Jump to content

How do I fix this error?


Recommended Posts

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); }

    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);
        return  entity;




All entities must have a constructor that takes one net.minecraft.world.World parameter.




There is an error in line 16 RabbitEntity.

Edited by 방세준
Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

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