Jump to content

Leaderboard

Popular Content

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

  1. Use this.setContainerItem in your Hammer Item class.
    1 point
  2. You never add your registry handler class to the game’s event bus, so your registry handlers are never called. To fix the problem, annotate your registry handler class with @EventBusSubscriber. Apart from that, there are some bad practices in your code: Stop using ItemBase and BlockBase (abusing inheritance). Do not use static initializers (likely to cause unpredictable errors). Stop using IHasModel (all items and blocks have models, thus the IHasModel interface is unnecessary). The detailed reasons are listed here: http://www.minecraftforge.net/forum/topic/61757-common-issues-and-recommendations/
    1 point
  3. You have to send the data back to the client too. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L94-L99 Note that that may not the best method (and that it is invoked elsewhere when the TE's data changes). It ended up being what worked for me. You will also need to override getUpdatePacket, getUpdateTag, and onDataPacket. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L174-L189
    1 point
  4. To get blockstate use Block#getDefaultState() Block is the block you want to place, you can get it from block list like Blocks class To get block by registry name, try going through ForgeRegistry
    1 point
×
×
  • Create New...

Important Information

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