Jump to content

andr11ew

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

andr11ew's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm new at modding and while i was creating custom snowball i've got an error in my registry class: Cannot resolve constructor "FriedSnowball" So here is my Registration class: package net.andr11ew.friedsnow.entity; import net.andr11ew.friedsnow.FriedSnow; import net.andr11ew.friedsnow.entity.custom.FriedSnowball; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MobCategory; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ModEntityTypes { public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, FriedSnow.MOD_ID); public static final RegistryObject<EntityType<FriedSnowball>> FRIED_SNOWBALL_ENTITY = ENTITY_TYPES.register("fried_snowball_entity", () -> EntityType.Builder.of(FriedSnowball::new, MobCategory.MISC) .sized(0.25F, 0.25F).clientTrackingRange(4).updateInterval(10)); public static void register(IEventBus eventBus) { ENTITY_TYPES.register(eventBus); } } I'm getting early mentioned error here: () -> EntityType.Builder.of(FriedSnowball::new Also here's entity class: package net.andr11ew.friedsnow.entity.custom; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.monster.Blaze; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.Snowball; import net.minecraft.world.item.enchantment.ProtectionEnchantment; import net.minecraft.world.level.Level; import net.minecraft.world.phys.EntityHitResult; public class FriedSnowball extends Snowball { public FriedSnowball(Level p_37399_, LivingEntity p_37400_) { super(p_37399_, p_37400_); } public FriedSnowball(Level p_37394_, double p_37395_, double p_37396_, double p_37397_) { super(p_37394_, p_37395_, p_37396_, p_37397_); } public FriedSnowball(EntityType<? extends FriedSnowball> p_37391_, Level p_37392_) { super(p_37391_, p_37392_); } @Override protected void onHitEntity(EntityHitResult pResult) { super.onHitEntity(pResult); Entity entity = pResult.getEntity(); entity.setSecondsOnFire(1); } } I've tried so many things, but didn't fixed it. Will really appreciate your help! By the way this is forge 1.18.2
×
×
  • Create New...

Important Information

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