Jump to content

bdkuhman

Members
  • Posts

    39
  • Joined

  • Last visited

Posts posted by bdkuhman

  1. I can't seem to get my block to register. I've tried a couple things but it's just not working.

    https://pastebin.com/UukL8F86
    https://pastebin.com/EiFHmpPq

    the log message never gets printed. I've also tried having the methods in DeconTable and add listeners to them from FMLJavaModLoadingContext; but that runs registerBlocks multiple times, and the block has already been registered so it crashes with "Attempted to set registry name with existing registry name!"

     I've looked through the documentation and i've tried to find examples but I'm not sure what i'm doing wrong.

  2. This just started occurring after upgrading to IDEA 15, the editor has no errors, but on build I get a large amount of errors.

    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\handler\UpdateHandler.java
        Error:Error:line (3)java: package cpw.mods.fml.common does not exist
        Error:Error:line (6)java: package net.minecraft.util does not exist
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\handler\GuiHandler.java
        Error:Error:line (6)java: package net.minecraft.entity.player does not exist
        Error:Error:line (7)java: package net.minecraft.world does not exist
        Error:Error:line (8)java: package cpw.mods.fml.common.network does not exist
        Error:Error:line (9)java: cannot find symbol
      symbol: class IGuiHandler
        Error:Error:line (11)java: cannot find symbol
      symbol:   class EntityPlayer
      location: class deconstruction.common.handler.GuiHandler
        Error:Error:line (11)java: cannot find symbol
      symbol:   class World
      location: class deconstruction.common.handler.GuiHandler
        Error:Error:line (19)java: cannot find symbol
      symbol:   class EntityPlayer
      location: class deconstruction.common.handler.GuiHandler
        Error:Error:line (19)java: cannot find symbol
      symbol:   class World
      location: class deconstruction.common.handler.GuiHandler
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\handler\PacketIndex.java
        Error:Error:line (3)java: package cpw.mods.fml.common.network.simpleimpl does not exist
        Error:Error:line (4)java: package cpw.mods.fml.common.network.simpleimpl does not exist
        Error:Error:line (7)java: package io.netty.buffer does not exist
        Error:Error:line (8)java: package cpw.mods.fml.common.network.simpleimpl does not exist
        Error:Error:line (10)java: cannot find symbol
      symbol: class IMessage
        Error:Error:line (21)java: cannot find symbol
      symbol:   class ByteBuf
      location: class deconstruction.common.handler.PacketIndex
        Error:Error:line (26)java: cannot find symbol
      symbol:   class ByteBuf
      location: class deconstruction.common.handler.PacketIndex
        Error:Error:line (30)java: cannot find symbol
      symbol:   class IMessageHandler
      location: class deconstruction.common.handler.PacketIndex
        Error:Error:line (30)java: cannot find symbol
      symbol:   class IMessage
      location: class deconstruction.common.handler.PacketIndex
        Error:Error:line (32)java: cannot find symbol
      symbol:   class MessageContext
      location: class deconstruction.common.handler.PacketIndex.Handler
        Error:Error:line (32)java: cannot find symbol
      symbol:   class IMessage
      location: class deconstruction.common.handler.PacketIndex.Handler
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\RecipeMover.java
        Error:Error:line (4)java: package net.minecraft.item.crafting does not exist
        Error:Error:line (5)java: package net.minecraft.item.crafting does not exist
        Error:Error:line (6)java: package net.minecraft.item.crafting does not exist
        Error:Error:line (7)java: package net.minecraft.item.crafting does not exist
        Error:Error:line (8)java: package net.minecraftforge.oredict does not exist
        Error:Error:line (9)java: package net.minecraftforge.oredict does not exist
        Information:Information:java: Some input files use unchecked or unsafe operations.
        Information:Information:java: Recompile with -Xlint:unchecked for details.
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\handler\DeconstructionManager.java
        Error:Error:line (3)java: package cpw.mods.fml.common does not exist
        Error:Error:line (4)java: package cpw.mods.fml.relauncher does not exist
        Error:Error:line (7)java: package net.minecraft.enchantment does not exist
        Error:Error:line (8)java: package net.minecraft.entity.player does not exist
        Error:Error:line (9)java: package net.minecraft.init does not exist
        Error:Error:line (10)java: package net.minecraft.item does not exist
        Error:Error:line (33)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (69)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (69)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (101)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (101)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (101)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (121)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (121)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (121)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (146)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (146)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (161)java: cannot find symbol
      symbol:   class EntityPlayer
      location: class deconstruction.common.handler.DeconstructionManager
        Error:Error:line (161)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.handler.DeconstructionManager
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\DeconRecipe.java
        Error:Error:line (4)java: package net.minecraft.item does not exist
        Error:Error:line (5)java: package net.minecraft.item.crafting does not exist
        Error:Error:line (6)java: package net.minecraft.item.crafting does not exist
        Error:Error:line (7)java: package net.minecraftforge.oredict does not exist
        Error:Error:line (8)java: package net.minecraftforge.oredict does not exist
        Error:Error:line (9)java: package net.minecraftforge.oredict does not exist
        Error:Error:line (18)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (19)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (22)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (22)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (31)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (31)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (57)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (115)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (143)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (143)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (154)java: cannot find symbol
      symbol:   class ShapedRecipes
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (173)java: cannot find symbol
      symbol:   class ShapelessRecipes
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (187)java: cannot find symbol
      symbol:   class ShapedOreRecipe
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (216)java: cannot find symbol
      symbol:   class ShapelessOreRecipe
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (246)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (246)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (276)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (276)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (296)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
        Error:Error:line (300)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.DeconRecipe
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\client\ClientProxy.java
        Error:Error:line (7)java: package net.minecraft.block does not exist
        Error:Error:line (8)java: package net.minecraft.client does not exist
        Error:Error:line (9)java: package net.minecraft.client.renderer.entity does not exist
        Error:Error:line (10)java: package net.minecraft.item does not exist
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\container\inventory\InventoryDeconstructResult.java
        Error:Error:line (4)java: package net.minecraft.entity.player does not exist
        Error:Error:line (5)java: package net.minecraft.inventory does not exist
        Error:Error:line (6)java: package net.minecraft.inventory does not exist
        Error:Error:line (7)java: package net.minecraft.item does not exist
        Error:Error:line (8)java: package net.minecraft.util does not exist
        Error:Error:line (10)java: cannot find symbol
      symbol: class IInventory
        Error:Error:line (11)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (13)java: cannot find symbol
      symbol:   class Container
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (21)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (31)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (36)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (58)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (69)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (94)java: cannot find symbol
      symbol:   class EntityPlayer
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
        Error:Error:line (109)java: cannot find symbol
      symbol:   class ItemStack
      location: class deconstruction.common.container.inventory.InventoryDeconstructResult
    E:\Desktop\DeconTable 1.7.10\src\main\java\deconstruction\common\container\ContainerDeconstructionTable.java
        Error:Error:line (12)java: package net.minecraft.entity.player does not exist
        Error:Error:line (13)java: package net.minecraft.entity.player does not exist
        Error:Error:line (14)java: package net.minecraft.inventory does not exist
        Error:Error:line (15)java: package net.minecraft.inventory does not exist
        Error:Error:line (16)java: package net.minecraft.inventory does not exist
        Error:Error:line (17)java: package net.minecraft.inventory does not exist
        Error:Error:line (18)java: package net.minecraft.item does not exist
        Error:Error:line (19)java: package net.minecraft.world does not exist
        Error:Error:line (21)java: cannot find symbol
      symbol: class Container

  3. The unlocalized name has nothing to do with how your block is stored, it is merely a display thing. Changing the unlocalized name does not "remove your block from any world".

    My bad, Not the unlocalized name, but the name used when calling GameRegistry.registerBlock();

    I thought they were the same for a moment there.

  4. So, due to a typo in version 1 of my mod, a block was registered as ModName:Block.name, In version 2 this was changed to ModName:Block

    Updating to version 2 would remove the block from any worlds. Is there any way to make the name change, but make sure the block stays in the world?

     

    Thanks-

      -bdkuhman

  5. Question:

    Why is this line here?

    MinecraftForge.EVENT_BUS.register(this);

     

    Your main mod is not, and should not be, an event handler.  Yes, it has @EventHandler annotations, but the event bus looks for @SubscribeEvent (which you do not have), so why are you trying to subscribe your main class to the event bus?

     

    I actually do have a SubscribeEvent to RenderGameOverlayEvent, but just did not include it in the post.

  6. I am trying to send a packet from the client to server, but it crashes to the main menu, and minecraft says:"Connection Lost / A fatal error has occured, this connection is terminated"

    with this stacktrace:

     

    [07:48:37] [Netty Server IO #1/ERROR] [FML]: FMLIndexedMessageCodec exception caught
    io.netty.handler.codec.DecoderException: java.lang.InstantiationException: deconstruction.common.handler.PacketIndex
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:88) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:144) [NetworkManager.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:469) [NetworkManager.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [simpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleServerSideCustomPacket(NetworkDispatcher.java:398) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:226) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:49) [NetworkDispatcher.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [simpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:312) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:44) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:298) [LocalChannel$6.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [singleThreadEventExecutor.class:4.0.15.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [NioEventLoop.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [singleThreadEventExecutor$2.class:4.0.15.Final]
    at java.lang.Thread.run(Thread.java:744) [?:1.7.0_51]
    Caused by: java.lang.InstantiationException: deconstruction.common.handler.PacketIndex
    at java.lang.Class.newInstance(Class.java:359) ~[?:1.7.0_51]
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:79) ~[FMLIndexedMessageToMessageCodec.class:?]
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:21) ~[FMLIndexedMessageToMessageCodec.class:?]
    at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:4.0.15.Final]
    ... 25 more
    [07:48:37] [Netty Server IO #1/ERROR] [FML]: SimpleChannelHandlerWrapper exception
    io.netty.handler.codec.DecoderException: java.lang.InstantiationException: deconstruction.common.handler.PacketIndex
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:88) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:144) [NetworkManager.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:469) [NetworkManager.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [simpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleServerSideCustomPacket(NetworkDispatcher.java:398) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:226) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:49) [NetworkDispatcher.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [simpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:312) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:44) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:298) [LocalChannel$6.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [singleThreadEventExecutor.class:4.0.15.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [NioEventLoop.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [singleThreadEventExecutor$2.class:4.0.15.Final]
    at java.lang.Thread.run(Thread.java:744) [?:1.7.0_51]
    Caused by: java.lang.InstantiationException: deconstruction.common.handler.PacketIndex
    at java.lang.Class.newInstance(Class.java:359) ~[?:1.7.0_51]
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:79) ~[FMLIndexedMessageToMessageCodec.class:?]
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:21) ~[FMLIndexedMessageToMessageCodec.class:?]
    at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:4.0.15.Final]
    ... 25 more
    [07:48:37] [Netty Server IO #1/ERROR] [FML]: There was a critical exception handling a packet on channel DeconTable
    io.netty.handler.codec.DecoderException: java.lang.InstantiationException: deconstruction.common.handler.PacketIndex
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) ~[MessageToMessageDecoder.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) ~[DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) ~[DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:88) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:144) [NetworkManager.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:469) [NetworkManager.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [simpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleServerSideCustomPacket(NetworkDispatcher.java:398) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:226) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:49) [NetworkDispatcher.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [simpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:312) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:44) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:298) [LocalChannel$6.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [singleThreadEventExecutor.class:4.0.15.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [NioEventLoop.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [singleThreadEventExecutor$2.class:4.0.15.Final]
    at java.lang.Thread.run(Thread.java:744) [?:1.7.0_51]
    Caused by: java.lang.InstantiationException: deconstruction.common.handler.PacketIndex
    at java.lang.Class.newInstance(Class.java:359) ~[?:1.7.0_51]
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:79) ~[FMLIndexedMessageToMessageCodec.class:?]
    at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:21) ~[FMLIndexedMessageToMessageCodec.class:?]
    at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) ~[MessageToMessageDecoder.class:4.0.15.Final]
    ... 25 more

     

     

    My code:

    mod_Deconstruction.java:

     

    public class mod_Deconstruction {
    
    public static SimpleNetworkWrapper networkWrapper;
    public GuiHandler guiHandler = new GuiHandler();
    
    
    @Mod.Instance(Resources.MOD_ID)
    public static mod_Deconstruction instance;
    
    @SidedProxy(clientSide = "deconstruction.client.ClientProxy", serverSide = "deconstruction.common.CommonProxy")
    public static CommonProxy proxy;
    
    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event) {
    	MinecraftForge.EVENT_BUS.register(this);
    
    	deconstructionTable = new BlockDeconstructionTable().setUnlocalizedName("deconstructionTable").setHardness(2.5F).setStepSound(Block.soundTypeWood);
    
    	networkWrapper = NetworkRegistry.INSTANCE.newSimpleChannel("DeconTable");
    	networkWrapper.registerMessage(PacketIndex.Handler.class, PacketIndex.class, 0, Side.SERVER);
    }
    
    @Mod.EventHandler
    public void load(FMLInitializationEvent event) {
    	proxy.registerRenderers();
    	NetworkRegistry.INSTANCE.registerGuiHandler(instance, guiHandler);
    }
    
    @Mod.EventHandler
    public void postInit(FMLPostInitializationEvent event)
    {
    }
    
    @Mod.EventHandler
    public void serverLoad(FMLServerStartedEvent event) {
    
    }
    }
    

     

     

    PacketIndex.java:

     

    public class PacketIndex implements IMessage {
    private int index;
    
    public PacketIndex(int index){
    	this.index = index;
    }
    
    @Override
    public void fromBytes(ByteBuf buf) {
    	this.index = buf.readInt();
    }
    
    @Override
    public void toBytes(ByteBuf buf) {
    	buf.writeInt(this.index);
    }
    
    public static class Handler implements IMessageHandler<PacketIndex, IMessage> {
    	@Override
    	public IMessage onMessage(PacketIndex message, MessageContext ctx) {
    		mod_Deconstruction.debug.log("Recieved index packet: "+ message.index);
    		((ContainerDeconstructionTable)ctx.getServerHandler().playerEntity.openContainer).setCurrentRecipeIndex(message.index);
    		return null;
    	}
    }
    }
    

     

     

    ContainerDeconstructionTable.setCurrentRecipeIndex():

     

    public void setCurrentRecipeIndex(int i){
    	this.index = i;
    	this.onCraftMatrixChanged(in);
    }
    

     

     

    GuiDeconstructionTable:

     

    private ResourceLocation guiTexture = new ResourceLocation(Resources.MOD_ID, "textures/gui/deconstruction.png");
    public int x, y, z;
    public World world;
    private GuiButtonDecon next;
    private GuiButtonDecon back;
    public int currentRecipeIndex = 0;
    public static GuiDeconstructionTable instance;
    private DeconstructionManager manager = DeconstructionManager.getInstance();
    public InventoryPlayer playerInv;
    
    public GuiDeconstructionTable(Container container) {
    	super(container);
    }
    
    public GuiDeconstructionTable(InventoryPlayer inventory, World world, int x, int y, int z) {
    	super(new ContainerDeconstructionTable(inventory, world, x, y, z));
    	this.x = x;
    	this.y = y;
    	this.z = z;
    	this.world = world;
    	this.playerInv = inventory;
    }
    
    public void initGui(){
    	super.initGui();
    	int x = (this.width - this.xSize)/2;
    	int y = (this.height - this.ySize)/2;
    	this.buttonList.add(this.next = new GuiButtonDecon(1, x + 160, y + 53, true));
    	this.buttonList.add(this.back = new GuiButtonDecon(2, x + 92, y + 53, false));
    	this.next.enabled = false;
    	this.back.enabled = false;
    	this.next.text = StatCollector.translateToLocal("button.recipe.next");
    	this.back.text = StatCollector.translateToLocal("button.recipe.previous");
    
    }
    
    @Override
    protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	this.mc.getTextureManager().bindTexture(guiTexture);
    	int x = (this.width - this.xSize) / 2;
    	int y = (this.height - this.ySize) / 2;
    
    	this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
    }
    
    protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY){
    	this.fontRendererObj.drawString(StatCollector.translateToLocal("container.deconstruction"), 28, 6, 4210752);
    	this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
    }
    
    public void updateScreen(){
    	super.updateScreen();
    	ContainerDeconstructionTable container = ((ContainerDeconstructionTable) this.inventorySlots);
    	List recipeList = this.manager.getRecipeList(container.in.getStackInSlot(0));
    	if(recipeList != null && container.in.getStackInSlot(0) != null && this.currentRecipeIndex <= recipeList.size()){
    		this.next.enabled = this.currentRecipeIndex < recipeList.size() - 1;
    		this.back.enabled = this.currentRecipeIndex > 0;
    	}else{
    		this.next.enabled = false;
    		this.back.enabled = false;
    	}
    }
    
    @Override
    public void drawScreen(int mouseX, int mouseY, float gameTicks) {
    	super.drawScreen(mouseX, mouseY, gameTicks);
    	drawToolTips(mouseX, mouseY);
    }
    protected void drawToolTips(int mouseX, int mouseY){
    	if(isPointInRegion(162, 56, 10, 14, mouseX, mouseY)){
    		drawButtonTooltip(StatCollector.translateToLocal("button.recipe.next"), mouseX, mouseY);
    	}
    	if(isPointInRegion(94, 56, 10, 14, mouseX, mouseY)){
    		drawButtonTooltip(StatCollector.translateToLocal("button.recipe.previous"), mouseX, mouseY);
    	}
    }
    protected void drawButtonTooltip(String name, int x, int y){
    	List<String> lines = new ArrayList<String>();
    	lines.add(name);
    	drawTooltip(lines, x, y);
    }
    
    
    protected void drawTooltip(List<String> lines, int x, int y){
    	GL11.glPushMatrix();
    	GL11.glDisable(GL11.GL_DEPTH_TEST);
    	GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    	GL11.glDisable(GL11.GL_LIGHTING);
    
    	int tooltipWidth = 0;
    	int tempWidth;
    	int xStart;
    	int yStart;
    
    	for(int i = 0; i < lines.size(); i++){
    		tempWidth = this.fontRendererObj.getStringWidth(lines.get(i));
    
    		if(tempWidth > tooltipWidth){
    			tooltipWidth = tempWidth;
    		}
    	}
    
    	xStart = x + 12;
    	yStart = y - 12;
    	int tooltipHeight = 8;
    	if(lines.size() > 1){
    		tooltipHeight += 2 + (lines.size() - 1) * 10;
    	}
    
    	if(this.guiTop + yStart + tooltipHeight + 6 > this.height){
    		yStart = this.height - tooltipHeight - this.guiTop - 6;
    	}
    
    	this.zLevel = 300.0F;
    	itemRender.zLevel = 300.0F;
    	int color1 = -267386864;
    	this.drawGradientRect(xStart - 3, yStart - 4, xStart + tooltipWidth + 3, yStart - 3, color1, color1);
    	this.drawGradientRect(xStart - 3, yStart + tooltipHeight + 3, xStart + tooltipWidth + 3, yStart + tooltipHeight + 4, color1, color1);
    	this.drawGradientRect(xStart - 3, yStart - 3, xStart + tooltipWidth + 3, yStart + tooltipHeight + 3, color1, color1);
    	this.drawGradientRect(xStart - 4, yStart - 3, xStart - 3, yStart + tooltipHeight + 3, color1, color1);
    	this.drawGradientRect(xStart + tooltipWidth + 3, yStart - 3, xStart + tooltipWidth + 4, yStart + tooltipHeight + 3, color1, color1);
    	int color2 = 1347420415;
    	int color3 = (color2 & 16711422) >> 1 | color2 & -16777216;
    	this.drawGradientRect(xStart - 3, yStart - 3 + 1, xStart - 3 + 1, yStart + tooltipHeight + 3 - 1, color2, color3);
    	this.drawGradientRect(xStart + tooltipWidth + 2, yStart - 3 + 1, xStart + tooltipWidth + 3, yStart + tooltipHeight + 3 - 1, color2, color3);
    	this.drawGradientRect(xStart - 3, yStart - 3, xStart + tooltipWidth + 3, yStart - 3 + 1, color2, color2);
    	this.drawGradientRect(xStart - 3, yStart + tooltipHeight + 2, xStart + tooltipWidth + 3, yStart + tooltipHeight + 3, color3, color3);
    
    	for(int stringIndex = 0; stringIndex < lines.size(); ++stringIndex){
    		String line = lines.get(stringIndex);
    
    		if(stringIndex == 0){
    			line = "\u00a7" + Integer.toHexString(15) + line;
    		}else{
    			line = "\u00a77" + line;
    		}
    
    		this.fontRendererObj.drawStringWithShadow(line, xStart, yStart, -1);
    
    		if(stringIndex == 0){
    			yStart += 2;
    		}
    		yStart += 10;
    	}
    
    	GL11.glPopMatrix();
    	GL11.glEnable(GL11.GL_DEPTH_TEST);
    	this.zLevel = 0.0F;
    	itemRender.zLevel = 0.0F;
    }
    
    protected void actionPerformed(GuiButton button){
    	mod_Deconstruction.debug.log("button clicked.");
    	boolean changed = false;
    	if(button == this.next){
    		++this.currentRecipeIndex;
    		changed = true;
    	}else if(button == this.back){
    		--this.currentRecipeIndex;
    		changed = true;
    	}
    	if(changed){
    		if(world.isRemote){   //!world.isRemote does not run, and anything true crashes.
    			mod_Deconstruction.debug.log("Sending index packet: "+ this.getCurrentRecipeIndex());
    			mod_Deconstruction.instance.networkWrapper.sendToServer(new PacketIndex(this.getCurrentRecipeIndex()));
    		}
    	}
    }
    
    public int getCurrentRecipeIndex(){
    	return this.currentRecipeIndex;
    }
    
    public class GuiButtonDecon extends GuiButton {
    	private final boolean mirrored;
    	public String text = "";
    	protected GuiDeconstructionTable guiDeconstructionTable;
    	private ResourceLocation guiTexture = new ResourceLocation(Resources.MOD_ID, "textures/gui/deconstruction.png");
    	public GuiButtonDecon(int buttonId, int x, int y, boolean mirrored) {
    		super(buttonId, x, y, 12, 19, "");
    		this.mirrored = mirrored;
    
    	}
    
    	public void drawButtonForegroundLayer(int mouseX, int mouseY){
    		super.drawButtonForegroundLayer(mouseX, mouseY);
    	}
    
    
    	public void drawButton(Minecraft minecraft, int mouseX, int mouseY){
    		if(this.visible){
    			minecraft.getTextureManager().bindTexture(guiTexture);
    			GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    			boolean mouseOnButton = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + 12 && mouseY < this.yPosition + 19;
    			int textureY = 0;
    			int textureX = 176;
    			if(!this.enabled){
    				textureX += 24;
    			}else if(mouseOnButton){
    				textureX += 12;
    			}
    			if(!this.mirrored){
    				textureY += 19;
    			}
    
    			this.drawTexturedModalRect(this.xPosition, this.yPosition, textureX, textureY, 12, 19);
    
    		}
    	}
    
    }
    

     

     

     

  7. I have plans to create a Power system like ic2/buildcraft/universal electricity/rotarycraft... But I'm just not sure where to start code-wise.

    I have looked at various source code (buildcraft, ic2 dev deobf, rotarycraft) but again, I just don't know where to start.

  8. I am trying to add a custom model to my block, but it crashes when placed in the world.

     

    BlockEggStand:

     

     

    public class BlockEggStand extends Block{
    public BlockEggStand() {
    	super(Material.iron);
    	this.setCreativeTab(StrongholdCraft.tabStrongholdCraft);
    
    }
    
    public int getRenderType()
    {
    	return BlockEggStandRenderer.myRenderID;
    }
    }
    

     

     

     

    ClientProxy:

     

     

    public class ClientProxy extends CommonProxy {
    
    public void registerRenderers(){
    	RenderingRegistry.registerBlockHandler(new BlockEggStandRenderer());
    }
    @Override
    public int addArmor(String armor)
    {
    	return RenderingRegistry.addNewArmourRendererPrefix(armor);
    }
    }
    

     

     

     

    BlockEggStandRenderer:

     

     

    public class BlockEggStandRenderer implements ISimpleBlockRenderingHandler {
    
    IModelCustom model = AdvancedModelLoader.loadModel(new ResourceLocation("strongholdcraft:models/eggStand.obj"));
    
    public static int myRenderID;
    
    public BlockEggStandRenderer() {
    	BlockEggStandRenderer.myRenderID = RenderingRegistry.getNextAvailableRenderId();
    }
    
    @Override
    public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
    	GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
    	Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("textures/blocks/iron_block.png"));
    	model.renderAll();
    	GL11.glTranslatef(0.5F, 0.5F, -0.5F);
    
    }
    
    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
    	GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
    	Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("textures/blocks/iron_block.png"));
    model.renderAll();
    	GL11.glTranslatef(0.5F, 0.5F, -0.5F);
    	return false;
    }
    @Override
    public boolean shouldRender3DInInventory(int modelId) {
    	return true;
    }
    @Override
    public int getRenderId() {
    	return BlockEggStandRenderer.myRenderID;
    }
    
    }
    

     

     

     

    crash report:

     

     

    [21:21:45] [Client thread/FATAL]: Unreported exception thrown!
    java.lang.IllegalStateException: Already tesselating!
    at net.minecraft.client.renderer.Tessellator.startDrawing(Tessellator.java:301) ~[Tessellator.class:?]
    at net.minecraftforge.client.model.obj.WavefrontObject.renderAll(WavefrontObject.java:182) ~[WavefrontObject.class:?]
    at strongholdCraft.common.render.BlockEggStandRenderer.renderWorldBlock(BlockEggStandRenderer.java:41) ~[blockEggStandRenderer.class:?]
    at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:118) ~[RenderingRegistry.class:?]
    at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:53) ~[FMLRenderAccessLibrary.class:?]
    at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:522) ~[RenderBlocks.class:?]
    at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:246) ~[WorldRenderer.class:?]
    at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1672) ~[RenderGlobal.class:?]
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1325) ~[EntityRenderer.class:?]
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1160) ~[EntityRenderer.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1064) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_40]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_40]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_40]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_40]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
    ---- Minecraft Crash Report ----
    // Oops.
    
    Time: 2/11/14 9:21 PM
    Description: Unexpected error
    
    java.lang.IllegalStateException: Already tesselating!
    at net.minecraft.client.renderer.Tessellator.startDrawing(Tessellator.java:301)
    at net.minecraftforge.client.model.obj.WavefrontObject.renderAll(WavefrontObject.java:182)
    at strongholdCraft.common.render.BlockEggStandRenderer.renderWorldBlock(BlockEggStandRenderer.java:41)
    at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:118)
    at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:53)
    at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:522)
    at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:246)
    at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1672)
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1325)
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1160)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1064)
    at net.minecraft.client.Minecraft.run(Minecraft.java:951)
    at net.minecraft.client.main.Main.main(Main.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    at net.minecraft.client.renderer.Tessellator.startDrawing(Tessellator.java:301)
    at net.minecraftforge.client.model.obj.WavefrontObject.renderAll(WavefrontObject.java:182)
    at strongholdCraft.common.render.BlockEggStandRenderer.renderWorldBlock(BlockEggStandRenderer.java:41)
    at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:118)
    at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:53)
    at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:522)
    at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:246)
    at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1672)
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1325)
    
    -- Affected level --
    Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['Player541'/206, l='MpServer', x=129.82, y=65.13, z=318.79]]
    Chunk stats: MultiplayerChunkCache: 256, 256
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: 
    Level spawn location: World: (132,64,295), Chunk: (at 4,4,7 in 8,18; contains blocks 128,0,288 to 143,255,303), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 32478 game time, 4313 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Forced entities: 113 total; [EntitySkeleton['Skeleton'/4135, l='MpServer', x=160.13, y=27.00, z=312.63], EntityBat['Bat'/4611, l='MpServer', x=73.44, y=17.54, z=384.75], EntityZombie['Zombie'/4139, l='MpServer', x=158.44, y=26.00, z=311.50], EntitySkeleton['Skeleton'/4141, l='MpServer', x=157.44, y=26.00, z=312.09], EntityCreeper['Creeper'/4151, l='MpServer', x=170.50, y=31.00, z=287.03], EntityCreeper['Creeper'/3002, l='MpServer', x=139.50, y=54.00, z=272.50], EntityItem['item.tile.eggStand'/1651, l='MpServer', x=129.09, y=61.13, z=314.38], EntityCreeper['Creeper'/5714, l='MpServer', x=81.50, y=21.00, z=384.50], EntityCreeper['Creeper'/5715, l='MpServer', x=84.50, y=21.00, z=384.50], EntityZombie['Zombie'/5716, l='MpServer', x=76.75, y=23.00, z=388.16], EntityBat['Bat'/5197, l='MpServer', x=62.34, y=36.00, z=386.72], EntitySpider['Spider'/6000, l='MpServer', x=165.50, y=26.00, z=377.50], EntityZombie['Zombie'/6001, l='MpServer', x=183.34, y=31.00, z=386.91], EntityCreeper['Creeper'/6002, l='MpServer', x=179.50, y=31.00, z=384.50], EntityZombie['Zombie'/6003, l='MpServer', x=190.50, y=25.00, z=316.50], EntityCow['Cow'/55, l='MpServer', x=63.16, y=71.00, z=312.19], EntitySkeleton['Skeleton'/2493, l='MpServer', x=58.50, y=61.00, z=338.50], EntityCow['Cow'/57, l='MpServer', x=59.41, y=74.00, z=322.63], EntityCow['Cow'/56, l='MpServer', x=50.22, y=75.00, z=314.81], EntityBat['Bat'/3788, l='MpServer', x=96.43, y=24.07, z=373.27], EntityBat['Bat'/1848, l='MpServer', x=173.25, y=23.10, z=285.25], EntityEnderman['Enderman'/6393, l='MpServer', x=81.50, y=40.00, z=285.50], EntityCreeper['Creeper'/6391, l='MpServer', x=97.50, y=42.00, z=377.50], EntityCow['Cow'/76, l='MpServer', x=71.28, y=68.00, z=303.75], EntitySquid['Squid'/3465, l='MpServer', x=175.41, y=57.66, z=370.44], EntityPig['Pig'/78, l='MpServer', x=76.19, y=71.00, z=379.91], EntityPig['Pig'/79, l='MpServer', x=78.50, y=78.00, z=376.50], EntitySquid['Squid'/3471, l='MpServer', x=169.28, y=57.88, z=362.50], EntitySquid['Squid'/3470, l='MpServer', x=171.25, y=59.19, z=365.13], EntityCreeper['Creeper'/3229, l='MpServer', x=87.50, y=36.00, z=376.50], EntitySquid['Squid'/3468, l='MpServer', x=169.50, y=56.00, z=366.19], EntityCreeper['Creeper'/3231, l='MpServer', x=83.50, y=36.00, z=380.50], EntitySquid['Squid'/3475, l='MpServer', x=185.88, y=55.22, z=373.84], EntityCreeper['Creeper'/3749, l='MpServer', x=90.50, y=25.00, z=283.50], EntityZombie['Zombie'/81, l='MpServer', x=65.50, y=30.00, z=387.50], EntityPig['Pig'/80, l='MpServer', x=78.47, y=72.00, z=377.53], EntityCow['Cow'/95, l='MpServer', x=91.31, y=63.00, z=303.47], EntityCow['Cow'/94, l='MpServer', x=80.50, y=72.00, z=293.38], EntityCow['Cow'/102, l='MpServer', x=81.38, y=64.00, z=331.34], EntityCow['Cow'/103, l='MpServer', x=87.06, y=64.00, z=322.03], EntityZombie['Zombie'/7146, l='MpServer', x=169.06, y=25.00, z=259.50], EntityCow['Cow'/100, l='MpServer', x=81.31, y=67.00, z=327.47], EntityCow['Cow'/101, l='MpServer', x=87.47, y=68.00, z=324.31], EntityCreeper['Creeper'/6602, l='MpServer', x=63.50, y=36.00, z=390.50], EntityCow['Cow'/98, l='MpServer', x=87.28, y=70.00, z=305.47], EntityZombie['Zombie'/4981, l='MpServer', x=199.50, y=37.00, z=325.50], EntityCow['Cow'/99, l='MpServer', x=88.59, y=63.00, z=317.31], EntityZombie['Zombie'/6600, l='MpServer', x=64.50, y=36.00, z=389.50], EntityCow['Cow'/96, l='MpServer', x=91.81, y=62.06, z=309.09], EntityCreeper['Creeper'/6601, l='MpServer', x=61.50, y=36.00, z=393.50], EntityCow['Cow'/97, l='MpServer', x=82.44, y=65.00, z=304.47], EntitySkeleton['Skeleton'/6598, l='MpServer', x=63.50, y=36.00, z=389.50], EntityZombie['Zombie'/6599, l='MpServer', x=60.50, y=36.00, z=388.50], EntitySkeleton['Skeleton'/6596, l='MpServer', x=62.50, y=36.00, z=393.50], EntitySkeleton['Skeleton'/6597, l='MpServer', x=62.50, y=36.00, z=389.50], EntityZombie['Zombie'/6594, l='MpServer', x=183.50, y=58.00, z=241.50], EntityBat['Bat'/6353, l='MpServer', x=192.97, y=20.33, z=275.82], EntityPig['Pig'/106, l='MpServer', x=82.50, y=76.00, z=377.50], EntityBat['Bat'/6352, l='MpServer', x=186.75, y=19.36, z=266.42], EntityZombie['Zombie'/6592, l='MpServer', x=175.88, y=55.00, z=243.47], EntityCow['Cow'/104, l='MpServer', x=94.88, y=69.00, z=340.03], EntityCow['Cow'/119, l='MpServer', x=106.97, y=64.00, z=259.03], EntityCow['Cow'/118, l='MpServer', x=111.69, y=63.00, z=267.50], EntityCow['Cow'/117, l='MpServer', x=110.31, y=60.00, z=272.47], EntitySkeleton['Skeleton'/7162, l='MpServer', x=55.40, y=61.00, z=365.61], EntityZombie['Zombie'/7165, l='MpServer', x=91.50, y=41.00, z=247.50], EntitySkeleton['Skeleton'/7152, l='MpServer', x=167.50, y=56.00, z=272.50], EntityBat['Bat'/125, l='MpServer', x=92.52, y=42.57, z=373.59], EntitySquid['Squid'/123, l='MpServer', x=109.50, y=57.00, z=321.51], EntitySquid['Squid'/122, l='MpServer', x=108.47, y=57.20, z=320.42], EntityCreeper['Creeper'/121, l='MpServer', x=96.50, y=21.00, z=296.50], EntityZombie['Zombie'/6608, l='MpServer', x=142.50, y=11.00, z=307.50], EntityCow['Cow'/120, l='MpServer', x=100.53, y=64.00, z=274.69], EntityCreeper['Creeper'/136, l='MpServer', x=138.47, y=42.00, z=309.97], EntityCreeper['Creeper'/135, l='MpServer', x=141.00, y=42.00, z=315.56], EntityCreeper['Creeper'/3943, l='MpServer', x=146.50, y=34.00, z=288.50], EntityBat['Bat'/5364, l='MpServer', x=168.08, y=37.49, z=277.80], EntitySkeleton['Skeleton'/158, l='MpServer', x=167.50, y=14.00, z=270.50], EntitySquid['Squid'/3416, l='MpServer', x=188.72, y=53.19, z=315.66], EntitySquid['Squid'/3415, l='MpServer', x=191.03, y=54.28, z=314.38], EntityCreeper['Creeper'/7260, l='MpServer', x=114.50, y=15.00, z=315.50], EntityClientPlayerMP['Player541'/206, l='MpServer', x=129.82, y=65.13, z=318.79], EntityBat['Bat'/6739, l='MpServer', x=149.00, y=14.89, z=252.25], EntityBat['Bat'/4606, l='MpServer', x=111.25, y=26.10, z=301.09], EntitySquid['Squid'/3343, l='MpServer', x=167.72, y=54.19, z=343.28], EntityBat['Bat'/4603, l='MpServer', x=117.63, y=25.10, z=301.25], EntityBat['Bat'/4602, l='MpServer', x=110.33, y=23.41, z=306.48], EntitySquid['Squid'/3355, l='MpServer', x=154.58, y=50.05, z=304.50], EntitySquid['Squid'/3354, l='MpServer', x=162.50, y=50.00, z=305.50], EntitySquid['Squid'/3353, l='MpServer', x=185.16, y=52.69, z=352.81], EntitySquid['Squid'/3358, l='MpServer', x=160.16, y=49.00, z=305.44], EntitySquid['Squid'/3357, l='MpServer', x=161.47, y=51.00, z=301.50], EntitySquid['Squid'/3356, l='MpServer', x=157.38, y=49.00, z=303.50], EntitySquid['Squid'/3346, l='MpServer', x=170.66, y=51.81, z=342.28], EntityBat['Bat'/5304, l='MpServer', x=150.46, y=24.18, z=319.85], EntitySquid['Squid'/3344, l='MpServer', x=161.06, y=54.13, z=335.31], EntitySpider['Spider'/5062, l='MpServer', x=164.03, y=53.00, z=261.34], EntitySquid['Squid'/3350, l='MpServer', x=172.66, y=54.34, z=345.75], EntitySpider['Spider'/2123, l='MpServer', x=68.06, y=34.00, z=380.75], EntitySquid['Squid'/3348, l='MpServer', x=177.06, y=54.34, z=346.50], EntityCreeper['Creeper'/5251, l='MpServer', x=166.13, y=15.00, z=280.78], EntitySquid['Squid'/3371, l='MpServer', x=151.81, y=48.00, z=343.38], EntityCreeper['Creeper'/5252, l='MpServer', x=163.50, y=20.00, z=292.50], EntityCreeper['Creeper'/5253, l='MpServer', x=160.94, y=20.00, z=291.38], EntitySquid['Squid'/3374, l='MpServer', x=143.09, y=49.34, z=349.72], EntitySquid['Squid'/3375, l='MpServer', x=144.51, y=47.45, z=336.06], EntityCreeper['Creeper'/7017, l='MpServer', x=102.50, y=45.00, z=276.50], EntitySkeleton['Skeleton'/7018, l='MpServer', x=100.50, y=45.00, z=274.50], EntityZombie['Zombie'/7025, l='MpServer', x=117.50, y=21.00, z=262.50], EntitySquid['Squid'/3377, l='MpServer', x=136.75, y=50.31, z=353.81], EntitySquid['Squid'/3379, l='MpServer', x=152.31, y=48.88, z=347.34], EntitySquid['Squid'/3378, l='MpServer', x=144.91, y=50.34, z=351.28], EntityItem['item.tile.eggStand'/1690, l='MpServer', x=128.25, y=62.13, z=315.16]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:418)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2557)
    at net.minecraft.client.Minecraft.run(Minecraft.java:980)
    at net.minecraft.client.main.Main.main(Main.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_40, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 785425712 bytes (749 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 1834 (102704 bytes; 0 MB) allocated, 1800 (100800 bytes; 0 MB) used
    IntCache: cache: 1, tcache: 1, allocated: 12, tallocated: 94
    FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 4 mods loaded, 4 mods active
    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    FML{7.2.116.1024} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge{10.12.0.1024} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    strongholdcraft{0.0.1} [strongholdCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Launched Version: 1.6
    LWJGL: 2.9.0
    OpenGL: AMD Radeon HD 6800 Series GL version 4.2.12002 Compatibility Profile Context 9.12.0.0, ATI Technologies Inc.
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: []
    Current Language: ~~ERROR~~ NullPointerException: null
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 2863 (160328 bytes; 0 MB) allocated, 2250 (126000 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)
    #@!@# Game crashed! Crash report saved to: #@!@# E:\Minecraft Modding\StrongholdCraft\StrongholdCraft 1.7\.\crash-reports\crash-2014-02-11_21.21.45-client.txt
    [21:21:45] [server thread/INFO]: Stopping server
    [21:21:45] [Client Shutdown Thread/INFO]: Stopping server
    [21:21:45] [server thread/INFO]: Saving players
    [21:21:45] [Client Shutdown Thread/INFO]: Saving players
    [21:21:45] [server thread/INFO]: Saving worlds
    [21:21:45] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
    AL lib: (EE) alc_cleanup: 1 device not closed
    

     

     

     

     

     

     

  9. I am creating a spike block, but the game will crash suddenly. The crash logs have been somewhat unhelpful as the entity being ticked is not the entity damaged by the spikes. Any help would be appreciated.

     

     

    Crash Report:

     

     

    ---- Minecraft Crash Report ----
    // I let you down. Sorry 
    
    Time: 2/3/14 9:18 AM
    Description: Ticking entity
    
    java.lang.NullPointerException: Ticking entity
    at net.minecraft.entity.Entity.moveEntity(Entity.java:758)
    at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1725)
    at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2063)
    at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:451)
    at net.minecraft.entity.EntityAgeable.onLivingUpdate(EntityAgeable.java:138)
    at net.minecraft.entity.passive.EntityAnimal.onLivingUpdate(EntityAnimal.java:56)
    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856)
    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:270)
    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2257)
    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:699)
    at net.minecraft.world.World.updateEntity(World.java:2217)
    at net.minecraft.world.World.updateEntities(World.java:2067)
    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:530)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:739)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:650)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:528)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:787)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    at net.minecraft.entity.Entity.moveEntity(Entity.java:758)
    at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1725)
    at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2063)
    at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:451)
    at net.minecraft.entity.EntityAgeable.onLivingUpdate(EntityAgeable.java:138)
    at net.minecraft.entity.passive.EntityAnimal.onLivingUpdate(EntityAnimal.java:56)
    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856)
    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:270)
    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2257)
    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:699)
    at net.minecraft.world.World.updateEntity(World.java:2217)
    
    -- Entity being ticked --
    Details:
    Entity Type: Cow (net.minecraft.entity.passive.EntityCow)
    Entity ID: 37
    Entity Name: Cow
    Entity's Exact location: -290.29, 73.00, 291.33
    Entity's Block location: World: (-291,73,291), Chunk: (at 13,4,3 in -19,18; contains blocks -304,0,288 to -289,255,303), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Entity's Momentum: 0.00, -0.08, 0.00
    Stacktrace:
    at net.minecraft.world.World.updateEntities(World.java:2067)
    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:530)
    
    -- Affected level --
    Details:
    Level name: Dev
    All players: 1 total; [EntityPlayerMP['Player688'/198, l='Dev', x=-209.25, y=79.00, z=257.82]]
    Chunk stats: ServerChunkCache: 625 Drop: 0
    Level seed: 6914035959553019192
    Level generator: ID 00 - default, ver 1. Features enabled: true
    Level generator options: 
    Level spawn location: World: (-216,64,256), Chunk: (at 8,4,0 in -14,16; contains blocks -224,0,256 to -209,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 772 game time, 772 day time
    Level dimension: 0
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 164816 (now: false), thunder time: 131710 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
    Stacktrace:
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:739)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:650)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:528)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:787)
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_51, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 838589000 bytes (799 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 6555 (367080 bytes; 0 MB) allocated, 420 (23520 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    FML: MCP v9.01-pre FML v7.2.112.1023 Minecraft Forge 10.12.0.1023 4 mods loaded, 4 mods active
    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    FML{7.2.112.1023} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1023.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge{10.12.0.1023} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1023.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    strongholdcraft{0.0.1} [strongholdCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 1055 (59080 bytes; 0 MB) allocated, 51 (2856 bytes; 0 MB) used
    Player Count: 1 / 8; [EntityPlayerMP['Player688'/198, l='Dev', x=-209.25, y=79.00, z=257.82]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    

     

     

     

     

    BlockSpikes:

     

     

    package strongholdCraft.common.blocks;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockContainer;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.util.AxisAlignedBB;
    import net.minecraft.util.DamageSource;
    import net.minecraft.util.IIcon;
    import net.minecraft.world.IBlockAccess;
    import net.minecraft.world.World;
    import net.minecraftforge.common.util.FakePlayer;
    import strongholdCraft.StrongholdCraft;
    import strongholdCraft.common.render.SpikeInventoryRenderer;
    import strongholdCraft.common.tileEntities.TileEntitySpike;
    
    import com.mojang.authlib.GameProfile;
    
    import cpw.mods.fml.common.FMLCommonHandler;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    
    public class BlockSpikes extends BlockContainer{
    @SideOnly(Side.CLIENT)
    private IIcon field_150041_a;
    @SideOnly(Side.CLIENT)
    private IIcon field_150040_b;
    
    //TODO add different tiers of spike
    
    public BlockSpikes(){
    	super(Material.field_151573_f);
    	//this.func_149711_c(5.0F);
    	this.func_149647_a(StrongholdCraft.tabStrongholdCraft);
    }
    public AxisAlignedBB func_149668_a(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
    {
    	float f = 0.125F;
    	return AxisAlignedBB.getAABBPool().getAABB((double)p_149668_2_+f, (double)p_149668_3_, (double)p_149668_4_+f, (double)(p_149668_2_+1)-f, (double)(p_149668_3_+1)-f, (double)(p_149668_4_+1)-f);
    }
    
    @SideOnly(Side.CLIENT)
    public IIcon func_149691_a(int p_149691_1_, int p_149691_2_)
    {
    	return p_149691_1_ == 1 ? this.field_150041_a : (p_149691_1_ == 0 ? this.field_150040_b : this.field_149761_L);
    }
    
    public boolean func_149662_c()
    {
    	return false;
    }
    
    
    
    public boolean func_149727_a(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
    { 
    	TileEntitySpike spikeentity = (TileEntitySpike)world.func_147438_o(x,  y,  z);
    
    	System.out.println(spikeentity.getCurrentDurability());
    	super.func_149727_a(world, x, y, z, player, side, hitX, hitY, hitZ);
    	return true;
    }
    
    
    
    public int func_149645_b()
    {
    	return SpikeInventoryRenderer.myRenderID;
    }
    
    
    public void func_149670_a(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_)
    {
    	if(p_149670_5_ instanceof EntityLivingBase){
    		TileEntitySpike spikeentity = (TileEntitySpike)p_149670_1_.func_147438_o(p_149670_2_,  p_149670_3_,  p_149670_4_);
    
    		double i = ((EntityLivingBase) p_149670_5_).getEntityAttribute(SharedMonsterAttributes.knockbackResistance).getAttributeValue();
    		((EntityLivingBase) p_149670_5_).getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(10000000D);
    		if(p_149670_5_.attackEntityFrom(DamageSource.causePlayerDamage(new FakePlayer(FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0), new GameProfile("", "Spikes"))), 1.0F)){
    			spikeentity.damageSpike(1);
    			if(spikeentity.getCurrentDurability() <= 0){
    				 Minecraft.getMinecraft().theWorld.playAuxSFX(2001, p_149670_2_, p_149670_3_, p_149670_4_, Block.func_149682_b(Minecraft.getMinecraft().theWorld.func_147439_a(p_149670_2_, p_149670_3_, p_149670_4_)) + (Minecraft.getMinecraft().theWorld.getBlockMetadata(p_149670_2_, p_149670_3_, p_149670_4_) << 12));
    				this.removedByPlayer(p_149670_1_, null, p_149670_2_, p_149670_3_, p_149670_4_);
    			}
    		}
    		((EntityLivingBase) p_149670_5_).getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(i);
    	}
    }
    
    @SideOnly(Side.CLIENT)
    public void func_149651_a(IIconRegister p_149651_1_)
    {
    	this.field_149761_L = p_149651_1_.registerIcon(this.func_149641_N() + "_side");
    	this.field_150041_a = p_149651_1_.registerIcon(this.func_149641_N() + "_top");
    	this.field_150040_b = p_149651_1_.registerIcon(this.func_149641_N() + "_bottom");
    }
    
    @Override
    public TileEntity func_149915_a(World var1, int var2) {
    	// TODO Auto-generated method stub
    	return new TileEntitySpike();
    }
    
    public boolean func_149646_a(IBlockAccess iblockaccess, int i, int j, int k, int l)
    {
       return false;
    }
    
    
    
    
    
    
    
    
    }
    
    

     

     

     

    TileEntitySpike

     

     

    package strongholdCraft.common.tileEntities;
    
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.network.NetworkManager;
    import net.minecraft.network.Packet;
    import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.world.World;
    
    public class TileEntitySpike extends TileEntity {
    
    public int maxDurability = 10;
    public int currentDurability = maxDurability;
    
    public void damageSpike(int damageDealt){
    	this.currentDurability -= damageDealt;
    }
    
    public void setMaxDurability(int maxDurability){
    	this.maxDurability = maxDurability;
    	System.out.println("SetDurability:" +maxDurability +"|"+currentDurability);
    }
    
    public void setCurrentDurability(int durability){
    	this.currentDurability = durability;
    }
    
    public int getMaxDurability(){
    	return this.currentDurability;
    }
    
    public int getCurrentDurability() {
    	return this.currentDurability;
    }
    
    public void func_145841_b(NBTTagCompound var1)
    {
    	var1.setInteger("maxDurability", this.maxDurability);
    	var1.setInteger("currentDurability", this.currentDurability);
    	System.out.println("writeNBT:" +maxDurability +"|"+currentDurability);
    	super.func_145841_b(var1);
    }
    
    public void func_145839_a(NBTTagCompound var1)
    {
    	this.maxDurability = var1.getInteger("maxDurability");
    	this.currentDurability = var1.getInteger("currentDurability");
    	System.out.println("readNBT:" +maxDurability +"|"+currentDurability);
    	super.func_145839_a(var1);
    }
    
    @Override 
    public Packet func_145844_m(){
    	NBTTagCompound tileTag = new NBTTagCompound();
    	this.func_145841_b(tileTag);
    	return new S35PacketUpdateTileEntity(this.field_145851_c, this.field_145848_d, field_145849_e, 0, tileTag);
    }
    
    @Override
    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){
    	this.func_145839_a(pkt.func_148857_g());
    }
    }
    
    

     

     

     

     

  10. I ran gradlew.bat setupDecompWorkspace, and i get the following error:

    FAILURE: Build failed with an exception.
    *What went wrong:
    A problem occurred configuring root project 'forge-1.7.2-10.12.0.998-src'.
    > Could not resolve all dependencies for configuration ':classpath'.
      > Could not resolve net.md-5:SpecialSource:1.7-SNAPSHOT.
        Required by:
            :forge-1.7.2-10.12.0.998-src:unspecified > net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT
          > Unable to load Maven meta-data from https://oss.sonatype.org/content/repositories/snapshots/net/md-5/SpecialSource/1.7-SNAPSHOT/maven-metadata.xml.
             > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/net/md-5/SpecialSource/1.7-SNAPSHOT/maven-metadata.xml'.
                > peer not authenticated
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    

     

    I have tried disabling my antivirus, as i have had problems in the past with programs not being able to connect or pass SSL Certificates correctly, but so far nothing has helped.

  11. I am having trouble setting up my repo for 1.7

    As an example, say I have my eclipse workspace at C:/DevWorkspace

    and I have installed Forge at C:/forge (I am just using "forge" as an example, it would really be forge-1.7.2-10.12... you get the picture)

     

    Where exactly would I put my repo so I don't need to move any files around, (forge 1.6.4 and earlier would be /forge/mcp/src/minecraft/ExampleMod/...)

     

    Thanks in advance,

    Bdkuhman

×
×
  • Create New...

Important Information

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