Jump to content

kris91268

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by kris91268

  1. Could you please show me how I would implement this, I'm sorry, I've tried my best, but I am really stuck, not a good day for me. Please reply soon, or message me on the forge forums, as this topic is getting too long
  2. I have made the PacketOutputStream and the PacketInputStream, but I don't understand where I should put the rest. Where should I declare a new PacketWriteStream object and put the tileEntity x, y, and z coordinates in it? Do I declare it in the gui file, or the PacketHandler file?
  3. I try to use the packet to send a message to the server to change it's tile entity when the buttons of the gui are clicked, but it crashes with a protocol exception when I try. I know I coded it to do this, but it was in the tutorial with advanced packet handling. How would you suggest I send a packet to the server with the x y z coordinates when I click a button on the gui?
  4. You solved the problem why it wasn't writing to it's tile entity, so I gave you a thank you. However, I do believe that packet handling would be neccessary, so MineMarteen also helpedd solve this problem. The thing that solved it was I forgot to use the hasTileEntity(int meta) method in my block class. I'll experiment around with some stuff, let you know how the results turned out and if the block successfully reads the stored nbt. Here is some code explained I used a double object to store the height value in the tile entity class so I can call the .toString() method in the GuiGravityLift class. I didn't know you could do that with a primitive. I intend to use the same tile entity for the gravity lift block, so saying which other tile entities I am using isn't neccessary I do know java, quite well actually, but not fully how Minecraft and Forge works. Thanks so much for your help, and MineMarteen's help with the packet handling
  5. Amazingly, this actually works, when the value is changed, the tile entity saves the new height to it's nbt. However, it doesn't read it when I reload the world. Is there anything I have missed, or need to change?
  6. Nope that did not work, but it could explain the nullpointer exception before.
  7. I have all of the required fields under NetworkMod, and if I try using the sendPacketToServer() method, the game just crashes and says that a packet cannot be sent to a server. Here is the stacktrace for using the sendPacketToAllPlayers() method Jul 30, 2013 4:03:58 PM net.minecraft.launchwrapper.LogWrapper log INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker 2013-07-30 16:03:58 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.2.7.779 for Minecraft 1.6.2 loading 2013-07-30 16:03:58 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_21, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7 2013-07-30 16:03:59 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation 2013-07-30 16:03:59 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg 2013-07-30 16:03:59 [iNFO] [sTDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg 2013-07-30 16:03:59 [sEVERE] [ForgeModLoader] The binary patch set is missing. Things are probably about to go very wrong. 2013-07-30 16:03:59 [iNFO] [ForgeModLoader] Launching wrapped minecraft 2013-07-30 16:04:00 [iNFO] [Minecraft-Client] Setting user: Player170 2013-07-30 16:04:00 [iNFO] [Minecraft-Client] (Session ID is null) 2013-07-30 16:04:02 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0 2013-07-30 16:04:03 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default 2013-07-30 16:04:03 [iNFO] [sTDOUT] 2013-07-30 16:04:03 [iNFO] [sTDOUT] Starting up SoundSystem... 2013-07-30 16:04:03 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization 2013-07-30 16:04:03 [iNFO] [sTDOUT] MinecraftForge v9.10.0.779 Initialized 2013-07-30 16:04:03 [iNFO] [ForgeModLoader] MinecraftForge v9.10.0.779 Initialized 2013-07-30 16:04:03 [iNFO] [sTDOUT] Initializing LWJGL OpenAL 2013-07-30 16:04:03 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-07-30 16:04:03 [iNFO] [sTDOUT] Replaced 101 ore recipies 2013-07-30 16:04:03 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization 2013-07-30 16:04:03 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\config\logging.properties 2013-07-30 16:04:03 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL 2013-07-30 16:04:03 [iNFO] [sTDOUT] OpenAL initialized. 2013-07-30 16:04:04 [iNFO] [ForgeModLoader] Searching C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\mods for mods 2013-07-30 16:04:04 [iNFO] [sTDOUT] 2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load 2013-07-30 16:04:11 [iNFO] [mcp] Activating mod mcp 2013-07-30 16:04:11 [iNFO] [FML] Activating mod FML 2013-07-30 16:04:11 [iNFO] [Forge] Activating mod Forge 2013-07-30 16:04:11 [iNFO] [fireworks] Activating mod fireworks 2013-07-30 16:04:11 [iNFO] [LightBridgesAndDoors] Activating mod LightBridgesAndDoors 2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Registering Forge Packet Handler 2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler 2013-07-30 16:04:11 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSource.png 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightSection.png 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSourceActive.png 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightDoorSource.png 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/gravityLift.png 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSection.png 2013-07-30 16:04:12 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightBridgeSource.png 2013-07-30 16:04:13 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png 2013-07-30 16:04:13 [WARNING] [ForgeModLoader] Mod LightBridgesAndDoors attempted to register a gui network handler during a construction phase 2013-07-30 16:04:13 [iNFO] [sTDERR] java.net.UnknownHostException: www.light-bridges-and-doors-mod.webnode.com 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.net.AbstractPlainSocketImpl.connect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.net.PlainSocketImpl.connect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.net.SocksSocketImpl.connect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.net.Socket.connect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.net.Socket.connect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.NetworkClient.doConnect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.openServer(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.openServer(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.<init>(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.New(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.New(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at kris91268.lbd.UpdateChecker.checkForUpdate(UpdateChecker.java:39) 2013-07-30 16:04:13 [iNFO] [sTDERR] at kris91268.lbd.ModLBD.init(ModLBD.java:178) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:506) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.client.main.Main.main(Main.java:93) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-07-30 16:04:13 [iNFO] [sTDOUT] [LightBridgesAndDoors] Failed to find http://www.light-bridges-and-doors-mod.webnode.com/changelog/, prehaps you are not connected to the internet 2013-07-30 16:04:13 [iNFO] [sTDOUT] www.light-bridges-and-doors-mod.webnode.com 2013-07-30 16:04:13 [iNFO] [sTDOUT] Failed to load from the website 2013-07-30 16:04:13 [iNFO] [sTDERR] java.lang.NullPointerException 2013-07-30 16:04:13 [iNFO] [sTDERR] at kris91268.lbd.UpdateChecker.isThereANewUpdate(UpdateChecker.java:66) 2013-07-30 16:04:13 [iNFO] [sTDERR] at kris91268.lbd.ModLBD.init(ModLBD.java:180) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-07-30 16:04:13 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697) 2013-07-30 16:04:13 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:506) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.client.main.Main.main(Main.java:93) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-07-30 16:04:13 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-07-30 16:04:13 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 5 mods 2013-07-30 16:04:13 [WARNING] [Fireworks+] Mod Fireworks+ is missing a pack.mcmeta file, things may not work well 2013-07-30 16:04:13 [WARNING] [kris91268's Light Bridges and Doors] Mod kris91268's Light Bridges and Doors is missing a pack.mcmeta file, things may not work well 2013-07-30 16:04:13 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Fireworks+, FMLFileResourcePack:kris91268's Light Bridges and Doors 2013-07-30 16:04:13 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png 2013-07-30 16:04:13 [iNFO] [sTDOUT] 2013-07-30 16:04:13 [iNFO] [sTDOUT] SoundSystem shutting down... 2013-07-30 16:04:13 [iNFO] [sTDOUT] Author: Paul Lamb, www.paulscode.com 2013-07-30 16:04:13 [iNFO] [sTDOUT] 2013-07-30 16:04:13 [iNFO] [sTDOUT] 2013-07-30 16:04:13 [iNFO] [sTDOUT] Starting up SoundSystem... 2013-07-30 16:04:13 [iNFO] [sTDOUT] Initializing LWJGL OpenAL 2013-07-30 16:04:13 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-07-30 16:04:14 [iNFO] [sTDOUT] OpenAL initialized. 2013-07-30 16:04:14 [sEVERE] [Minecraft-Client] Realms: Server not available! 2013-07-30 16:04:14 [iNFO] [sTDOUT] 2013-07-30 16:04:19 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2 2013-07-30 16:04:19 [iNFO] [Minecraft-Server] Generating keypair 2013-07-30 16:04:20 [iNFO] [ForgeModLoader] Loading dimension 0 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@6cf81618) 2013-07-30 16:04:20 [iNFO] [ForgeModLoader] Loading dimension 1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@6cf81618) 2013-07-30 16:04:20 [iNFO] [ForgeModLoader] Loading dimension -1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@6cf81618) 2013-07-30 16:04:20 [iNFO] [Minecraft-Server] Preparing start region for level 0 2013-07-30 16:04:21 [iNFO] [sTDOUT] loading single player 2013-07-30 16:04:21 [iNFO] [Minecraft-Server] Player170[/127.0.0.1:0] logged in with entity id 113 at (196.1191858953188, 67.0, -39.81733750857464) 2013-07-30 16:04:21 [iNFO] [Minecraft-Server] Player170 joined the game 2013-07-30 16:04:22 [iNFO] [sTDOUT] Setting up custom skins 2013-07-30 16:04:22 [iNFO] [sTDERR] java.net.UnknownHostException: skins.minecraft.net 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.AbstractPlainSocketImpl.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.PlainSocketImpl.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.SocksSocketImpl.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.Socket.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.Socket.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.NetworkClient.doConnect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.openServer(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.openServer(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.<init>(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.New(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.New(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at net.minecraft.client.renderer.ThreadDownloadImageDataINNER1.run(ThreadDownloadImageDataINNER1.java:30) 2013-07-30 16:04:22 [iNFO] [sTDERR] java.net.UnknownHostException: skins.minecraft.net 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.AbstractPlainSocketImpl.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.PlainSocketImpl.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.SocksSocketImpl.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.Socket.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at java.net.Socket.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.NetworkClient.doConnect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.openServer(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.openServer(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.<init>(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.New(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.http.HttpClient.New(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) 2013-07-30 16:04:22 [iNFO] [sTDERR] at net.minecraft.client.renderer.ThreadDownloadImageDataINNER1.run(ThreadDownloadImageDataINNER1.java:30) 2013-07-30 16:04:24 [iNFO] [sTDOUT] 1.0 2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Stopping server 2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Saving players 2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Player170 left the game 2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Saving worlds 2013-07-30 16:04:24 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Overworld 2013-07-30 16:04:25 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Nether 2013-07-30 16:04:25 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/The End 2013-07-30 16:04:25 [iNFO] [ForgeModLoader] Unloading dimension 0 2013-07-30 16:04:25 [iNFO] [ForgeModLoader] Unloading dimension -1 2013-07-30 16:04:25 [iNFO] [ForgeModLoader] Unloading dimension 1 2013-07-30 16:04:25 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Exception in world tick 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1932) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.main.Main.main(Main.java:93) 2013-07-30 16:04:25 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:25 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-07-30 16:04:25 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2013-07-30 16:04:25 [iNFO] [sTDERR] at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:45) 2013-07-30 16:04:25 [iNFO] [sTDERR] at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35) 2013-07-30 16:04:25 [iNFO] [sTDERR] at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255) 2013-07-30 16:04:25 [iNFO] [sTDERR] at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245) 2013-07-30 16:04:25 [iNFO] [sTDERR] at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1647) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:281) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:99) 2013-07-30 16:04:25 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1916) 2013-07-30 16:04:25 [iNFO] [sTDERR] ... 9 more 2013-07-30 16:04:25 [iNFO] [sTDOUT] ---- Minecraft Crash Report ---- 2013-07-30 16:04:25 [iNFO] [sTDOUT] // Shall we play a game? 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Time: 30/07/13 4:04 PM 2013-07-30 16:04:25 [iNFO] [sTDOUT] Description: Exception in world tick 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] java.lang.NullPointerException 2013-07-30 16:04:25 [iNFO] [sTDOUT] at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:45) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1647) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:281) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.WorldClient.tick(WorldClient.java:99) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1916) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows: 2013-07-30 16:04:25 [iNFO] [sTDOUT] --------------------------------------------------------------------------------------- 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] -- Head -- 2013-07-30 16:04:25 [iNFO] [sTDOUT] Stacktrace: 2013-07-30 16:04:25 [iNFO] [sTDOUT] at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:45) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.NetClientHandler.handleCustomPayload(NetClientHandler.java:1647) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.NetClientHandler.processReadPackets(NetClientHandler.java:281) 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] -- Affected level -- 2013-07-30 16:04:25 [iNFO] [sTDOUT] Details: 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level name: MpServer 2013-07-30 16:04:25 [iNFO] [sTDOUT] All players: 1 total; [EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82]] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Chunk stats: MultiplayerChunkCache: 310 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level seed: 0 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level generator: ID 00 - default, ver 1. Features enabled: false 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level generator options: 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level spawn location: World: (192,64,-44), Chunk: (at 0,4,4 in 12,-3; contains blocks 192,0,-48 to 207,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level time: 14484 game time, 887 day time 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level dimension: 0 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level storage version: 0x00000 - Unknown? 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false 2013-07-30 16:04:25 [iNFO] [sTDOUT] Forced entities: 31 total; [EntityBat['Bat'/64, l='MpServer', x=160.45, y=36.01, z=-37.44], EntityBat['Bat'/77, l='MpServer', x=198.75, y=47.10, z=-53.47], EntityBat['Bat'/78, l='MpServer', x=201.45, y=47.06, z=-48.90], EntityBat['Bat'/79, l='MpServer', x=197.34, y=47.81, z=-47.51], EntityBat['Bat'/72, l='MpServer', x=185.63, y=24.10, z=-23.25], EntityBat['Bat'/87, l='MpServer', x=221.62, y=44.39, z=-61.07], EntityBat['Bat'/86, l='MpServer', x=210.25, y=34.10, z=-75.06], EntityItem['item.tile.grass'/81, l='MpServer', x=200.72, y=67.13, z=-38.91], EntityItem['item.tile.lbd:gravityLift'/80, l='MpServer', x=197.19, y=67.13, z=-41.53], EntityBat['Bat'/82, l='MpServer', x=199.69, y=21.10, z=-17.09], EntityBat['Bat'/93, l='MpServer', x=237.75, y=32.10, z=-45.25], EntityBat['Bat'/92, l='MpServer', x=238.43, y=41.84, z=-51.22], EntityBat['Bat'/95, l='MpServer', x=237.19, y=31.60, z=-50.48], EntityBat['Bat'/94, l='MpServer', x=231.14, y=36.84, z=-48.66], EntityPig['Pig'/89, l='MpServer', x=230.69, y=69.00, z=-107.09], EntityBat['Bat'/88, l='MpServer', x=215.25, y=52.10, z=-55.50], EntityBat['Bat'/91, l='MpServer', x=225.56, y=44.10, z=-67.69], EntityPig['Pig'/90, l='MpServer', x=230.25, y=69.00, z=-104.94], EntityPig['Pig'/103, l='MpServer', x=260.53, y=66.00, z=-107.56], EntityPig['Pig'/100, l='MpServer', x=254.22, y=64.00, z=-96.03], EntityBat['Bat'/101, l='MpServer', x=242.63, y=35.10, z=-48.25], EntityBat['Bat'/98, l='MpServer', x=254.75, y=53.10, z=-94.31], EntityPig['Pig'/99, l='MpServer', x=252.44, y=64.00, z=-95.53], EntityPig['Pig'/96, l='MpServer', x=249.47, y=65.00, z=-98.53], EntityPig['Pig'/97, l='MpServer', x=252.91, y=67.00, z=-107.53], EntityPig['Pig'/106, l='MpServer', x=270.81, y=64.00, z=-40.34], EntityPig['Pig'/107, l='MpServer', x=275.28, y=64.00, z=-57.78], EntityPig['Pig'/104, l='MpServer', x=260.03, y=63.00, z=-59.91], EntityPig['Pig'/105, l='MpServer', x=262.14, y=63.00, z=-48.97], EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82], EntityBat['Bat'/63, l='MpServer', x=170.75, y=48.10, z=-108.69]] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Retry entities: 0 total; [] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Server brand: fml,forge 2013-07-30 16:04:25 [iNFO] [sTDOUT] Server type: Integrated singleplayer server 2013-07-30 16:04:25 [iNFO] [sTDOUT] Stacktrace: 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1929) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-07-30 16:04:25 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] -- Affected level -- 2013-07-30 16:04:25 [iNFO] [sTDOUT] Details: 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level name: MpServer 2013-07-30 16:04:25 [iNFO] [sTDOUT] All players: 1 total; [EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82]] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Chunk stats: MultiplayerChunkCache: 310 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level seed: 0 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level generator: ID 00 - default, ver 1. Features enabled: false 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level generator options: 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level spawn location: World: (192,64,-44), Chunk: (at 0,4,4 in 12,-3; contains blocks 192,0,-48 to 207,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level time: 14484 game time, 887 day time 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level dimension: 0 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level storage version: 0x00000 - Unknown? 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false 2013-07-30 16:04:25 [iNFO] [sTDOUT] Forced entities: 31 total; [EntityBat['Bat'/64, l='MpServer', x=160.45, y=36.01, z=-37.44], EntityBat['Bat'/77, l='MpServer', x=198.75, y=47.10, z=-53.47], EntityBat['Bat'/78, l='MpServer', x=201.45, y=47.06, z=-48.90], EntityBat['Bat'/79, l='MpServer', x=197.34, y=47.81, z=-47.51], EntityBat['Bat'/72, l='MpServer', x=185.63, y=24.10, z=-23.25], EntityBat['Bat'/87, l='MpServer', x=221.62, y=44.39, z=-61.07], EntityBat['Bat'/86, l='MpServer', x=210.25, y=34.10, z=-75.06], EntityItem['item.tile.grass'/81, l='MpServer', x=200.72, y=67.13, z=-38.91], EntityItem['item.tile.lbd:gravityLift'/80, l='MpServer', x=197.19, y=67.13, z=-41.53], EntityBat['Bat'/82, l='MpServer', x=199.69, y=21.10, z=-17.09], EntityBat['Bat'/93, l='MpServer', x=237.75, y=32.10, z=-45.25], EntityBat['Bat'/92, l='MpServer', x=238.43, y=41.84, z=-51.22], EntityBat['Bat'/95, l='MpServer', x=237.19, y=31.60, z=-50.48], EntityBat['Bat'/94, l='MpServer', x=231.14, y=36.84, z=-48.66], EntityPig['Pig'/89, l='MpServer', x=230.69, y=69.00, z=-107.09], EntityBat['Bat'/88, l='MpServer', x=215.25, y=52.10, z=-55.50], EntityBat['Bat'/91, l='MpServer', x=225.56, y=44.10, z=-67.69], EntityPig['Pig'/90, l='MpServer', x=230.25, y=69.00, z=-104.94], EntityPig['Pig'/103, l='MpServer', x=260.53, y=66.00, z=-107.56], EntityPig['Pig'/100, l='MpServer', x=254.22, y=64.00, z=-96.03], EntityBat['Bat'/101, l='MpServer', x=242.63, y=35.10, z=-48.25], EntityBat['Bat'/98, l='MpServer', x=254.75, y=53.10, z=-94.31], EntityPig['Pig'/99, l='MpServer', x=252.44, y=64.00, z=-95.53], EntityPig['Pig'/96, l='MpServer', x=249.47, y=65.00, z=-98.53], EntityPig['Pig'/97, l='MpServer', x=252.91, y=67.00, z=-107.53], EntityPig['Pig'/106, l='MpServer', x=270.81, y=64.00, z=-40.34], EntityPig['Pig'/107, l='MpServer', x=275.28, y=64.00, z=-57.78], EntityPig['Pig'/104, l='MpServer', x=260.03, y=63.00, z=-59.91], EntityPig['Pig'/105, l='MpServer', x=262.14, y=63.00, z=-48.97], EntityClientPlayerMP['Player170'/113, l='MpServer', x=196.12, y=68.62, z=-39.82], EntityBat['Bat'/63, l='MpServer', x=170.75, y=48.10, z=-108.69]] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Retry entities: 0 total; [] 2013-07-30 16:04:25 [iNFO] [sTDOUT] Server brand: fml,forge 2013-07-30 16:04:25 [iNFO] [sTDOUT] Server type: Integrated singleplayer server 2013-07-30 16:04:25 [iNFO] [sTDOUT] 2013-07-30 16:04:25 [iNFO] [sTDOUT] -- System Details -- 2013-07-30 16:04:25 [iNFO] [sTDOUT] Details: 2013-07-30 16:04:25 [iNFO] [sTDOUT] Minecraft Version: 1.6.2 2013-07-30 16:04:25 [iNFO] [sTDOUT] Operating System: Windows 7 (amd64) version 6.1 2013-07-30 16:04:25 [iNFO] [sTDOUT] Java Version: 1.7.0_21, Oracle Corporation 2013-07-30 16:04:25 [iNFO] [sTDOUT] Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation 2013-07-30 16:04:25 [iNFO] [sTDOUT] Memory: 802305360 bytes (765 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) 2013-07-30 16:04:25 [iNFO] [sTDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 2013-07-30 16:04:25 [iNFO] [sTDOUT] AABB Pool Size: 3251 (182056 bytes; 0 MB) allocated, 373 (20888 bytes; 0 MB) used 2013-07-30 16:04:25 [iNFO] [sTDOUT] Suspicious classes: FML and Forge are installed 2013-07-30 16:04:25 [iNFO] [sTDOUT] IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63 2013-07-30 16:04:25 [iNFO] [sTDOUT] FML: MCP v8.04 FML v6.2.7.779 Minecraft Forge 9.10.0.779 5 mods loaded, 5 mods active 2013-07-30 16:04:25 [iNFO] [sTDOUT] mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available 2013-07-30 16:04:25 [iNFO] [sTDOUT] FML{6.2.7.779} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available 2013-07-30 16:04:25 [iNFO] [sTDOUT] Forge{9.10.0.779} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available 2013-07-30 16:04:25 [iNFO] [sTDOUT] fireworks{0.1.0} [Fireworks+] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available 2013-07-30 16:04:25 [iNFO] [sTDOUT] LightBridgesAndDoors{0.1.5} [kris91268's Light Bridges and Doors] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available 2013-07-30 16:04:25 [iNFO] [sTDOUT] Launched Version: 1.6 2013-07-30 16:04:25 [iNFO] [sTDOUT] LWJGL: 2.9.0 2013-07-30 16:04:25 [iNFO] [sTDOUT] OpenGL: Intel(R) HD Graphics 4000 GL version 3.3.0 - Build 8.15.10.2653, Intel 2013-07-30 16:04:25 [iNFO] [sTDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge' 2013-07-30 16:04:25 [iNFO] [sTDOUT] Type: Client (map_client.txt) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Resource Pack: Default 2013-07-30 16:04:25 [iNFO] [sTDOUT] Current Language: English (US) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Profiler Position: N/A (disabled) 2013-07-30 16:04:25 [iNFO] [sTDOUT] Vec3 Pool Size: 571 (31976 bytes; 0 MB) allocated, 62 (3472 bytes; 0 MB) used 2013-07-30 16:04:25 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\.\crash-reports\crash-2013-07-30_16.04.25-client.txt AL lib: (EE) alc_cleanup: 1 device not closed And here is the stacktrace when using the sendPacketToServer() method Jul 30, 2013 7:53:20 PM net.minecraft.launchwrapper.LogWrapper log INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker 2013-07-30 19:53:20 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.2.7.779 for Minecraft 1.6.2 loading 2013-07-30 19:53:20 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_21, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7 2013-07-30 19:53:20 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation 2013-07-30 19:53:20 [iNFO] [sTDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg 2013-07-30 19:53:20 [iNFO] [sTDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg 2013-07-30 19:53:21 [sEVERE] [ForgeModLoader] The binary patch set is missing. Things are probably about to go very wrong. 2013-07-30 19:53:21 [iNFO] [ForgeModLoader] Launching wrapped minecraft 2013-07-30 19:53:22 [iNFO] [Minecraft-Client] Setting user: Player30 2013-07-30 19:53:22 [iNFO] [Minecraft-Client] (Session ID is null) 2013-07-30 19:53:24 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0 2013-07-30 19:53:25 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default 2013-07-30 19:53:25 [iNFO] [sTDOUT] 2013-07-30 19:53:25 [iNFO] [sTDOUT] Starting up SoundSystem... 2013-07-30 19:53:25 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization 2013-07-30 19:53:25 [iNFO] [sTDOUT] MinecraftForge v9.10.0.779 Initialized 2013-07-30 19:53:25 [iNFO] [ForgeModLoader] MinecraftForge v9.10.0.779 Initialized 2013-07-30 19:53:25 [iNFO] [sTDOUT] Initializing LWJGL OpenAL 2013-07-30 19:53:25 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-07-30 19:53:26 [iNFO] [sTDOUT] OpenAL initialized. 2013-07-30 19:53:26 [iNFO] [sTDOUT] Replaced 101 ore recipies 2013-07-30 19:53:26 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization 2013-07-30 19:53:26 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\config\logging.properties 2013-07-30 19:53:26 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL 2013-07-30 19:53:26 [iNFO] [sTDOUT] 2013-07-30 19:53:26 [iNFO] [ForgeModLoader] Searching C:\Users\Arbiter\Documents\Minecraft\Minecraft Modding\mcp 1.6.2\mcp\jars\mods for mods 2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load 2013-07-30 19:53:34 [iNFO] [mcp] Activating mod mcp 2013-07-30 19:53:34 [iNFO] [FML] Activating mod FML 2013-07-30 19:53:34 [iNFO] [Forge] Activating mod Forge 2013-07-30 19:53:34 [iNFO] [fireworks] Activating mod fireworks 2013-07-30 19:53:34 [iNFO] [LightBridgesAndDoors] Activating mod LightBridgesAndDoors 2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Registering Forge Packet Handler 2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler 2013-07-30 19:53:34 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSource.png 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightSection.png 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSourceActive.png 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightDoorSource.png 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/gravityLift.png 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightRailSection.png 2013-07-30 19:53:35 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: lbd:textures/blocks/lightBridgeSource.png 2013-07-30 19:53:36 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png 2013-07-30 19:53:36 [WARNING] [ForgeModLoader] Mod LightBridgesAndDoors attempted to register a gui network handler during a construction phase 2013-07-30 19:53:37 [iNFO] [sTDOUT] [LightBridgesAndDoors] Successfully loaded info from http://www.light-bridges-and-doors-mod.webnode.com/changelog/ 2013-07-30 19:53:37 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 5 mods 2013-07-30 19:53:37 [WARNING] [Fireworks+] Mod Fireworks+ is missing a pack.mcmeta file, things may not work well 2013-07-30 19:53:37 [WARNING] [kris91268's Light Bridges and Doors] Mod kris91268's Light Bridges and Doors is missing a pack.mcmeta file, things may not work well 2013-07-30 19:53:37 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Fireworks+, FMLFileResourcePack:kris91268's Light Bridges and Doors 2013-07-30 19:53:38 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: missing_icon_item_5316_fireworks:textures/items/cardboard.png 2013-07-30 19:53:38 [iNFO] [sTDOUT] 2013-07-30 19:53:38 [iNFO] [sTDOUT] SoundSystem shutting down... 2013-07-30 19:53:38 [iNFO] [sTDOUT] Author: Paul Lamb, www.paulscode.com 2013-07-30 19:53:38 [iNFO] [sTDOUT] 2013-07-30 19:53:38 [iNFO] [sTDOUT] 2013-07-30 19:53:38 [iNFO] [sTDOUT] Starting up SoundSystem... 2013-07-30 19:53:38 [iNFO] [sTDOUT] Initializing LWJGL OpenAL 2013-07-30 19:53:38 [iNFO] [sTDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-07-30 19:53:38 [iNFO] [sTDOUT] OpenAL initialized. 2013-07-30 19:53:39 [iNFO] [sTDOUT] 2013-07-30 19:53:39 [sEVERE] [Minecraft-Client] Realms: Invalid session id 2013-07-30 19:53:44 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2 2013-07-30 19:53:44 [iNFO] [Minecraft-Server] Generating keypair 2013-07-30 19:53:45 [iNFO] [ForgeModLoader] Loading dimension 0 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@2c27973) 2013-07-30 19:53:45 [iNFO] [ForgeModLoader] Loading dimension 1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@2c27973) 2013-07-30 19:53:45 [iNFO] [ForgeModLoader] Loading dimension -1 (aghsdf) (net.minecraft.server.integrated.IntegratedServer@2c27973) 2013-07-30 19:53:45 [iNFO] [Minecraft-Server] Preparing start region for level 0 2013-07-30 19:53:47 [iNFO] [sTDOUT] loading single player 2013-07-30 19:53:47 [iNFO] [Minecraft-Server] Player30[/127.0.0.1:0] logged in with entity id 113 at (196.1191858953188, 67.0, -39.81733750857464) 2013-07-30 19:53:47 [iNFO] [Minecraft-Server] Player30 joined the game 2013-07-30 19:53:47 [iNFO] [sTDOUT] Setting up custom skins 2013-07-30 19:53:49 [iNFO] [sTDOUT] 0.0 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Player30 left the game 2013-07-30 19:53:49 [iNFO] [sTDERR] kris91268.lbd.Packet.PacketBase$ProtocolException: Cannot send packet to server 2013-07-30 19:53:49 [iNFO] [sTDERR] at kris91268.lbd.Packet.PacketBlockChange.execute(PacketBlockChange.java:51) 2013-07-30 19:53:49 [iNFO] [sTDERR] at kris91268.lbd.Packet.PacketHandler.onPacketData(PacketHandler.java:35) 2013-07-30 19:53:49 [iNFO] [sTDERR] at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255) 2013-07-30 19:53:49 [iNFO] [sTDERR] at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245) 2013-07-30 19:53:49 [iNFO] [sTDERR] at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.network.NetServerHandler.handleCustomPayload(NetServerHandler.java:1111) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:689) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:585) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) 2013-07-30 19:53:49 [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Player30 lost connection: 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Player30 left the game 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Stopping singleplayer server as player logged out 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Stopping server 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Saving players 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Saving worlds 2013-07-30 19:53:49 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Overworld 2013-07-30 19:53:50 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/Nether 2013-07-30 19:53:50 [iNFO] [Minecraft-Server] Saving chunks for level 'aghsdf'/The End 2013-07-30 19:53:50 [iNFO] [ForgeModLoader] Unloading dimension 0 2013-07-30 19:53:50 [iNFO] [ForgeModLoader] Unloading dimension -1 2013-07-30 19:53:50 [iNFO] [ForgeModLoader] Unloading dimension 1 I know it is coded to throw an exception if the world type is server, but I was taught that that was the best way.
  8. I have made all of the files, and tested it out. When I try it out, the game crashes with a null pointer exception. I know it is doing this because there is no tile entity defined, but can't figure out where it is being initialized to null. Here are all of the files that have been updated, focus on the part in the gui where it creates a new packet, and the packet files PacketHandler.java package kris91268.lbd.Packet; import java.util.logging.Logger; import kris91268.lbd.Packet.PacketBase.ProtocolException; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet250CustomPayload; import cpw.mods.fml.common.network.IPacketHandler; import cpw.mods.fml.common.network.Player; import cpw.mods.fml.relauncher.Side; /** * * @author Arbiter * */ public class PacketHandler 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(); PacketBase packetBase = PacketBase.constructPacket(packetId); packetBase.read(in); packetBase.execute(entityPlayer, entityPlayer.worldObj.isRemote ? Side.CLIENT : Side.SERVER); } catch (ProtocolException e) { if (player instanceof EntityPlayerMP) { ((EntityPlayerMP)player).playerNetServerHandler.kickPlayerFromServer("Protocol Exception!"); e.printStackTrace(); Logger.getLogger("lbd").warning("Player " + ((EntityPlayer)player).username + " caused a Protocol Exception"); } } catch (ReflectiveOperationException e) { throw new RuntimeException("Unexpected Reflection exception during Packet construction"); } } } PacketBase.java package kris91268.lbd.Packet; 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 PacketBase { public static final String CHANNEL = "lbd"; private static final BiMap<Integer, Class<? extends PacketBase>> idMap; static { ImmutableBiMap.Builder<Integer, Class<? extends PacketBase>> builder = ImmutableBiMap.builder(); builder.put(Integer.valueOf(0), PacketBlockChange.class); idMap = builder.build(); } public static PacketBase constructPacket(int packetId) throws ProtocolException, ReflectiveOperationException { Class<? extends PacketBase> 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 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()); } public abstract void write(ByteArrayDataOutput out); public abstract void read(ByteArrayDataInput in) throws ProtocolException; public abstract void execute(EntityPlayer par1EntityPlayer, Side par2Side) throws ProtocolException; } PacketBlockChange.java package kris91268.lbd.Packet; import kris91268.lbd.Tileentity.TileEntityGravityLift; 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 PacketBlockChange extends PacketBase { private double height; private TileEntityGravityLift tileEntity; public PacketBlockChange(double height, TileEntityGravityLift par2, int x, int y, int z) { this.height = height; tileEntity = (TileEntityGravityLift)par2.worldObj.getBlockTileEntity(x, y, z); } public PacketBlockChange() { } @Override public void write(ByteArrayDataOutput out) { out.writeDouble(height); } @Override public void read(ByteArrayDataInput in) throws ProtocolException { height = in.readDouble(); } @Override public void execute(EntityPlayer player, Side side) throws ProtocolException { if (side.isClient()) { System.out.println(tileEntity.height); System.out.println(this.height); tileEntity.height = this.height; } else { throw new ProtocolException("Cannot send packet to server"); } } } GuiGravityLift.java package kris91268.lbd; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import cpw.mods.fml.common.network.PacketDispatcher; import kris91268.lbd.Blocks.BlockGravityLift; import kris91268.lbd.Packet.PacketBlockChange; import kris91268.lbd.Tileentity.TileEntityGravityLift; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; /** * * @author Arbiter * */ public class GuiGravityLift extends GuiContainer { private static final ResourceLocation texture = new ResourceLocation("lbd:textures/gui/gravlift.png"); private GuiButton dnButton; private GuiButton decByPointZeroOne; private GuiButton decByPointOne; private GuiButton incByPointOne; private GuiButton incByOnePointZero; private GuiTextField number; public static String gravLiftHeight; private TileEntityGravityLift tileEntity; public GuiGravityLift(InventoryPlayer par1, TileEntityGravityLift par2) { super(new ContainerGravityLift(par1, par2)); tileEntity = par2; gravLiftHeight = par2.height.toString(); } @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRenderer.drawString("Gravity Lift", 8, 6, 4210752); fontRenderer.drawString("Inventory", 8, ySize - 96 + 2, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { this.mc.func_110434_K().func_110577_a(texture); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int x = (width - xSize) / 2; int y = (height - ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); this.number.drawTextBox(); } @Override public void initGui() { super.initGui(); this.buttonList.clear(); Keyboard.enableRepeatEvents(true); this.buttonList.add(this.dnButton = new GuiButton(0, this.width / 2 - 25, this.height / 4 + 35, 50, 20, "Done")); this.buttonList.add(this.decByPointZeroOne = new GuiButton(1, this.width / 2 - 75, this.height / 4 + 0, 40, 20, "-0.1")); this.buttonList.add(this.decByPointOne = new GuiButton(2, this.width / 2 - 75, this.height / 4 + 25, 40, 20, "-1.0")); this.buttonList.add(this.incByPointOne = new GuiButton(3, this.width / 2 + 25, this.height / 4 + 0, 40, 20, "+0.1")); this.buttonList.add(this.incByOnePointZero = new GuiButton(4, this.width / 2 + 25, this.height / 4 + 25, 40, 20, "+1.0")); this.number = new GuiTextField(this.fontRenderer, this.width / 2 - 20, this.height / 4 + 1, 40, 20); this.number.setVisible(true); this.number.setCanLoseFocus(false); this.number.setFocused(true); this.number.setText(tileEntity.height.toString()); } public void onGuiClosed() { Keyboard.enableRepeatEvents(false); Double theNumber = Double.parseDouble(gravLiftHeight); tileEntity.height = theNumber; tileEntity.bindHeightToTileEntity(theNumber); } public boolean isAboveZero(String par1Str) { Double theDouble = Double.parseDouble(par1Str); return theDouble >= 0.00 ? true : false; } public boolean isBelowFive(String par1Str) { Double theDouble = Double.parseDouble(par1Str); return theDouble <= 5.00 ? true : false; } public void updateScreen() { this.number.updateCursorCounter(); } /** public void mouseClicked(int par1, int par2, int par3) { super.mouseClicked(par1, par2, par3); this.number.mouseClicked(par1, par2, par3); } public void keyTyped(char par1, int par2) { this.number.textboxKeyTyped(par1, par2); ((GuiButton)this.buttonList.get(0)).enabled = this.number.getText().trim().length() > 0; if (par2 == 28 || par2 == 156) { this.actionPerformed((GuiButton)this.buttonList.get(0)); } }**/ @Override protected void actionPerformed(GuiButton guiButton) { switch (guiButton.id) { case 0: this.mc.displayGuiScreen((GuiScreen)null); break; case 1: Double heightInDoubles = Double.parseDouble(gravLiftHeight); if (heightInDoubles != 0.0) { heightInDoubles -= 0.1; } gravLiftHeight = heightInDoubles.toString(); number.setText(gravLiftHeight); break; case 2: Double heightInDoubles1 = Double.parseDouble(gravLiftHeight); if (heightInDoubles1 < 1.0) { heightInDoubles1 = 0.0; } else { heightInDoubles1 -= 1.0; } gravLiftHeight = heightInDoubles1.toString(); number.setText(gravLiftHeight); break; case 3: Double theHeight = Double.parseDouble(gravLiftHeight); if (theHeight != 5.0) { theHeight += 0.1; } gravLiftHeight = theHeight.toString(); number.setText(gravLiftHeight); break; case 4: Double theNumber = Double.parseDouble(gravLiftHeight); if (theNumber > 4.0) { theNumber = 5.0; } else { theNumber += 1.0; } gravLiftHeight = theNumber.toString(); number.setText(gravLiftHeight); System.out.println(tileEntity.height); int x = tileEntity.xCoord; int y = tileEntity.yCoord; int z = tileEntity.zCoord; PacketDispatcher.sendPacketToAllPlayers(new PacketBlockChange(theNumber, tileEntity, x, y, z).makePacket()); default: break; } } } TileEntityGravityLift.java package kris91268.lbd.Tileentity; import java.awt.List; import kris91268.lbd.Blocks.BlockGravityLift; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagDouble; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; /** * * @author Arbiter * */ public class TileEntityGravityLift extends TileEntity { private String aString; public Double height = new Double(0.0D); public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); height = par1NBTTagCompound.getDouble("height"); } public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setDouble("height", height); } public boolean isUsableByPlayer(EntityPlayer par1EntityPlayer) { return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D; } public void something(String par1Str) { this.aString = par1Str; } public void bindHeightToTileEntity(double theHeight) { this.height = theHeight; } } Tell me if you need any other files And again, thanks for the help you have given me so far.
  9. Interesting, I have not thought about making a NBT tag variable. The height variable is changed in the GuiGravityLift.java file under the actionPerformed method when the buttons are clicked, and when the Done button is clicked.
  10. How would you suggest to change the height, should I sent it to the tile entity of the block at the x y z coordinates?
  11. Here is the PacketHandler class, what is next? PacketHandler.java package kris91268.lbd; import java.util.logging.Logger; import kris91268.lbd.PacketBase.ProtocolException; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet250CustomPayload; import cpw.mods.fml.common.network.IPacketHandler; import cpw.mods.fml.common.network.Player; import cpw.mods.fml.relauncher.Side; /** * * @author Arbiter * */ public class PacketHandler 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(); PacketBase packetBase = PacketBase.constructPacket(packetId); packetBase.read(in); packetBase.execute(entityPlayer, entityPlayer.worldObj.isRemote ? Side.CLIENT : Side.SERVER); } catch (ProtocolException e) { if (player instanceof EntityPlayerMP) { ((EntityPlayerMP)player).playerNetServerHandler.kickPlayerFromServer("Protocol Exception!"); Logger.getLogger("lbd").warning("Player " + ((EntityPlayer)player).username + " caused a Protocol Exception"); } } catch (ReflectiveOperationException e) { throw new RuntimeException("Unexpected Reflection exception during Packet construction"); } } }
  12. OK, the PacketBase class is all figured out, what next? Here is the code for the PacketBase PacketBase.java package kris91268.lbd; import net.minecraft.entity.player.EntityPlayer; 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 cpw.mods.fml.relauncher.Side; /** * * @author Arbiter * */ public abstract class PacketBase { public static final String CHANNEL = "lbd"; private static final BiMap<Integer, Class<? extends PacketBase>> idMap; static { ImmutableBiMap.Builder<Integer, Class<? extends PacketBase>> builder = ImmutableBiMap.builder(); idMap = builder.build(); } public static PacketBase constructPacket(int packetId) throws ProtocolException, ReflectiveOperationException { Class<? extends PacketBase> 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); public abstract void execute(EntityPlayer par1EntityPlayer, Side par2Side); }
  13. I don't think you can, if there is, I have never heard of it.
  14. I'm sorry, but I have already looked through those tutorials, and I still don't know what to do, or where I should implement everything. It should be much simpler than this shouldn't it? Thank you already for the help you have given me, it is much appreciated. I will mention you in the mod's credits. No need to put me in the mod's credits! Packet handling is a bit confusing at first, but once you actually get one working it's simple. I can try to figure out what needs to be done, but it is quite late where I am, so I will take a look at your code tomorrow, sound good? OK, thank you so much Just a heads up with my code, some of it might be pointless or unccessesary, just ignore them, unless they are of utmost importance
  15. I'm sorry, but I have already looked through those tutorials, and I still don't know what to do, or where I should implement everything. It should be much simpler than this shouldn't it? Thank you already for the help you have given me, it is much appreciated. I will mention you in the mod's credits.
  16. And how would I do this? Or should I just remove the check for a remote server?
  17. Hello there, I have implemented a gui to a block that sets it's height for which launches you in the air on contact with the block. When I run the game, I can set different height levels for different blocks, but when I save and quit then reload, they are not saved and are reset to the default value Is there any way for me to save the nbt data when the gui is closed, or when the game is quit? Because I checked, and the tile entities are reading and writing too early. Examples BlockGravityLift.java package kris91268.lbd.Blocks; import java.util.Random; import kris91268.lbd.GuiGravityLift; import kris91268.lbd.ModLBD; import kris91268.lbd.Tileentity.TileEntityGravityLift; import cpw.mods.fml.common.registry.BlockProxy; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; /** * * @author Arbiter * */ public class BlockGravityLift extends BlockContainer implements BlockProxy { public Class theTileEntityClass; public BlockGravityLift(int par1, Class entityClass) { super(par1, Material.iron); this.theTileEntityClass = entityClass; setHardness(1.5F); setResistance(1.0F); setStepSound(Block.soundMetalFootstep); setUnlocalizedName("lbd:gravityLift"); func_111022_d("lbd:gravityLift"); setCreativeTab(CreativeTabs.tabRedstone); setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3F, 1.0F); } public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { TileEntityGravityLift tileEntity = (TileEntityGravityLift)par1World.getBlockTileEntity(par2, par3, par4); if (tileEntity.height <= 0.0D) { return; } if (par1World.isRemote) { if (par5Entity instanceof EntityPlayer) { par5Entity.setVelocity(0.0D, tileEntity.height / 2, 0.0D); par5Entity.moveEntity(0.0D, tileEntity.height, 0.0D); } } else { if (par5Entity instanceof EntityPlayerMP) { par5Entity.addVelocity(0.0D, tileEntity.height / 2, 0.0D); par5Entity.moveEntity(0.0D, tileEntity.height, 0.0D); } } } public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer player, int metadata, float par7, float par8, float par9) { if (!par1World.isRemote) { TileEntityGravityLift tileEntity = (TileEntityGravityLift)par1World.getBlockTileEntity(par2, par3, par4); if (tileEntity != null) { player.openGui(ModLBD.instance, 0, par1World, par2, par3, par4); } } return true; } public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { double d0 = (double)((float)par2 + 0.5F); double d1 = (double)((float)par3 + 0.3F); double d2 = (double)((float)par4 + 0.5F); par1World.spawnParticle("smoke", d0, d1, d2, 0.0D, 0.0D, 0.0D); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return -1; } public TileEntity getBlockEntity() { return new TileEntityGravityLift(); } public TileEntity createNewTileEntity(World par1World) { try { return (TileEntity)theTileEntityClass.newInstance(); } catch (Exception e) { throw new RuntimeException(); } } } TileEntityGravityLift.java package kris91268.lbd.Tileentity; import java.awt.List; import kris91268.lbd.Blocks.BlockGravityLift; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; /** * * @author Arbiter * */ public class TileEntityGravityLift extends TileEntity { private String aString; public Double height = new Double(0.0D); public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); this.height = par1NBTTagCompound.getDouble("height"); System.out.println(height); } public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setDouble("height", height); System.out.println(height); } public boolean isUsableByPlayer(EntityPlayer par1EntityPlayer) { return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D; } public void something(String par1Str) { this.aString = par1Str; } } GuiGravityLift.java package kris91268.lbd; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import kris91268.lbd.Blocks.BlockGravityLift; import kris91268.lbd.Tileentity.TileEntityGravityLift; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; /** * * @author Arbiter * */ public class GuiGravityLift extends GuiContainer { private static final ResourceLocation texture = new ResourceLocation("lbd:textures/gui/gravlift.png"); private GuiButton dnButton; private GuiButton decByPointZeroOne; private GuiButton decByPointOne; private GuiButton incByPointOne; private GuiButton incByOnePointZero; private GuiTextField number; public static String gravLiftHeight; private TileEntityGravityLift tileEntity; public GuiGravityLift(InventoryPlayer par1, TileEntityGravityLift par2) { super(new ContainerGravityLift(par1, par2)); tileEntity = par2; gravLiftHeight = tileEntity.height.toString(); } @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRenderer.drawString("Gravity Lift", 8, 6, 4210752); fontRenderer.drawString("Inventory", 8, ySize - 96 + 2, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { this.mc.func_110434_K().func_110577_a(texture); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int x = (width - xSize) / 2; int y = (height - ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); this.number.drawTextBox(); } @Override public void initGui() { super.initGui(); this.buttonList.clear(); Keyboard.enableRepeatEvents(true); this.buttonList.add(this.dnButton = new GuiButton(0, this.width / 2 - 25, this.height / 4 + 35, 50, 20, "Done")); this.buttonList.add(this.decByPointZeroOne = new GuiButton(1, this.width / 2 - 75, this.height / 4 + 0, 40, 20, "-0.1")); this.buttonList.add(this.decByPointOne = new GuiButton(2, this.width / 2 - 75, this.height / 4 + 25, 40, 20, "-1.0")); this.buttonList.add(this.incByPointOne = new GuiButton(3, this.width / 2 + 25, this.height / 4 + 0, 40, 20, "+0.1")); this.buttonList.add(this.incByOnePointZero = new GuiButton(4, this.width / 2 + 25, this.height / 2 + 25, 40, 20, "+1.0")); this.number = new GuiTextField(this.fontRenderer, this.width / 2 - 20, this.height / 4 + 1, 40, 20); this.number.setVisible(true); this.number.setCanLoseFocus(false); this.number.setFocused(true); this.number.setText(tileEntity.height.toString()); } public void onGuiClosed() { Keyboard.enableRepeatEvents(false); Double theNumber = Double.parseDouble(gravLiftHeight); tileEntity.height = theNumber; } public boolean isAboveZero(String par1Str) { Double theDouble = Double.parseDouble(par1Str); return theDouble >= 0.00D ? true : false; } public boolean isBelowFive(String par1Str) { Double theDouble = Double.parseDouble(par1Str); return theDouble <= 5.0D ? true : false; } public void updateScreen() { this.number.updateCursorCounter(); } @Override protected void actionPerformed(GuiButton guiButton) { switch (guiButton.id) { case 0: this.mc.displayGuiScreen((GuiScreen)null); break; case 1: if (isAboveZero(gravLiftHeight)) { Double heightInDoubles = Double.parseDouble(gravLiftHeight); heightInDoubles -= 0.1D; gravLiftHeight = heightInDoubles.toString(); number.setText(gravLiftHeight); tileEntity.height = heightInDoubles; } break; case 2: if (isAboveZero(gravLiftHeight)) { Double heightInDoubles1 = Double.parseDouble(gravLiftHeight); if (heightInDoubles1 < 1.0D) { heightInDoubles1 = 0.0D; } else { heightInDoubles1 -= 1.0D; } gravLiftHeight = heightInDoubles1.toString(); number.setText(gravLiftHeight); tileEntity.height = heightInDoubles1; } break; case 3: if (isBelowFive(gravLiftHeight)) { Double theHeight = Double.parseDouble(gravLiftHeight); theHeight += 0.1D; gravLiftHeight = theHeight.toString(); number.setText(gravLiftHeight); tileEntity.height = theHeight; } break; case 4: if (isBelowFive(gravLiftHeight)) { Double theNumber = Double.parseDouble(gravLiftHeight); if (theNumber > 4.0D) { theNumber = 5.0D; } else { theNumber += 1.0D; } gravLiftHeight = theNumber.toString(); number.setText(gravLiftHeight); tileEntity.height = theNumber; } default: break; } } } Any help would be much appreciated
  18. Thank you so much, you are amazing. I would of figured this out myself, but I did not see that the other method was a new one (notch changed the onBlockPlacedBy method), but anyway, thanks so much. +Thank you
  19. Sorry, but I am not that good with annotations, it never occurs to me to use the @Override annotation. But I do feel stupid about myself because I didn't see this
  20. Please can someone reply to this/help me out, as this is a very urgent bug.
  21. Hello to anyone reading this, I am kris91268, the creator of Light bridges and doors, if you may know On a previous version of Minecraft (1.5.2) My light door rotated correctly when you place it on the underside of a block. But in the 1.6 versions, it doesn't do this anymore, and only can rotate in one way (I would of said one direction, but I don't want to). I was wandering if anyone on the forums could help me with this dilemma. Below is the source code of the whole BlockLightDoorSource file, any help would be much appreciated. BlockLightDoorSource.java package kris91268.lbd.Blocks; import java.util.Random; import kris91268.lbd.ModLBD; import kris91268.lbd.Tileentity.TileEntityLightDoorSource; import cpw.mods.fml.common.registry.BlockProxy; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLiving; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import static net.minecraftforge.common.ForgeDirection.*; /** * * @author Arbiter * */ public class BlockLightDoorSource extends BlockContainer implements BlockProxy { public final boolean powered; public BlockLightDoorSource(int par1, boolean par2) { super(par1, Material.iron); powered = par2; setHardness(1.5F); setResistance(0.5F); setStepSound(Block.soundMetalFootstep); setUnlocalizedName("lightDoorSource"); setCreativeTab(CreativeTabs.tabRedstone); } public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { return false; } public int getRenderBlockPass() { return 1; } public void onBlockAdded(World par1World, int par2, int par3, int par4) { if (par1World.getBlockMetadata(par2, par3, par4) == 0) { if (par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); } else if (par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 1, 2); } else if (par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); } else if (par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); } else { this.dropLightDoorIfCantStay(par1World, par2, par3, par4); } } if (par1World.isRemote) { if (this.powered && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) { par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, 4); } else if (!this.powered && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) { int par5 = par1World.getBlockMetadata(par2, par3, par4); if (par5 == 5) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 5, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 0, 2); } else { break; } } } if (par5 == 1) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 1, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 1, 2); } else { break; } } } if (par5 == 2) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 2, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 2, 2); } else { break; } } } if (par5 == 3) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 3, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 3, 2); } else { break; } } } } } } public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { return par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true); } public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { int par10 = par9; if (par9 == 1 && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par10 = 1; } if (par9 == 3 && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par10 = 3; } if (par9 == 5 && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par10 = 5; } if (par9 == 2 && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true)) { par10 = 2; } return par10; } public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { int par5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4); float par6 = 0.625F; float par7 = 0.575F; if (par5 == 5) { // Shorter side facing west setBlockBounds(1.0F - par6, 1.0F, 0.0F, 0.55F, 0.8F, 1.0F); } if (par5 == 1) { // Shorter side facing north setBlockBounds(0.0F, 1.0F, 1.0F - par7, 1.0F, 0.8F, 0.625F); } if (par5 == 2) { // Shorter side facing east setBlockBounds(1.0F - par7, 1.0F, 0.0F, 0.625F, 0.8F, 1.0F); } if (par5 == 3) { // Shorter side facing south setBlockBounds(0.0F, 1.0F, 1.0F - par6, 1.0F, 0.8F, 0.55F); } } protected boolean dropLightDoorIfCantStay(World par1World, int par2, int par3, int par4) { if (!this.canPlaceBlockAt(par1World, par2, par3, par4)) { if (par1World.getBlockId(par2, par3, par4) == this.blockID) { this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); par1World.setBlockToAir(par2, par3, par4); } return false; } else { return true; } } public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) { if (this.dropLightDoorIfCantStay(par1World, par2, par3, par4)) { int par6 = par1World.getBlockMetadata(par2, par3, par4); boolean flag = false; if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true) && par6 == 5) { flag = true; } if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true) && par6 == 2) { flag = true; } if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true) && par6 == 3) { flag = true; } if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN, true) && par6 == 1) { flag = true; } if (flag) { this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); par1World.setBlockToAir(par2, par3, par4); } } if (!par1World.isRemote) { if (this.powered && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) { par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, 4); } else if (!this.powered && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) { int par6 = par1World.getBlockMetadata(par2, par3, par4); if (par6 == 5) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 5, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 0, 2); } else { break; } } } if (par6 == 1) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 1, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 1, 2); } else { break; } } } if (par6 == 2) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 2, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 2, 2); } else { break; } } } if (par6 == 3) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSourceActive.blockID, 3, 2); for (int par7 = par3 - 1; par7 >= par3 - 50; --par7) { if (par1World.isAirBlock(par2, par7, par4)) { par1World.setBlock(par2, par7, par4, ModLBD.lightDoorSection.blockID, 3, 2); } else { break; } } } } } } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote && this.powered && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4)) { int par6 = par1World.getBlockMetadata(par2, par3, par4); if (par6 == 5) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSource.blockID, 5, 2); } if (par6 == 1) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSource.blockID, 1, 2); } if (par6 == 2) { par1World.setBlock(par2, par3, par4, ModLBD.lightBridgeSource.blockID, 2, 2); } if (par6 == 3) { par1World.setBlock(par2, par3, par4, ModLBD.lightDoorSource.blockID, 3, 2); } } } public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack) { int par7 = MathHelper.floor_double((double)(par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (par7 == 0) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 1, 2); } if (par7 == 1) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); } if (par7 == 2) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); } if (par7 == 3) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); } if (par6ItemStack.hasDisplayName()) { ((TileEntityLightDoorSource)par1World.getBlockTileEntity(par2, par3, par4)).func_91249_a(par6ItemStack.getDisplayName()); } } public int quantityDropped(Random par1Random) { return 1; } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return -1; } public TileEntity getBlockEntity() { return new TileEntityLightDoorSource(); } public TileEntity createNewTileEntity(World par1World) { return new TileEntityLightDoorSource(); } } Thanks kris91268
  22. Hello, When I run my set of custom Tile Entities with my mod, during game time, it spams the console with errors saying that the tile entity is missing a mapping. What does this mean, and what methods do I need to implement in order to solve this? Any help would be much appreciated
  23. So if anyone knows, how do you register textures that are used for an entity or model block texture?
  24. Never mind, I figured out why Minecraft was throwing a NullPointerException at me, I was refrencing the player as a new object, which was set to null. So I just refrenced Minecraft and called an EntityPlayer message straight from here like this. Minecraft mc = Minecraft.getMinecraft(); instead of Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.theplayer; And when I needed to display a message in the chat, I went mc.theplayer.addChatMessage("blahblahblah"); I guess you learn from your mistakes
×
×
  • Create New...

Important Information

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