diff options
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Utility.java | 172 |
1 files changed, 80 insertions, 92 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index cfd0b4b880..c425278db0 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -51,7 +51,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; @@ -95,14 +94,6 @@ public class GT_Utility { GregTech_API.sItemStackMappings.add(sEmptyContainerToFluidToData); } - public static int safeInt(long number, int margin){ - return number>Integer.MAX_VALUE-margin ? Integer.MAX_VALUE-margin :(int)number; - } - - public static int safeInt(long number){ - return number>GT_Values.V[GT_Values.V.length-1] ? safeInt(GT_Values.V[GT_Values.V.length-1],1) : number<Integer.MIN_VALUE ? Integer.MIN_VALUE : (int)number; - } - public static Field getPublicField(Object aObject, String aField) { Field rField = null; try { @@ -819,7 +810,7 @@ public class GT_Utility { return copyMetaData(Items.feather.getDamage(aStack) + 1, aStack); return null; } - + public static synchronized boolean removeIC2BottleRecipe(ItemStack aContainer, ItemStack aInput, Map<ic2.api.recipe.ICannerBottleRecipeManager.Input, RecipeOutput> aRecipeList, ItemStack aOutput){ if ((isStackInvalid(aInput) && isStackInvalid(aOutput) && isStackInvalid(aContainer)) || aRecipeList == null) return false; boolean rReturn = false; @@ -869,10 +860,12 @@ public class GT_Utility { return false; } } + ItemStack[] tStack = GT_OreDictUnificator.getStackArray(true, aOutput); + if(tStack==null||(tStack.length>0&>_Utility.areStacksEqual(aInput, tStack[0])))return false; if (tOreName != null) { - aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput))); + aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, tStack)); } else { - aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput))); + aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, tStack)); } return true; } @@ -929,7 +922,7 @@ public class GT_Utility { } public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) { - return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, 0.9F + new Random().nextFloat() * 0.2F, aX, aY, aZ); + return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, 1.01818028F, aX, aY, aZ); } public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, double aX, double aY, double aZ) { @@ -1053,35 +1046,15 @@ public class GT_Utility { } public static boolean isOpaqueBlock(World aWorld, int aX, int aY, int aZ) { - boolean result; - try { - result=aWorld.getBlock(aX, aY, aZ).isOpaqueCube(); - } catch (Throwable e) { - result=true; - } - return result; - + return aWorld.getBlock(aX, aY, aZ).isOpaqueCube(); } public static boolean isBlockAir(World aWorld, int aX, int aY, int aZ) { - boolean result; - try { - result=aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ); - } catch (Throwable e) { - result=false; - } - return result; - } + return aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ); + } public static boolean hasBlockHitBox(World aWorld, int aX, int aY, int aZ) { - boolean result; - try { - result=aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) != null; - } catch (Throwable e) { - result=false; - } - return result; - + return aWorld.getBlock(aX, aY, aZ).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) != null; } public static void setCoordsOnFire(World aWorld, int aX, int aY, int aZ, boolean aReplaceCenter) { @@ -1123,7 +1096,6 @@ public class GT_Utility { * Converts a Number to a String */ public static String parseNumberToString(int aNumber) { - String tString = E; boolean temp = true, negative = false; if (aNumber < 0) { @@ -1131,15 +1103,18 @@ public class GT_Utility { negative = true; } + StringBuilder tStringB = new StringBuilder(); for (int i = 1000000000; i > 0; i /= 10) { int tDigit = (aNumber / i) % 10; if (temp && tDigit != 0) temp = false; if (!temp) { - tString += tDigit; - if (i != 1) for (int j = i; j > 0; j /= 1000) if (j == 1) tString += ","; + tStringB.append(tDigit); + if (i != 1) for (int j = i; j > 0; j /= 1000) if (j == 1) tStringB.append(","); } } + String tString = tStringB.toString(); + if (tString.equals(E)) tString = "0"; return negative ? "-" + tString : tString; @@ -1438,7 +1413,7 @@ public class GT_Utility { Collections.sort(tEntrySet, new Comparator<Map.Entry<X, Y>>() { @Override public int compare(Entry<X, Y> aValue1, Entry<X, Y> aValue2) { - return -aValue1.getValue().compareTo(aValue2.getValue()); + return aValue2.getValue().compareTo(aValue1.getValue());//FB: RV - RV_NEGATING_RESULT_OF_COMPARETO } }); LinkedHashMap<X, Y> rMap = new LinkedHashMap<X, Y>(); @@ -1480,26 +1455,27 @@ public class GT_Utility { if (tTargetWorld != null && tOriginalWorld != null && tTargetWorld != tOriginalWorld) { if (aEntity.ridingEntity != null) aEntity.mountEntity(null); if (aEntity.riddenByEntity != null) aEntity.riddenByEntity.mountEntity(null); - if (aEntity instanceof EntityPlayerMP) { EntityPlayerMP aPlayer = (EntityPlayerMP) aEntity; - aPlayer.dimension = aDimension; - aPlayer.playerNetServerHandler.sendPacket(new S07PacketRespawn(aPlayer.dimension, aPlayer.worldObj.difficultySetting, aPlayer.worldObj.getWorldInfo().getTerrainType(), aPlayer.theItemInWorldManager.getGameType())); - tOriginalWorld.removePlayerEntityDangerously(aPlayer); - aPlayer.isDead = false; - aPlayer.setWorld(tTargetWorld); - MinecraftServer.getServer().getConfigurationManager().func_72375_a(aPlayer, tOriginalWorld); +// aPlayer.dimension = aDimension; +// aPlayer.playerNetServerHandler.sendPacket(new S07PacketRespawn(aPlayer.dimension, aPlayer.worldObj.difficultySetting, aPlayer.worldObj.getWorldInfo().getTerrainType(), aPlayer.theItemInWorldManager.getGameType())); +// tOriginalWorld.removePlayerEntityDangerously(aPlayer); +// aPlayer.isDead = false; +// aPlayer.setWorld(tTargetWorld); +// MinecraftServer.getServer().getConfigurationManager().func_72375_a(aPlayer, tOriginalWorld); +// aPlayer.playerNetServerHandler.setPlayerLocation(aX + 0.5, aY + 0.5, aZ + 0.5, aPlayer.rotationYaw, aPlayer.rotationPitch); +// aPlayer.theItemInWorldManager.setWorld(tTargetWorld); +// MinecraftServer.getServer().getConfigurationManager().updateTimeAndWeatherForPlayer(aPlayer, tTargetWorld); +// MinecraftServer.getServer().getConfigurationManager().syncPlayerInventory(aPlayer); +// Iterator tIterator = aPlayer.getActivePotionEffects().iterator(); +// while (tIterator.hasNext()) { +// PotionEffect potioneffect = (PotionEffect) tIterator.next(); +// aPlayer.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(aPlayer.getEntityId(), potioneffect)); +// } +// FMLCommonHandler.instance().firePlayerChangedDimensionEvent(aPlayer, tOriginalWorld.provider.dimensionId, aDimension); + aPlayer.travelToDimension(aDimension); aPlayer.playerNetServerHandler.setPlayerLocation(aX + 0.5, aY + 0.5, aZ + 0.5, aPlayer.rotationYaw, aPlayer.rotationPitch); - aPlayer.theItemInWorldManager.setWorld(tTargetWorld); - MinecraftServer.getServer().getConfigurationManager().updateTimeAndWeatherForPlayer(aPlayer, tTargetWorld); - MinecraftServer.getServer().getConfigurationManager().syncPlayerInventory(aPlayer); - Iterator tIterator = aPlayer.getActivePotionEffects().iterator(); - while (tIterator.hasNext()) { - PotionEffect potioneffect = (PotionEffect) tIterator.next(); - aPlayer.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(aPlayer.getEntityId(), potioneffect)); - } - aPlayer.playerNetServerHandler.setPlayerLocation(aX + 0.5, aY + 0.5, aZ + 0.5, aPlayer.rotationYaw, aPlayer.rotationPitch); - FMLCommonHandler.instance().firePlayerChangedDimensionEvent(aPlayer, tOriginalWorld.provider.dimensionId, aDimension); + } else { aEntity.setPosition(aX + 0.5, aY + 0.5, aZ + 0.5); aEntity.worldObj.removeEntity(aEntity); @@ -1534,7 +1510,7 @@ public class GT_Utility { public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { - + Random tRandom = new Random((aWorld.getSeed() + (aX / 96) + (7 * (aZ / 96)))); int oil = tRandom.nextInt(3); double amount = tRandom.nextInt(50) + tRandom.nextDouble(); @@ -1561,17 +1537,17 @@ public class GT_Utility { int tAmount = (int) (Math.pow(amount, 5) / 100); ChunkPosition tPos = new ChunkPosition(aX/16, 1, aZ/16); int[] tInts = new int[2]; - if(GT_Proxy.chunkData.containsKey(tPos)){ - tInts = GT_Proxy.chunkData.get(tPos); - if(tInts.length>0){ - if(tInts[0]>=0){tAmount = tInts[0];} - } - GT_Proxy.chunkData.remove(tPos); - } - tAmount = tAmount - 5; - tInts[0] = tAmount; - GT_Proxy.chunkData.put(tPos, tInts); - + if(GT_Proxy.chunkData.containsKey(tPos)){ + tInts = GT_Proxy.chunkData.get(tPos); + if(tInts.length>0){ + if(tInts[0]>=0){tAmount = tInts[0];} + } + GT_Proxy.chunkData.remove(tPos); + } + tAmount = tAmount - 5; + tInts[0] = tAmount; + GT_Proxy.chunkData.put(tPos, tInts); + return new FluidStack(tFluid, tAmount); } @@ -1585,15 +1561,15 @@ public class GT_Utility { Block tBlock = aWorld.getBlock(aX, aY, aZ); - tList.add("----- X: " +EnumChatFormatting.AQUA+ aX +EnumChatFormatting.RESET + " Y: " +EnumChatFormatting.AQUA+ aY +EnumChatFormatting.RESET+ " Z: " +EnumChatFormatting.AQUA+ aZ +EnumChatFormatting.RESET+ " -----"); + tList.add("----- X: " + aX + " Y: " + aY + " Z: " + aZ + " -----"); try { - if (tTileEntity != null && tTileEntity instanceof IInventory) - tList.add("Name: " + EnumChatFormatting.BLUE+ ((IInventory) tTileEntity).getInventoryName()+EnumChatFormatting.RESET + " MetaData: " +EnumChatFormatting.AQUA+ aWorld.getBlockMetadata(aX, aY, aZ)+EnumChatFormatting.RESET); + if (tTileEntity instanceof IInventory) + tList.add("Name: " + ((IInventory) tTileEntity).getInventoryName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ)); else - tList.add("Name: " +EnumChatFormatting.BLUE+ tBlock.getUnlocalizedName() +EnumChatFormatting.RESET+ " MetaData: " +EnumChatFormatting.AQUA+ aWorld.getBlockMetadata(aX, aY, aZ)+EnumChatFormatting.RESET); + tList.add("Name: " + tBlock.getUnlocalizedName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ)); - tList.add("Hardness: " +EnumChatFormatting.YELLOW+ tBlock.getBlockHardness(aWorld, aX, aY, aZ) +EnumChatFormatting.RESET+ " Blast Resistance: " +EnumChatFormatting.YELLOW+ tBlock.getExplosionResistance(aPlayer, aWorld, aX, aY, aZ, aPlayer.posX, aPlayer.posY, aPlayer.posZ)+EnumChatFormatting.RESET); - if (tBlock.isBeaconBase(aWorld, aX, aY, aZ, aX, aY + 1, aZ)) tList.add(EnumChatFormatting.GOLD+"Is valid Beacon Pyramid Material"+EnumChatFormatting.RESET ); + tList.add("Hardness: " + tBlock.getBlockHardness(aWorld, aX, aY, aZ) + " Blast Resistance: " + tBlock.getExplosionResistance(aPlayer, aWorld, aX, aY, aZ, aPlayer.posX, aPlayer.posY, aPlayer.posZ)); + if (tBlock.isBeaconBase(aWorld, aX, aY, aZ, aX, aY + 1, aZ)) tList.add("Is valid Beacon Pyramid Material"); } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } @@ -1603,7 +1579,7 @@ public class GT_Utility { rEUAmount += 500; FluidTankInfo[] tTanks = ((IFluidHandler) tTileEntity).getTankInfo(ForgeDirection.getOrientation(aSide)); if (tTanks != null) for (byte i = 0; i < tTanks.length; i++) { - tList.add("Tank " + i + ": " +EnumChatFormatting.GREEN+ GT_Utility.formatNumbers((tTanks[i].fluid == null ? 0 : tTanks[i].fluid.amount)) +EnumChatFormatting.RESET+ " L / " +EnumChatFormatting.YELLOW+ GT_Utility.formatNumbers(tTanks[i].capacity) +EnumChatFormatting.RESET+ " L of " +EnumChatFormatting.GOLD+ getFluidName(tTanks[i].fluid, true)+EnumChatFormatting.RESET); + tList.add("Tank " + i + ": " + GT_Utility.formatNumbers((tTanks[i].fluid == null ? 0 : tTanks[i].fluid.amount)) + " / " + GT_Utility.formatNumbers(tTanks[i].capacity) + " " + getFluidName(tTanks[i].fluid, true)); } } } catch (Throwable e) { @@ -1620,8 +1596,8 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.reactor.IReactor) { rEUAmount += 500; - tList.add("Heat: " +EnumChatFormatting.GREEN+ ((ic2.api.reactor.IReactor) tTileEntity).getHeat() +EnumChatFormatting.RESET+ " / " +EnumChatFormatting.YELLOW+ ((ic2.api.reactor.IReactor) tTileEntity).getMaxHeat()+EnumChatFormatting.RESET); - tList.add("HEM: " +EnumChatFormatting.YELLOW+((ic2.api.reactor.IReactor) tTileEntity).getHeatEffectModifier() +EnumChatFormatting.RESET/*+ " Base EU Output: " + ((ic2.api.reactor.IReactor)tTileEntity).getOutput()*/);//TODO WHAT? + tList.add("Heat: " + ((ic2.api.reactor.IReactor) tTileEntity).getHeat() + "/" + ((ic2.api.reactor.IReactor) tTileEntity).getMaxHeat() + + " HEM: " + ((ic2.api.reactor.IReactor) tTileEntity).getHeatEffectModifier() + " Base EU Output: "/* + ((ic2.api.reactor.IReactor)tTileEntity).getOutput()*/); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -1629,8 +1605,8 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.tile.IWrenchable) { rEUAmount += 100; - tList.add("Facing: " +EnumChatFormatting.GREEN+ ((ic2.api.tile.IWrenchable) tTileEntity).getFacing() +EnumChatFormatting.RESET+ " / Chance: " +EnumChatFormatting.YELLOW+ (((ic2.api.tile.IWrenchable) tTileEntity).getWrenchDropRate() * 100) +EnumChatFormatting.RESET+ "%"); - tList.add(((ic2.api.tile.IWrenchable) tTileEntity).wrenchCanRemove(aPlayer) ? EnumChatFormatting.GREEN+"You can remove this with a Wrench"+EnumChatFormatting.RESET : EnumChatFormatting.RED+"You can NOT remove this with a Wrench"+EnumChatFormatting.RESET); + tList.add("Facing: " + ((ic2.api.tile.IWrenchable) tTileEntity).getFacing() + " / Chance: " + (((ic2.api.tile.IWrenchable) tTileEntity).getWrenchDropRate() * 100) + "%"); + tList.add(((ic2.api.tile.IWrenchable) tTileEntity).wrenchCanRemove(aPlayer) ? "You can remove this with a Wrench" : "You can NOT remove this with a Wrench"); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -1664,7 +1640,7 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.energy.tile.IEnergyConductor) { rEUAmount += 200; - tList.add("Conduction Loss: " +EnumChatFormatting.YELLOW+ ((ic2.api.energy.tile.IEnergyConductor) tTileEntity).getConductionLoss()+EnumChatFormatting.RESET); + tList.add("Conduction Loss: " + ((ic2.api.energy.tile.IEnergyConductor) tTileEntity).getConductionLoss()); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -1672,7 +1648,7 @@ public class GT_Utility { try { if (tTileEntity instanceof ic2.api.tile.IEnergyStorage) { rEUAmount += 200; - tList.add("Contained Energy: " +EnumChatFormatting.YELLOW+ ((ic2.api.tile.IEnergyStorage) tTileEntity).getStored() +EnumChatFormatting.RESET+ " EU / " +EnumChatFormatting.YELLOW+ ((ic2.api.tile.IEnergyStorage) tTileEntity).getCapacity()+EnumChatFormatting.RESET+" EU"); + tList.add("Contained Energy: " + ((ic2.api.tile.IEnergyStorage) tTileEntity).getStored() + " of " + ((ic2.api.tile.IEnergyStorage) tTileEntity).getCapacity()); //aList.add(((ic2.api.tile.IEnergyStorage)tTileEntity).isTeleporterCompatible(ic2.api.Direction.YP)?"Teleporter Compatible":"Not Teleporter Compatible"); } } catch (Throwable e) { @@ -1681,7 +1657,7 @@ public class GT_Utility { try { if (tTileEntity instanceof IUpgradableMachine) { rEUAmount += 500; - if (((IUpgradableMachine) tTileEntity).hasMufflerUpgrade()) tList.add(EnumChatFormatting.GREEN+"Has Muffler Upgrade"+EnumChatFormatting.RESET); + if (((IUpgradableMachine) tTileEntity).hasMufflerUpgrade()) tList.add("Has Muffler Upgrade"); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -1691,7 +1667,7 @@ public class GT_Utility { rEUAmount += 400; int tValue = 0; if (0 < (tValue = ((IMachineProgress) tTileEntity).getMaxProgress())) - tList.add("Progress: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(((IMachineProgress) tTileEntity).getProgress()/20) +EnumChatFormatting.RESET+ " s / " +EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(tValue/20) +EnumChatFormatting.RESET+" s"); + tList.add("Progress: " + GT_Utility.formatNumbers(tValue) + " / " + GT_Utility.formatNumbers(((IMachineProgress) tTileEntity).getProgress())); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -1707,16 +1683,16 @@ public class GT_Utility { } try { if (tTileEntity instanceof IBasicEnergyContainer && ((IBasicEnergyContainer) tTileEntity).getEUCapacity() > 0) { - tList.add("Max IN: " +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getInputVoltage() +EnumChatFormatting.RESET+ " EU at "+EnumChatFormatting.RED+((IBasicEnergyContainer)tTileEntity).getInputAmperage()+EnumChatFormatting.RESET+" A"); - tList.add("Max OUT: " +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getOutputVoltage() +EnumChatFormatting.RESET+ " EU at " +EnumChatFormatting.RED+ ((IBasicEnergyContainer) tTileEntity).getOutputAmperage() +EnumChatFormatting.RESET+ " A"); - tList.add("Energy: " +EnumChatFormatting.GREEN+ GT_Utility.formatNumbers(((IBasicEnergyContainer) tTileEntity).getStoredEU()) +EnumChatFormatting.RESET+ " EU / " +EnumChatFormatting.YELLOW+ GT_Utility.formatNumbers(((IBasicEnergyContainer) tTileEntity).getEUCapacity()) +EnumChatFormatting.RESET+ " EU"); + tList.add("Max IN: " + ((IBasicEnergyContainer) tTileEntity).getInputVoltage() + " EU"); + tList.add("Max OUT: " + ((IBasicEnergyContainer) tTileEntity).getOutputVoltage() + " EU at " + ((IBasicEnergyContainer) tTileEntity).getOutputAmperage() + " Amperes"); + tList.add("Energy: " + GT_Utility.formatNumbers(((IBasicEnergyContainer) tTileEntity).getStoredEU()) + " / " + GT_Utility.formatNumbers(((IBasicEnergyContainer) tTileEntity).getEUCapacity()) + "EU"); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } try { if (tTileEntity instanceof IGregTechTileEntity) { - tList.add("Owned by: " +EnumChatFormatting.BLUE+ ((IGregTechTileEntity) tTileEntity).getOwnerName()+EnumChatFormatting.RESET); + tList.add("Owned by: " + ((IGregTechTileEntity) tTileEntity).getOwnerName()); } } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); @@ -1750,10 +1726,11 @@ public class GT_Utility { + " Humidity: " + ((ic2.api.crops.ICropTile) tTileEntity).getHumidity() + " Air-Quality: " + ((ic2.api.crops.ICropTile) tTileEntity).getAirQuality() ); - String tString = E; + StringBuilder tStringB = new StringBuilder(); for (String tAttribute : ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].attributes()) { - tString += ", " + tAttribute; + tStringB.append(", ").append(tAttribute); } + String tString = tStringB.toString(); tList.add("Attributes:" + tString.replaceFirst(",", E)); tList.add("Discovered by: " + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].discoveredBy()); } @@ -1764,8 +1741,19 @@ public class GT_Utility { } if (aPlayer.capabilities.isCreativeMode&>_Values.D1) { FluidStack tFluid = getUndergroundOil(aWorld, aX, aZ); - tList.add(EnumChatFormatting.GOLD+"Oil"+EnumChatFormatting.RESET+" in Chunk: " +EnumChatFormatting.YELLOW+ tFluid.amount + " " + tFluid.getLocalizedName()+EnumChatFormatting.RESET); + tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); + } +// if(aPlayer.capabilities.isCreativeMode){ + ChunkPosition tPos = new ChunkPosition(aX/16, 1, aZ/16); + if(GT_Proxy.chunkData.containsKey(tPos)){ + int[] tPollution = GT_Proxy.chunkData.get(tPos); + if(tPollution.length>1){ + tList.add("Pollution in Chunk: "+tPollution[1]); + }else{ + tList.add("No Pollution in Chunk"); + } } +// } try { if (tBlock instanceof IDebugableBlock) { |