Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
- {
- if(player instanceof EntityPlayerMP && worldIn.getBlockState(pos).getBlock() instanceof BlockDoor)
- {
- EntityPlayerMP playerMP = (EntityPlayerMP) player;
- PlayerList playerList = playerMP.mcServer.getPlayerList();
- WorldServer dimension = DimensionManager.getWorld(Dimensions.vanqarDimensionID);
- //Only executes if the dimension hasnt been entered before
- if(dimension != null)
- playerList.transferPlayerToDimension(playerMP, Dimensions.vanqarDimensionID, new VanqarTeleporter(dimension));
- return EnumActionResult.SUCCESS;
- }
- return EnumActionResult.FAIL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement