1
Coding a New Golem
Hey guys, I used a copy of the golem file to make a new one and edited some properties and the name and stuff, but Minecraft crashes every time I try to build it! (I also added another section to the BlockPumpkin file so the crafting is different)
It keeps saying:
[WARNING] [Minecraft-Client] Skipping Entity with id 0
in the console output.
Anyone know what's going on?
It keeps saying:
[WARNING] [Minecraft-Client] Skipping Entity with id 0
in the console output.
Anyone know what's going on?
17
you have to change the id of the mob i think if you could provide and error log or some sort of files that would be more helpfull
Yeah You are right... Here's the Crash Report:
Is there a file where all of the Entity IDs are located? Cuz I'm pretty sure it isnt mixed with the item/block IDs...
Click to reveal
---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3
Time: 6/26/13 10:32 AM
Description: Exception in world tick
java.lang.NullPointerException
at net.minecraft.client.multiplayer.NetClientHandler.handleMobSpawn(NetClientHandler.java:930)
at net.minecraft.network.packet.Packet24MobSpawn.processPacket(Packet24MobSpawn.java:143)
at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:266)
at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:94)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1862)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:835)
at net.minecraft.client.Minecraft.run(Minecraft.java:760)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.client.multiplayer.NetClientHandler.handleMobSpawn(NetClientHandler.java:930)
at net.minecraft.network.packet.Packet24MobSpawn.processPacket(Packet24MobSpawn.java:143)
at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:266)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42]]
Chunk stats: MultiplayerChunkCache: 441
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (242,64,644), Chunk: (at 2,4,4 in 15,40; contains blocks 240,0,640 to 255,255,655), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
Level time: 10961 game time, 10961 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: 48 total; [EntityBat['Bat'/68, l='MpServer', x=182.44, y=16.00, z=611.53], EntityBat['Bat'/69, l='MpServer', x=178.56, y=17.10, z=605.25], EntityBat['Bat'/70, l='MpServer', x=183.25, y=37.92, z=666.47], EntitySheep['Sheep'/71, l='MpServer', x=182.03, y=70.00, z=686.06], EntityMinecartChest['entity.MinecartChest.name'/66, l='MpServer', x=183.50, y=21.50, z=550.50], EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42], EntityBat['Bat'/67, l='MpServer', x=180.25, y=21.10, z=545.00], EntitySquid['Squid'/129, l='MpServer', x=296.66, y=48.31, z=622.56], EntityBat['Bat'/131, l='MpServer', x=294.72, y=22.73, z=687.31], EntityBat['Bat'/130, l='MpServer', x=294.41, y=20.85, z=684.94], EntityBat['Bat'/79, l='MpServer', x=197.25, y=16.32, z=598.38], EntitySheep['Sheep'/72, l='MpServer', x=176.19, y=70.00, z=693.66], EntitySheep['Sheep'/73, l='MpServer', x=185.50, y=72.00, z=696.22], EntitySheep['Sheep'/74, l='MpServer', x=185.44, y=71.00, z=693.13], EntityBat['Bat'/134, l='MpServer', x=312.16, y=17.07, z=700.28], EntitySheep['Sheep'/75, l='MpServer', x=186.13, y=73.00, z=694.63], EntityIronGolem['Iron Golem'/85, l='MpServer', x=222.81, y=64.00, z=618.56], EntitySquid['Squid'/84, l='MpServer', x=217.59, y=47.38, z=593.81], EntityBat['Bat'/87, l='MpServer', x=225.50, y=24.51, z=671.72], EntityBat['Bat'/86, l='MpServer', x=221.25, y=30.00, z=645.75], EntityBat['Bat'/81, l='MpServer', x=205.28, y=11.10, z=684.75], EntityBat['Bat'/80, l='MpServer', x=193.09, y=38.05, z=671.06], EntitySquid['Squid'/83, l='MpServer', x=227.28, y=47.00, z=590.34], EntitySheep['Sheep'/82, l='MpServer', x=196.63, y=80.00, z=703.53], EntityIronGolem['Iron Golem'/93, l='MpServer', x=224.97, y=64.00, z=621.06], EntityIronGolem['Iron Golem'/92, l='MpServer', x=235.03, y=75.00, z=613.09], EntitySheep['Sheep'/95, l='MpServer', x=223.47, y=98.00, z=690.75], EntitySheep['Sheep'/94, l='MpServer', x=233.66, y=103.00, z=682.53], EntitySheep['Sheep'/89, l='MpServer', x=220.38, y=96.00, z=689.63], EntitySheep['Sheep'/88, l='MpServer', x=216.19, y=94.00, z=693.16], EntitySheep['Sheep'/90, l='MpServer', x=218.03, y=98.00, z=702.06], EntityIronGolem['Iron Golem'/100, l='MpServer', x=254.97, y=68.00, z=635.09], EntitySheep['Sheep'/101, l='MpServer', x=245.44, y=91.00, z=702.59], EntityIronGolem['Iron Golem'/98, l='MpServer', x=251.53, y=73.00, z=628.66], EntityIronGolem['Iron Golem'/99, l='MpServer', x=247.52, y=73.06, z=627.31], EntitySheep['Sheep'/96, l='MpServer', x=227.38, y=101.00, z=682.19], EntityIronGolem['Iron Golem'/97, l='MpServer', x=245.28, y=76.00, z=612.72], EntityIronGolem['Iron Golem'/106, l='MpServer', x=262.00, y=73.00, z=624.97], EntitySquid['Squid'/105, l='MpServer', x=257.50, y=49.03, z=581.50], EntitySquid['Squid'/119, l='MpServer', x=270.94, y=47.38, z=642.63], EntitySheep['Sheep'/54, l='MpServer', x=158.75, y=67.00, z=687.44], EntityBat['Bat'/59, l='MpServer', x=164.13, y=16.12, z=601.88], EntityBat['Bat'/58, l='MpServer', x=171.50, y=17.10, z=600.13], EntityBat['Bat'/57, l='MpServer', x=164.75, y=18.10, z=589.25], EntityBat['Bat'/56, l='MpServer', x=169.75, y=16.98, z=590.75], EntityBat['Bat'/61, l='MpServer', x=175.75, y=36.10, z=661.91], EntityBat['Bat'/60, l='MpServer', x=174.97, y=32.17, z=609.63], EntitySheep['Sheep'/120, l='MpServer', x=274.50, y=85.00, z=702.19]]
Retry entities: 0 total; []
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:441)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1875)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:835)
at net.minecraft.client.Minecraft.run(Minecraft.java:760)
at java.lang.Thread.run(Unknown Source)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42]]
Chunk stats: MultiplayerChunkCache: 441
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (242,64,644), Chunk: (at 2,4,4 in 15,40; contains blocks 240,0,640 to 255,255,655), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
Level time: 10961 game time, 10961 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: 48 total; [EntityBat['Bat'/68, l='MpServer', x=182.44, y=16.00, z=611.53], EntityBat['Bat'/69, l='MpServer', x=178.56, y=17.10, z=605.25], EntityBat['Bat'/70, l='MpServer', x=183.25, y=37.92, z=666.47], EntitySheep['Sheep'/71, l='MpServer', x=182.03, y=70.00, z=686.06], EntityMinecartChest['entity.MinecartChest.name'/66, l='MpServer', x=183.50, y=21.50, z=550.50], EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42], EntityBat['Bat'/67, l='MpServer', x=180.25, y=21.10, z=545.00], EntitySquid['Squid'/129, l='MpServer', x=296.66, y=48.31, z=622.56], EntityBat['Bat'/131, l='MpServer', x=294.72, y=22.73, z=687.31], EntityBat['Bat'/130, l='MpServer', x=294.41, y=20.85, z=684.94], EntityBat['Bat'/79, l='MpServer', x=197.25, y=16.32, z=598.38], EntitySheep['Sheep'/72, l='MpServer', x=176.19, y=70.00, z=693.66], EntitySheep['Sheep'/73, l='MpServer', x=185.50, y=72.00, z=696.22], EntitySheep['Sheep'/74, l='MpServer', x=185.44, y=71.00, z=693.13], EntityBat['Bat'/134, l='MpServer', x=312.16, y=17.07, z=700.28], EntitySheep['Sheep'/75, l='MpServer', x=186.13, y=73.00, z=694.63], EntityIronGolem['Iron Golem'/85, l='MpServer', x=222.81, y=64.00, z=618.56], EntitySquid['Squid'/84, l='MpServer', x=217.59, y=47.38, z=593.81], EntityBat['Bat'/87, l='MpServer', x=225.50, y=24.51, z=671.72], EntityBat['Bat'/86, l='MpServer', x=221.25, y=30.00, z=645.75], EntityBat['Bat'/81, l='MpServer', x=205.28, y=11.10, z=684.75], EntityBat['Bat'/80, l='MpServer', x=193.09, y=38.05, z=671.06], EntitySquid['Squid'/83, l='MpServer', x=227.28, y=47.00, z=590.34], EntitySheep['Sheep'/82, l='MpServer', x=196.63, y=80.00, z=703.53], EntityIronGolem['Iron Golem'/93, l='MpServer', x=224.97, y=64.00, z=621.06], EntityIronGolem['Iron Golem'/92, l='MpServer', x=235.03, y=75.00, z=613.09], EntitySheep['Sheep'/95, l='MpServer', x=223.47, y=98.00, z=690.75], EntitySheep['Sheep'/94, l='MpServer', x=233.66, y=103.00, z=682.53], EntitySheep['Sheep'/89, l='MpServer', x=220.38, y=96.00, z=689.63], EntitySheep['Sheep'/88, l='MpServer', x=216.19, y=94.00, z=693.16], EntitySheep['Sheep'/90, l='MpServer', x=218.03, y=98.00, z=702.06], EntityIronGolem['Iron Golem'/100, l='MpServer', x=254.97, y=68.00, z=635.09], EntitySheep['Sheep'/101, l='MpServer', x=245.44, y=91.00, z=702.59], EntityIronGolem['Iron Golem'/98, l='MpServer', x=251.53, y=73.00, z=628.66], EntityIronGolem['Iron Golem'/99, l='MpServer', x=247.52, y=73.06, z=627.31], EntitySheep['Sheep'/96, l='MpServer', x=227.38, y=101.00, z=682.19], EntityIronGolem['Iron Golem'/97, l='MpServer', x=245.28, y=76.00, z=612.72], EntityIronGolem['Iron Golem'/106, l='MpServer', x=262.00, y=73.00, z=624.97], EntitySquid['Squid'/105, l='MpServer', x=257.50, y=49.03, z=581.50], EntitySquid['Squid'/119, l='MpServer', x=270.94, y=47.38, z=642.63], EntitySheep['Sheep'/54, l='MpServer', x=158.75, y=67.00, z=687.44], EntityBat['Bat'/59, l='MpServer', x=164.13, y=16.12, z=601.88], EntityBat['Bat'/58, l='MpServer', x=171.50, y=17.10, z=600.13], EntityBat['Bat'/57, l='MpServer', x=164.75, y=18.10, z=589.25], EntityBat['Bat'/56, l='MpServer', x=169.75, y=16.98, z=590.75], EntityBat['Bat'/61, l='MpServer', x=175.75, y=36.10, z=661.91], EntityBat['Bat'/60, l='MpServer', x=174.97, y=32.17, z=609.63], EntitySheep['Sheep'/120, l='MpServer', x=274.50, y=85.00, z=702.19]]
Retry entities: 0 total; []
-- System Details --
Details:
Minecraft Version: 1.5.2
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_06, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 796818032 bytes (759 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 21635 (1211560 bytes; 1 MB) allocated, 623 (34888 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
FML: MCP v7.51 FML v5.2.23.738 Minecraft Forge 7.8.1.738 4 mods loaded, 4 mods active
mcp{7.51} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{5.2.23.738} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{7.8.1.738} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
TutorialMod{v1} [Xenolith Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
LWJGL: 2.4.2
OpenGL: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2867, Intel
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: 3460 (193760 bytes; 0 MB) allocated, 394 (22064 bytes; 0 MB) used
// Don't be sad, have a hug! <3
Time: 6/26/13 10:32 AM
Description: Exception in world tick
java.lang.NullPointerException
at net.minecraft.client.multiplayer.NetClientHandler.handleMobSpawn(NetClientHandler.java:930)
at net.minecraft.network.packet.Packet24MobSpawn.processPacket(Packet24MobSpawn.java:143)
at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:266)
at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:94)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1862)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:835)
at net.minecraft.client.Minecraft.run(Minecraft.java:760)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.client.multiplayer.NetClientHandler.handleMobSpawn(NetClientHandler.java:930)
at net.minecraft.network.packet.Packet24MobSpawn.processPacket(Packet24MobSpawn.java:143)
at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:266)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42]]
Chunk stats: MultiplayerChunkCache: 441
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (242,64,644), Chunk: (at 2,4,4 in 15,40; contains blocks 240,0,640 to 255,255,655), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
Level time: 10961 game time, 10961 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: 48 total; [EntityBat['Bat'/68, l='MpServer', x=182.44, y=16.00, z=611.53], EntityBat['Bat'/69, l='MpServer', x=178.56, y=17.10, z=605.25], EntityBat['Bat'/70, l='MpServer', x=183.25, y=37.92, z=666.47], EntitySheep['Sheep'/71, l='MpServer', x=182.03, y=70.00, z=686.06], EntityMinecartChest['entity.MinecartChest.name'/66, l='MpServer', x=183.50, y=21.50, z=550.50], EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42], EntityBat['Bat'/67, l='MpServer', x=180.25, y=21.10, z=545.00], EntitySquid['Squid'/129, l='MpServer', x=296.66, y=48.31, z=622.56], EntityBat['Bat'/131, l='MpServer', x=294.72, y=22.73, z=687.31], EntityBat['Bat'/130, l='MpServer', x=294.41, y=20.85, z=684.94], EntityBat['Bat'/79, l='MpServer', x=197.25, y=16.32, z=598.38], EntitySheep['Sheep'/72, l='MpServer', x=176.19, y=70.00, z=693.66], EntitySheep['Sheep'/73, l='MpServer', x=185.50, y=72.00, z=696.22], EntitySheep['Sheep'/74, l='MpServer', x=185.44, y=71.00, z=693.13], EntityBat['Bat'/134, l='MpServer', x=312.16, y=17.07, z=700.28], EntitySheep['Sheep'/75, l='MpServer', x=186.13, y=73.00, z=694.63], EntityIronGolem['Iron Golem'/85, l='MpServer', x=222.81, y=64.00, z=618.56], EntitySquid['Squid'/84, l='MpServer', x=217.59, y=47.38, z=593.81], EntityBat['Bat'/87, l='MpServer', x=225.50, y=24.51, z=671.72], EntityBat['Bat'/86, l='MpServer', x=221.25, y=30.00, z=645.75], EntityBat['Bat'/81, l='MpServer', x=205.28, y=11.10, z=684.75], EntityBat['Bat'/80, l='MpServer', x=193.09, y=38.05, z=671.06], EntitySquid['Squid'/83, l='MpServer', x=227.28, y=47.00, z=590.34], EntitySheep['Sheep'/82, l='MpServer', x=196.63, y=80.00, z=703.53], EntityIronGolem['Iron Golem'/93, l='MpServer', x=224.97, y=64.00, z=621.06], EntityIronGolem['Iron Golem'/92, l='MpServer', x=235.03, y=75.00, z=613.09], EntitySheep['Sheep'/95, l='MpServer', x=223.47, y=98.00, z=690.75], EntitySheep['Sheep'/94, l='MpServer', x=233.66, y=103.00, z=682.53], EntitySheep['Sheep'/89, l='MpServer', x=220.38, y=96.00, z=689.63], EntitySheep['Sheep'/88, l='MpServer', x=216.19, y=94.00, z=693.16], EntitySheep['Sheep'/90, l='MpServer', x=218.03, y=98.00, z=702.06], EntityIronGolem['Iron Golem'/100, l='MpServer', x=254.97, y=68.00, z=635.09], EntitySheep['Sheep'/101, l='MpServer', x=245.44, y=91.00, z=702.59], EntityIronGolem['Iron Golem'/98, l='MpServer', x=251.53, y=73.00, z=628.66], EntityIronGolem['Iron Golem'/99, l='MpServer', x=247.52, y=73.06, z=627.31], EntitySheep['Sheep'/96, l='MpServer', x=227.38, y=101.00, z=682.19], EntityIronGolem['Iron Golem'/97, l='MpServer', x=245.28, y=76.00, z=612.72], EntityIronGolem['Iron Golem'/106, l='MpServer', x=262.00, y=73.00, z=624.97], EntitySquid['Squid'/105, l='MpServer', x=257.50, y=49.03, z=581.50], EntitySquid['Squid'/119, l='MpServer', x=270.94, y=47.38, z=642.63], EntitySheep['Sheep'/54, l='MpServer', x=158.75, y=67.00, z=687.44], EntityBat['Bat'/59, l='MpServer', x=164.13, y=16.12, z=601.88], EntityBat['Bat'/58, l='MpServer', x=171.50, y=17.10, z=600.13], EntityBat['Bat'/57, l='MpServer', x=164.75, y=18.10, z=589.25], EntityBat['Bat'/56, l='MpServer', x=169.75, y=16.98, z=590.75], EntityBat['Bat'/61, l='MpServer', x=175.75, y=36.10, z=661.91], EntityBat['Bat'/60, l='MpServer', x=174.97, y=32.17, z=609.63], EntitySheep['Sheep'/120, l='MpServer', x=274.50, y=85.00, z=702.19]]
Retry entities: 0 total; []
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:441)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1875)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:835)
at net.minecraft.client.Minecraft.run(Minecraft.java:760)
at java.lang.Thread.run(Unknown Source)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42]]
Chunk stats: MultiplayerChunkCache: 441
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (242,64,644), Chunk: (at 2,4,4 in 15,40; contains blocks 240,0,640 to 255,255,655), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
Level time: 10961 game time, 10961 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: 48 total; [EntityBat['Bat'/68, l='MpServer', x=182.44, y=16.00, z=611.53], EntityBat['Bat'/69, l='MpServer', x=178.56, y=17.10, z=605.25], EntityBat['Bat'/70, l='MpServer', x=183.25, y=37.92, z=666.47], EntitySheep['Sheep'/71, l='MpServer', x=182.03, y=70.00, z=686.06], EntityMinecartChest['entity.MinecartChest.name'/66, l='MpServer', x=183.50, y=21.50, z=550.50], EntityClientPlayerMP['Player671'/142, l='MpServer', x=234.78, y=73.18, z=624.42], EntityBat['Bat'/67, l='MpServer', x=180.25, y=21.10, z=545.00], EntitySquid['Squid'/129, l='MpServer', x=296.66, y=48.31, z=622.56], EntityBat['Bat'/131, l='MpServer', x=294.72, y=22.73, z=687.31], EntityBat['Bat'/130, l='MpServer', x=294.41, y=20.85, z=684.94], EntityBat['Bat'/79, l='MpServer', x=197.25, y=16.32, z=598.38], EntitySheep['Sheep'/72, l='MpServer', x=176.19, y=70.00, z=693.66], EntitySheep['Sheep'/73, l='MpServer', x=185.50, y=72.00, z=696.22], EntitySheep['Sheep'/74, l='MpServer', x=185.44, y=71.00, z=693.13], EntityBat['Bat'/134, l='MpServer', x=312.16, y=17.07, z=700.28], EntitySheep['Sheep'/75, l='MpServer', x=186.13, y=73.00, z=694.63], EntityIronGolem['Iron Golem'/85, l='MpServer', x=222.81, y=64.00, z=618.56], EntitySquid['Squid'/84, l='MpServer', x=217.59, y=47.38, z=593.81], EntityBat['Bat'/87, l='MpServer', x=225.50, y=24.51, z=671.72], EntityBat['Bat'/86, l='MpServer', x=221.25, y=30.00, z=645.75], EntityBat['Bat'/81, l='MpServer', x=205.28, y=11.10, z=684.75], EntityBat['Bat'/80, l='MpServer', x=193.09, y=38.05, z=671.06], EntitySquid['Squid'/83, l='MpServer', x=227.28, y=47.00, z=590.34], EntitySheep['Sheep'/82, l='MpServer', x=196.63, y=80.00, z=703.53], EntityIronGolem['Iron Golem'/93, l='MpServer', x=224.97, y=64.00, z=621.06], EntityIronGolem['Iron Golem'/92, l='MpServer', x=235.03, y=75.00, z=613.09], EntitySheep['Sheep'/95, l='MpServer', x=223.47, y=98.00, z=690.75], EntitySheep['Sheep'/94, l='MpServer', x=233.66, y=103.00, z=682.53], EntitySheep['Sheep'/89, l='MpServer', x=220.38, y=96.00, z=689.63], EntitySheep['Sheep'/88, l='MpServer', x=216.19, y=94.00, z=693.16], EntitySheep['Sheep'/90, l='MpServer', x=218.03, y=98.00, z=702.06], EntityIronGolem['Iron Golem'/100, l='MpServer', x=254.97, y=68.00, z=635.09], EntitySheep['Sheep'/101, l='MpServer', x=245.44, y=91.00, z=702.59], EntityIronGolem['Iron Golem'/98, l='MpServer', x=251.53, y=73.00, z=628.66], EntityIronGolem['Iron Golem'/99, l='MpServer', x=247.52, y=73.06, z=627.31], EntitySheep['Sheep'/96, l='MpServer', x=227.38, y=101.00, z=682.19], EntityIronGolem['Iron Golem'/97, l='MpServer', x=245.28, y=76.00, z=612.72], EntityIronGolem['Iron Golem'/106, l='MpServer', x=262.00, y=73.00, z=624.97], EntitySquid['Squid'/105, l='MpServer', x=257.50, y=49.03, z=581.50], EntitySquid['Squid'/119, l='MpServer', x=270.94, y=47.38, z=642.63], EntitySheep['Sheep'/54, l='MpServer', x=158.75, y=67.00, z=687.44], EntityBat['Bat'/59, l='MpServer', x=164.13, y=16.12, z=601.88], EntityBat['Bat'/58, l='MpServer', x=171.50, y=17.10, z=600.13], EntityBat['Bat'/57, l='MpServer', x=164.75, y=18.10, z=589.25], EntityBat['Bat'/56, l='MpServer', x=169.75, y=16.98, z=590.75], EntityBat['Bat'/61, l='MpServer', x=175.75, y=36.10, z=661.91], EntityBat['Bat'/60, l='MpServer', x=174.97, y=32.17, z=609.63], EntitySheep['Sheep'/120, l='MpServer', x=274.50, y=85.00, z=702.19]]
Retry entities: 0 total; []
-- System Details --
Details:
Minecraft Version: 1.5.2
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_06, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 796818032 bytes (759 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 21635 (1211560 bytes; 1 MB) allocated, 623 (34888 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
FML: MCP v7.51 FML v5.2.23.738 Minecraft Forge 7.8.1.738 4 mods loaded, 4 mods active
mcp{7.51} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{5.2.23.738} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{7.8.1.738} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
TutorialMod{v1} [Xenolith Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
LWJGL: 2.4.2
OpenGL: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2867, Intel
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: 3460 (193760 bytes; 0 MB) allocated, 394 (22064 bytes; 0 MB) used
Is there a file where all of the Entity IDs are located? Cuz I'm pretty sure it isnt mixed with the item/block IDs...
It looks like you are on multiplayer, correct? If so, make sure your mod is MP compatible!
I think he is on multiplayer just look at all the code read it and you will find
hmm... now that I actually look at it, It does say I'm on multiplayer, but I don't mean to be.
I'm just running this mod from eclipse and opening a single player world. Is it because I'm connected to the internet? I have no idea... But I don't think that relates to the problem...
I'm just running this mod from eclipse and opening a single player world. Is it because I'm connected to the internet? I have no idea... But I don't think that relates to the problem...
Anyway, going back to what DED said, I found the file:
EntityRegistry.java but I don't know what to add or change...
Thanks for the quick responses though. This is helping.
EntityRegistry.java but I don't know what to add or change...
Click to reveal
package cpw.mods.fml.common.registry;
import java.util.BitSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityTracker;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import com.google.common.base.Function;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Maps;
import com.google.common.primitives.UnsignedBytes;
import com.google.common.primitives.UnsignedInteger;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.network.EntitySpawnPacket;
import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
public class EntityRegistry
{
public class EntityRegistration
{
private Class<? extends Entity> entityClass;
private ModContainer container;
private String entityName;
private int modId;
private int trackingRange;
private int updateFrequency;
private boolean sendsVelocityUpdates;
private Function<EntitySpawnPacket, Entity> customSpawnCallback;
private boolean usesVanillaSpawning;
public EntityRegistration(ModContainer mc, Class<? extends Entity> entityClass, String entityName, int id, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
this.container = mc;
this.entityClass = entityClass;
this.entityName = entityName;
this.modId = id;
this.trackingRange = trackingRange;
this.updateFrequency = updateFrequency;
this.sendsVelocityUpdates = sendsVelocityUpdates;
}
public Class<? extends Entity> getEntityClass()
{
return entityClass;
}
public ModContainer getContainer()
{
return container;
}
public String getEntityName()
{
return entityName;
}
public int getModEntityId()
{
return modId;
}
public int getTrackingRange()
{
return trackingRange;
}
public int getUpdateFrequency()
{
return updateFrequency;
}
public boolean sendsVelocityUpdates()
{
return sendsVelocityUpdates;
}
public boolean usesVanillaSpawning()
{
return usesVanillaSpawning;
}
public boolean hasCustomSpawning()
{
return customSpawnCallback != null;
}
public Entity doCustomSpawning(EntitySpawnPacket packet) throws Exception
{
return customSpawnCallback.apply(packet);
}
public void setCustomSpawning(Function<EntitySpawnPacket, Entity> callable, boolean usesVanillaSpawning)
{
this.customSpawnCallback = callable;
this.usesVanillaSpawning = usesVanillaSpawning;
}
}
private static final EntityRegistry INSTANCE = new EntityRegistry();
private BitSet availableIndicies;
private ListMultimap<ModContainer, EntityRegistration> entityRegistrations = ArrayListMultimap.create();
private Map<String,ModContainer> entityNames = Maps.newHashMap();
private BiMap<Class<? extends Entity>, EntityRegistration> entityClassRegistrations = HashBiMap.create();
public static EntityRegistry instance()
{
return INSTANCE;
}
private EntityRegistry()
{
availableIndicies = new BitSet(256);
availableIndicies.set(1,255);
for (Object id : EntityList.IDtoClassMapping.keySet())
{
availableIndicies.clear((Integer)id);
}
}
/**
* Register the mod entity type with FML
* @param entityClass The entity class
* @param entityName A unique name for the entity
* @param id A mod specific ID for the entity
* @param mod The mod
* @param trackingRange The range at which MC will send tracking updates
* @param updateFrequency The frequency of tracking updates
* @param sendsVelocityUpdates Whether to send velocity information packets as well
*/
public static void registerModEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
instance().doModEntityRegistration(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);
}
private void doModEntityRegistration(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
ModContainer mc = FMLCommonHandler.instance().findContainerFor(mod);
EntityRegistration er = new EntityRegistration(mc, entityClass, entityName, id, trackingRange, updateFrequency, sendsVelocityUpdates);
try
{
entityClassRegistrations.put(entityClass, er);
entityNames.put(entityName, mc);
if (!EntityList.classToStringMapping.containsKey(entityClass))
{
String entityModName = String.format("%s.%s", mc.getModId(), entityName);
EntityList.classToStringMapping.put(entityClass, entityModName);
EntityList.stringToClassMapping.put(entityModName, entityClass);
FMLLog.finest("Automatically registered mod %s entity %s as %s", mc.getModId(), entityName, entityModName);
}
else
{
FMLLog.fine("Skipping automatic mod %s entity registration for already registered class %s", mc.getModId(), entityClass.getName());
}
}
catch (IllegalArgumentException e)
{
FMLLog.log(Level.WARNING, e, "The mod %s tried to register the entity (name,class) (%s,%s) one or both of which are already registered", mc.getModId(), entityName, entityClass.getName());
return;
}
entityRegistrations.put(mc, er);
}
public static void registerGlobalEntityID(Class <? extends Entity > entityClass, String entityName, int id)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
{
ModContainer activeModContainer = Loader.instance().activeModContainer();
String modId = "unknown";
if (activeModContainer != null)
{
modId = activeModContainer.getModId();
}
else
{
FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped.");
}
FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass);
return;
}
id = instance().validateAndClaimId(id);
EntityList.addMapping(entityClass, entityName, id);
}
private int validateAndClaimId(int id)
{
// workaround for broken ML
int realId = id;
if (id < Byte.MIN_VALUE)
{
FMLLog.warning("Compensating for modloader out of range compensation by mod : entityId %d for mod %s is now %d", id, Loader.instance().activeModContainer().getModId(), realId);
realId += 3000;
}
if (realId < 0)
{
realId += Byte.MAX_VALUE;
}
try
{
UnsignedBytes.checkedCast(realId);
}
catch (IllegalArgumentException e)
{
FMLLog.log(Level.SEVERE, "The entity ID %d for mod %s is not an unsigned byte and may not work", id, Loader.instance().activeModContainer().getModId());
}
if (!availableIndicies.get(realId))
{
FMLLog.severe("The mod %s has attempted to register an entity ID %d which is already reserved. This could cause severe problems", Loader.instance().activeModContainer().getModId(), id);
}
availableIndicies.clear(realId);
return realId;
}
public static void registerGlobalEntityID(Class <? extends Entity > entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
{
ModContainer activeModContainer = Loader.instance().activeModContainer();
String modId = "unknown";
if (activeModContainer != null)
{
modId = activeModContainer.getModId();
}
else
{
FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped.");
}
FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass);
return;
}
instance().validateAndClaimId(id);
EntityList.addMapping(entityClass, entityName, id, backgroundEggColour, foregroundEggColour);
}
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
for (BiomeGenBase biome : biomes)
{
@SuppressWarnings("unchecked")
List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);
for (SpawnListEntry entry : spawns)
{
//Adjusting an existing spawn entry
if (entry.entityClass == entityClass)
{
entry.itemWeight = weightedProb;
entry.minGroupCount = min;
entry.maxGroupCount = max;
break;
}
}
spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max));
}
}
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = (Class<? extends Entity>) EntityList.stringToClassMapping.get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
addSpawn((Class <? extends EntityLiving >) entityClazz, weightedProb, min, max, spawnList, biomes);
}
}
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
for (BiomeGenBase biome : biomes)
{
@SuppressWarnings("unchecked")
Iterator<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature).iterator();
while (spawns.hasNext())
{
SpawnListEntry entry = spawns.next();
if (entry.entityClass == entityClass)
{
spawns.remove();
}
}
}
}
public static void removeSpawn(String entityName, EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = (Class<? extends Entity>) EntityList.stringToClassMapping.get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
removeSpawn((Class <? extends EntityLiving >) entityClazz, spawnList, biomes);
}
}
public static int findGlobalUniqueEntityId()
{
int res = instance().availableIndicies.nextSetBit(0);
if (res < 0)
{
throw new RuntimeException("No more entity indicies left");
}
return res;
}
public EntityRegistration lookupModSpawn(Class<? extends Entity> clazz, boolean keepLooking)
{
Class<?> localClazz = clazz;
do
{
EntityRegistration er = entityClassRegistrations.get(localClazz);
if (er != null)
{
return er;
}
localClazz = localClazz.getSuperclass();
keepLooking = (!Object.class.equals(localClazz));
}
while (keepLooking);
return null;
}
public EntityRegistration lookupModSpawn(ModContainer mc, int modEntityId)
{
for (EntityRegistration er : entityRegistrations.get(mc))
{
if (er.getModEntityId() == modEntityId)
{
return er;
}
}
return null;
}
public boolean tryTrackingEntity(EntityTracker entityTracker, Entity entity)
{
EntityRegistration er = lookupModSpawn(entity.getClass(), true);
if (er != null)
{
entityTracker.addEntityToTracker(entity, er.getTrackingRange(), er.getUpdateFrequency(), er.sendsVelocityUpdates());
return true;
}
return false;
}
/**
*
* DO NOT USE THIS METHOD
*
* @param entityClass
* @param entityTypeId
* @param updateRange
* @param updateInterval
* @param sendVelocityInfo
*/
@Deprecated
public static EntityRegistration registerModLoaderEntity(Object mod, Class<? extends Entity> entityClass, int entityTypeId, int updateRange, int updateInterval,
boolean sendVelocityInfo)
{
String entityName = (String) EntityList.classToStringMapping.get(entityClass);
if (entityName == null)
{
throw new IllegalArgumentException(String.format("The ModLoader mod %s has tried to register an entity tracker for a non-existent entity type %s", Loader.instance().activeModContainer().getModId(), entityClass.getCanonicalName()));
}
instance().doModEntityRegistration(entityClass, entityName, entityTypeId, mod, updateRange, updateInterval, sendVelocityInfo);
return instance().entityClassRegistrations.get(entityClass);
}
}
import java.util.BitSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityTracker;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import com.google.common.base.Function;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Maps;
import com.google.common.primitives.UnsignedBytes;
import com.google.common.primitives.UnsignedInteger;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.network.EntitySpawnPacket;
import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
public class EntityRegistry
{
public class EntityRegistration
{
private Class<? extends Entity> entityClass;
private ModContainer container;
private String entityName;
private int modId;
private int trackingRange;
private int updateFrequency;
private boolean sendsVelocityUpdates;
private Function<EntitySpawnPacket, Entity> customSpawnCallback;
private boolean usesVanillaSpawning;
public EntityRegistration(ModContainer mc, Class<? extends Entity> entityClass, String entityName, int id, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
this.container = mc;
this.entityClass = entityClass;
this.entityName = entityName;
this.modId = id;
this.trackingRange = trackingRange;
this.updateFrequency = updateFrequency;
this.sendsVelocityUpdates = sendsVelocityUpdates;
}
public Class<? extends Entity> getEntityClass()
{
return entityClass;
}
public ModContainer getContainer()
{
return container;
}
public String getEntityName()
{
return entityName;
}
public int getModEntityId()
{
return modId;
}
public int getTrackingRange()
{
return trackingRange;
}
public int getUpdateFrequency()
{
return updateFrequency;
}
public boolean sendsVelocityUpdates()
{
return sendsVelocityUpdates;
}
public boolean usesVanillaSpawning()
{
return usesVanillaSpawning;
}
public boolean hasCustomSpawning()
{
return customSpawnCallback != null;
}
public Entity doCustomSpawning(EntitySpawnPacket packet) throws Exception
{
return customSpawnCallback.apply(packet);
}
public void setCustomSpawning(Function<EntitySpawnPacket, Entity> callable, boolean usesVanillaSpawning)
{
this.customSpawnCallback = callable;
this.usesVanillaSpawning = usesVanillaSpawning;
}
}
private static final EntityRegistry INSTANCE = new EntityRegistry();
private BitSet availableIndicies;
private ListMultimap<ModContainer, EntityRegistration> entityRegistrations = ArrayListMultimap.create();
private Map<String,ModContainer> entityNames = Maps.newHashMap();
private BiMap<Class<? extends Entity>, EntityRegistration> entityClassRegistrations = HashBiMap.create();
public static EntityRegistry instance()
{
return INSTANCE;
}
private EntityRegistry()
{
availableIndicies = new BitSet(256);
availableIndicies.set(1,255);
for (Object id : EntityList.IDtoClassMapping.keySet())
{
availableIndicies.clear((Integer)id);
}
}
/**
* Register the mod entity type with FML
* @param entityClass The entity class
* @param entityName A unique name for the entity
* @param id A mod specific ID for the entity
* @param mod The mod
* @param trackingRange The range at which MC will send tracking updates
* @param updateFrequency The frequency of tracking updates
* @param sendsVelocityUpdates Whether to send velocity information packets as well
*/
public static void registerModEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
instance().doModEntityRegistration(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);
}
private void doModEntityRegistration(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
ModContainer mc = FMLCommonHandler.instance().findContainerFor(mod);
EntityRegistration er = new EntityRegistration(mc, entityClass, entityName, id, trackingRange, updateFrequency, sendsVelocityUpdates);
try
{
entityClassRegistrations.put(entityClass, er);
entityNames.put(entityName, mc);
if (!EntityList.classToStringMapping.containsKey(entityClass))
{
String entityModName = String.format("%s.%s", mc.getModId(), entityName);
EntityList.classToStringMapping.put(entityClass, entityModName);
EntityList.stringToClassMapping.put(entityModName, entityClass);
FMLLog.finest("Automatically registered mod %s entity %s as %s", mc.getModId(), entityName, entityModName);
}
else
{
FMLLog.fine("Skipping automatic mod %s entity registration for already registered class %s", mc.getModId(), entityClass.getName());
}
}
catch (IllegalArgumentException e)
{
FMLLog.log(Level.WARNING, e, "The mod %s tried to register the entity (name,class) (%s,%s) one or both of which are already registered", mc.getModId(), entityName, entityClass.getName());
return;
}
entityRegistrations.put(mc, er);
}
public static void registerGlobalEntityID(Class <? extends Entity > entityClass, String entityName, int id)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
{
ModContainer activeModContainer = Loader.instance().activeModContainer();
String modId = "unknown";
if (activeModContainer != null)
{
modId = activeModContainer.getModId();
}
else
{
FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped.");
}
FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass);
return;
}
id = instance().validateAndClaimId(id);
EntityList.addMapping(entityClass, entityName, id);
}
private int validateAndClaimId(int id)
{
// workaround for broken ML
int realId = id;
if (id < Byte.MIN_VALUE)
{
FMLLog.warning("Compensating for modloader out of range compensation by mod : entityId %d for mod %s is now %d", id, Loader.instance().activeModContainer().getModId(), realId);
realId += 3000;
}
if (realId < 0)
{
realId += Byte.MAX_VALUE;
}
try
{
UnsignedBytes.checkedCast(realId);
}
catch (IllegalArgumentException e)
{
FMLLog.log(Level.SEVERE, "The entity ID %d for mod %s is not an unsigned byte and may not work", id, Loader.instance().activeModContainer().getModId());
}
if (!availableIndicies.get(realId))
{
FMLLog.severe("The mod %s has attempted to register an entity ID %d which is already reserved. This could cause severe problems", Loader.instance().activeModContainer().getModId(), id);
}
availableIndicies.clear(realId);
return realId;
}
public static void registerGlobalEntityID(Class <? extends Entity > entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour)
{
if (EntityList.classToStringMapping.containsKey(entityClass))
{
ModContainer activeModContainer = Loader.instance().activeModContainer();
String modId = "unknown";
if (activeModContainer != null)
{
modId = activeModContainer.getModId();
}
else
{
FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped.");
}
FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass);
return;
}
instance().validateAndClaimId(id);
EntityList.addMapping(entityClass, entityName, id, backgroundEggColour, foregroundEggColour);
}
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
for (BiomeGenBase biome : biomes)
{
@SuppressWarnings("unchecked")
List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);
for (SpawnListEntry entry : spawns)
{
//Adjusting an existing spawn entry
if (entry.entityClass == entityClass)
{
entry.itemWeight = weightedProb;
entry.minGroupCount = min;
entry.maxGroupCount = max;
break;
}
}
spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max));
}
}
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = (Class<? extends Entity>) EntityList.stringToClassMapping.get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
addSpawn((Class <? extends EntityLiving >) entityClazz, weightedProb, min, max, spawnList, biomes);
}
}
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
for (BiomeGenBase biome : biomes)
{
@SuppressWarnings("unchecked")
Iterator<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature).iterator();
while (spawns.hasNext())
{
SpawnListEntry entry = spawns.next();
if (entry.entityClass == entityClass)
{
spawns.remove();
}
}
}
}
public static void removeSpawn(String entityName, EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = (Class<? extends Entity>) EntityList.stringToClassMapping.get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
removeSpawn((Class <? extends EntityLiving >) entityClazz, spawnList, biomes);
}
}
public static int findGlobalUniqueEntityId()
{
int res = instance().availableIndicies.nextSetBit(0);
if (res < 0)
{
throw new RuntimeException("No more entity indicies left");
}
return res;
}
public EntityRegistration lookupModSpawn(Class<? extends Entity> clazz, boolean keepLooking)
{
Class<?> localClazz = clazz;
do
{
EntityRegistration er = entityClassRegistrations.get(localClazz);
if (er != null)
{
return er;
}
localClazz = localClazz.getSuperclass();
keepLooking = (!Object.class.equals(localClazz));
}
while (keepLooking);
return null;
}
public EntityRegistration lookupModSpawn(ModContainer mc, int modEntityId)
{
for (EntityRegistration er : entityRegistrations.get(mc))
{
if (er.getModEntityId() == modEntityId)
{
return er;
}
}
return null;
}
public boolean tryTrackingEntity(EntityTracker entityTracker, Entity entity)
{
EntityRegistration er = lookupModSpawn(entity.getClass(), true);
if (er != null)
{
entityTracker.addEntityToTracker(entity, er.getTrackingRange(), er.getUpdateFrequency(), er.sendsVelocityUpdates());
return true;
}
return false;
}
/**
*
* DO NOT USE THIS METHOD
*
* @param entityClass
* @param entityTypeId
* @param updateRange
* @param updateInterval
* @param sendVelocityInfo
*/
@Deprecated
public static EntityRegistration registerModLoaderEntity(Object mod, Class<? extends Entity> entityClass, int entityTypeId, int updateRange, int updateInterval,
boolean sendVelocityInfo)
{
String entityName = (String) EntityList.classToStringMapping.get(entityClass);
if (entityName == null)
{
throw new IllegalArgumentException(String.format("The ModLoader mod %s has tried to register an entity tracker for a non-existent entity type %s", Loader.instance().activeModContainer().getModId(), entityClass.getCanonicalName()));
}
instance().doModEntityRegistration(entityClass, entityName, entityTypeId, mod, updateRange, updateInterval, sendVelocityInfo);
return instance().entityClassRegistrations.get(entityClass);
}
}
Thanks for the quick responses though. This is helping.
[deleted]
wow thank you so much, Teotoo I used the code you gave and placed it in the main class. My setup is kinda sloppy but It works now. Thanks Again
Now the only problem is the texture. It isn't laying on properly. I can make out the parts of the texture, but it seems shrunken and leaves most of the golem invisible...
this.texture = "/mob/texture_name.png";
is the code in my golem class. But it seems undersized. Even though it is a copy of the iron golem's texture
this.texture = "/mob/texture_name.png";
is the code in my golem class. But it seems undersized. Even though it is a copy of the iron golem's texture
[deleted]
I will remember that for the next entity I make, but all I need to know for this one is why the texture doesnt fit properly.
I understand how extending the Entity Iron Golem would make this a ton easier, but I dont want to go back and change it now.
You see I am not fluent with java, so I only understand bits and pieces, which probably makes this harder than it has to be... but do you know why the texture is not fitting right?
I checked both Golems png sizes and they are identical. Also, I specified the path correctly, since the texture does show up on the golem instead of "missing texture"
So I dont know why this is happening...
Btw if it wasn't for you, I would probably be editing all the base files hoping for a solution
I understand how extending the Entity Iron Golem would make this a ton easier, but I dont want to go back and change it now.
You see I am not fluent with java, so I only understand bits and pieces, which probably makes this harder than it has to be... but do you know why the texture is not fitting right?
I checked both Golems png sizes and they are identical. Also, I specified the path correctly, since the texture does show up on the golem instead of "missing texture"
So I dont know why this is happening...
Btw if it wasn't for you, I would probably be editing all the base files hoping for a solution
OK I think I know why. I think it thinks that the new entity is a "char" character. B/c when I removed the texture, missing texture appears in the shape of a character such as Steve.
So that's why the texture isn't fitting properly, but how to i tweak that?
So that's why the texture isn't fitting properly, but how to i tweak that?
[deleted]
no I am not... Where do I input this code? My main class?
and yes my public class extends EntityGolem
[deleted]
I put it into my
public void load(FMLInitializationEvent event)
and tweaked it to compile right, but when i try to spawn the golem in, it shuts down the client...
public void load(FMLInitializationEvent event)
and tweaked it to compile right, but when i try to spawn the golem in, it shuts down the client...
