Jump to content

Ayamun

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ayamun's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I want to switch to parchment but this error keeps showing up when building.
  2. public class Haki { public static final DeferredRegister<Attribute> REGISTRY = DeferredRegister.create(ForgeRegistries.Keys.ATTRIBUTES, Hakimod.MODID); public static final RegistryObject<Attribute> ARMAMENT = REGISTRY.register("armament_haki", ()-> new RangedAttribute("attribute.hakimod.armament", 0, 0, 200)); public static final RegistryObject<Attribute> OBSERVATION = REGISTRY.register("observation_haki", () -> new RangedAttribute("attribute.hakimod.observation", 0, 0, 200)); public static final RegistryObject<Attribute> CONQUEROR = REGISTRY.register("conqueror_haki", ()-> new RangedAttribute("attribute.hakimod.conqueror", 0, 0, 200)); @SubscribeEvent public static void regAttr(EntityAttributeCreationEvent e){ e.put(EntityType.PLAYER, AttributeSupplier.builder().add(ARMAMENT.get(), 0).build()); e.put(EntityType.PLAYER, AttributeSupplier.builder().add(OBSERVATION.get(), 0).build()); e.put(EntityType.PLAYER, AttributeSupplier.builder().add(CONQUEROR.get(), 0).build()); } } This is my class with the Attributes. And this is how I add them into the bus. modEventBus.addListener(Haki::regAttr); modEventBus.register(Haki.REGISTRY); I get this error: net.minecraftforge.fml.ModLoadingException: hakimod (hakimod) encountered an error during the common_setup event phase §7java.lang.NullPointerException: Registry Object not present: hakimod:armament_haki
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.