Jump to content

chirptheboy

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

chirptheboy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks for the info, I'll take a look into that. Edit: I made modifications to that method since there were items that should have fired independently of which world it was in. @Override public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult result) { TileEntity tileEntity = world.getTileEntity(pos); if (tileEntity instanceof INamedContainerProvider){ if (!world.isRemote) { NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tileEntity, tileEntity.getPos()); } } else { throw new IllegalStateException("Our named container provider is missing."); } return true; //return super.onBlockActivated(state, world, pos, player, hand, result); }
  2. When I right-click my mod block with torches in my off-hand, it tries to place the torch on the block--briefly emitting light--then consumes the torch (count decreases by one), and finally still opens up the GUI. Then, if I exit to the menu and then return, I have all my torches back. When right-clicking my mod block with any placeable block, the animation of placing the block appears before opening the GUI. These blocks remain in the hotbar when this happens. Instead of pasting huge codeblocks--unless that is preferable--here are links to my code: Block Block TileEntity Block Container Block Screen Any and all help is appreciated!
×
×
  • Create New...

Important Information

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