Jump to content

PremiumRush

Members
  • Posts

    1
  • Joined

  • Last visited

PremiumRush's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey! I know it has been almost a year but I have a question about this, maybe you can give me a hint... I also added a DamageType almost exactly like you did and also added the .json file in the data folder for my mod. However, I find no way to interface with/use my added DamageType whatsoever... From what I understand, private static ResourceKey<DamageType> register(String name) { return ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Mod.MODID, name)); } adds the desired DamageType to the DAMAGE_TYPE registry. Any class that uses RegistryObjects of this registry should now also "see" the new custom DamageType. In my case, that would be the LivingEntity class. It references the Entity and finally the Level class, which uses the registry via: this.registryAccess = pRegistryAccess; this.damageSources = new DamageSources(pRegistryAccess); But sadly, my custom damage type is nowhere to be found if I try to use it as a damageSource().custom_damagetype(). Again, sorry to bother but I don't see how to use my added DamageType in the mod.
×
×
  • Create New...

Important Information

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