Posted October 27, 20204 yr package com.coldbreath.frost.entities; import com.coldbreath.frost.init.ModEntityTypes; import net.minecraft.entity.AgeableEntity; import net.minecraft.entity.EntityType; import net.minecraft.entity.ILivingEntityData; import net.minecraft.entity.SpawnReason; import net.minecraft.entity.ai.goal.EatGrassGoal; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import javax.annotation.Nullable; public class RabbitEntity extends AnimalEntity { private EatGrassGoal eatGrassGoal; private int rabbitTimer; public RabbitEntity(EntityType<? extends AnimalEntity> type, World worldIn) { super(type, worldIn); } @Nullable @Override public AgeableEntity createChild(AgeableEntity ageable) { RabbitEntity entity = new RabbitEntity(ModEntityTypes.RABBIT_ENTITY.get(), this.world); entity.onInitialSpawn(this.world, this.world.getDifficultyForLocation(new BlockPos(entity)), SpawnReason.BREEDING, (ILivingEntityData)null, (CompoundNBT)null); entity.setGlowing(true); return entity; } } code. All entities must have a constructor that takes one net.minecraft.world.World parameter. errorcode There is an error in line 16 RabbitEntity. Edited October 27, 20204 yr by 방세준
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.