Jump to content

[SOLVED][1.10] Help rendering a custom projectile (custom chicken egg)


merick

Recommended Posts

I'm trying to make a modded chicken that's almost identical to vanilla, except it lays golden eggs. The chicken works fine, but I can't seem to make the egg render properly while flying after the player throws it.

 

Whenever I try to use my own renderer, the projectile is invisible, but the particles when the egg hits something seem to be correct (the cracks are yellow instead of the vanilla white).

Since my EntityGoldEgg class extends the regular EntityEgg class, if I don't register my own rederer, the projectile looks exactly like the vanilla one, but still keeps the correct particles (and spawns the correct chicken).

 

I've tried extending EntityThrowable instead of EntityEgg, which only makes it invisible even when not using my renderer. I've seen some old tutorials that render their projectiles using the snowball renderer, but I couldn't make it work in this version. Also, it seems there isn't a specific renderer for the egg projectile in vanilla (couldn't find a RenderEgg class), so I might be making things more complicated than it needs to be.

 

Below are the relevant classes. Give me a heads up if I didn't include some important code and I'll share it.

 

Renderer:

package merick.eggcentric.renderer;

import merick.eggcentric.Eggcentric;
import merick.eggcentric.entity.projectile.EntityGoldEgg;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;

public class RenderGoldEgg extends Render<EntityGoldEgg>{
ResourceLocation GOLD_EGG_TEXTURE = new ResourceLocation(Eggcentric.MODID, "textures/items/gold_egg.png");

public RenderGoldEgg(RenderManager renderManager) {
	super(renderManager);
}

@Override
protected ResourceLocation getEntityTexture(EntityGoldEgg entity) {
	return GOLD_EGG_TEXTURE;
}

}

 

Entity:

package merick.eggcentric.entity.projectile;

import merick.eggcentric.Eggcentric;
import merick.eggcentric.entity.passive.EntityGoldChicken;
import merick.eggcentric.init.EggcentricItems;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityEgg;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.item.Item;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.datafix.DataFixer;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;

public class EntityGoldEgg extends EntityEgg
{
    public EntityGoldEgg(World worldIn)
    {
        super(worldIn);
    }

    public EntityGoldEgg(World worldIn, EntityLivingBase throwerIn)
    {
        super(worldIn, throwerIn);
    }

    public EntityGoldEgg(World worldIn, double x, double y, double z)
    {
        super(worldIn, x, y, z);
    }

    public static void func_189664_a(DataFixer p_189664_0_)
    {
        EntityThrowable.func_189661_a(p_189664_0_, "ThrownGoldEgg");
    }

    /**
     * Called when this EntityThrowable hits a block or entity.
     */
    protected void onImpact(RayTraceResult result)
    {
        if (result.entityHit != null)
        {
            result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0.0F);
        }

        if (!this.worldObj.isRemote && this.rand.nextInt( == 0)
        {
            int i = 1;

            if (this.rand.nextInt(32) == 0)
            {
                i = 4;
            }

            for (int j = 0; j < i; ++j)
            {
                EntityGoldChicken entitychicken = new EntityGoldChicken(this.worldObj);
                entitychicken.setGrowingAge(-24000);
                entitychicken.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
                this.worldObj.spawnEntityInWorld(entitychicken);
            }
        }

        double d0 = 0.08D;

        for (int k = 0; k < 8; ++k)
        {
            this.worldObj.spawnParticle(EnumParticleTypes.ITEM_CRACK, this.posX, this.posY, this.posZ, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, ((double)this.rand.nextFloat() - 0.5D) * 0.08D, new int[] {Item.getIdFromItem(EggcentricItems.GOLD_EGG)});
        }

        if (!this.worldObj.isRemote)
        {
            this.setDead();
        }
    }
}

 

Registrations:

package merick.eggcentric.init;

import merick.eggcentric.Eggcentric;
import merick.eggcentric.entity.passive.EntityDiamondChicken;
import merick.eggcentric.entity.passive.EntityGoldChicken;
import merick.eggcentric.entity.projectile.EntityGoldEgg;
import merick.eggcentric.renderer.RenderDiamondChicken;
import merick.eggcentric.renderer.RenderGoldChicken;
import merick.eggcentric.renderer.RenderGoldEgg;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EnumCreatureType;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class EggcentricEntities {

public static int entityId = 300; //Base entity ID for Eggcentric

public static void register(){
	registerRenders();
	registerEntities();
}

private static void registerRenders(){
	RenderingRegistry.registerEntityRenderingHandler(EntityGoldChicken.class, new RenderGoldChicken(Minecraft.getMinecraft().getRenderManager(), new ModelChicken(), 0.5F));
	RenderingRegistry.registerEntityRenderingHandler(EntityDiamondChicken.class, new RenderDiamondChicken(Minecraft.getMinecraft().getRenderManager(), new ModelChicken(), 0.5F));

	RenderingRegistry.registerEntityRenderingHandler(EntityGoldEgg.class, new RenderGoldEgg(Minecraft.getMinecraft().getRenderManager()));

}
private static void registerEntities(){
	EntityRegistry.registerModEntity(EntityGoldChicken.class, "gold_chicken", ++entityId, Eggcentric.instance, 64, 1, true, 0xFFFF08, 0xDB0000);
	EntityRegistry.registerModEntity(EntityDiamondChicken.class, "diamond_chicken", ++entityId, Eggcentric.instance, 64, 1, true, 0x74CBD2, 0xDB0000);

	EntityRegistry.registerModEntity(EntityGoldEgg.class, "gold_egg", ++entityId, Eggcentric.instance, 64, 1, true);


	//Natural spawns
	EntityRegistry.addSpawn(EntityGoldChicken.class, 10, 1, 6, EnumCreatureType.CREATURE, BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS));
	EntityRegistry.addSpawn(EntityDiamondChicken.class, 10, 1, 6, EnumCreatureType.CREATURE, BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS));

}
}

 

I feel like this might be a really easy thing to do, but I just started modding so I'm out of ideas to solve this problem. If there's an easier way to do it, I'm open to learning. Thanks in advance!

 

PS: registerEntityRenderingHandler seems to be deprecated (Eclipse crosses it over), but every tutorial/guide uses it. What's the proper way to do that in 1.10?

Link to comment
Share on other sites

I'm trying to make a modded chicken that's almost identical to vanilla, except it lays golden eggs. The chicken works fine, but I can't seem to make the egg render properly while flying after the player throws it.

 

Whenever I try to use my own renderer, the projectile is invisible, but the particles when the egg hits something seem to be correct (the cracks are yellow instead of the vanilla white).

Since my EntityGoldEgg class extends the regular EntityEgg class, if I don't register my own rederer, the projectile looks exactly like the vanilla one, but still keeps the correct particles (and spawns the correct chicken).

 

I've tried extending EntityThrowable instead of EntityEgg, which only makes it invisible even when not using my renderer. I've seen some old tutorials that render their projectiles using the snowball renderer, but I couldn't make it work in this version. Also, it seems there isn't a specific renderer for the egg projectile in vanilla (couldn't find a RenderEgg class), so I might be making things more complicated than it needs to be.

 

I feel like this might be a really easy thing to do, but I just started modding so I'm out of ideas to solve this problem. If there's an easier way to do it, I'm open to learning. Thanks in advance!

 

PS: registerEntityRenderingHandler seems to be deprecated (Eclipse crosses it over), but every tutorial/guide uses it. What's the proper way to do that in 1.10?

 

I don't think you need a custom renderer. All the vanilla projectiles use RenderSnowball, which accepts your item as one of the constructing parameters. It pulls the texture from your item to render, rather than you having to supply it yourself.

 

As for registering an entity registering handler, yes it has changed in 1.10. You no longer supply a raw Render instance. Instead, you need an instance of IRenderFactory. IRenderFactory has a method you must override (createRenderFor) to return your renderer (which should be RenderSnowball, as I said before).

Link to comment
Share on other sites

I don't think you need a custom renderer. All the vanilla projectiles use RenderSnowball, which accepts your item as one of the constructing parameters. It pulls the texture from your item to render, rather than you having to supply it yourself.

 

Hmm, that's what I thought, but I still can't get the snowball renderer to work. I changed the Rendering Registry line to

		RenderingRegistry.registerEntityRenderingHandler(EntityGoldEgg.class, new RenderSnowball<EntityGoldEgg>(Minecraft.getMinecraft().getRenderManager(), EggcentricItems.GOLD_EGG, Minecraft.getMinecraft().getRenderItem()));

 

Whenever I throw an egg, the game crashes. I'm not sure if I'm doing this right, I don't really know what the 3rd parameter (RenderItem itemRendererIn) is so I might be screwing that one up.

 

As for registering an entity registering handler, yes it has changed in 1.10. You no longer supply a raw Render instance. Instead, you need an instance of IRenderFactory. IRenderFactory has a method you must override (createRenderFor) to return your renderer (which should be RenderSnowball, as I said before).

 

Thanks for the tip, I'll check that out after I manage to get this egg flying.

Link to comment
Share on other sites

Yes, where are my manners! I was in a hurry when I posted the last reply, forgot about the crash report.

 

Here it is:

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
Minecraft Version: 1.10.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_60, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 875010648 bytes (834 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13441 Compatibility Profile Context 0' Renderer: 'AMD Radeon HD 7970M'
[20:04:17] [Client thread/INFO] [FML]: MinecraftForge v12.18.1.2011 Initialized
[20:04:17] [Client thread/INFO] [FML]: Replaced 233 ore recipes
[20:04:17] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[20:04:17] [Client thread/INFO] [FML]: Searching C:\Users\Erico\Documents\Minecraft Modding\Eggcentric\forge-1.10.2-12.18.1.2011-mdk\run\mods for mods
[20:04:18] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[20:04:19] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, eggcentric] at CLIENT
[20:04:19] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, eggcentric] at SERVER
[20:04:19] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Eggcentric
[20:04:19] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[20:04:20] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations
[20:04:20] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[20:04:20] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[20:04:20] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[20:04:20] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[20:04:20] [Client thread/INFO] [FML]: Applying holder lookups
[20:04:20] [Client thread/INFO] [FML]: Holder lookups applied
[20:04:20] [Client thread/INFO] [FML]: Injecting itemstacks
[20:04:20] [Client thread/INFO] [FML]: Itemstack injection complete
[20:04:20] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: UP_TO_DATE Target: null
[20:04:22] [sound Library Loader/INFO]: Starting up SoundSystem...
[20:04:23] [Thread-8/INFO]: Initializing LWJGL OpenAL
[20:04:23] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[20:04:23] [Thread-8/INFO]: OpenAL initialized.
[20:04:23] [sound Library Loader/INFO]: Sound engine started
[20:04:27] [Client thread/INFO] [FML]: Max texture size: 16384
[20:04:27] [Client thread/INFO]: Created: 16x16 textures-atlas
[20:04:29] [Client thread/INFO] [FML]: Injecting itemstacks
[20:04:29] [Client thread/INFO] [FML]: Itemstack injection complete
[20:04:29] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[20:04:29] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Eggcentric
[20:04:31] [Client thread/INFO]: SoundSystem shutting down...
[20:04:31] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[20:04:31] [sound Library Loader/INFO]: Starting up SoundSystem...
[20:04:31] [Thread-10/INFO]: Initializing LWJGL OpenAL
[20:04:31] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[20:04:31] [Thread-10/INFO]: OpenAL initialized.
[20:04:32] [sound Library Loader/INFO]: Sound engine started
[20:04:35] [Client thread/INFO] [FML]: Max texture size: 16384
[20:04:35] [Client thread/INFO]: Created: 1024x512 textures-atlas
[20:04:36] [Client thread/WARN]: Skipping bad option: lastServer:
[20:04:38] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[20:04:46] [server thread/INFO]: Starting integrated minecraft server version 1.10.2
[20:04:46] [server thread/INFO]: Generating keypair
[20:04:46] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[20:04:46] [server thread/INFO] [FML]: Applying holder lookups
[20:04:46] [server thread/INFO] [FML]: Holder lookups applied
[20:04:46] [server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@141c436b)
[20:04:46] [server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@141c436b)
[20:04:46] [server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@141c436b)
[20:04:46] [server thread/INFO]: Preparing start region for level 0
[20:04:47] [server thread/INFO]: Preparing spawn area: 37%
[20:04:48] [server thread/INFO]: Changing view distance to 12, from 10
[20:04:54] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[20:04:54] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[20:04:54] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],[email protected]
[20:04:54] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[20:04:54] [server thread/INFO] [FML]: [server thread] Server side modded connection established
[20:04:54] [server thread/INFO]: Player751[local:E:3cb9b9c1] logged in with entity id 161 at (-120.47978472951178, 76.3713189188829, 233.09469848042284)
[20:04:54] [server thread/INFO]: Player751 joined the game
[20:04:55] [server thread/INFO]: Saving and pausing game...
[20:04:55] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[20:04:55] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[20:04:55] [server thread/INFO]: Saving chunks for level 'New World'/The End
[20:04:56] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@5f533d1b[id=fe412f9e-f508-30d0-b407-ff978cf8fc5c,name=Player751,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:65) ~[YggdrasilAuthenticationService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?]
at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3060) [Minecraft.class:?]
at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:131) [skinManager$3.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_60]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_60]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_60]
[20:04:59] [server thread/INFO]: Stopping server
[20:04:59] [server thread/INFO]: Saving players
[20:04:59] [server thread/INFO]: Saving worlds
[20:04:59] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[20:04:59] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[20:04:59] [server thread/INFO]: Saving chunks for level 'New World'/The End
[20:05:00] [server thread/INFO] [FML]: Unloading dimension 0
[20:05:00] [server thread/INFO] [FML]: Unloading dimension -1
[20:05:00] [server thread/INFO] [FML]: Unloading dimension 1
[20:05:00] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering entity in world
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:413) ~[RenderManager.class:?]
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:355) ~[RenderManager.class:?]
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:643) ~[RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1139) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.NullPointerException
at net.minecraft.item.ItemStack.getMetadata(ItemStack.java:286) ~[itemStack.class:?]
at net.minecraft.client.renderer.ItemModelMesher.getMetadata(ItemModelMesher.java:66) ~[itemModelMesher.class:?]
at net.minecraft.client.renderer.ItemModelMesher.getItemModel(ItemModelMesher.java:44) ~[itemModelMesher.class:?]
at net.minecraft.client.renderer.RenderItem.getItemModelWithOverrides(RenderItem.java:253) ~[RenderItem.class:?]
at net.minecraft.client.renderer.RenderItem.renderItem(RenderItem.java:246) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:46) ~[RenderSnowball.class:?]
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:371) ~[RenderManager.class:?]
... 20 more
[20:05:00] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ----
// On the bright side, I bought you a teddy bear!

Time: 28/08/16 20:05
Description: Rendering entity in world

java.lang.NullPointerException: Rendering entity in world
at net.minecraft.item.ItemStack.getMetadata(ItemStack.java:286)
at net.minecraft.client.renderer.ItemModelMesher.getMetadata(ItemModelMesher.java:66)
at net.minecraft.client.renderer.ItemModelMesher.getItemModel(ItemModelMesher.java:44)
at net.minecraft.client.renderer.RenderItem.getItemModelWithOverrides(RenderItem.java:253)
at net.minecraft.client.renderer.RenderItem.renderItem(RenderItem.java:246)
at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:46)
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:371)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:355)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:643)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1139)
at net.minecraft.client.Minecraft.run(Minecraft.java:406)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
at net.minecraft.item.ItemStack.getMetadata(ItemStack.java:286)
at net.minecraft.client.renderer.ItemModelMesher.getMetadata(ItemModelMesher.java:66)
at net.minecraft.client.renderer.ItemModelMesher.getItemModel(ItemModelMesher.java:44)
at net.minecraft.client.renderer.RenderItem.getItemModelWithOverrides(RenderItem.java:253)
at net.minecraft.client.renderer.RenderItem.renderItem(RenderItem.java:246)
at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:46)

-- Entity being rendered --
Details:
Entity Type: eggcentric.gold_egg (merick.eggcentric.entity.projectile.EntityGoldEgg)
Entity ID: 265
Entity Name: entity.eggcentric.gold_egg.name
Entity's Exact location: -120,48, 77,89, 233,09
Entity's Block location: World: (-121,77,233), Chunk: (at 7,4,9 in -8,14; contains blocks -128,0,224 to -113,255,239), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Entity's Momentum: 0,31, -0,56, 1,36
Entity's Passengers: []
Entity's Vehicle: ~~ERROR~~ NullPointerException: null

-- Renderer details --
Details:
Assigned renderer: net.minecraft.client.renderer.entity.RenderSnowball@4c2a96f4
Location: 0,00,1,52,0,00 - World: (0,1,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Rotation: 12.966758
Delta: 0.583335
Stacktrace:
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:371)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:355)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:643)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player751'/161, l='MpServer', x=-120,48, y=76,37, z=233,09]]
Chunk stats: MultiplayerChunkCache: 607, 607
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: World: (-152,64,240), Chunk: (at 8,4,0 in -10,15; contains blocks -160,0,240 to -145,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 122021 game time, 1000 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 99 total; [EntityGoldEgg['entity.eggcentric.gold_egg.name'/265, l='MpServer', x=-120,48, y=77,89, z=233,09], EntityCreeper['Creeper'/25, l='MpServer', x=-196,50, y=33,00, z=204,50], EntityBat['Bat'/29, l='MpServer', x=-199,42, y=22,24, z=239,10], EntityCow['Cow'/31, l='MpServer', x=-186,52, y=83,00, z=163,77], EntityBat['Bat'/32, l='MpServer', x=-179,25, y=25,10, z=247,25], EntityBat['Bat'/33, l='MpServer', x=-186,03, y=25,69, z=242,82], EntityBat['Bat'/34, l='MpServer', x=-180,29, y=32,63, z=244,49], EntitySkeleton['Skeleton'/35, l='MpServer', x=-184,21, y=50,00, z=285,50], EntitySkeleton['Skeleton'/36, l='MpServer', x=-179,50, y=24,00, z=301,50], EntityCreeper['Creeper'/37, l='MpServer', x=-191,50, y=38,00, z=310,50], EntityBat['Bat'/38, l='MpServer', x=-173,25, y=31,10, z=196,45], EntityCreeper['Creeper'/39, l='MpServer', x=-165,49, y=31,00, z=192,17], EntitySkeleton['Skeleton'/40, l='MpServer', x=-173,50, y=23,00, z=223,50], EntityCow['Cow'/41, l='MpServer', x=-165,41, y=79,00, z=224,17], EntityPig['Pig'/42, l='MpServer', x=-169,50, y=66,00, z=285,50], EntityBat['Bat'/43, l='MpServer', x=-164,72, y=27,02, z=298,11], EntityBat['Bat'/45, l='MpServer', x=-154,04, y=26,10, z=180,16], EntityZombie['Zombie'/46, l='MpServer', x=-157,50, y=17,00, z=254,50], EntityDiamondChicken['Diamond Chicken'/47, l='MpServer', x=-151,47, y=72,00, z=261,49], EntitySkeleton['Skeleton'/48, l='MpServer', x=-161,51, y=61,00, z=286,23], EntityCreeper['Creeper'/50, l='MpServer', x=-131,80, y=47,00, z=161,41], EntitySkeleton['Skeleton'/51, l='MpServer', x=-135,50, y=26,00, z=279,71], EntitySkeleton['Skeleton'/52, l='MpServer', x=-134,49, y=13,00, z=290,67], EntitySpider['Spider'/56, l='MpServer', x=-126,50, y=46,00, z=157,50], EntityBat['Bat'/57, l='MpServer', x=-117,42, y=45,62, z=170,14], EntityCow['Cow'/58, l='MpServer', x=-113,78, y=75,00, z=177,40], EntityGoldChicken['Gold Chicken'/59, l='MpServer', x=-114,56, y=71,00, z=203,26], EntitySkeleton['Skeleton'/60, l='MpServer', x=-118,37, y=29,01, z=221,30], EntityCreeper['Creeper'/61, l='MpServer', x=-127,50, y=41,00, z=215,50], EntityBat['Bat'/62, l='MpServer', x=-120,75, y=31,10, z=227,25], EntitySkeleton['Skeleton'/63, l='MpServer', x=-121,50, y=40,00, z=224,50], EntityBat['Bat'/64, l='MpServer', x=-118,25, y=37,10, z=227,75], EntityChicken['Chicken'/65, l='MpServer', x=-128,90, y=67,00, z=232,36], EntityChicken['Chicken'/66, l='MpServer', x=-120,11, y=72,00, z=240,82], EntityGoldChicken['Gold Chicken'/67, l='MpServer', x=-107,92, y=77,09, z=244,60], EntityChicken['Chicken'/68, l='MpServer', x=-117,12, y=72,00, z=245,49], EntityZombie['Zombie'/69, l='MpServer', x=-120,50, y=17,00, z=293,50], EntityZombie['Zombie'/73, l='MpServer', x=-99,50, y=18,00, z=174,50], EntityDiamondChicken['Diamond Chicken'/74, l='MpServer', x=-106,50, y=74,00, z=238,26], EntityDiamondChicken['Diamond Chicken'/75, l='MpServer', x=-107,29, y=75,02, z=239,22], EntityGoldChicken['Gold Chicken'/76, l='MpServer', x=-104,52, y=73,00, z=233,88], EntityGoldChicken['Gold Chicken'/77, l='MpServer', x=-106,00, y=73,00, z=236,45], EntityChicken['Chicken'/78, l='MpServer', x=-100,38, y=76,00, z=235,20], EntityChicken['Chicken'/79, l='MpServer', x=-101,45, y=74,29, z=234,36], EntityChicken['Chicken'/80, l='MpServer', x=-100,90, y=77,00, z=236,50], EntityChicken['Chicken'/81, l='MpServer', x=-100,63, y=77,00, z=236,51], EntityChicken['Chicken'/82, l='MpServer', x=-100,79, y=76,00, z=235,42], EntityChicken['Chicken'/83, l='MpServer', x=-95,88, y=83,00, z=248,19], EntityGoldChicken['Gold Chicken'/84, l='MpServer', x=-100,98, y=79,00, z=240,49], EntityGoldChicken['Gold Chicken'/85, l='MpServer', x=-104,79, y=78,02, z=240,95], EntityGoldChicken['Gold Chicken'/86, l='MpServer', x=-106,06, y=77,09, z=240,38], EntityGoldChicken['Gold Chicken'/87, l='MpServer', x=-103,98, y=78,00, z=240,45], EntityGoldChicken['Gold Chicken'/88, l='MpServer', x=-105,10, y=77,44, z=240,38], EntityGoldChicken['Gold Chicken'/89, l='MpServer', x=-104,11, y=79,07, z=241,63], EntityGoldChicken['Gold Chicken'/90, l='MpServer', x=-104,67, y=78,00, z=242,39], EntityGoldChicken['Gold Chicken'/91, l='MpServer', x=-103,97, y=78,00, z=240,70], EntityGoldChicken['Gold Chicken'/92, l='MpServer', x=-104,37, y=78,14, z=241,10], EntityChicken['Chicken'/93, l='MpServer', x=-117,19, y=72,00, z=245,11], EntityChicken['Chicken'/94, l='MpServer', x=-95,19, y=83,00, z=248,44], EntityChicken['Chicken'/95, l='MpServer', x=-95,70, y=83,00, z=248,00], EntityChicken['Chicken'/96, l='MpServer', x=-95,68, y=83,00, z=248,82], EntityBat['Bat'/97, l='MpServer', x=-99,37, y=13,07, z=262,81], EntityBat['Bat'/98, l='MpServer', x=-98,25, y=14,64, z=264,03], EntityZombie['Zombie'/99, l='MpServer', x=-101,50, y=29,00, z=263,50], EntityZombie['Zombie'/100, l='MpServer', x=-104,50, y=29,00, z=301,50], EntitySkeleton['Skeleton'/101, l='MpServer', x=-109,50, y=24,00, z=295,50], EntityZombie['entity.Zombie.name'/102, l='MpServer', x=-110,78, y=25,00, z=297,50], EntityBat['Bat'/103, l='MpServer', x=-103,27, y=31,00, z=304,96], EntityCreeper['Creeper'/104, l='MpServer', x=-108,50, y=26,00, z=309,50], EntitySkeleton['Skeleton'/110, l='MpServer', x=-91,49, y=16,00, z=182,22], EntityZombie['Zombie'/111, l='MpServer', x=-84,47, y=51,00, z=181,20], EntityDiamondChicken['Diamond Chicken'/112, l='MpServer', x=-93,47, y=80,00, z=233,65], EntityChicken['Chicken'/113, l='MpServer', x=-95,32, y=83,00, z=249,12], EntityDiamondChicken['Diamond Chicken'/114, l='MpServer', x=-93,43, y=80,93, z=239,84], EntityDiamondChicken['Diamond Chicken'/115, l='MpServer', x=-93,47, y=81,00, z=240,10], EntityDiamondChicken['Diamond Chicken'/116, l='MpServer', x=-93,15, y=80,00, z=232,67], EntityDiamondChicken['Diamond Chicken'/117, l='MpServer', x=-93,50, y=79,77, z=237,28], EntityDiamondChicken['Diamond Chicken'/118, l='MpServer', x=-93,39, y=80,14, z=239,06], EntityDiamondChicken['Diamond Chicken'/119, l='MpServer', x=-93,75, y=80,00, z=234,04], EntityDiamondChicken['Diamond Chicken'/120, l='MpServer', x=-93,62, y=80,86, z=239,62], EntityDiamondChicken['Diamond Chicken'/121, l='MpServer', x=-93,68, y=80,93, z=239,85], EntityDiamondChicken['Diamond Chicken'/122, l='MpServer', x=-93,34, y=80,40, z=239,31], EntityDiamondChicken['Diamond Chicken'/123, l='MpServer', x=-92,68, y=80,00, z=232,54], EntityChicken['Chicken'/124, l='MpServer', x=-95,53, y=83,00, z=249,57], EntityDiamondChicken['Diamond Chicken'/125, l='MpServer', x=-93,70, y=80,40, z=239,58], EntityDiamondChicken['Diamond Chicken'/126, l='MpServer', x=-93,33, y=81,00, z=240,30], EntitySheep['Sheep'/128, l='MpServer', x=-79,84, y=68,00, z=155,24], EntitySpider['Spider'/129, l='MpServer', x=-67,50, y=12,00, z=220,50], EntitySkeleton['Skeleton'/130, l='MpServer', x=-65,50, y=16,00, z=247,80], EntitySkeleton['Skeleton'/131, l='MpServer', x=-69,50, y=35,00, z=294,50], EntityBat['Bat'/132, l='MpServer', x=-76,56, y=34,03, z=300,28], EntitySkeleton['Skeleton'/134, l='MpServer', x=-50,50, y=44,00, z=170,50], EntityCreeper['Creeper'/135, l='MpServer', x=-62,50, y=40,00, z=180,50], EntityZombie['Zombie'/136, l='MpServer', x=-50,76, y=15,00, z=234,02], EntitySkeleton['Skeleton'/137, l='MpServer', x=-48,50, y=20,00, z=249,50], EntitySpider['Spider'/142, l='MpServer', x=-40,50, y=14,00, z=218,50], EntityZombie['Zombie'/145, l='MpServer', x=-46,50, y=15,00, z=227,79], EntitySkeleton['Skeleton'/146, l='MpServer', x=-45,50, y=16,00, z=225,73], EntityPlayerSP['Player751'/161, l='MpServer', x=-120,48, y=76,37, z=233,09]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:450)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2779)
at net.minecraft.client.Minecraft.run(Minecraft.java:427)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
Minecraft Version: 1.10.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_60, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 508526816 bytes (484 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 1, tcache: 1, allocated: 12, tallocated: 94
FML: MCP 9.32 Powered by Forge 12.18.1.2011 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.1.2011.jar) 
UCHIJAAAA	Forge{12.18.1.2011} [Minecraft Forge] (forgeSrc-1.10.2-12.18.1.2011.jar) 
UCHIJAAAA	eggcentric{1.0} [Eggcentric] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13441 Compatibility Profile Context 0' Renderer: 'AMD Radeon HD 7970M'
Launched Version: 1.10.2
LWJGL: 2.9.4
OpenGL: AMD Radeon HD 7970M GL version 4.5.13441 Compatibility Profile Context 0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: 
Current Language: English (US)
Profiler Position: N/A (disabled)
CPU: 8x Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz

Link to comment
Share on other sites

In the EggcentricEntities class:

package merick.eggcentric.init;

import merick.eggcentric.Eggcentric;
import merick.eggcentric.entity.passive.EntityDiamondChicken;
import merick.eggcentric.entity.passive.EntityGoldChicken;
import merick.eggcentric.entity.projectile.EntityGoldEgg;
import merick.eggcentric.renderer.RenderDiamondChicken;
import merick.eggcentric.renderer.RenderGoldChicken;
import merick.eggcentric.renderer.RenderGoldEgg;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EnumCreatureType;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class EggcentricEntities {

public static int entityId = 300; //Base entity ID for Eggcentric

public static void register(){
	registerRenders();
	registerEntities();
}

private static void registerRenders(){
	RenderingRegistry.registerEntityRenderingHandler(EntityGoldChicken.class, new RenderGoldChicken(Minecraft.getMinecraft().getRenderManager(), new ModelChicken(), 0.5F));
	RenderingRegistry.registerEntityRenderingHandler(EntityDiamondChicken.class, new RenderDiamondChicken(Minecraft.getMinecraft().getRenderManager(), new ModelChicken(), 0.5F));

	RenderingRegistry.registerEntityRenderingHandler(EntityGoldEgg.class, new RenderGoldEgg(Minecraft.getMinecraft().getRenderManager()));

}
private static void registerEntities(){
	EntityRegistry.registerModEntity(EntityGoldChicken.class, "gold_chicken", ++entityId, Eggcentric.instance, 64, 1, true, 0xFFFF08, 0xDB0000);
	EntityRegistry.registerModEntity(EntityDiamondChicken.class, "diamond_chicken", ++entityId, Eggcentric.instance, 64, 1, true, 0x74CBD2, 0xDB0000);

	EntityRegistry.registerModEntity(EntityGoldEgg.class, "gold_egg", ++entityId, Eggcentric.instance, 64, 1, true);


	//Natural spawns
	EntityRegistry.addSpawn(EntityGoldChicken.class, 10, 1, 6, EnumCreatureType.CREATURE, BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS));
	EntityRegistry.addSpawn(EntityDiamondChicken.class, 10, 1, 6, EnumCreatureType.CREATURE, BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS));

}
}

 

For the entity registration:

EntityRegistry.registerModEntity(EntityGoldEgg.class, "gold_egg", ++entityId, Eggcentric.instance, 64, 1, true);

 

For the renderer (with the newest attempt at using the snowball renderer):

RenderingRegistry.registerEntityRenderingHandler(EntityGoldEgg.class, new RenderSnowball<EntityGoldEgg>(Minecraft.getMinecraft().getRenderManager(), EggcentricItems.GOLD_EGG, Minecraft.getMinecraft().getRenderItem()));;

Link to comment
Share on other sites

Oh, I get it. It's in the init phase, but it's before the items. I guess that could be a problem?

 

package merick.eggcentric.proxy;

import merick.eggcentric.init.EggcentricItems;
import merick.eggcentric.init.EggcentricEntities;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class CommonProxy {

public void preInit(FMLPreInitializationEvent event){

}

public void init(FMLInitializationEvent event){
	EggcentricEntities.register();
	EggcentricItems.register();
}

public void postInit(FMLPostInitializationEvent event){

}

public void registerItemSided(Item item){

}
}

Link to comment
Share on other sites

Oh, I get it. It's in the init phase, but it's before the items. I guess that could be a problem?

 

package merick.eggcentric.proxy;

import merick.eggcentric.init.EggcentricItems;
import merick.eggcentric.init.EggcentricEntities;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class CommonProxy {

public void preInit(FMLPreInitializationEvent event){

}

public void init(FMLInitializationEvent event){
	EggcentricEntities.register();
	EggcentricItems.register();
}

public void postInit(FMLPostInitializationEvent event){

}

public void registerItemSided(Item item){

}
}

Yes because you are passing a null item instead of an initialized one. Also item registration should really be done in the preInit method and instead of using Minecraft...getItemModelMesher(...) use ModelLoader.setCustomModelResourceLocation(...).

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

It works now! Huge thanks to you guys for giving me a hand and thanks for all the tips on good practices, since I'm new to this hehe. I just switched the entities items (EDIT: items first, not entities) to be registered first and that did it. Now I'm changing all the stuff that's not up to date/not very well done.

Link to comment
Share on other sites

It works now! Huge thanks to you guys for giving me a hand and thanks for all the tips on good practices, since I'm new to this hehe. I just switched the entities to be registered first and that did it. Now I'm changing all the stuff that's not up to date/not very well done.

You meant items not entities right?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.

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.



×
×
  • Create New...

Important Information

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