Skip to content
Thomas Vanmellaerts edited this page Aug 24, 2014 · 1 revision

How This Works?#

How this plugin works is an interesting story and i hope i wont blow your mind. To get started this plugin sees items and blocks as a certain type of block using NMS (net.minecraft.server). Here I show you the list of block and item types.

Item Types:

  • Weapon
  • Food
  • Item
  • AdvItem
  • Block
  • Container
  • Unknown

Block Types:

  • Container
  • Block
  • Trade
  • Unknown

You prob wonder how my plugin can see what is what. Well its very easy to explain that. You have to know that every block that has a GUI and holds inventory has a tileentity. A tile or tileentity contains all the data for that block. And for normal blocks this tile is normally set to null. For itemblocks its a bit trickier. Because these don't contain a tile. So the plugin just looks for methods that forge use to see if the block has a tile or not. If forge isn't available we will scan the block for methods that return a tile.

Clone this wiki locally