Initial port of pollution changes from bloodasp
This commit is contained in:
parent
894a79153c
commit
b476b0d54a
15 changed files with 118 additions and 139 deletions
|
@ -12,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin
|
|||
import gregtech.api.net.GT_Packet_TileEntity;
|
||||
import gregtech.api.objects.GT_ItemStack;
|
||||
import gregtech.api.util.*;
|
||||
import gregtech.common.GT_Pollution;
|
||||
import ic2.api.Direction;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFire;
|
||||
|
@ -25,6 +26,7 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -1119,6 +1121,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
|
|||
}
|
||||
}
|
||||
}
|
||||
GT_Pollution.addPollution(new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000);
|
||||
mMetaTileEntity.doExplosion(aAmount);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
}
|
||||
if(tProducedEU>0&&getPollution()>0){
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
||||
(int) ((tProducedEU * getPollution()/500)+1));
|
||||
(int) ((tProducedEU * getPollution()/(500*mTier))+1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{mDescription, "DO NOT OBSTRUCT THE OUTPUT!"};
|
||||
return new String[]{mDescription, "DO NOT OBSTRUCT THE OUTPUT!","Reduces Pollution to "+calculatePollutionReduction(100)+"%"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,9 +64,13 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
}
|
||||
|
||||
public boolean polluteEnvironment() {
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 10000 - (600*(mTier-1)));
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000));
|
||||
return (mTier > 1 && getBaseMetaTileEntity().getRandomNumber(mTier) != 0) || getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing());
|
||||
}
|
||||
|
||||
public int calculatePollutionReduction(int aPollution){
|
||||
return (int) (aPollution *(Math.pow(0.5, mTier-1)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
|
@ -78,17 +82,6 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
return false;
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public String[] getInfoData() {
|
||||
// return new String[]{
|
||||
// "Reduces pollution by: "+ EnumChatFormatting.GREEN + (6*(mTier-1))+ EnumChatFormatting.RESET+" %"
|
||||
// };
|
||||
//}
|
||||
|
||||
public int getPollutionReduction() {
|
||||
return 6*(mTier-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
super.onPostTick(aBaseMetaTileEntity, aTick);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package gregtech.common;
|
||||
package gregtech.common;
|
||||
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.objects.XSTR;
|
||||
|
@ -20,7 +20,37 @@ import java.util.List;
|
|||
//import net.minecraft.entity.EntityLiving;
|
||||
|
||||
public class GT_Pollution {
|
||||
|
||||
/**
|
||||
* Pollution dispersion until effects start:
|
||||
* Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate)
|
||||
*
|
||||
* SMOG(500k) 466.7 pollution/sec
|
||||
* Poison(750k) 633,3 pollution/sec
|
||||
* Dying Plants(1mio) 800 pollution/sec
|
||||
* Sour Rain(1.5mio) 1133.3 pollution/sec
|
||||
*
|
||||
* Pollution producers (pollution/sec)
|
||||
* Bronze Boiler(20)
|
||||
* Lava Boiler(20)
|
||||
* High Pressure Boiler(20)
|
||||
* Bronze Blast Furnace(50)
|
||||
* Diesel Generator(14/28/75)
|
||||
* Gas Turbine(7/14/37)
|
||||
* Charcoal Pile(100)
|
||||
*
|
||||
* Large Diesel Generator(300)
|
||||
* Electric Blast Furnace(100)
|
||||
* Implosion Compressor(2000)
|
||||
* Large Boiler(240)
|
||||
* Large Gas Turbine(160)
|
||||
* Multi Smelter(100)
|
||||
* Pyrolyse Oven(400)
|
||||
*
|
||||
* Machine Explosion(100,000)
|
||||
*
|
||||
* Muffler Hatch Pollution reduction:
|
||||
* LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%)
|
||||
*/
|
||||
|
||||
static List<ChunkPosition> tList = null;
|
||||
static int loops = 1;
|
||||
|
@ -30,77 +60,79 @@ public class GT_Pollution {
|
|||
if(!GT_Mod.gregtechproxy.mPollution)return;
|
||||
if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){
|
||||
tList = new ArrayList<ChunkPosition>(GT_Proxy.chunkData.keySet());
|
||||
loops = /*(tList.size()/1000) +*/ 1;
|
||||
loops = (tList.size()/1200) + 1;
|
||||
// System.out.println("new Pollution loop"+aTick);
|
||||
}
|
||||
if(tList!=null && tList.size() > 0){
|
||||
int i = 0;
|
||||
for(; i < loops ; i++){
|
||||
ChunkPosition tPos = tList.get(0);
|
||||
tList.remove(0);
|
||||
if(tList.size()>0){
|
||||
ChunkPosition tPos = tList.get(0);
|
||||
tList.remove(0);
|
||||
if(tPos!=null && GT_Proxy.chunkData.containsKey(tPos)){
|
||||
int tPollution = GT_Proxy.chunkData.get(tPos)[1];
|
||||
// System.out.println("process: "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution);
|
||||
//Reduce pollution in chunk
|
||||
//tPollution = (int)(0.99f*tPollution);
|
||||
tPollution -= 3000;
|
||||
tPollution = (int)(0.995f*tPollution);
|
||||
tPollution -= 2000;
|
||||
if(tPollution<=0){tPollution = 0;}else{
|
||||
//Spread Pollution
|
||||
if(tPollution>500000){
|
||||
List<ChunkPosition> tNeighbor = new ArrayList();
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, 1, tPos.chunkPosZ));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, 1, tPos.chunkPosZ));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX, 1, tPos.chunkPosZ+1));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX, 1, tPos.chunkPosZ-1));
|
||||
for(ChunkPosition tNPos : tNeighbor){
|
||||
if(!GT_Proxy.chunkData.containsKey(tNPos)){
|
||||
GT_Utility.getUndergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ);
|
||||
}
|
||||
int tNPol = GT_Proxy.chunkData.get(tNPos)[1];
|
||||
if(tNPol*12 < tPollution*10){
|
||||
int tDiff = tPollution - tNPol;
|
||||
tDiff = tDiff/20;
|
||||
tNPol = GT_Utility.safeInt((long)tNPol+tDiff);//tNPol += tDiff;
|
||||
tPollution -= tDiff;
|
||||
GT_Proxy.chunkData.get(tNPos)[1] = tNPol;
|
||||
}
|
||||
}
|
||||
}
|
||||
int[] tArray = GT_Proxy.chunkData.get(tPos);
|
||||
tArray[1] = tPollution;
|
||||
GT_Proxy.chunkData.remove(tPos);
|
||||
GT_Proxy.chunkData.put(tPos, tArray);
|
||||
//Create Pollution effects
|
||||
// Smog filter TODO
|
||||
if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){
|
||||
AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX<<4, 0, tPos.chunkPosZ<<4, (tPos.chunkPosX<<4)+16, 256, (tPos.chunkPosZ<<4)+16);
|
||||
List<EntityLivingBase> tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk);
|
||||
for(EntityLivingBase tEnt : tEntitys){
|
||||
if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/25000) > 10){
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution/1000,1000), 1));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution/1000,1000), 1));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution/1000,1000), 1));
|
||||
}
|
||||
}
|
||||
// Poison effects
|
||||
if(tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit){
|
||||
//AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16);
|
||||
//List<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk);
|
||||
for(EntityLivingBase tEnt : tEntitys){
|
||||
if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/25000) > 20){
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution/2000,1000), 1));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution/4000,1000), 1));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution/2000,1000), 1));
|
||||
//Spread Pollution
|
||||
if(tPollution>400000){
|
||||
List<ChunkPosition> tNeighbor = new ArrayList();
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, 1, tPos.chunkPosZ));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, 1, tPos.chunkPosZ));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX, 1, tPos.chunkPosZ+1));
|
||||
tNeighbor.add(new ChunkPosition(tPos.chunkPosX, 1, tPos.chunkPosZ-1));
|
||||
for(ChunkPosition tNPos : tNeighbor){
|
||||
if(!GT_Proxy.chunkData.containsKey(tNPos)){
|
||||
GT_Utility.getUndergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ);
|
||||
}
|
||||
int tNPol = GT_Proxy.chunkData.get(tNPos)[1];
|
||||
if(tNPol*6 < tPollution*5){
|
||||
int tDiff = tPollution - tNPol;
|
||||
tDiff = tDiff/20;
|
||||
tNPol = GT_Utility.safeInt((long)tNPol+tDiff);//tNPol += tDiff;
|
||||
tPollution -= tDiff;
|
||||
GT_Proxy.chunkData.get(tNPos)[1] = tNPol;
|
||||
}
|
||||
}
|
||||
// killing plants
|
||||
if(tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit){
|
||||
int f = 20;
|
||||
for(;f<(tPollution/25000);f++){
|
||||
int x =(tPos.chunkPosX<<4)+tRan.nextInt(16);
|
||||
int y =60 +(-f+tRan.nextInt(f*2+1));
|
||||
int z =(tPos.chunkPosZ<<4)+tRan.nextInt(16);
|
||||
damageBlock(aWorld,x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit);
|
||||
}
|
||||
int[] tArray = GT_Proxy.chunkData.get(tPos);
|
||||
tArray[1] = tPollution;
|
||||
GT_Proxy.chunkData.remove(tPos);
|
||||
GT_Proxy.chunkData.put(tPos, tArray);
|
||||
//Create Pollution effects
|
||||
// Smog filter TODO
|
||||
if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) {
|
||||
AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX << 4, 0, tPos.chunkPosZ << 4, (tPos.chunkPosX << 4) + 16, 256, (tPos.chunkPosZ << 4) + 16);
|
||||
List<EntityLivingBase> tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk);
|
||||
for (EntityLivingBase tEnt : tEntitys) {
|
||||
if (!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution / 25000) > 10) {
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution / 1000, 1000), tPollution / 400000));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000));
|
||||
}
|
||||
}
|
||||
// Poison effects
|
||||
if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) {
|
||||
//AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16);
|
||||
//List<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk);
|
||||
for (EntityLivingBase tEnt : tEntitys) {
|
||||
if (!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution / 25000) > 20) {
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution / 2000, 1000), tPollution / 500000));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution / 4000, 1000), 1));
|
||||
tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution / 2000, 1000), 1));
|
||||
}
|
||||
}
|
||||
// killing plants
|
||||
if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) {
|
||||
int f = 20;
|
||||
for (; f < (tPollution / 25000); f++) {
|
||||
int x = (tPos.chunkPosX << 4) + tRan.nextInt(16);
|
||||
int y = 60 + (-f + tRan.nextInt(f * 2 + 1));
|
||||
int z = (tPos.chunkPosZ << 4) + tRan.nextInt(16);
|
||||
damageBlock(aWorld, x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -181,48 +213,6 @@ public class GT_Pollution {
|
|||
}
|
||||
}catch(Exception e){}
|
||||
}
|
||||
|
||||
//PLACE HOLDER TODO
|
||||
public static void onWorldTickClient(World aWorld, int aTick){
|
||||
if(!GT_Mod.gregtechproxy.mPollution)return;
|
||||
if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){
|
||||
tList = new ArrayList<ChunkPosition>(GT_Proxy.chunkData.keySet());
|
||||
loops = (tList.size()/1000) + 1;
|
||||
// System.out.println("new Pollution loop"+aTick);
|
||||
}
|
||||
if(tList!=null && tList.size() > 0){
|
||||
int i = 0;
|
||||
for(; i < loops ; i++){
|
||||
ChunkPosition tPos = tList.get(0);
|
||||
tList.remove(0);
|
||||
if(tPos!=null && GT_Proxy.chunkData.containsKey(tPos)){
|
||||
int tPollution = GT_Proxy.chunkData.get(tPos)[1];
|
||||
|
||||
if(tPollution<=0){tPollution = 0;}else{
|
||||
|
||||
int[] tArray = GT_Proxy.chunkData.get(tPos);
|
||||
tArray[1] = tPollution;
|
||||
GT_Proxy.chunkData.remove(tPos);
|
||||
GT_Proxy.chunkData.put(tPos, tArray);
|
||||
//Create Pollution effects
|
||||
// Smog filter TODO
|
||||
if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){
|
||||
doSmog(tPos,aWorld,tPollution);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void doSmog(ChunkPosition tPos, World aWorld, int tPollution) {
|
||||
if(aWorld.isRemote) {
|
||||
int i = Math.max(tPollution/5000,300);
|
||||
for (; i > 0; i -= 1)
|
||||
aWorld.spawnParticle("largesmoke", tPos.chunkPosX * 16 + (new XSTR()).nextFloat() * 16, (new XSTR()).nextFloat() * 250, tPos.chunkPosZ * 16 + (new XSTR()).nextFloat() * 16, 0.0D, 0.3D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getPollutionAtCoords(int aX, int aZ){
|
||||
ChunkPosition tPos = new ChunkPosition(aX>>4, 1, aZ>>4);
|
||||
|
|
|
@ -141,7 +141,7 @@ public class GT_MetaTileEntity_Boiler_Bronze
|
|||
this.mTemperature += 1;
|
||||
}
|
||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30);
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
||||
}
|
||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ public class GT_MetaTileEntity_Boiler_Lava
|
|||
}
|
||||
|
||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30);
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
||||
}
|
||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ public class GT_MetaTileEntity_Boiler_Steel
|
|||
this.mTemperature += 1;
|
||||
}
|
||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30);
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
||||
}
|
||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||
}
|
||||
|
|
|
@ -211,17 +211,14 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
|
|||
this.mOutputItem2 = null;
|
||||
this.mProgresstime = 0;
|
||||
this.mMaxProgresstime = 0;
|
||||
try {
|
||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
|
||||
}
|
||||
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
|
||||
checkRecipe();
|
||||
}
|
||||
}
|
||||
if(this.mMachine && this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 400);
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 75);
|
||||
}
|
||||
|
||||
aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
|
||||
|
@ -350,8 +347,6 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
|
|||
}
|
||||
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
if (aIndex < 2) {
|
||||
}
|
||||
return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
|||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.common.GT_Pollution;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -85,6 +86,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock
|
|||
this.mEfficiency = 10000;
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5);
|
||||
return true;
|
||||
} else {
|
||||
this.mEfficiency = 0;
|
||||
|
|
|
@ -216,7 +216,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -104,7 +104,6 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
|||
}
|
||||
}
|
||||
FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
|
||||
|
||||
if (tInputList.size() > 0) {
|
||||
long tVoltage = getMaxInputVoltage();
|
||||
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
|
||||
|
@ -221,7 +220,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
|||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 10;
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
|
|
|
@ -144,7 +144,7 @@ public class GT_MetaTileEntity_ImplosionCompressor
|
|||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 1000;
|
||||
return 100;
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
public String[] getDescription() {
|
||||
return new String[]{
|
||||
"Controller Block for the Large Boiler",
|
||||
"Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam/sec for 1 Coal",
|
||||
"Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam with 1 Coal in "+runtimeBoost(20)+" ticks",
|
||||
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
|
||||
"3x1x3 of Fire Boxes (Bottom layer, Min 3)",
|
||||
"3x4x3 of Casings (Above Fireboxes, hollow, Min 24!)",
|
||||
|
@ -151,10 +151,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (mProgresstime > 0 && firstRun) {
|
||||
firstRun = false;
|
||||
try {
|
||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
|
||||
}
|
||||
super.onPostTick(aBaseMetaTileEntity, aTick);
|
||||
}
|
||||
|
@ -225,7 +222,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 10;
|
||||
return 12;
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
|
|||
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 10;
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -196,7 +196,7 @@ public class GT_MetaTileEntity_MultiFurnace
|
|||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 20;
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
|
|
Loading…
Reference in a new issue