Hi, I'm reposting my issue since I made a github repo now which might help: https://github.com/VoodooLikesCoding/voodoos-modern-armor-1.21.1
I'm making a mod that adds armor that can take attachments like a gun in Vic's Point Blank, but my class for the AttachmentArmorItem gives the following error:
'getName()' in 'net.minecraft.item.Item' clashes with 'getName()' in 'com.vicmatskiv.pointblank.Nameable'; attempting to use incompatible return type
My Class currently looks like this:
package net.iamvoodoo.voodoosmodernarmor.item.custom;
import com.vicmatskiv.pointblank.Nameable;
import com.vicmatskiv.pointblank.attachment.Attachment;
import com.vicmatskiv.pointblank.attachment.AttachmentHost;
import com.vicmatskiv.pointblank.feature.Feature;
import com.vicmatskiv.pointblank.item.ItemExtra;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.registry.entry.RegistryEntry;
import java.util.Collection;
import java.util.List;
public class AttachmentArmorItem extends ArmorItem implements AttachmentHost, Nameable, ItemExtra {
private String name;
public AttachmentArmorItem(RegistryEntry<ArmorMaterial> material, Type type, Settings settings) {
super(material, type, settings);
}
@Override
public String getName() {
return this.name;
}
@Override
public Collection<Attachment> getCompatibleAttachments() {
return List.of();
}
@Override
public Collection<Feature> getFeatures() {
return List.of();
}
}
I tried to figure out how the gunItem class fixes this issue, but I haven't had much luck yet. Does anyone know a solution?
