if (dim == paramEntityPlayer.dimension) {
int x = ItemSkyPearl.getX(stackToCount);
int y = ItemSkyPearl.getY(stackToCount);
int z = ItemSkyPearl.getZ(stackToCount);
if (wand.consumeAllVis(paramItemStack, paramEntityPlayer, getVisCost(), false, false) && TileWarpGate.teleportPlayer(paramEntityPlayer, new ChunkCoordinates(x, y, z)))
wand.consumeAllVis(paramItemStack, paramEntityPlayer, getVisCost(), true, false);
}
}
paramEntityPlayer.clearItemInUse();