Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void place(BlockPos pos, final EnumFacing face) {
- if (face == EnumFacing.UP) {
- pos = pos.add(0, -1, 0);
- } else if (face == EnumFacing.NORTH) {
- pos = pos.add(0, 0, 1);
- } else if (face == EnumFacing.EAST) {
- pos = pos.add(-1, 0, 0);
- } else if (face == EnumFacing.SOUTH) {
- pos = pos.add(0, 0, -1);
- } else if (face == EnumFacing.WEST) {
- pos = pos.add(1, 0, 0);
- }
- if (getBlockInHotbar() != -1 && (getBlockInHotbar() != -1 || mc.thePlayer.getHeldItem() == null)) {
- switchItem();
- mc.thePlayer.swingItem();
- if (mc.theWorld.getBlockState(pos) != null && mc.theWorld.getBlockState(pos).getBlock() == Blocks.air) {
- mc.playerController.onPlayerRightClick(mc.thePlayer, mc.theWorld, mc.thePlayer.getCurrentEquippedItem(), pos, face, new Vec3(pos));
- mc.thePlayer.swingItem();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement