Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/18/18 in all areas

  1. I went ahead and logged an issue, maybe someone will create a hook for this in the future. https://github.com/MinecraftForge/MinecraftForge/issues/4756
    1 point
  2. The shape of your furnace is rotation agnostic. First: find the bock behind the one clicked (you get a facing value, offset by that ejection -1) then just check all the locations from there. Additionally, you'll need to make your blocks invalidate the TE (if it exists) when broken. That will be trickier, but each block can figure it out (or just have the TE periodically validate itself)
    1 point
  3. To modify vanilla behavior you often should consider using events. There is a RenderLivingEvent which allows you to replace the renderer. So what you can do is create your own player renderer class that copies the vanilla one but adds the text you want to add and then handle the event to use your renderer instead. So to start you need to learn how to handle events. I have a tutorial on this here: http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-event-handling.html I need to update the list of available events but most of the information should be good to get you started. Get an event handler working for RenderLivingEvent and have it check for player. Actually I think that event is generic so maybe you can just handle RenderLivingEvent<EntityPlayerSP> or similar. Then copy the RenderPlayer class into your own class and add stuff you want. Then make sure your event handler replaces the renderer with your own. Try what you can and post the code if you get stuck. We can help further then.
    1 point
  4. @Override public void readNBT(Capability capability, Object instance, EnumFacing side, NBTBase nbt) { NBTTagList list = (NBTTagList)nbt; for (int i = 0; i < list.tagCount(); i++) { new ItemStack(list.getCompoundTagAt(i)); } } this is what you want
    1 point
  5. There is no instance of MultiblockCokeFurnace that you ever need to create, you just have to change the blockstate of the block clicked on so that a TileEntity can be created (this is what hasTileEntity and createTileEntity are for, so you can specify which states of the block have a TE and which don't).
    1 point
  6. If an event exists, it can be subscribed to. Those three methods are only called when a player is actively using an item (e.g. drawing a bow, eating food, blocking with a shield) and only for the item that they're using.
    1 point
  7. The sub-events of PlayerInteractEvent are fired when the player left or right clicks in various ways.
    1 point
×
×
  • Create New...

Important Information

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