Jump to content

Recommended Posts

Posted

Hi,

 

I posted this in the bottom of another topic, but since there were no responses, so I imagine it was already stale.

 

I having problems adding a custom entity (that I had previously working under 12.2)

I have an entity (extended from EntityChicken + some code borrowed from vanilla horse class) with a custom renderer and model.

 

It looks like the entity gets registered as it I can do a "/summon chicken_mod:protochicken" in-game, but what I get is a normal vanilla chicken (as identified when targeted in debug screen), albeit with some of the behaviors I'm trying to add (for instance riding like a saddled horse)

 

My code in its entirety can be found here: https://github.com/pchonacky/randombits.git, but I will include the important bits below for brevity.

 

Any help is appreciated.

/Philip

 

Rendering Registration:

    private void setup(final FMLCommonSetupEvent event)
    {
    	DistExecutor.runWhenOn(
                Dist.CLIENT, () -> () -> 
                RenderingRegistry.registerEntityRenderingHandler(EntityProtoChicken.class,RenderProtoChicken :: new)
                );
    }

 

Entity Registration (edited sightly for brevity):

    @Mod.EventBusSubscriber(modid=ChickenMod.MODID, bus=Mod.EventBusSubscriber.Bus.MOD)
    @ObjectHolder(ChickenMod.MODID)
    public static class RegistryEvents {

  
    	//Register Entities
    	@SubscribeEvent
    	public static void onEntitiesRegistry(final RegistryEvent.Register<EntityType<?>> entityRegistryEvent) {	
    		entityRegistryEvent.getRegistry().registerAll(		    	
    		    EntityType.Builder.create(EntityProtoChicken.class, EntityProtoChicken::new)
    		    	.tracker(60, 24, true).disableSerialization().build("protochicken").setRegistryName(MODID, "protochicken")
    			);	
    	}
    
    }  //RegistryEvents class

 

Custom Entity:

package net.chonacky.minecraft.mod.chicken_mod;

import javax.annotation.Nullable;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

public class EntityProtoChicken extends EntityChicken 
{

	public EntityProtoChicken(World worldIn) {
		super(worldIn);

		this.setSize(2.5F, 5.0F);
		this.setBoundingBox(this.getBoundingBox().offset(0, 0, 25));
		this.stepHeight = 2.1F;
//		this.jumpPower = 0.0F;
//		this.isJumping = false;
	}
	
	@Override
	public float getEyeHeight() {
	
		return super.getEyeHeight()-0.5F;
	}

	
	@Override
	public void livingTick()
	    {
	        super.livingTick();
	        if (this.world.isRemote && this.dataManager.isDirty())  {
	            this.dataManager.setClean();
	        }
	    }
	
	@Override 
    public boolean processInteract(EntityPlayer player, EnumHand hand)
	    {
		 this.mountTo(player);
		 super.processInteract(player, hand);
		 return true;
	    }
	
	 
	protected void mountTo(EntityPlayer player)
	    {
	        player.rotationYaw = this.rotationYaw;
	        player.rotationPitch = this.rotationPitch;
	        if (!this.world.isRemote)  player.startRiding(this);
	    }

	@Override
	 public void updatePassenger(Entity passenger)
	    {
	        super.updatePassenger(passenger);
	        float f = MathHelper.sin(this.renderYawOffset * 0.017453292F);
	        float f1 = MathHelper.cos(this.renderYawOffset * 0.017453292F);
//unused	float f2 = 0.1F;
//unused	float f3 = 0.0F;
	        passenger.setPosition(
	        		this.posX + (double)(0.1F * f),
	        		this.posY + (double)(this.height * 0.35F) + passenger.getYOffset() + 0.0D,
	        		this.posZ - (double)(0.1F * f1)													);
	        if (passenger instanceof EntityLivingBase)	((EntityLivingBase)passenger).renderYawOffset = this.renderYawOffset;
	    }

	 

	@Override
	public void travel(float strafe, float vertical, float forward)
	    {	
	        if (this.isBeingRidden() && this.canBeSteered() )	{
	        										//&& this.isHorseSaddled()
	            EntityLivingBase controllingPassenger = (EntityLivingBase)this.getControllingPassenger();
	            this.rotationYaw = controllingPassenger.rotationYaw;
	            this.prevRotationYaw = this.rotationYaw;
	            this.rotationPitch = controllingPassenger.rotationPitch * 0.5F;
	            this.setRotation(this.rotationYaw, this.rotationPitch);
	            this.renderYawOffset = this.rotationYaw;
	            this.rotationYawHead = this.renderYawOffset;
	            strafe = controllingPassenger.moveStrafing * 0.5F;
	            forward = controllingPassenger.moveForward;
	            if (forward <= 0.0F) forward *= 0.25F; 
	            this.jumpMovementFactor = this.getAIMoveSpeed() * 0.1F;
	            if (this.canPassengerSteer()) {
	                this.setAIMoveSpeed((float)this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getValue());
	                super.travel(strafe, vertical, forward);
	            }
	            else if (controllingPassenger instanceof EntityPlayer)  {
	                this.motionX = 0.0D;
	                this.motionY = 0.0D;
	                this.motionZ = 0.0D;
	            }
	            if (this.onGround)	 this.isJumping = false;
	        }
	        else {
	            this.jumpMovementFactor = 0.02F;
	            super.travel(strafe, vertical, forward);
	        }   
	    }

	@Override    
	public boolean canBeSteered()  
		{
	        return this.getControllingPassenger() instanceof EntityLivingBase;
	    }    
	    
	@Override @Nullable
    public Entity getControllingPassenger()
	    {
	        return this.getPassengers().isEmpty() ? null : (Entity)this.getPassengers().get(0);
	    }

}

 

 

Custom Model:

package net.chonacky.minecraft.mod.chicken_mod;

import net.minecraft.client.renderer.entity.model.ModelBase;
import net.minecraft.client.renderer.entity.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class ModelProtoChicken extends ModelBase
{
    
	public ModelRenderer head;
    public ModelRenderer body;
    public ModelRenderer rightLeg;
    public ModelRenderer leftLeg;
    public ModelRenderer rightShin;
    public ModelRenderer leftShin;
    public ModelRenderer leftFoot;
    public ModelRenderer rightFoot;


    public ModelProtoChicken()
    {
    	
       this.textureWidth = 132;
       this.textureHeight = 64;
       
    	
    	this.head = new ModelRenderer(this, 0, 16);
        this.head.addBox(-8.0F, -8.0F, -8.0F, 16, 8, 16, 5.0F); 
        this.head.setRotationPoint(0.0F, -42.0F, 0.0F);

        this.body = new ModelRenderer(this, 0, 0);
        this.body.addBox(-16.0F, -16.0F, -16.0F, 32, 32, 32, 5.0F); 
        this.body.setRotationPoint(0.0F, -23.0F, 0.0F);

       this.leftLeg = new ModelRenderer(this, 128,32);
       this.leftLeg.addBox(0.0F, 0.5F, 0.0F, 1, 13, 1 , 3.0F); 
       this.leftLeg.setRotationPoint(20.0F, 0.0F, -24.0F);
       this.body.addChild(this.leftLeg);

       this.leftShin = new ModelRenderer(this, 128,32);
       this.leftShin.addBox(0.0F, -0.5F, 0.0F, 1, 13, 1, 3.0F); 
       this.leftShin.setRotationPoint(0.0F, 12.0F, 0.0F);
       this.leftLeg.addChild(this.leftShin);
       
       this.leftFoot = new ModelRenderer(this,128,32);
       this.leftFoot.addBox(0.0F, 1.0F, -0.0F, 1, 4, 1, 3.0F);
       this.leftFoot.setRotationPoint(0.0F, 14.0F, 0.0F);
       this.leftShin.addChild(this.leftFoot);
       

       this.rightLeg = new ModelRenderer(this, 128,32);
       this.rightLeg.addBox(0.0F, 0.5F, 0.0F, 1, 13, 1 , 3.0F); 
       this.rightLeg.setRotationPoint(-20.0F, 0.0F, -24.0F);
       this.body.addChild(this.rightLeg);

       this.rightShin = new ModelRenderer(this, 128,32);
       this.rightShin.addBox(0.0F, -0.5F, 0.0F, 1, 13, 1, 3.0F); 
       this.rightShin.setRotationPoint(0.0F, 12.0F, 0.0F);
       this.rightLeg.addChild(this.rightShin);
      
       this.rightFoot = new ModelRenderer(this,128,32);
       this.rightFoot.addBox(0.0F, 1.0F, -0.0F, 1, 4, 1, 3.0F);
       this.rightFoot.setRotationPoint(0.0F, 14.0F, 0.0F);
       this.rightShin.addChild(this.rightFoot);
      
//        

    }

    /**
     * Sets the models various rotation angles then renders the model.
     */
    @Override
    public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
    {
        this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);
        this.head.render(scale);
        this.body.render(scale);   
    }

    /**
     * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
     * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
     * "far" arms and legs can swing at most.
     */
    @Override
    public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
    {
        this.head.rotateAngleX = headPitch * 0.017453292F;
        this.head.rotateAngleY = netHeadYaw * 0.017453292F;
        this.body.rotateAngleX = ((float)Math.PI / 2F);
        this.leftLeg.rotateAngleX =  (MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount) -((float)Math.PI/4);
        this.leftShin.rotateAngleX = -(MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount) -((float)Math.PI/2);
        this.leftFoot.rotateAngleX = -((float)Math.PI/4) ;
        this.rightLeg.rotateAngleX =  -(MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount) -((float)Math.PI/4);
        this.rightShin.rotateAngleX = +(MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount) -((float)Math.PI/2);
        this.rightFoot.rotateAngleX = -((float)Math.PI/4) ;
//        this.rightWing.rotateAngleZ = ageInTicks;
//        this.leftWing.rotateAngleZ = -ageInTicks;
    }
}

 

Custom Renderer:

package net.chonacky.minecraft.mod.chicken_mod;

import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;


@OnlyIn(Dist.CLIENT)
public class RenderProtoChicken extends RenderLiving<EntityProtoChicken>
{

	 private static final ResourceLocation PROTOCHICKEN_TEXTURES = new ResourceLocation(ChickenMod.MODID+":textures/entity/byhut.png");
    																	//"chicken:textures/entity/checker.png"
	 
	 // public RenderLiving(RenderManager rendermanagerIn, ModelBase modelbaseIn, float shadowsizeIn)
    public RenderProtoChicken(RenderManager manager)
    {
    	super(manager, new ModelProtoChicken(), 1.75F);
    }
 
    @Override
	protected ResourceLocation getEntityTexture(EntityProtoChicken entity) {
		
		return PROTOCHICKEN_TEXTURES;
	}

    /**
     * Defines what float the third param in setRotationAngles of ModelBase is
     */
    @Override
    protected float handleRotationFloat(EntityProtoChicken livingBase, float partialTicks)
    {
        float f = livingBase.oFlap + (livingBase.wingRotation - livingBase.oFlap) * partialTicks;
        float f1 = livingBase.oFlapSpeed + (livingBase.destPos - livingBase.oFlapSpeed) * partialTicks;
        return (MathHelper.sin(f) + 1.0F) * f1;
    }

    @Override
    public void doRender(EntityProtoChicken entity, double x, double y, double z, float entityYaw, float partialTicks)
    {
        if (entity.isInWater()) {
          	super.doRender(entity, x, (y-1.0D), z, entityYaw, partialTicks);
        }
        else {
          	super.doRender(entity, x, y, z, entityYaw, partialTicks);
        }
        if (!this.renderOutlines)
        {
            this.renderLeash(entity, x, y, z, entityYaw, partialTicks);
        }
    }
    
	
}

 

Posted

OK, So to answer my own question, the Entity Renderer gets registered in FMLClientSetupEvent, which runs specifically on the client and right after FMLCommonSetupEvent (PreInit).

 

I've been up and down my code and can't find anything wrong, but I'm still spawning vanilla chickens (with slightly different behavior)

 

[repository updated]

 

Latest log below:

[08Jun2019 21:03:29.937] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190213.203750, --fml.mcVersion, 1.13.2, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 25.0.215, --version, MOD_DEV, --assetIndex, 1.13.1, --assetsDir, /home/philip/.gradle/caches/forge_gradle/assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[08Jun2019 21:03:29.949] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher starting: java version 1.8.0_212
[08Jun2019 21:03:30.408] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[08Jun2019 21:03:31.581] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, /home/philip/.gradle/caches/forge_gradle/assets, --assetIndex, 1.13.1, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[08Jun2019 21:03:38.402] [Client thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[08Jun2019 21:03:51.381] [Client thread/WARN] [net.minecraft.client.GameSettings/]: Skipping bad option: lastServer:
[08Jun2019 21:03:51.458] [Client thread/INFO] [net.minecraft.client.Minecraft/]: LWJGL Version: 3.1.6 build 14
[08Jun2019 21:03:52.946] [Client thread/INFO] [net.minecraftforge.fml.ModLoader/CORE]: Loading Network data for FML net version: FML2
[08Jun2019 21:03:53.147] [modloading-worker-0/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 25.0.215, for MC 1.13.2 with MCP 20190213.203750
[08Jun2019 21:03:53.148] [modloading-worker-0/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v25.0.215 Initialized
[08Jun2019 21:03:53.673] [Thread-1/FATAL] [net.minecraftforge.common.ForgeConfig/CORE]: Forge config just got changed on the file system!
[08Jun2019 21:03:53.674] [Thread-1/FATAL] [net.minecraftforge.common.ForgeConfig/CORE]: Forge config just got changed on the file system!
[08Jun2019 21:03:53.954] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[08Jun2019 21:03:54.228] [Client thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: main, forge-1.13.2-25.0.215_mapped_snapshot_20180921-1.13-recomp.jar, Default
[08Jun2019 21:03:55.056] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: BETA_OUTDATED Current: 25.0.215 Target: 25.0.219
[08Jun2019 21:03:55.063] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [chicken_mod] Starting version check at http://myurl.me/
[08Jun2019 21:03:55.893] [Forge Version Check/WARN] [net.minecraftforge.fml.VersionChecker/]: Failed to process update information
java.io.IOException: Server returned HTTP response code: 400 for URL: http://myurl.me/
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_212]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_212]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_212]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_212]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944) ~[?:1.8.0_212]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939) ~[?:1.8.0_212]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_212]
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938) ~[?:1.8.0_212]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508) ~[?:1.8.0_212]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[?:1.8.0_212]
	at net.minecraftforge.fml.VersionChecker$1.openUrlStream(VersionChecker.java:173) ~[?:?]
	at net.minecraftforge.fml.VersionChecker$1.process(VersionChecker.java:190) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_212]
	at net.minecraftforge.fml.VersionChecker$1.run(VersionChecker.java:141) [?:?]
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://myurl.me/
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) ~[?:1.8.0_212]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[?:1.8.0_212]
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:1.8.0_212]
	at net.minecraftforge.fml.VersionChecker$1.openUrlStream(VersionChecker.java:157) ~[?:?]
	... 3 more
[08Jun2019 21:03:56.664] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager/]: Starting up SoundSystem version 201809301515...
[08Jun2019 21:03:56.920] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager/]: Initializing No Sound
[08Jun2019 21:03:56.921] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager/]: (Silent Mode)
[08Jun2019 21:03:57.568] [Thread-5/INFO] [net.minecraft.client.audio.SoundManager/]: OpenAL initialized.
[08Jun2019 21:03:57.571] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager/SOUNDS]: Preloading sound minecraft:sounds/ambient/underwater/underwater_ambience.ogg
[08Jun2019 21:03:57.575] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager/SOUNDS]: Sound engine started
[08Jun2019 21:04:05.524] [Client thread/INFO] [net.minecraft.client.renderer.texture.TextureMap/]: Max texture size: 4096
[08Jun2019 21:04:08.509] [Client thread/INFO] [net.minecraft.client.renderer.texture.TextureMap/]: Created: 512x512 textures-atlas
[08Jun2019 21:04:14.568] [Client thread/WARN] [net.minecraft.client.GameSettings/]: Skipping bad option: lastServer:
[08Jun2019 21:04:14.703] [Client thread/INFO] [com.mojang.text2speech.NarratorLinux/]: Narrator library successfully loaded
[08Jun2019 21:04:15.132] [Realms Notification Availability checker #1/INFO] [com.mojang.realmsclient.client.RealmsClient/]: Could not authorize you against Realms server: Invalid session id
[08Jun2019 21:04:25.610] [Thread-5/ERROR] [net.minecraft.client.audio.SoundManager/]: Error in class 'Source'
[08Jun2019 21:04:25.614] [Thread-5/ERROR] [net.minecraft.client.audio.SoundManager/]: Channel null in method 'stop'
[08Jun2019 21:04:25.614] [Thread-5/ERROR] [net.minecraft.client.audio.SoundManager/]: Error in class 'Source'
[08Jun2019 21:04:25.614] [Thread-5/ERROR] [net.minecraft.client.audio.SoundManager/]: Channel null in method 'stop'
[08Jun2019 21:04:27.659] [Client thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[08Jun2019 21:04:27.660] [Client thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[08Jun2019 21:04:27.661] [Client thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[08Jun2019 21:04:27.662] [Client thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[08Jun2019 21:04:27.663] [Client thread/WARN] [net.minecraft.command.Commands/]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[08Jun2019 21:04:27.853] [Client thread/INFO] [net.minecraft.item.crafting.RecipeManager/]: Loaded 0 recipes
[08Jun2019 21:04:27.869] [Client thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 0 advancements
[08Jun2019 21:04:27.995] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Starting integrated minecraft server version 1.13.2
[08Jun2019 21:04:27.997] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Generating keypair
[08Jun2019 21:04:28.321] [Thread-1/FATAL] [net.minecraftforge.common.ForgeConfig/CORE]: Forge config just got changed on the file system!
[08Jun2019 21:04:28.365] [Server thread/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]: Injecting existing registry data into this SERVER instance
[08Jun2019 21:04:28.534] [Server thread/INFO] [net.minecraftforge.registries.ForgeRegistry/REGISTRIES]: Registry Block: Found a missing id from the world minecraft:test_block
[08Jun2019 21:04:29.184] [Server thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: main, Default, forge-1.13.2-25.0.215_mapped_snapshot_20180921-1.13-recomp.jar
[08Jun2019 21:04:30.171] [Server thread/INFO] [net.minecraft.item.crafting.RecipeManager/]: Loaded 524 recipes
[08Jun2019 21:04:31.188] [Server thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 571 advancements
[08Jun2019 21:04:31.722] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing start region for dimension minecraft:overworld
[08Jun2019 21:04:32.113] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 4%
[08Jun2019 21:04:32.319] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 8%
[08Jun2019 21:04:32.404] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 12%
[08Jun2019 21:04:32.496] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 16%
[08Jun2019 21:04:32.579] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 20%
[08Jun2019 21:04:32.668] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 24%
[08Jun2019 21:04:32.760] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 28%
[08Jun2019 21:04:32.807] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 32%
[08Jun2019 21:04:32.842] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 36%
[08Jun2019 21:04:32.880] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 40%
[08Jun2019 21:04:33.018] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 44%
[08Jun2019 21:04:33.161] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 48%
[08Jun2019 21:04:33.319] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 52%
[08Jun2019 21:04:33.425] [Server thread/WARN] [net.minecraft.world.WorldServer/]: Keeping entity minecraft:chicken that already exists with UUID a5be0894-2fa4-4b52-952c-6c3fb640cb54
[08Jun2019 21:04:33.465] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 56%
[08Jun2019 21:04:33.522] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 60%
[08Jun2019 21:04:33.676] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 64%
[08Jun2019 21:04:33.757] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 68%
[08Jun2019 21:04:33.833] [Server thread/WARN] [net.minecraft.world.WorldServer/]: Keeping entity minecraft:pig that already exists with UUID c0b45209-cd3d-426d-9310-6b4806371ae0
[08Jun2019 21:04:33.874] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 72%
[08Jun2019 21:04:33.929] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 76%
[08Jun2019 21:04:34.029] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 80%
[08Jun2019 21:04:34.110] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 84%
[08Jun2019 21:04:36.094] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 88%
[08Jun2019 21:04:36.137] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 92%
[08Jun2019 21:04:36.185] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 96%
[08Jun2019 21:04:36.317] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing spawn area: 100%
[08Jun2019 21:04:36.317] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Time elapsed: 4594 ms
[08Jun2019 21:04:37.251] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Changing view distance to 12, from 10
[08Jun2019 21:04:39.884] [Netty Local Client IO #0/INFO] [net.minecraftforge.fml.network.NetworkHooks/]: Connected to a modded server.
[08Jun2019 21:04:40.411] [Server thread/INFO] [net.minecraft.server.management.PlayerList/]: Dev[local:E:cf465c7f] logged in with entity id 312 at (-286.39401927871864, 79.0, -510.7622744925549)
[08Jun2019 21:04:40.457] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dev joined the game
[08Jun2019 21:04:43.712] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 5469ms or 109 ticks behind
[08Jun2019 21:04:45.605] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Saving and pausing game...
[08Jun2019 21:04:45.623] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'New World'/minecraft:overworld
[08Jun2019 21:04:48.289] [Client thread/INFO] [net.minecraft.advancements.AdvancementList/]: Loaded 0 advancements
[08Jun2019 21:04:49.397] [pool-5-thread-1/WARN] [com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService/]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@2fabf2d[id=380df991-f603-344c-a090-369bad2a924a,name=Dev,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[authlib-1.5.25.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) ~[authlib-1.5.25.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) ~[authlib-1.5.25.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) ~[authlib-1.5.25.jar:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:4154) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) ~[guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) ~[guava-21.0.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) ~[authlib-1.5.25.jar:?]
	at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:1909) ~[?:?]
	at net.minecraft.client.resources.SkinManager.lambda$loadProfileTextures$1(SkinManager.java:111) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_212]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
[08Jun2019 21:05:10.747] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 12054ms or 241 ticks behind
[08Jun2019 21:05:27.820] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 2027ms or 40 ticks behind
[08Jun2019 21:05:29.904] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: [Dev: Summoned new Chicken]
[08Jun2019 21:05:29.932] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat/]: [CHAT] Summoned new Chicken
[08Jun2019 21:05:35.419] [Server thread/INFO] [net.minecraft.server.integrated.IntegratedServer/]: Saving and pausing game...
[08Jun2019 21:05:35.437] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'New World'/minecraft:overworld
[08Jun2019 21:05:36.250] [Client thread/INFO] [net.minecraft.client.Minecraft/]: Stopping!
[08Jun2019 21:05:37.223] [Client thread/INFO] [net.minecraft.client.audio.SoundManager/]: SoundSystem shutting down...
[08Jun2019 21:05:37.234] [Client thread/INFO] [net.minecraft.client.audio.SoundManager/]: SoundSystem Author: Paul Lamb, www.paulscode.com

Log is below:

 

Posted
5 hours ago, diesieben07 said:

EntityChicken calls the Entity constructor with EntityType.CHICKEN. You must call the Entity constructor with your custom entity type.

This would seem to be a problem because the  EntityChicken constructor doesn't include the right overload (EntityType, World)

Posted

That was the solution that worked for me. [solved]

 

1. Created an EnttyType<> object holder in my registry class

@ObjectHolder(ChickenMod.MODID)
    public static class RegistryEvents {

    	public static final EntityType<EntityProtoChicken> protochicken=null;
...

 

2. Created an Override of getType() which returns object holder in the Entity Class

@Override
	public EntityType<?> getType()
	{
		return ChickenMod.RegistryEvents.protochicken;
	}

 

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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