Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

alkinister

Members
  • Joined

  • Last visited

Everything posted by alkinister

  1. Hi so I am trying to make a item that can move a tile entity and blocks from a location to another which works with blocks however if I move a tile entity one of two things will happen if it is a furnace it will move but the items will pop out and fuel level gets removed so the furnace is no longer burning. The other thing is that if you move a chest all the items pop out and the chest is empty when it gets to the final location. Here is the code I have any help is appreciated. public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (stack.getTagCompound() == null) { stack.setTagCompound(new NBTTagCompound()); } if (world.getBlockState(pos).getBlock().equals(ModBlocks.block_warper)) { stack.getTagCompound().setDouble("x", pos.getX()); stack.getTagCompound().setDouble("y", pos.getY()); stack.getTagCompound().setDouble("z", pos.getZ()); stack.getTagCompound().setBoolean("linked", true); } if (!world.getBlockState(pos).getBlock().equals(ModBlocks.block_warper)) { BlockPos targetPos = new BlockPos(pos.getX(), pos.getY() + 1, pos.getZ()); IBlockState targetBlockState = world.getBlockState(new BlockPos(stack.getTagCompound().getDouble("x"), stack.getTagCompound().getDouble("y") + 1, stack.getTagCompound().getDouble("z"))); if (world.getBlockState(targetPos).getBlock().equals(Blocks.air)) { world.setBlockState(targetPos, targetBlockState); if (!(world.getTileEntity(new BlockPos(stack.getTagCompound().getDouble("x"), stack.getTagCompound().getDouble("y") + 1, stack.getTagCompound().getDouble("z"))) == null)) { world.setTileEntity(targetPos, world.getTileEntity(new BlockPos(stack.getTagCompound().getDouble("x"), stack.getTagCompound().getDouble("y") + 1, stack.getTagCompound().getDouble("z")))); } world.setBlockToAir(new BlockPos(stack.getTagCompound().getDouble("x"), stack.getTagCompound().getDouble("y") + 1, stack.getTagCompound().getDouble("z"))); } } return EnumActionResult.PASS; }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.