Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer ep)
- {
- if(util.getString(is, "Type", "null") == "Teleport"){
- if(ep.isSneaking()){
- util.setDouble(is, "X", ep.posX);
- util.setDouble(is, "Y", ep.posY);
- util.setDouble(is, "Z", ep.posZ);
- util.setInt(is, "Dim", ep.dimension);
- util.setBoolean(is, "HasCoords", true);
- }
- else if(util.getBoolean(is, "HasCoords", false)){
- if(ep.dimension != util.getInt(is, "Dim", 0)){
- ep.travelToDimension(util.getInt(is, "Dim", 0));
- }
- ep.setPosition(util.getDouble(is, "X", 0), util.getDouble(is, "Y", 0), util.getDouble(is, "Z", 0));
- }
- }
- return is;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement