Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
- {
- if (!worldIn.isRemote)
- {
- NetworkHooks.openGui((EntityPlayerMP) player, new InteractionObjectCarpentersTable(worldIn, pos), pos);
- }
- return true;
- }
- public class InteractionObjectCarpentersTable implements IInteractionObject
- {
- private final World world;
- private BlockPos pos;
- public InteractionObjectCarpentersTable(World world, BlockPos pos)
- {
- this.world = world;
- this.pos = pos;
- }
- @Override
- public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
- {
- return new ContainerCarpentersTable(playerInventory, this.world, this.pos);
- }
- @Override
- public String getGuiID()
- {
- return Constants.MODID + ":carpenters_table_gui";
- }
- @Override
- public ITextComponent getName()
- {
- return new TextComponentTranslation(MEBlocks.CARPENTERS_TABLE.getTranslationKey());
- }
- @Override
- public boolean hasCustomName()
- {
- return false;
- }
- @Nullable
- @Override
- public ITextComponent getCustomName()
- {
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement