123124125126127128129130131132133134
int worldID = 0; int x = 0, y = 0, z = 0; if (sender instanceof TileEntityCommandBlock) { TileEntityCommandBlock cb = (TileEntityCommandBlock) sender; worldID = cb.getWorldObj().provider.dimensionId; x = cb.xCoord; y = cb.yCoord; z = cb.zCoord; }