I hope you guys dont mind me poking my head in here! haha
I have a block that needs to save its facing AND type (this affects mechanics and model texture). It is a custom model.
I have TileEntities setup, and just went through all the packet stuff above. But I am getting this error in the Packet class.
Error
Aug 14, 2013 6:22:57 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
2013-08-14 18:22:57 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.2.35.804 for Minecraft 1.6.2 loading
2013-08-14 18:22:57 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_51, running on Mac OS X:x86_64:10.8.4, installed at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
2013-08-14 18:22:57 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2013-08-14 18:22:57 [WARNING] [ForgeModLoader] The coremod codechicken.core.launch.CodeChickenCorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft
2013-08-14 18:23:00 [WARNING] [ForgeModLoader] The coremod codechicken.nei.asm.NEICorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft
2013-08-14 18:23:00 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg
2013-08-14 18:23:00 [iNFO] [sTDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg
2013-08-14 18:23:00 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg
2013-08-14 18:23:01 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!
2013-08-14 18:23:01 [iNFO] [sTDOUT] Adding AccessTransformer: nei_at.cfg
2013-08-14 18:23:01 [iNFO] [sTDOUT] Adding Accesstransformer map: temp.dat
2013-08-14 18:23:01 [iNFO] [sTDOUT] Loaded 53 rules from AccessTransformer config file temp.dat
2013-08-14 18:23:02 [iNFO] [ForgeModLoader] Launching wrapped minecraft
2013-08-14 18:23:04 [iNFO] [sTDOUT] Inserted super call into net.minecraft.client.gui.inventory.GuiInventory.updateScreen
2013-08-14 18:23:04 [iNFO] [sTDOUT] net.minecraft.client.gui.inventory.GuiContainer was overriden from NotEnoughItems-dev 1.6.0.7.jar
2013-08-14 18:23:04 [iNFO] [Minecraft-Client] Setting user: Player449
2013-08-14 18:23:04 [iNFO] [Minecraft-Client] (Session ID is null)
2013-08-14 18:23:05 [iNFO] [sTDOUT] Generated BlockMobSpawner helper method.
2013-08-14 18:23:06 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0
2013-08-14 18:23:08 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default
2013-08-14 18:23:09 [iNFO] [sTDOUT]
2013-08-14 18:23:09 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-08-14 18:23:09 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization
2013-08-14 18:23:09 [iNFO] [sTDOUT] MinecraftForge v9.10.0.804 Initialized
2013-08-14 18:23:09 [iNFO] [ForgeModLoader] MinecraftForge v9.10.0.804 Initialized
2013-08-14 18:23:09 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-08-14 18:23:09 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2013-08-14 18:23:09 [iNFO] [sTDOUT] Replaced 101 ore recipies
2013-08-14 18:23:09 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization
2013-08-14 18:23:09 [iNFO] [sTDOUT] OpenAL initialized.
2013-08-14 18:23:09 [iNFO] [ForgeModLoader] Reading custom logging properties from /Users/dustinyost/Minecraft Modding/1.6.2/forge 9.10.0.804 client/mcp/jars/config/logging.properties
2013-08-14 18:23:09 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2013-08-14 18:23:09 [iNFO] [sTDOUT]
2013-08-14 18:23:09 [iNFO] [ForgeModLoader] Searching /Users/dustinyost/Minecraft Modding/1.6.2/forge 9.10.0.804 client/mcp/jars/mods for mods
2013-08-14 18:23:12 [iNFO] [ForgeModLoader] Attempting to reparse the mod container bin
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 11 mods to load
2013-08-14 18:23:14 [iNFO] [mcp] Activating mod mcp
2013-08-14 18:23:14 [iNFO] [FML] Activating mod FML
2013-08-14 18:23:14 [iNFO] [Forge] Activating mod Forge
2013-08-14 18:23:14 [iNFO] [CodeChickenCore] Activating mod CodeChickenCore
2013-08-14 18:23:14 [iNFO] [NotEnoughItems] Activating mod NotEnoughItems
2013-08-14 18:23:14 [iNFO] [CountryGamer_BetterVillages2.0] Activating mod CountryGamer_BetterVillages2.0
2013-08-14 18:23:14 [iNFO] [CountryGamer_Misc] Activating mod CountryGamer_Misc
2013-08-14 18:23:14 [iNFO] [CountryGamer_PlantsVsZombies] Activating mod CountryGamer_PlantsVsZombies
2013-08-14 18:23:14 [iNFO] [CountryGamer_PvZExtensions] Activating mod CountryGamer_PvZExtensions
2013-08-14 18:23:14 [iNFO] [CountryGamer_Tardis] Activating mod CountryGamer_Tardis
2013-08-14 18:23:14 [iNFO] [DamageIndicatorsMod] Activating mod DamageIndicatorsMod
2013-08-14 18:23:14 [WARNING] [Not Enough Items] Mod Not Enough Items is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [WARNING] [better Villages 2.0] Mod Better Villages 2.0 is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [WARNING] [Country Gamer ModPack; Misc Mod] Mod Country Gamer ModPack; Misc Mod is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [WARNING] [Plants Vs Zombies] Mod Plants Vs Zombies is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [WARNING] [PvZ Extensions] Mod PvZ Extensions is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [WARNING] [Tardis] Mod Tardis is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [WARNING] [Damage Indicators] Mod Damage Indicators is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:14 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Not Enough Items, FMLFileResourcePack:Better Villages 2.0, FMLFileResourcePack:Country Gamer ModPack; Misc Mod, FMLFileResourcePack:Plants Vs Zombies, FMLFileResourcePack:PvZ Extensions, FMLFileResourcePack:Tardis, FMLFileResourcePack:Damage Indicators
2013-08-14 18:23:14 [iNFO] [sTDOUT]
2013-08-14 18:23:14 [iNFO] [sTDOUT] SoundSystem shutting down...
2013-08-14 18:23:14 [iNFO] [sTDOUT] Author: Paul Lamb, www.paulscode.com
2013-08-14 18:23:14 [iNFO] [sTDOUT]
2013-08-14 18:23:14 [iNFO] [sTDOUT]
2013-08-14 18:23:14 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] FML has found a non-mod file CodeChickenCore 0.9.0.0.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] FML has found a non-mod file CodeChickenLib-dev-1.6.2-1.0.0.9.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] FML has found a non-mod file CodeChickenLib-universal-1.6.2-1.0.0.9.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] FML has found a non-mod file NotEnoughItems-dev 1.6.0.7.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] Registering Forge Packet Handler
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2013-08-14 18:23:14 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-08-14 18:23:14 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2013-08-14 18:23:14 [iNFO] [sTDOUT] OpenAL initialized.
2013-08-14 18:23:14 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2013-08-14 18:23:15 [iNFO] [sTDOUT]
2013-08-14 18:23:15 [iNFO] [sTDOUT] Removing TMI Uninstaller
2013-08-14 18:23:15 [iNFO] [sTDOUT] Deleting Dir: /Users/dustinyost/Minecraft Modding/1.6.2/forge 9.10.0.804 client/mcp/eclipse/Minecraft/bin/net/minecraft/client/TMIUninstaller
2013-08-14 18:23:16 [sEVERE] [ForgeModLoader] The mod CountryGamer_PlantsVsZombies has attempted to register an entity ID 1 which is already reserved. This could cause severe problems
2013-08-14 18:23:16 [sEVERE] [ForgeModLoader] The mod CountryGamer_PlantsVsZombies has attempted to register an entity ID 2 which is already reserved. This could cause severe problems
2013-08-14 18:23:16 [sEVERE] [ForgeModLoader] The mod CountryGamer_PlantsVsZombies has attempted to register an entity ID 8 which is already reserved. This could cause severe problems
2013-08-14 18:23:16 [sEVERE] [ForgeModLoader] The mod CountryGamer_PlantsVsZombies has attempted to register an entity ID 9 which is already reserved. This could cause severe problems
2013-08-14 18:23:16 [sEVERE] [ForgeModLoader] The mod CountryGamer_PlantsVsZombies has attempted to register an entity ID 10 which is already reserved. This could cause severe problems
2013-08-14 18:23:16 [sEVERE] [ForgeModLoader] The mod CountryGamer_PlantsVsZombies has attempted to register an entity ID 11 which is already reserved. This could cause severe problems
2013-08-14 18:23:16 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 11 mods
2013-08-14 18:23:16 [WARNING] [Not Enough Items] Mod Not Enough Items is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [WARNING] [better Villages 2.0] Mod Better Villages 2.0 is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [WARNING] [Country Gamer ModPack; Misc Mod] Mod Country Gamer ModPack; Misc Mod is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [WARNING] [Plants Vs Zombies] Mod Plants Vs Zombies is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [WARNING] [PvZ Extensions] Mod PvZ Extensions is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [WARNING] [Tardis] Mod Tardis is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [WARNING] [Damage Indicators] Mod Damage Indicators is missing a pack.mcmeta file, things may not work well
2013-08-14 18:23:16 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Not Enough Items, FMLFileResourcePack:Better Villages 2.0, FMLFileResourcePack:Country Gamer ModPack; Misc Mod, FMLFileResourcePack:Plants Vs Zombies, FMLFileResourcePack:PvZ Extensions, FMLFileResourcePack:Tardis, FMLFileResourcePack:Damage Indicators
2013-08-14 18:23:16 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: countrygamer_tardis:textures/items/tardisKey.png
2013-08-14 18:23:16 [iNFO] [sTDOUT]
2013-08-14 18:23:16 [iNFO] [sTDOUT] SoundSystem shutting down...
2013-08-14 18:23:16 [iNFO] [sTDOUT] Author: Paul Lamb, www.paulscode.com
2013-08-14 18:23:16 [iNFO] [sTDOUT]
2013-08-14 18:23:16 [iNFO] [sTDOUT]
2013-08-14 18:23:16 [iNFO] [sTDOUT] Starting up SoundSystem...
2013-08-14 18:23:16 [sEVERE] [Minecraft-Client] ########## GL ERROR ##########
2013-08-14 18:23:16 [sEVERE] [Minecraft-Client] @ Post startup
2013-08-14 18:23:16 [sEVERE] [Minecraft-Client] 1281: Invalid value
2013-08-14 18:23:17 [iNFO] [sTDOUT] Initializing LWJGL OpenAL
2013-08-14 18:23:17 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2013-08-14 18:23:17 [iNFO] [sTDOUT] OpenAL initialized.
2013-08-14 18:23:17 [iNFO] [sTDOUT]
2013-08-14 18:23:17 [sEVERE] [Minecraft-Client] Realms: Invalid session id
2013-08-14 18:23:21 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2
2013-08-14 18:23:21 [iNFO] [Minecraft-Server] Generating keypair
2013-08-14 18:23:21 [iNFO] [ForgeModLoader] Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@3079279)
2013-08-14 18:23:21 [iNFO] [ForgeModLoader] Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@3079279)
2013-08-14 18:23:21 [iNFO] [ForgeModLoader] Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@3079279)
2013-08-14 18:23:21 [iNFO] [Minecraft-Server] Preparing start region for level 0
2013-08-14 18:23:22 [iNFO] [DamageIndicatorsMod] Server no longer requires this mod to function!
2013-08-14 18:23:22 [WARNING] [Minecraft-Server] Server no longer requires Damage Indicators to function client side!
2013-08-14 18:23:22 [iNFO] [sTDOUT] Loading NEI
2013-08-14 18:23:22 [iNFO] [sTDOUT] loading single player
2013-08-14 18:23:22 [iNFO] [Minecraft-Server] Player449[/127.0.0.1:0] logged in with entity id 183 at (-180.9020783888061, 68.0, 173.26330801090847)
2013-08-14 18:23:22 [iNFO] [Minecraft-Server] Player449 joined the game
2013-08-14 18:23:22 [iNFO] [sTDOUT] Loading Player: Player449
2013-08-14 18:23:22 [iNFO] [sTDOUT] Sending serverside check to: Player449
2013-08-14 18:23:23 [iNFO] [sTDOUT] Setting up custom skins
2013-08-14 18:23:23 [iNFO] [sTDOUT] Loading World: local/New World
2013-08-14 18:23:24 [iNFO] [Minecraft-Client] [CHAT] Version 0.9.0.3 of CodeChickenCore is available
2013-08-14 18:23:24 [iNFO] [Minecraft-Client] [CHAT] Version 1.6.1.2 of NotEnoughItems is available
2013-08-14 18:23:24 [iNFO] [Minecraft-Client] [CHAT] Damage Indicators Mod v.2.9.0.0 is up to date.
2013-08-14 18:23:26 [iNFO] [sTDOUT] facing = 2
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Stopping server
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Saving players
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Player449 left the game
2013-08-14 18:23:27 [iNFO] [sTDOUT] Unloading Player: Player449
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Saving worlds
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/Overworld
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/Nether
2013-08-14 18:23:27 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/The End
2013-08-14 18:23:28 [iNFO] [ForgeModLoader] Unloading dimension 0
2013-08-14 18:23:28 [iNFO] [ForgeModLoader] Unloading dimension -1
2013-08-14 18:23:28 [iNFO] [ForgeModLoader] Unloading dimension 1
2013-08-14 18:23:28 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Ticking tile entity
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.world.World.updateEntities(World.java:2219)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1907)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.client.main.Main.main(Main.java:93)
2013-08-14 18:23:28 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-14 18:23:28 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-14 18:23:28 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-14 18:23:28 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-08-14 18:23:28 [iNFO] [sTDERR] Caused by: java.lang.RuntimeException: Packet GravestoneChangePacket is missing a mapping!
2013-08-14 18:23:28 [iNFO] [sTDERR] at mods.CountryGamer_PlantsVsZombies.PvZPacket.getPacketId(PvZPacket.java:74)
2013-08-14 18:23:28 [iNFO] [sTDERR] at mods.CountryGamer_PlantsVsZombies.PvZPacket.makePacket(PvZPacket.java:80)
2013-08-14 18:23:28 [iNFO] [sTDERR] at mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts.TileEntityGravestone.updateEntity(TileEntityGravestone.java:90)
2013-08-14 18:23:28 [iNFO] [sTDERR] at net.minecraft.world.World.updateEntities(World.java:2204)
2013-08-14 18:23:28 [iNFO] [sTDERR] ... 10 more
2013-08-14 18:23:28 [iNFO] [sTDOUT] ---- Minecraft Crash Report ----
2013-08-14 18:23:28 [iNFO] [sTDOUT] // On the bright side, I bought you a teddy bear!
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] Time: 8/14/13 6:23 PM
2013-08-14 18:23:28 [iNFO] [sTDOUT] Description: Ticking tile entity
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] java.lang.RuntimeException: Packet GravestoneChangePacket is missing a mapping!
2013-08-14 18:23:28 [iNFO] [sTDOUT] at mods.CountryGamer_PlantsVsZombies.PvZPacket.getPacketId(PvZPacket.java:74)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at mods.CountryGamer_PlantsVsZombies.PvZPacket.makePacket(PvZPacket.java:80)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts.TileEntityGravestone.updateEntity(TileEntityGravestone.java:90)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.world.World.updateEntities(World.java:2204)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1907)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
2013-08-14 18:23:28 [iNFO] [sTDOUT] ---------------------------------------------------------------------------------------
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] -- Head --
2013-08-14 18:23:28 [iNFO] [sTDOUT] Stacktrace:
2013-08-14 18:23:28 [iNFO] [sTDOUT] at mods.CountryGamer_PlantsVsZombies.PvZPacket.getPacketId(PvZPacket.java:74)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at mods.CountryGamer_PlantsVsZombies.PvZPacket.makePacket(PvZPacket.java:80)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts.TileEntityGravestone.updateEntity(TileEntityGravestone.java:90)
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] -- Tile entity being ticked --
2013-08-14 18:23:28 [iNFO] [sTDOUT] Details:
2013-08-14 18:23:28 [iNFO] [sTDOUT] Name: Gravestone // mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts.TileEntityGravestone
2013-08-14 18:23:28 [iNFO] [sTDOUT] Block type: ID #506 (tile.gravestoneReg // mods.CountryGamer_PlantsVsZombies.Blocks.BlockGravestone)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Block data value: 0 / 0x0 / 0b0000
2013-08-14 18:23:28 [iNFO] [sTDOUT] Block location: World: (-181,68,170), Chunk: (at 11,4,10 in -12,10; contains blocks -192,0,160 to -177,255,175), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Actual block type: ID #506 (tile.gravestoneReg // mods.CountryGamer_PlantsVsZombies.Blocks.BlockGravestone)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Actual block data value: 0 / 0x0 / 0b0000
2013-08-14 18:23:28 [iNFO] [sTDOUT] Stacktrace:
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.world.World.updateEntities(World.java:2204)
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] -- Affected level --
2013-08-14 18:23:28 [iNFO] [sTDOUT] Details:
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level name: MpServer
2013-08-14 18:23:28 [iNFO] [sTDOUT] All players: 1 total; [EntityClientPlayerMP['Player449'/183, l='MpServer', x=-180.90, y=69.62, z=173.26]]
2013-08-14 18:23:28 [iNFO] [sTDOUT] Chunk stats: MultiplayerChunkCache: 405
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level seed: 0
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level generator: ID 00 - default, ver 1. Features enabled: false
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level generator options:
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level spawn location: World: (-200,64,221), Chunk: (at 8,4,13 in -13,13; contains blocks -208,0,208 to -193,255,223), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level time: 56497 game time, 6000 day time
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level dimension: 0
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level storage version: 0x00000 - Unknown?
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
2013-08-14 18:23:28 [iNFO] [sTDOUT] Forced entities: 40 total; [EntityBat['Bat'/137, l='MpServer', x=-129.25, y=41.10, z=130.72], EntityBat['Bat'/136, l='MpServer', x=-144.11, y=22.00, z=139.16], EntityClientPlayerMP['Player449'/183, l='MpServer', x=-180.90, y=69.62, z=173.26], EntityChicken['Chicken'/143, l='MpServer', x=-123.38, y=71.00, z=101.56], EntityBat['Bat'/129, l='MpServer', x=-154.25, y=24.10, z=130.75], EntityBat['Bat'/128, l='MpServer', x=-152.07, y=22.00, z=138.83], EntityBat['Bat'/131, l='MpServer', x=-146.73, y=45.13, z=179.40], EntityBat['Bat'/130, l='MpServer', x=-149.71, y=22.15, z=138.38], EntitySheep['Sheep'/135, l='MpServer', x=-134.41, y=72.00, z=94.47], EntityZombie['Zombie'/220, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/221, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/222, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/223, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityChicken['Chicken'/159, l='MpServer', x=-111.94, y=64.00, z=119.88], EntityZombie['Zombie'/219, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityBat['Bat'/93, l='MpServer', x=-226.35, y=34.10, z=198.25], EntitySheep['Sheep'/144, l='MpServer', x=-114.88, y=62.00, z=120.53], EntityChicken['Chicken'/145, l='MpServer', x=-124.22, y=71.00, z=114.78], EntityBat['Bat'/92, l='MpServer', x=-225.47, y=35.10, z=197.75], EntityChicken['Chicken'/146, l='MpServer', x=-112.38, y=65.00, z=122.28], EntityBat['Bat'/94, l='MpServer', x=-236.25, y=27.10, z=232.75], EntityChicken['Chicken'/147, l='MpServer', x=-114.41, y=64.00, z=121.47], EntityBat['Bat'/89, l='MpServer', x=-250.43, y=24.50, z=229.38], EntityChicken['Chicken'/148, l='MpServer', x=-126.56, y=70.00, z=124.17], EntityBat['Bat'/88, l='MpServer', x=-253.63, y=33.10, z=194.38], EntitySheep['Sheep'/149, l='MpServer', x=-115.38, y=71.00, z=134.40], EntityChicken['Chicken'/150, l='MpServer', x=-120.19, y=70.00, z=147.53], EntityBat['Bat'/98, l='MpServer', x=-229.33, y=20.08, z=226.46], EntityPig['Pig'/99, l='MpServer', x=-217.91, y=65.00, z=247.13], EntityPig['Pig'/97, l='MpServer', x=-221.19, y=64.00, z=212.84], EntityBat['Bat'/110, l='MpServer', x=-180.54, y=49.73, z=115.52], EntityZombie['Zombie'/229, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/228, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityItem['item.item.sulphur'/106, l='MpServer', x=-194.22, y=68.13, z=174.72], EntityZombie['Zombie'/227, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/226, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/225, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityZombie['Zombie'/224, l='MpServer', x=0.00, y=-0.06, z=0.00], EntityBat['Bat'/121, l='MpServer', x=-170.20, y=38.74, z=153.71], EntityBat['Bat'/120, l='MpServer', x=-172.78, y=43.10, z=102.88]]
2013-08-14 18:23:28 [iNFO] [sTDOUT] Retry entities: 0 total; []
2013-08-14 18:23:28 [iNFO] [sTDOUT] Server brand: fml,forge
2013-08-14 18:23:28 [iNFO] [sTDOUT] Server type: Integrated singleplayer server
2013-08-14 18:23:28 [iNFO] [sTDOUT] Stacktrace:
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2298)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:844)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-08-14 18:23:28 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
2013-08-14 18:23:28 [iNFO] [sTDOUT]
2013-08-14 18:23:28 [iNFO] [sTDOUT] -- System Details --
2013-08-14 18:23:28 [iNFO] [sTDOUT] Details:
2013-08-14 18:23:28 [iNFO] [sTDOUT] Minecraft Version: 1.6.2
2013-08-14 18:23:28 [iNFO] [sTDOUT] Operating System: Mac OS X (x86_64) version 10.8.4
2013-08-14 18:23:28 [iNFO] [sTDOUT] Java Version: 1.6.0_51, Apple Inc.
2013-08-14 18:23:28 [iNFO] [sTDOUT] Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
2013-08-14 18:23:28 [iNFO] [sTDOUT] Memory: 904307512 bytes (862 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
2013-08-14 18:23:28 [iNFO] [sTDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
2013-08-14 18:23:28 [iNFO] [sTDOUT] AABB Pool Size: 20872 (1168832 bytes; 1 MB) allocated, 458 (25648 bytes; 0 MB) used
2013-08-14 18:23:28 [iNFO] [sTDOUT] Suspicious classes: FML and Forge are installed
2013-08-14 18:23:28 [iNFO] [sTDOUT] IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
2013-08-14 18:23:28 [iNFO] [sTDOUT] FML: MCP v8.04 FML v6.2.35.804 Minecraft Forge 9.10.0.804 11 mods loaded, 11 mods active
2013-08-14 18:23:28 [iNFO] [sTDOUT] mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] FML{6.2.35.804} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] Forge{9.10.0.804} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] CodeChickenCore{0.9.0.0} [CodeChicken Core] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] NotEnoughItems{1.6.0.7} [Not Enough Items] (NotEnoughItems-dev 1.6.0.7.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] CountryGamer_BetterVillages2.0{1.0} [better Villages 2.0] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] CountryGamer_Misc{1.0} [Country Gamer ModPack; Misc Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] CountryGamer_PlantsVsZombies{2.3} [Plants Vs Zombies] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] CountryGamer_PvZExtensions{2.2} [PvZ Extensions] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] CountryGamer_Tardis{1.0} [Tardis] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] DamageIndicatorsMod{2.9.0.0} [Damage Indicators] (1.6.2 DamageIndicators v2.9.0.0.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-08-14 18:23:28 [iNFO] [sTDOUT] Launched Version: 1.6
2013-08-14 18:23:28 [iNFO] [sTDOUT] LWJGL: 2.9.0
2013-08-14 18:23:28 [iNFO] [sTDOUT] OpenGL: Intel HD Graphics 3000 OpenGL Engine GL version 2.1 INTEL-8.12.47, Intel Inc.
2013-08-14 18:23:28 [iNFO] [sTDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge'
2013-08-14 18:23:28 [iNFO] [sTDOUT] Type: Client (map_client.txt)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Resource Pack: Default
2013-08-14 18:23:28 [iNFO] [sTDOUT] Current Language: English (US)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Profiler Position: N/A (disabled)
2013-08-14 18:23:28 [iNFO] [sTDOUT] Vec3 Pool Size: 701 (39256 bytes; 0 MB) allocated, 87 (4872 bytes; 0 MB) used
2013-08-14 18:23:28 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# /Users/dustinyost/Minecraft Modding/1.6.2/forge 9.10.0.804 client/mcp/jars/./crash-reports/crash-2013-08-14_18.23.28-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
TileEnt
package mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts;
import java.util.List;
import mods.CountryGamer_PlantsVsZombies.GravestoneChangePacket;
import mods.CountryGamer_PlantsVsZombies.PvZ_Util;
import mods.CountryGamer_PlantsVsZombies.Resources;
import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.common.network.PacketDispatcher;
public class TileEntityGravestone extends TileEntity {
public int facing=-1;
public int type=0;
public ResourceLocation[] typeTexture = new ResourceLocation[]{
Resources.gravestone,
Resources.gravestoneReg,
Resources.gravestoneFootball,
Resources.gravestoneFlag,
Resources.gravestoneCone,
Resources.gravestoneBucket
};
private double spawnDelay = 20 * 60 * 0.1;//PvZ_Main.zombieSpawnDelay; // 20 = 1 sec
private int maxNearbyEntities = 10;
/**
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
* ticks and creates a new spawn inside its implementation.
*/
public void updateEntity() {
double spawnDelay = this.spawnDelay;
if( ! this.getWorldObj().isRemote) {
if(spawnDelay > 0) {
spawnDelay -= 1.0;
return;
}
if(facing == -1) {
facing = 0;
System.out.println("facing was -1");
}
Entity entity = new EntityZombie(this.getWorldObj());
List<Entity> entList = this.getWorldObj().getEntitiesWithinAABB(
entity.getClass(),
AxisAlignedBB.getAABBPool().getAABB(
(double)this.xCoord-3,
(double)this.yCoord,
(double)this.zCoord-3,
(double)this.xCoord+3,
(double)this.yCoord,
(double)this.zCoord+3
));
/*for(int i = 0; i < entList.size(); i++) {
if( !( entList.get(i) instanceof EntityZombie ) ) {
entList.remove(i);
}
}*/
int j = entList.size();
if (j >= this.maxNearbyEntities)
{
return;
}
PvZ_Util.checkUnder(getWorldObj(), this.xCoord, this.yCoord, this.zCoord, 4);
System.out.println("Spawn wave");
PvZ_Util.spawnRandZombie(this.worldObj, this.xCoord, this.yCoord, this.zCoord, facing, type);
spawnDelay = this.spawnDelay;
}
super.updateEntity();
//System.out.println(facing + ":" + type);
PacketDispatcher.sendPacketToServer(new GravestoneChangePacket(this.facing, this.type, this,
this.xCoord, this.yCoord, this.zCoord).makePacket());
}
}
PacketHandler
package mods.CountryGamer_PlantsVsZombies;
import java.net.ProtocolException;
import java.util.logging.Logger;
import javax.management.ReflectionException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
/**
*
* @author Arbiter
*
*/
public class PvZPacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{
try
{
EntityPlayer entityPlayer = (EntityPlayer)player;
ByteArrayDataInput in = ByteStreams.newDataInput(packet.data);
int packetId = in.readUnsignedByte();
PvZPacket packetBase = PvZPacket.constructPacket(packetId);
packetBase.read(in);
packetBase.execute(entityPlayer, entityPlayer.worldObj.isRemote ? Side.CLIENT : Side.SERVER);
}
catch (ReflectionException e)
{
throw new RuntimeException("Unexpected Reflection exception during Packet construction");
} catch (mods.CountryGamer_PlantsVsZombies.PvZPacket.ProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Packet
package mods.CountryGamer_PlantsVsZombies;
import javax.management.ReflectionException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.packet.Packet;
import com.google.common.collect.BiMap;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;
/**
*
* @author Arbiter
*
*/
public abstract class PvZPacket
{
public static final String CHANNEL = "lbd";
private static final BiMap<Integer, Class<? extends PvZPacket>> idMap;
static
{
ImmutableBiMap.Builder<Integer, Class<? extends PvZPacket>> builder = ImmutableBiMap.builder();
idMap = builder.build();
}
public static PvZPacket constructPacket(int packetId) throws ProtocolException, ReflectionException, InstantiationException, IllegalAccessException
{
Class<? extends PvZPacket> theClass = idMap.get(Integer.valueOf(packetId));
if (theClass == null)
{
throw new ProtocolException("Unknown packet id");
}
else
{
return theClass.newInstance();
}
}
public static class ProtocolException extends Exception
{
public ProtocolException()
{
}
public ProtocolException(String message, Throwable cause)
{
super(message, cause);
}
public ProtocolException(String message)
{
super(message);
}
public ProtocolException(Throwable cause)
{
super(cause);
}
}
public abstract void write(ByteArrayDataOutput out);
public abstract void read(ByteArrayDataInput in) throws ProtocolException;
public abstract void execute(EntityPlayer par1EntityPlayer, Side par2Side) throws ProtocolException;
public final int getPacketId() {
if (idMap.inverse().containsKey(getClass())) {
return idMap.inverse().get(getClass()).intValue();
} else {
throw new RuntimeException("Packet " + getClass().getSimpleName() + " is missing a mapping!");
}
}
public final Packet makePacket() {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeByte(getPacketId());
write(out);
return PacketDispatcher.getPacket(CHANNEL, out.toByteArray());
}
}
Block Packet
package mods.CountryGamer_PlantsVsZombies;
import mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts.TileEntityGravestone;
import net.minecraft.entity.player.EntityPlayer;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import cpw.mods.fml.relauncher.Side;
/**
*
* @author Arbiter
*
*/
public class GravestoneChangePacket extends PvZPacket
{
private int facing, type;
private TileEntityGravestone tileEntity;
public GravestoneChangePacket(int facing, int type, TileEntityGravestone par2, int x, int y, int z)
{
this.facing = facing;
this.type = type;
tileEntity = (TileEntityGravestone)par2.worldObj.getBlockTileEntity(x, y, z);
}
public GravestoneChangePacket()
{
}
@Override
public void write(ByteArrayDataOutput out)
{
out.writeInt(facing);
out.writeInt(type);
}
@Override
public void read(ByteArrayDataInput in) throws ProtocolException
{
facing = in.readInt();
type = in.readInt();
}
@Override
public void execute(EntityPlayer player, Side side) throws ProtocolException
{
if (side.isClient())
{
System.out.println(tileEntity.facing);
System.out.println(this.facing);
tileEntity.facing = this.facing;
System.out.println(tileEntity.type);
System.out.println(this.type);
tileEntity.type = this.type;
}
else
{
throw new ProtocolException("Cannot send packet to server");
}
}
}
Block Class
package mods.CountryGamer_PlantsVsZombies.Blocks;
import java.util.ArrayList;
import java.util.Random;
import mods.CountryGamer_PlantsVsZombies.PvZ_Main;
import mods.CountryGamer_PlantsVsZombies.PvZ_Util;
import mods.CountryGamer_PlantsVsZombies.Blocks.tileEnts.TileEntityGravestone;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockGravestone extends BlockContainer {
private Class entityClass;
public TileEntityGravestone gravestoneTE;
public int type = 0;
public BlockGravestone(int id, int type, Class tClass) {
super(id, Material.rock);
entityClass = tClass;
this.type = type;
this.setHardness(0.2F).setResistance(3F);
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
this.setCreativeTab(PvZ_Main.pvzTab);
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconReg) {
this.blockIcon = iconReg.registerIcon(PvZ_Main.base_Tex + (this.getUnlocalizedName().substring(5)));
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public TileEntity getBlockEntity() {
try {
return (TileEntity)entityClass.newInstance();
}catch(Exception exception) {
throw new RuntimeException(exception);
}
}
@Override
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z,
int metadata, int fortune) {
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
switch(gravestoneTE.type) {
case 1:
ret.add(new ItemStack(Item.rottenFlesh, );
break;
case 2:
int i = world.rand.nextInt(4);
switch(i) {
case 0:
ret.add(new ItemStack(PvZ_Main.footballHelm, 1));
break;
case 1:
ret.add(new ItemStack(PvZ_Main.footballChest, 1));
break;
case 2:
ret.add(new ItemStack(PvZ_Main.footballLegs, 1));
break;
case 3:
ret.add(new ItemStack(PvZ_Main.footballBoots, 1));
break;
default:
ret.add(new ItemStack(PvZ_Main.footballHelm, 1));
ret.add(new ItemStack(PvZ_Main.footballChest, 1));
ret.add(new ItemStack(PvZ_Main.footballLegs, 1));
ret.add(new ItemStack(PvZ_Main.footballBoots, 1));
break;
}
break;
case 3:
ret.add(new ItemStack(PvZ_Main.flag, 1));
break;
case 4:
//ret.add(new ItemStack(PvZ_Main.cone, 1));
break;
case 5:
ret.add(new ItemStack(Item.bucketEmpty, 1));
break;
default:
ret.clear();
break;
}
return ret;
}
@Override
protected boolean canSilkHarvest() { return true; }
public int quantityDropped(Random rand) {
return 1;
}
public int getRenderType() {
return -1;
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public TileEntity createNewTileEntity(World world) {
return new TileEntityGravestone();
}
public void onBlockAdded(World world, int x, int y, int z) {
super.onBlockAdded(world, x, y, z);
TileEntity tile = world.getBlockTileEntity(x, y, z);
if( tile instanceof TileEntityGravestone) {
gravestoneTE = ((TileEntityGravestone)tile);
}else System.out.println("Tile Error");
//gravestoneTE.setFacing(0);
}
/** Orientation */
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
{
onBlockAdded(world, x, y, z);
if(gravestoneTE.facing < 0) {
int facing = PvZ_Util.checkFacing(world, x, y, z, par5EntityLivingBase, par6ItemStack, this.gravestoneTE);
this.gravestoneTE.facing = facing;
}
if(gravestoneTE.type <= 0)
this.gravestoneTE.type = type;
PvZ_Util.spawnRandZombie(world, x, y, z, gravestoneTE.facing, gravestoneTE.type);
}
}