aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/gregtech/api/enums/ItemList.java1
-rw-r--r--src/main/java/gregtech/api/enums/Textures.java1
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java30
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java8
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java2
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_Pollution.java31
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java12
-rw-r--r--src/main/java/gregtech/common/GT_Client.java49
-rw-r--r--src/main/java/gregtech/common/GT_Pollution.java71
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java4
-rw-r--r--src/main/java/gregtech/common/entities/GT_EntityFXPollution.java59
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java6
-rw-r--r--src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java156
-rw-r--r--src/main/java/gregtech/common/misc/GT_Command.java50
-rw-r--r--src/main/java/gregtech/common/render/GT_PollutionRenderer.java242
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java6
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java10
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java2
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java27
-rw-r--r--src/main/resources/assets/gregtech/lang/en_US.lang3
-rw-r--r--src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.pngbin0 -> 3302 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.pngbin380 -> 1995 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.pngbin498 -> 2204 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.pngbin366 -> 1888 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.pngbin410 -> 2168 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.pngbin462 -> 2161 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.pngbin514 -> 2236 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.pngbin474 -> 2223 bytes
29 files changed, 652 insertions, 123 deletions
diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java
index cb6e94f5ba..6f7a0567a1 100644
--- a/src/main/java/gregtech/api/enums/ItemList.java
+++ b/src/main/java/gregtech/api/enums/ItemList.java
@@ -1474,6 +1474,7 @@ public enum ItemList implements IItemContainer {
Block_TungstenSteelReinforced,
Block_NaquadahPlate,
Block_NeutroniumPlate,
+ Block_BedrockiumCompressed,
Honeycomb,
Charcoal_Pile,
diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java
index a813eacd57..7b229550ff 100644
--- a/src/main/java/gregtech/api/enums/Textures.java
+++ b/src/main/java/gregtech/api/enums/Textures.java
@@ -351,6 +351,7 @@ public class Textures {
BLOCK_TITANIUMPREIN,
BLOCK_NAQUADAHPREIN,
BLOCK_NEUTRONIUMPREIN,
+ BLOCK_DEEP_DARK_RAW,
BLOCK_IRREIN,
BLOCK_PLASCRETE,
BLOCK_TSREIN,
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 63c88cfd0a..9e37141bc6 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -496,15 +496,17 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
dischargeItem(mMetaTileEntity.mInventory[i]);
- if(ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])>0){
+ if(ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])>0){
if((getStoredEU() + ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]))<getEUCapacity()){
increaseStoredEnergyUnits((long)ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]),false);
mMetaTileEntity.mInventory[i].stackSize--;
+ mInventoryChanged = true;
}
}
- if (mMetaTileEntity.mInventory[i].stackSize <= 0)
+ if (mMetaTileEntity.mInventory[i].stackSize <= 0) {
mMetaTileEntity.mInventory[i] = null;
- mInventoryChanged = true;
+ mInventoryChanged = true;
+ }
}
}
}
@@ -516,9 +518,10 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
chargeItem(mMetaTileEntity.mInventory[i]);
- if (mMetaTileEntity.mInventory[i].stackSize <= 0)
+ if (mMetaTileEntity.mInventory[i].stackSize <= 0) {
mMetaTileEntity.mInventory[i] = null;
- mInventoryChanged = true;
+ mInventoryChanged = true;
+ }
}
}
}
@@ -545,7 +548,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
NW.sendPacketToAllPlayersInRange(worldObj,
new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID,
mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5],
- oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)),
+ oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0) | (mWorks ? 64 : 0) ),
oTexturePage = (hasValidMetaTileEntity() && mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) ? ((GT_MetaTileEntity_Hatch) mMetaTileEntity).getTexturePage() : 0,
oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0,
oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)),
@@ -556,7 +559,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
}
if (mTickTimer > 10) {
- byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
+ byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)| (mWorks ? 64 : 0));
if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
tData = mMetaTileEntity.getUpdateData();
@@ -681,6 +684,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
mActive = ((aValue & 8) != 0);
mRedstone = ((aValue & 16) != 0);
//mLockUpgrade = ((aValue&32) != 0);
+ mWorks = ((aValue & 64) != 0);
break;
case 1:
if (hasValidMetaTileEntity()) {
@@ -1724,15 +1728,19 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
@Override
public long getAverageElectricInput() {
long rEU = 0;
- for (long tEU : mAverageEUInput) rEU += tEU;
- return rEU / mAverageEUInput.length;
+ for (int i = 0; i < mAverageEUInput.length; ++i)
+ if (i != mAverageEUInputIndex)
+ rEU += mAverageEUInput[i];
+ return rEU / (mAverageEUInput.length - 1);
}
@Override
public long getAverageElectricOutput() {
long rEU = 0;
- for (long tEU : mAverageEUOutput) rEU += tEU;
- return rEU / mAverageEUOutput.length;
+ for (int i = 0; i < mAverageEUOutput.length; ++i)
+ if (i != mAverageEUOutputIndex)
+ rEU += mAverageEUOutput[i];
+ return rEU / (mAverageEUOutput.length - 1);
}
@Override
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
index 0767bd0081..23afaa84f7 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
@@ -104,7 +104,13 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
{1, 0, 2, 3},
{1, 0, 2, 3}
};
- if (aSide >= 0 && aSide < 6) for (byte i = 0; i < 4; i++) if (isInputDisabledAtSide(sRestrictionArray[aSide][i])) tMask |= 1 << i;
+ if (aSide >= 0 && aSide < 6) {
+ for (byte i = 0; i < 4; i++) if (isInputDisabledAtSide(sRestrictionArray[aSide][i])) tMask |= 1 << i;
+ //Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate
+ if (tThickNess >= 0.99F && (aSide == 5 || aSide == 2))
+ if (tMask > 3 && tMask < 12)
+ tMask = (byte) (tMask ^ 12);
+ }
return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)};
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java
index f33b8aa3d9..711670db08 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java
@@ -60,7 +60,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aActive ? 0 : 6)][aColorIndex + 1];
+ return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aBaseMetaTileEntity.isAllowedToWork() ? 0 : 6)][aColorIndex + 1];
}
@Override
diff --git a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
index 2c67d74150..7f717c1a47 100644
--- a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
+++ b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
@@ -1,38 +1,47 @@
package gregtech.api.net;
import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-import gregtech.common.GT_Pollution;
+import gregtech.common.GT_Client;
+import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.IBlockAccess;
+import java.nio.ByteBuffer;
+
public class GT_Packet_Pollution extends GT_Packet {
- private int mPollution;
+ private ChunkCoordIntPair chunk;
+ private int pollution;
public GT_Packet_Pollution() {
super(true);
}
- public GT_Packet_Pollution(int aPollution) {
+ public GT_Packet_Pollution(ChunkCoordIntPair chunk, int pollution) {
super(false);
- mPollution = aPollution;
+ this.chunk = chunk;
+ this.pollution = pollution;
}
@Override
public byte[] encode() {
- ByteArrayDataOutput tOut = ByteStreams.newDataOutput(4);
- tOut.writeInt(mPollution);
- return tOut.toByteArray();
+ return ByteBuffer
+ .allocate(12)
+ .putInt(chunk.chunkXPos)
+ .putInt(chunk.chunkZPos)
+ .putInt(pollution)
+ .array();
}
@Override
public GT_Packet decode(ByteArrayDataInput aData) {
- return new GT_Packet_Pollution(aData.readInt());
+ return new GT_Packet_Pollution(
+ new ChunkCoordIntPair(aData.readInt(), aData.readInt()),
+ aData.readInt()
+ );
}
@Override
public void process(IBlockAccess aWorld) {
- GT_Pollution.mPlayerPollution = mPollution;
+ GT_Client.recieveChunkPollutionPacket(chunk, pollution);
}
@Override
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index f5dfb42a2c..6df77f16bf 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -559,14 +559,14 @@ public class GT_Utility {
for (int i = 0; i < tGrabSlots.length; i++) {
byte tMovedItemCount = 0;
- for (int j = 0; j < tPutSlots.length; j++) {
- if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(tGrabSlots[i]), true, aInvertFilter)) {
- if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, aTileEntity1.getStackInSlot(tGrabSlots[i]))) {
- if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlots[j], aPutTo, aTileEntity1.getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) {
- tMovedItemCount += moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce);
+ ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlots[i]);
+ if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter)) {
+ if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, tGrabStack)) {
+ for (int j = 0; j < tPutSlots.length; j++) {
+ if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlots[j], aPutTo, tGrabStack, aMaxTargetStackSize)) {
+ tMovedItemCount += moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItemCount), aMinMoveAtOnce);
if (tMovedItemCount >= aMaxMoveAtOnce) {
return tMovedItemCount;
-
}
}
}
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index 51f5e30c28..e528323da4 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -33,6 +33,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatFileWriter;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
import net.minecraftforge.oredict.OreDictionary;
@@ -56,7 +57,8 @@ public class GT_Client extends GT_Proxy
});
}
- private final HashSet mCapeList = new HashSet();
+ private final HashSet<String> mCapeList = new HashSet<>();
+ public final static GT_PollutionRenderer mPollutionRenderer = new GT_PollutionRenderer();
private final GT_CapeRenderer mCapeRenderer;
private final List mPosR;
private final List mPosG;
@@ -247,45 +249,6 @@ public class GT_Client extends GT_Proxy
drawGrid(aEvent, false);
}
- //TODO less bad
- //@SubscribeEvent
- //public void manipulateDensity(EntityViewRenderEvent.FogDensity event) {
- // if(GT_Pollution.mPlayerPollution > (GT_Mod.gregtechproxy.mPollutionSmogLimit)){
- // event.density = (0.15f*(Math.min(GT_Pollution.mPlayerPollution/((float)GT_Mod.gregtechproxy.mPollutionSourRainLimit),1.0f)))+0.1f;
- // event.setCanceled(true);
- // }
- //}
-
- //@SubscribeEvent
- //public void manipulateColor(EntityViewRenderEvent.FogColors event) {
- // if(GT_Pollution.mPlayerPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){
- // event.red = 140f/255f;
- // event.green = 80f/255f;
- // event.blue = 40f/255f;
- // }
- //}
-
- //@SubscribeEvent
- //public void manipulateGrassColor(BiomeEvent.GetGrassColor event) {
- // if(GT_Pollution.mPlayerPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){
- // event.newColor = 0xD2691E;
- // }
- //}
-
- //@SubscribeEvent
- //public void manipulateWaterColor(BiomeEvent.GetWaterColor event) {
- // if(GT_Pollution.mPlayerPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){
- // event.newColor = 0x556B2F;
- // }
- //}
-
- //@SubscribeEvent
- //public void manipulateFoliageColor(BiomeEvent.GetFoliageColor event) {
- // if(GT_Pollution.mPlayerPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit){
- // event.newColor = 0xCD853F;
- // }
- //}
-
public boolean isServerSide() {
return true;
}
@@ -329,6 +292,8 @@ public class GT_Client extends GT_Proxy
mCapeList.add(tName.toLowerCase());
}
(new Thread(this)).start();
+
+ mPollutionRenderer.preLoad();
}
public void onLoad() {
@@ -730,4 +695,8 @@ public class GT_Client extends GT_Proxy
return 0;
}
}
+
+ public static void recieveChunkPollutionPacket(ChunkCoordIntPair chunk, int pollution) {
+ mPollutionRenderer.processPacket(chunk, pollution);
+ }
}
diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java
index f25c21f86a..be49e57e4a 100644
--- a/src/main/java/gregtech/common/GT_Pollution.java
+++ b/src/main/java/gregtech/common/GT_Pollution.java
@@ -1,12 +1,18 @@
package gregtech.common;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
+import cpw.mods.fml.common.network.NetworkRegistry;
import gregtech.GT_Mod;
+import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.net.GT_Packet_Pollution;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@@ -15,6 +21,8 @@ import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.world.ChunkWatchEvent;
import java.util.ArrayList;
import java.util.HashMap;
@@ -64,6 +72,10 @@ public class GT_Pollution {
private final World aWorld;
public static int mPlayerPollution;
+ private static int POLLUTIONPACKET_MINVALUE = 1000;
+
+ private static GT_PollutionEventHandler EVENT_HANDLER;
+
public GT_Pollution(World world){
aWorld=world;
chunkData=dimensionWiseChunkData.get(aWorld.provider.dimensionId);
@@ -72,6 +84,11 @@ public class GT_Pollution {
dimensionWiseChunkData.put(world.provider.dimensionId,chunkData);
}
dimensionWisePollution.put(aWorld.provider.dimensionId,this);
+
+ if (EVENT_HANDLER == null) {
+ EVENT_HANDLER = new GT_PollutionEventHandler();
+ MinecraftForge.EVENT_BUS.register(EVENT_HANDLER);
+ }
}
public static void onWorldTick(TickEvent.WorldTickEvent aEvent){//called from proxy
@@ -130,7 +147,9 @@ public class GT_Pollution {
AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(actualPos.chunkXPos << 4, 0, actualPos.chunkZPos << 4, (actualPos.chunkXPos << 4) + 16, 256, (actualPos.chunkZPos << 4) + 16);
List<EntityLivingBase> tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk);
for (EntityLivingBase tEnt : tEntitys) {
- if (!GT_Utility.isWearingFullGasHazmat(tEnt)) {
+ if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode)
+ continue;
+ if (!(GT_Utility.isWearingFullGasHazmat(tEnt))) {
switch (XSTR_INSTANCE.nextInt(3)) {
default:
tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution / 1000, 1000), tPollution / 400000));
@@ -148,6 +167,8 @@ public class GT_Pollution {
//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 (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode)
+ continue;
if (!GT_Utility.isWearingFullGasHazmat(tEnt)) {
switch (XSTR_INSTANCE.nextInt(4)) {
default:
@@ -178,15 +199,21 @@ public class GT_Pollution {
}
//Write new pollution to Hashmap !!!
chunkData.get(actualPos)[GTPOLLUTION] = tPollution;
+
+ //Send new value to players nearby
+ if (tPollution > POLLUTIONPACKET_MINVALUE) {
+ NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(aWorld.provider.dimensionId, (actualPos.chunkXPos << 4), 64, (actualPos.chunkZPos << 4), 256);
+ GT_Values.NW.sendToAllAround(new GT_Packet_Pollution(actualPos, tPollution), point);
+ }
}
}
-
+
private static void damageBlock(World world, int x, int y, int z, boolean sourRain){
if (world.isRemote) return;
Block tBlock = world.getBlock(x, y, z);
int tMeta = world.getBlockMetadata(x, y, z);
if (tBlock == Blocks.air || tBlock == Blocks.stone || tBlock == Blocks.sand|| tBlock == Blocks.deadbush)return;
-
+
if (tBlock == Blocks.leaves || tBlock == Blocks.leaves2 || tBlock.getMaterial() == Material.leaves)
world.setBlockToAir(x, y, z);
if (tBlock == Blocks.reeds) {
@@ -199,12 +226,12 @@ public class GT_Pollution {
tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0);
world.setBlockToAir(x, y, z);
}
- if (tBlock == Blocks.waterlily || tBlock == Blocks.wheat || tBlock == Blocks.cactus ||
+ if (tBlock == Blocks.waterlily || tBlock == Blocks.wheat || tBlock == Blocks.cactus ||
tBlock.getMaterial() == Material.cactus || tBlock == Blocks.melon_block || tBlock == Blocks.melon_stem) {
tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0);
world.setBlockToAir(x, y, z);
}
- if (tBlock == Blocks.red_flower || tBlock == Blocks.yellow_flower || tBlock == Blocks.carrots ||
+ if (tBlock == Blocks.red_flower || tBlock == Blocks.yellow_flower || tBlock == Blocks.carrots ||
tBlock == Blocks.potatoes || tBlock == Blocks.pumpkin || tBlock == Blocks.pumpkin_stem) {
tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0);
world.setBlockToAir(x, y, z);
@@ -218,12 +245,12 @@ public class GT_Pollution {
if (tBlock == Blocks.mossy_cobblestone)
world.setBlock(x, y, z, Blocks.cobblestone);
if (tBlock == Blocks.grass || tBlock.getMaterial() == Material.grass )
- world.setBlock(x, y, z, Blocks.dirt);
+ world.setBlock(x, y, z, Blocks.dirt);
if(tBlock == Blocks.farmland || tBlock == Blocks.dirt){
- world.setBlock(x, y, z, Blocks.sand);
+ world.setBlock(x, y, z, Blocks.sand);
}
-
- if(sourRain && world.isRaining() && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) &&
+
+ if(sourRain && world.isRaining() && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) &&
world.getBlock(x, y+1, z) == Blocks.air && world.canBlockSeeTheSky(x, y, z)){
if(tBlock == Blocks.stone){world.setBlock(x, y, z, Blocks.cobblestone); }
else if(tBlock == Blocks.cobblestone){world.setBlock(x, y, z, Blocks.gravel); }
@@ -256,19 +283,22 @@ public class GT_Pollution {
}
public static int getPollution(Chunk ch){
- if(!GT_Mod.gregtechproxy.mPollution)return 0;
+ if(!GT_Mod.gregtechproxy.mPollution)
+ return 0;
HashMap<ChunkCoordIntPair,int[]> dataMap=dimensionWiseChunkData.get(ch.worldObj.provider.dimensionId);
if(dataMap==null || dataMap.get(ch.getChunkCoordIntPair())==null) return 0;
return dataMap.get(ch.getChunkCoordIntPair())[GTPOLLUTION];
}
- public static int getPollution(ChunkCoordIntPair aCh, int aDim){
- if(!GT_Mod.gregtechproxy.mPollution)return 0;
- HashMap<ChunkCoordIntPair,int[]> dataMap=dimensionWiseChunkData.get(aDim);
- if(dataMap==null || dataMap.get(aCh)==null) return 0;
+ public static int getPollution(ChunkCoordIntPair aCh, int aDim) {
+ if (!GT_Mod.gregtechproxy.mPollution)
+ return 0;
+ HashMap<ChunkCoordIntPair, int[]> dataMap = dimensionWiseChunkData.get(aDim);
+ if (dataMap == null || dataMap.get(aCh) == null)
+ return 0;
return dataMap.get(aCh)[GTPOLLUTION];
}
-
+
//Add compatibility with old code
@Deprecated /*Don't use it... too weird way of passing position*/
public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){
@@ -276,4 +306,15 @@ public class GT_Pollution {
//is just bad especially when that is both used to store ChunkPos and BlockPos depending on context
addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX,aPos.chunkPosZ),aPollution);
}
+
+ public class GT_PollutionEventHandler {
+ @SubscribeEvent
+ public void chunkWatch(ChunkWatchEvent.Watch event) {
+ if (chunkData.containsKey(event.chunk)) {
+ int pollution = chunkData.get(event.chunk)[GTPOLLUTION];
+ if (pollution > POLLUTIONPACKET_MINVALUE)
+ GT_Values.NW.sendToPlayer(new GT_Packet_Pollution(event.chunk, pollution), event.player);
+ }
+ }
+ }
}
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 26b971a093..5b762d6d58 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -1490,11 +1490,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
aEvent.player.addExhaustion(Math.max(1.0F, tCount / 666.6F));
}
}
- if (aEvent.player.ticksExisted % 10 == 0) {
- int tPollution = 0;
- tPollution = GT_Pollution.getPollution(new ChunkCoordIntPair(aEvent.player.chunkCoordX,aEvent.player.chunkCoordZ), aEvent.player.dimension);
- if(aEvent.player instanceof EntityPlayerMP)GT_Values.NW.sendToPlayer(new GT_Packet_Pollution(tPollution), (EntityPlayerMP) aEvent.player);
- }
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
index 32ce6e78f9..ec31cb212c 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -55,6 +55,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Titanium Reinforced Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Naquadah Reinforced Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Neutronium Reinforced Block");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Raw Deep Dark Portal Block");
ItemList.Block_BronzePlate.set(new ItemStack(this.setHardness(60.0f).setResistance(150.0f), 1, 0));
ItemList.Block_IridiumTungstensteel.set(new ItemStack(this.setHardness(400.0f).setResistance(600.0f), 1, 1));
ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(40.0f).setResistance(100.0f), 1, 2));
@@ -67,6 +68,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
ItemList.Block_TitaniumPlate.set(new ItemStack(this.setHardness(200.0f).setResistance(300.0f), 1, 9));
ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10));
ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11));
+ ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12));
//GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteBlack)});
//GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteRed)});
//GT_ModHandler.addCraftingRecipe(ItemList.Block_IridiumTungstensteel.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hBP", 'P', OrePrefixes.plate.get(Materials.Iridium), 'B', ItemList.Block_TungstenSteelReinforced.get(1L, new Object[0])});
@@ -116,6 +118,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
return Textures.BlockIcons.BLOCK_NAQUADAHPREIN.getIcon();
case 11:
return Textures.BlockIcons.BLOCK_NEUTRONIUMPREIN.getIcon();
+ case 12:
+ return Textures.BlockIcons.BLOCK_DEEP_DARK_RAW.getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
diff --git a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java
new file mode 100644
index 0000000000..b44f90f7ea
--- /dev/null
+++ b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java
@@ -0,0 +1,59 @@
+package gregtech.common.entities;
+
+import net.minecraft.client.particle.EntityFX;
+import net.minecraft.world.World;
+
+import java.util.Random;
+
+public class GT_EntityFXPollution extends EntityFX {
+
+ public GT_EntityFXPollution(World world, double x, double y, double z) {
+ super(world, x, y, z,0 ,0 ,0);
+
+ this.particleRed = 0.25F;
+ this.particleGreen = 0.2F;
+ this.particleBlue = 0.25F;
+
+ this.motionX *= 0.1D;
+ this.motionY *= -0.1D;
+ this.motionZ *= 0.1F;
+
+ Random random = world.rand;
+ this.motionX += random.nextFloat() * -1.9D * random.nextFloat() * 0.1D;
+ this.motionY += random.nextFloat() * -0.5D * random.nextFloat() * 0.1D * 5.0D;
+ this.motionZ += random.nextFloat() * -1.9D * random.nextFloat() * 0.1D;
+
+ this.particleTextureIndexX = 0;
+ this.particleTextureIndexY = 0;
+
+ this.particleMaxAge = (int)((double)20 / ((double)random.nextFloat() * 0.8D + 0.2D));
+
+ this.particleScale *= 0.75F;
+ this.noClip = true;
+ }
+
+ @Override
+ public void onUpdate() {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+
+ if (this.particleAge++ >= this.particleMaxAge) {
+ this.setDead();
+ } else {
+ this.motionY += -5.0E-4D;
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ if (this.posY == this.prevPosY) {
+ this.motionX *= 1.1D;
+ this.motionZ *= 1.1D;
+ }
+ this.motionX *= 0.96D;
+ this.motionY *= 0.96D;
+ this.motionZ *= 0.96D;
+ if (this.onGround) {
+ this.motionX *= 0.7D;
+ this.motionZ *= 0.7D;
+ }
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index 20dbccf2cb..57654ec43b 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -382,12 +382,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Ingot_Heavy2.set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2", new Object[0]));
ItemList.Ingot_Heavy3.set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3", new Object[0]));
- GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B', OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)});
+ //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B', OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)});
}
ItemList.Ingot_IridiumAlloy.set(addItem(tLastID = 480, "Iridium Alloy Ingot", "Used to make Iridium Plates", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L)}));
- GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)});
- GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)});
+ //GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)});
+ //GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)});
ItemList.Paper_Printed_Pages.set(addItem(tLastID = 481, "Printed Pages", "Used to make written Books", new Object[]{new ItemData(Materials.Paper, 10886400L, new MaterialStack[0]), new Behaviour_PrintedPages(), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L)}));
ItemList.Paper_Magic_Empty.set(addItem(tLastID = 482, "Magic Paper", "", new Object[]{SubTag.INVISIBLE, new ItemData(Materials.Paper, 3628800L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L)}));
diff --git a/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java
new file mode 100644
index 0000000000..7ba470e412
--- /dev/null
+++ b/src/main/java/gregtech/common/misc/GT_ClientPollutionMap.java
@@ -0,0 +1,156 @@
+package gregtech.common.misc;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class GT_ClientPollutionMap {
+ private static final byte RADIUS = 24;
+ private static final byte DISTANCE_RELOAD_MAP = 5; //When player moved x chunks, shift the map to new center.
+ private static final byte SIZE = RADIUS*2+1; //Area to keep stored.
+
+ private int x0, z0;
+ private int dim;
+
+ private boolean initialized = false;
+
+ private static short[][] chunkMatrix; //short because reasons.
+
+
+ public GT_ClientPollutionMap(){ }
+
+ public void reset() {
+ initialized = false;
+ }
+
+ private void initialize(int playerChunkX, int playerChunkZ, int dimension) {
+ initialized = true;
+ chunkMatrix = new short[SIZE][SIZE];
+ x0 = playerChunkX;
+ z0 = playerChunkZ;
+ dim = dimension;
+ }
+
+ public void addChunkPollution(int chunkX, int chunkZ, int pollution) {
+ EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
+ if (player == null || player.worldObj == null)
+ return;
+
+ int playerXChunk = MathHelper.floor_double(player.posX) >> 4;
+ int playerZChunk = MathHelper.floor_double(player.posZ) >> 4; //posX/Z seems to be always loaded,
+
+ if (!initialized) {
+ initialize(playerXChunk, playerZChunk, player.dimension);
+ }
+
+ if (dim != player.dimension) {
+ initialize(playerXChunk, playerZChunk, player.dimension);
+ }
+
+ if (Math.abs(x0 - playerXChunk) > DISTANCE_RELOAD_MAP || Math.abs(z0 - playerZChunk) > DISTANCE_RELOAD_MAP)
+ shiftCenter(playerXChunk, playerZChunk);
+
+ int relX = chunkX - x0 + RADIUS;
+ if (relX >= SIZE || relX < 0) //out of bounds
+ return;
+ int relZ = chunkZ - z0 + RADIUS;
+ if (relZ >= SIZE || relZ < 0) //out of bounds
+ return;
+
+ pollution = pollution/225;
+ if (pollution > Short.MAX_VALUE) //Sanity
+ chunkMatrix[relX][relZ] = Short.MAX_VALUE; //Max pollution = 7,3mill
+ else if (pollution < 0)
+ chunkMatrix[relX][relZ] = 0;
+ else
+ chunkMatrix[relX][relZ] = (short) (pollution);
+ }
+
+ //xy interpolation, between 4 chunks as corners, unknown treated as 0.
+ public int getPollution(double fx, double fz) {
+ if (!initialized)
+ return 0;
+ int x = MathHelper.floor_double(fx);
+ int z = MathHelper.floor_double(fz);
+ int xDiff = ((x-8) >> 4) - x0;
+ int zDiff = ((z-8) >> 4) - z0;
+
+ if (xDiff < -RADIUS || zDiff < -RADIUS || xDiff >= RADIUS || zDiff >= RADIUS )
+ return 0;
+
+ //coordinates in shifted chunk.
+ x = (x-8) % 16;
+ z = (z-8) % 16;
+ if (x < 0)
+ x = 16+x;
+ if (z < 0)
+ z = 16+z;
+
+ int xi = 15 - x;
+ int zi = 15 - z;
+
+ //read pollution in 4 corner chunks
+ int offsetX = RADIUS+xDiff;
+ int offsetZ = RADIUS+zDiff;
+
+ int c00 = chunkMatrix[offsetX][offsetZ];
+ int c10 = chunkMatrix[offsetX+1][offsetZ];
+ int c01 = chunkMatrix[offsetX][offsetZ+1];
+ int c11 = chunkMatrix[offsetX+1][offsetZ+1];
+
+ //Is divided by 15*15 but is handled when storing chunk data.
+ return c00*xi*zi + c10*x*zi + c01*xi*z + c11*x*z;
+ }
+
+ //shift the matrix to fit new center
+ private void shiftCenter(int chunkX, int chunkZ) {
+ int xDiff = chunkX - x0;
+ int zDiff = chunkZ - z0;
+ boolean[] allEmpty = new boolean[SIZE]; //skip check z row if its empty.
+ if (xDiff > 0)
+ for (byte x = 0; x < SIZE; x++) {
+ int xOff = x + xDiff;
+ if (xOff < SIZE) {
+ chunkMatrix[x] = chunkMatrix[xOff].clone();
+ } else {
+ chunkMatrix[x] = new short[SIZE];
+ allEmpty[x] = true;
+ }
+ }
+ else if (xDiff < 0)
+ for (byte x = SIZE-1; x >= 0; x--) {
+ int xOff = x + xDiff;
+ if (xOff > 0) {
+ chunkMatrix[x] = chunkMatrix[xOff].clone();
+ } else {
+ chunkMatrix[x] = new short[SIZE];
+ allEmpty[x] = true;
+ }
+ }
+
+ if (zDiff > 0)
+ for (byte x = 0; x < SIZE; x++) {
+ if (allEmpty[x])
+ continue;
+ for (int z = 0; z < SIZE ; z++) {
+ int zOff = z + zDiff;
+ chunkMatrix[x][z] = (zOff < SIZE) ? chunkMatrix[x][zOff] : 0;
+ }
+ }
+ else if (zDiff < 0)
+ for (byte x = 0; x < SIZE; x++) {
+ if (allEmpty[x])
+ continue;
+ for (int z = SIZE-1; z >= 0 ; z--) {
+ int zOff = z+zDiff;
+ chunkMatrix[x][z] = (zOff > 0) ? chunkMatrix[x][zOff] : 0;
+ }
+ }
+
+ x0 = chunkX;
+ z0 = chunkZ;
+ }
+}
diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java
index 66ae7058bc..f3272ee341 100644
--- a/src/main/java/gregtech/common/misc/GT_Command.java
+++ b/src/main/java/gregtech/common/misc/GT_Command.java
@@ -1,11 +1,15 @@
package gregtech.common.misc;
+import gregtech.GT_Mod;
import gregtech.api.enums.GT_Values;
import gregtech.api.objects.GT_ChunkManager;
+import gregtech.common.GT_Pollution;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.ChunkCoordinates;
+
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
@@ -21,10 +25,10 @@ public final class GT_Command extends CommandBase {
@Override
public String getCommandUsage(ICommandSender sender) {
- return "Usage: gt <subcommand>. Valid subcommands are: toggle, chunks.";
+ return "Usage: gt <subcommand>. Valid subcommands are: toggle, chunks, pollution.";
}
private void printHelp(ICommandSender sender) {
- sender.addChatMessage(new ChatComponentText("Usage: gt <toggle|chunks>"));
+ sender.addChatMessage(new ChatComponentText("Usage: gt <toggle|chunks|pollution>"));
sender.addChatMessage(new ChatComponentText("\"toggle D1\" - toggles general.Debug (D1)"));
sender.addChatMessage(new ChatComponentText("\"toggle D2\" - toggles general.Debug2 (D2)"));
sender.addChatMessage(new ChatComponentText("\"toggle debugCleanroom\" - toggles cleanroom debug log"));
@@ -38,6 +42,10 @@ public final class GT_Command extends CommandBase {
sender.addChatMessage(new ChatComponentText("\"toggle debugStones\" - toggles worldgen stones debug"));
sender.addChatMessage(new ChatComponentText("\"toggle debugChunkloaders\" - toggles chunkloaders debug"));
sender.addChatMessage(new ChatComponentText("\"chunks\" - print a list of the force loaded chunks"));
+ sender.addChatMessage(new ChatComponentText(
+ "\"pollution <amount>\" - adds the <amount> of the pollution to the current chunk, " +
+ "\n if <amount> isnt specified, will add" + GT_Mod.gregtechproxy.mPollutionSmogLimit + "gibbl."
+ ));
}
@Override
@@ -45,25 +53,24 @@ public final class GT_Command extends CommandBase {
List<String> l = new ArrayList<>();
Stream<String> keywords = Arrays.stream(new String[]{"toggle", "chunks"});
String test = ss.length == 0 ? "" : ss[0].trim();
- if (ss.length == 0 || ss.length == 1 && (test.isEmpty() || keywords.anyMatch(s -> s.startsWith(test)))) {
- keywords.forEach(s -> {
- if (test.isEmpty() || s.startsWith(test))
- l.add(s);
- });
+ if (ss.length == 0 || ss.length == 1 && (test.isEmpty() || Stream.of("toggle", "chunks", "pollution").anyMatch(s -> s.startsWith(test)))) {
+ Stream.of("toggle", "chunks", "pollution")
+ .filter(s -> test.isEmpty() || s.startsWith(test))
+ .forEach(l::add);
} else if (test.equals("toggle")) {
- String test1 = ss.length == 1 ? "" : ss[1].trim();
- Arrays.stream(new String[]{"D1", "D2", "debugCleanroom", "debugDriller", "debugBlockPump", "debugBlockMiner", "debugWorldGen", "debugEntityCramming",
- "debugOrevein", "debugSmallOres", "debugStones", "debugChunkloaders"}).forEach(s -> {
- if (test1.isEmpty() || s.startsWith(test1))
- l.add(s);
- });
+ String test1 = ss[1].trim();
+ Stream.of("D1", "D2", "debugCleanroom", "debugDriller", "debugBlockPump", "debugBlockMiner", "debugWorldGen", "debugEntityCramming",
+ "debugOrevein", "debugSmallOres", "debugStones", "debugChunkloaders")
+ .filter(s -> test1.isEmpty() || s.startsWith(test1))
+ .forEach(l::add);
+
}
return l;
}
@Override
public void processCommand(ICommandSender sender, String[] strings) {
- if (strings.length < 1 || (!strings[0].equals("toggle") && !strings[0].equals("chunks"))) {
+ if (strings.length < 1) {
printHelp(sender);
return;
}
@@ -90,6 +97,21 @@ public final class GT_Command extends CommandBase {
GT_ChunkManager.printTickets();
sender.addChatMessage(new ChatComponentText("Forced chunks logged to GregTech.log"));
break;
+ case "pollution": {
+ ChunkCoordinates coordinates = sender.getPlayerCoordinates();
+ int amount = (strings.length < 2) ? GT_Mod.gregtechproxy.mPollutionSmogLimit : Integer.parseInt(strings[1]);
+ GT_Pollution.addPollution(sender
+ .getEntityWorld()
+ .getChunkFromBlockCoords(
+ coordinates.posX,
+ coordinates.posZ
+ ),
+ amount
+ );
+ break;
+ }
+ default:
+ printHelp(sender);
}
}
}
diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
new file mode 100644
index 0000000000..4353786a7b
--- /dev/null
+++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
@@ -0,0 +1,242 @@
+package gregtech.common.render;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.eventhandler.EventPriority;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.common.gameevent.TickEvent;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.common.entities.GT_EntityFXPollution;
+import gregtech.common.misc.GT_ClientPollutionMap;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.particle.EntityFX;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.potion.Potion;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.EntityViewRenderEvent;
+import net.minecraftforge.event.world.WorldEvent;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GT_PollutionRenderer {
+ private static GT_ClientPollutionMap pollutionMap;
+ private static int playerPollution = 0;
+
+ private static boolean DEBUG = false;
+
+ // PARTICLES_POLLUTION_START + PARTICLES_POLLUTION_END -> Max Particles
+ private static final int PARTICLES_MAX_NUM = 100;
+ private static final int PARTICLES_POLLUTION_START = 400000;
+ private static final int PARTICLES_POLLUTION_END = 3500000;
+
+ private static final int FOG_START_AT_POLLUTION = 400000;
+ private static final int FOG_MAX_AT_POLLUTION = 7000000;
+ //jump from linear to exponential fog. x*FOG_MAX_AT_POLLUTION+FOG_START_AT_POLLUTION
+ private static final double FOG_START_EXP_RATIO = 0.02D;
+
+ private static final float[] fogColor = {0.3f, 0.25f, 0.1f};
+ private static final short[] grassColor = {230, 180, 40};
+ private static final short[] leavesColor = {160, 80, 15};
+ private static final short[] liquidColor = {160, 200, 10};
+ private static final short[] foliageColor = {160, 80, 15};
+
+ //TODO need to soft update some blocks, grass and leaves does more often than liquid it looks like.
+
+ public GT_PollutionRenderer() {
+ pollutionMap = new GT_ClientPollutionMap();
+ }
+
+ public void preLoad() {
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(this);
+ FMLCommonHandler.instance().bus().register(this);
+ }
+
+ public void processPacket(ChunkCoordIntPair chunk, int pollution) {
+ pollutionMap.addChunkPollution(chunk.chunkXPos, chunk.chunkZPos, pollution);
+ }
+
+ @SubscribeEvent(priority = EventPriority.HIGH)
+ public void enteredWorld(WorldEvent.Load event) {
+ EntityClientPlayerMP p = Minecraft.getMinecraft().thePlayer;
+ if (!event.world.isRemote || p == null)
+ return;
+ pollutionMap.reset();
+ }
+
+ private static int color(int color, int pollution, int low, float high, short[] colors) {
+ if ( pollution < low)
+ return color;
+
+ int r = (color >> 16) & 0xFF;
+ int g = (color >> 8) & 0xFF;
+ int b = color & 0xFF;
+ float p = (pollution - low) / high;
+ if (p > 1) p = 1;
+ float pi = 1 - p;
+
+ r = ((int) (r * pi + p * colors[0])) & 0xFF;
+ g = ((int) (g * pi + p * colors[1])) & 0xFF;
+ b = ((int) (b * pi + p * colors[2])) & 0xFF;
+
+ return (r & 0xFF) << 16 | (g & 0xFF) << 8 | b & 0xFF;
+ }
+
+ // Methods for hodgepodge to color grass / foliage blocks etc.
+ public static int colorGrass(int oColor, int x, int z) {
+ return color(oColor, pollutionMap.getPollution(x, z)/1000, 350, 600, grassColor);
+ }
+ public static int colorLeaves(int oColor, int x, int z) {
+ return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, leavesColor);
+ }
+ public static int colorLiquid(int oColor, int x, int z) {
+ return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, liquidColor);
+ }
+ public static int colorFoliage(int oColor, int x, int z) {
+ return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, foliageColor);
+ }
+
+ @SubscribeEvent(priority = EventPriority.LOW)
+ public void manipulateColor(EntityViewRenderEvent.FogColors event) {
+ if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode)
+ return;
+
+ if (event.block.getMaterial() == Material.water ||
+ event.block.getMaterial() == Material.lava)
+ return;
+
+ float x = fogIntensityLastTick > 1 ? 1F : (float) fogIntensityLastTick;
+ float xi = 1 - x;
+
+ event.red = xi*event.red + x*fogColor[0];
+ event.green = xi*event.green + x*fogColor[1];
+ event.blue = xi*event.blue + x*fogColor[2];
+ }
+
+ private static final int END_MAX_DISTANCE = 192 - 1;
+ private static double fogIntensityLastTick = 0;
+
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void renderGTPollutionFog(EntityViewRenderEvent.RenderFogEvent event) {
+ if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) ||
+ (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO))
+ return;
+
+ if (event.fogMode == 0) {
+ double v = 1 - fogIntensityLastTick/FOG_START_EXP_RATIO;
+ //trying to smooth out jump from linear to exponential
+ GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_LINEAR);
+ GL11.glFogf(GL11.GL_FOG_START, (float) ((END_MAX_DISTANCE-20) * 0.75F * v + 20));
+ GL11.glFogf(GL11.GL_FOG_END, (float) (END_MAX_DISTANCE * (0.75F + v * 0.25F)));
+ }
+ //else if ( event.fogMode < 0) { }
+ }
+
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void renderGTPollutionFog(EntityViewRenderEvent.FogDensity event) {
+ if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode)
+ return;
+
+ if (event.entity.isPotionActive(Potion.blindness) ||
+ (fogIntensityLastTick < FOG_START_EXP_RATIO) ||
+ event.block.getMaterial() == Material.water ||
+ event.block.getMaterial() == Material.lava
+ )
+ return;
+
+ GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP2);
+ event.density = (float) Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F)/5 + 0.01F;
+ event.setCanceled(true);
+ }
+
+ private double lastUpdate = 0;
+ @SubscribeEvent(priority = EventPriority.HIGHEST)
+ public void onRenderTick(TickEvent.RenderTickEvent event) {
+ Minecraft mc = Minecraft.getMinecraft();
+ if (mc == null)
+ return;
+ EntityClientPlayerMP player = mc.thePlayer;
+ if (player == null)
+ return;
+
+ if (event.phase == TickEvent.Phase.START) {
+ if (event.renderTickTime < lastUpdate)
+ lastUpdate = lastUpdate - 1;
+ float step = (float) ((event.renderTickTime - lastUpdate) / 50);
+ lastUpdate = event.renderTickTime;
+
+ float fogIntensity = (playerPollution-FOG_START_AT_POLLUTION)/ (float) FOG_MAX_AT_POLLUTION;
+ if (fogIntensity > 1) fogIntensity = 1;
+ else if (fogIntensity < 0) fogIntensity = 0;
+
+ double e = fogIntensity-fogIntensityLastTick;
+ if (e != 0) {
+ if (e > 0.2) e = 0.2D;
+ else if (e < -0.5) e = - 0.5D;
+
+ if (e > 0.001D || e < -0.001D)
+ fogIntensityLastTick += step *e;
+ else
+ fogIntensityLastTick = fogIntensity;
+ }
+ }
+ else if (DEBUG) {
+ drawPollution("Intensity: " + (fogIntensityLastTick * 10000), 0);
+ drawPollution("Pollution: " + pollutionMap.getPollution(Minecraft.getMinecraft().thePlayer.lastTickPosX, Minecraft.getMinecraft().thePlayer.lastTickPosZ), 20);
+ drawPollution("Density: " + ((float)(Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F)/5 + 0.01F)* 10000), 40);
+ }
+ }
+
+ // Adding dirt particles in the air
+ @SubscribeEvent(priority = EventPriority.HIGHEST)
+ public void onClientTick(TickEvent.ClientTickEvent event) {
+ Minecraft mc = Minecraft.getMinecraft();
+ if (mc == null)
+ return;
+ EntityClientPlayerMP player = mc.thePlayer;
+ if (player == null || (player.capabilities.isCreativeMode && !DEBUG))
+ return;
+
+ World w = player.worldObj;
+ playerPollution = pollutionMap.getPollution(player.lastTickPosX, player.lastTickPosZ);
+
+ float intensity = ((float) playerPollution - PARTICLES_POLLUTION_START) / PARTICLES_POLLUTION_END;
+ if (intensity < 0)
+ return;
+ else if (intensity > 1)
+ intensity = 1;
+ else
+ intensity *= intensity;
+
+ int x = MathHelper.floor_double(player.posX);
+ int y = MathHelper.floor_double(player.posY);
+ int z = MathHelper.floor_double(player.posZ);
+
+ int numParticles = Math.round(intensity * PARTICLES_MAX_NUM);
+
+ for (int l = 0; l < numParticles; ++l) {
+ int i1 = x + w.rand.nextInt(16) - w.rand.nextInt(16);
+ int j1 = y + w.rand.nextInt(16) - w.rand.nextInt(16);
+ int k1 = z + w.rand.nextInt(16) - w.rand.nextInt(16);
+ Block block = w.getBlock(i1, j1, k1);
+
+ if (block.getMaterial() == Material.air) {
+ EntityFX fx = new GT_EntityFXPollution(w, (float) i1 + w.rand.nextFloat(), (float) j1 + w.rand.nextFloat(), (float) k1 + w.rand.nextFloat());
+ mc.effectRenderer.addEffect(fx);
+ }
+ }
+ }
+
+ private void drawPollution(String text, int off){
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ OpenGlHelper.glBlendFunc(770, 771, 1, 0);
+ Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(text, 0, off, 0xFFFFFFFF);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index 6db4013a60..eeb8ec252f 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -137,7 +137,11 @@ public class GT_MetaTileEntity_Boiler_Bronze
(GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Charcoal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) ||
(GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Lignite) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) ||
(GT_Utility.isPartOfMaterials(this.mInventory[2],Materials.Diamond) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2],OrePrefixes.block)) ||
- GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke")
+ GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") ||
+ GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") ||
+ GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") ||
+ GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") ||
+ GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke")
) {
if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10) > 0) {
this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2])/10);
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
index fe5f4e357d..27871e7648 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
@@ -106,8 +106,9 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr
}
}
if (aMaterial.contains(SubTag.CRYSTALLISABLE)) {
- GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 7000, 2000, 24);
- GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getDistilledWater(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 1500, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 7000, 2000, 24, false);
+ GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(2), GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 1500, 24, false);
+ GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false);
}
switch (aMaterial.mName) {
@@ -179,8 +180,9 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr
}
}
if (aMaterial.contains(SubTag.CRYSTALLISABLE)) {
- GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 2000, 24);
- GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9500, 1500, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 2000, 24, false);
+ GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(2), gregtech.api.util.GT_ModHandler.getDistilledWater(100L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9500, 1500, 24, false);
+ GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getIntegratedCircuit(3), Materials.Void.getMolten(36L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 10000, 1200, 24, false);
}
ItemStack tImpureStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tByProduct, GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), 1L);
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java
index d7c7a89edc..4a79beb44f 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java
@@ -44,7 +44,7 @@ public class ProcessingStone
GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4);
//GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1L), new ItemStack(Blocks.ender_chest, 1), 400, 4);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("Railcraft", "cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, true);
- GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30);
+ //GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 30);
break;
case "Concrete":
GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 100, 30);
diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
index ebf3d7ac60..82992d1272 100644
--- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
+++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
@@ -484,13 +484,16 @@ public class GT_MachineRecipeLoader implements Runnable {
GT_Values.RA.addFluidSmelterRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextForestry, "phosphor", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), Materials.Lava.getFluid(800L), 1000, 256, 128);
GT_Values.RA.addAutoclaveRecipe(ItemList.IC2_Energium_Dust.get(9L), Materials.EnergeticAlloy.getMolten(288), ItemList.IC2_EnergyCrystal.get(1L), 10000, 600, 256);
- GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 10000, 2000, 24);
- GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 10000, 2000, 24);
- GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 10000, 2000, 24);
GT_Values.RA.addAutoclaveRecipe(ItemList.IC2_Energium_Dust.get(9L), Materials.ConductiveIron.getMolten(576), ItemList.IC2_EnergyCrystal.get(1L), 10000, 1200, 256);
- GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), GT_ModHandler.getDistilledWater(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 10000, 1000, 24);
- GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), GT_ModHandler.getDistilledWater(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 10000, 1000, 24);
- GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), GT_ModHandler.getDistilledWater(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 10000, 1000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 8000, 2000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 8000, 2000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), Materials.Water.getFluid(200L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 8000, 2000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), GT_ModHandler.getDistilledWater(100L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 9000, 1000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), GT_ModHandler.getDistilledWater(100L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 9000, 1000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), GT_ModHandler.getDistilledWater(100L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 9000, 1000, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 0), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 10), 10000, 500, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 600), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 11), 10000, 500, 24);
+ GT_Values.RA.addAutoclaveRecipe(GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, "item.ItemCrystalSeed", 1L, 1200), Materials.Void.getMolten(36L), GT_ModHandler.getModItem(GT_MachineRecipeLoader.aTextAE, GT_MachineRecipeLoader.aTextAEMM, 1L, 12), 10000, 500, 24);
GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Polybenzimidazole.getMolten(72L), GT_ModHandler.getIC2Item("carbonFiber", 128L), 10000, 300, 1920);
GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Epoxid.getMolten(144L), GT_ModHandler.getIC2Item("carbonFiber", 64L), 10000, 300, 480);
GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 64), Materials.Polytetrafluoroethylene.getMolten(288L), GT_ModHandler.getIC2Item("carbonFiber", 32L), 10000, 400, 120);
@@ -1423,6 +1426,7 @@ public class GT_MachineRecipeLoader implements Runnable {
GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Fertilizer.get(1L));
GT_Values.RA.addImplosionRecipe(ItemList.IC2_Compressed_Coal_Chunk.get(1L), 8, ItemList.IC2_Industrial_Diamond.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L));
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4L), GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 4L), GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Diamond, 1L), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Ingot_IridiumAlloy.get(1L), 1200, 7680);
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_IridiumAlloy.get(1L), 8, GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L));
if (Loader.isModLoaded("GalacticraftMars")) {
@@ -1441,8 +1445,9 @@ public class GT_MachineRecipeLoader implements Runnable {
//GT_Values.RA.addPulveriserRecipe(GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 2), new ItemStack[]{GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 0)}, null, 400, 2);
//GT_Values.RA.addCentrifugeRecipe(GT_ModHandler.getModItem("GalacticraftMars", "tile.asteroidsBlock", 1L, 0), null, null, Materials.Nitrogen.getGas(33), new ItemStack(Blocks.sand,1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Platinum, 1), new int[]{5000,400,400,100,100,100}, 400, 8);
- GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MeteoricIron, 2L), Materials.TungstenSteel.getMolten(48L), ItemList.Ingot_Heavy2.get(1L), 300, 1920);
- GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Desh, 4L), Materials.Platinum.getMolten(72L), ItemList.Ingot_Heavy3.get(1L), 300, 7680);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Aluminium, 1L), GT_OreDictUnificator.get(OrePrefixes.compressed, Materials.Steel, 1L), GT_Utility.getIntegratedCircuit(1)}, Materials.StainlessSteel.getMolten(72L), ItemList.Ingot_Heavy1.get(1L), 300, 480);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.MeteoricIron, 2L), GT_Utility.getIntegratedCircuit(1)}, Materials.TungstenSteel.getMolten(72L), ItemList.Ingot_Heavy2.get(1L), 300, 1920);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Desh, 4L), GT_Utility.getIntegratedCircuit(1)}, Materials.Platinum.getMolten(72L), ItemList.Ingot_Heavy3.get(1L), 300, 7680);
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy1.get(1L), 8, GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 1L));
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy2.get(1L), 16, GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L, 3), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.TungstenSteel, 2L));
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy3.get(1L), 24, GT_ModHandler.getModItem("GalacticraftMars", "item.itemBasicAsteroids", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Platinum, 3L));
@@ -2209,8 +2214,9 @@ public class GT_MachineRecipeLoader implements Runnable {
GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Values.NI, Materials.Water.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60);
GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Values.NI, Materials.HydricSulfide.getGas(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60);
//}
- GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Water.getFluid(200L), Materials.Quartzite.getGems(1), 750, 2000, 24);
- GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), GT_ModHandler.getDistilledWater(200L), Materials.Quartzite.getGems(1), 1000, 1500, 24);
+ GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Water.getFluid(200L), Materials.Quartzite.getGems(1), 750, 2000, 24);
+ GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), GT_ModHandler.getDistilledWater(100L), Materials.Quartzite.getGems(1), 1000, 1500, 24);
+ GT_Values.RA.addAutoclaveRecipe(Materials.SiliconDioxide.getDust(1), Materials.Void.getMolten(36L), Materials.Quartzite.getGems(1), 10000, 1000, 24);
this.addRecipesMay2017OilRefining();
this.addPyrometallurgicalRecipes();
@@ -2776,6 +2782,7 @@ public class GT_MachineRecipeLoader implements Runnable {
Materials.ElectrumFlux.getMolten(1152L),
}, ItemList.FusionComputer_UV.get(1), 1000, 90000);
+
if (GregTech_API.sThaumcraftCompat != null) {
String tKey = "GT_WOOD_TO_CHARCOAL";
GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way of making charcoal magically instead of using regular ovens for this purpose.<BR><BR>To create charcoal from wood you first need an air-free environment, some vacuus essentia is needed for that, then you need to incinerate the wood using ignis essentia and wait until all the water inside the wood is burned away.<BR><BR>This method however doesn't create creosote oil as byproduct.");
diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang
index 51b648b308..882c237c5b 100644
--- a/src/main/resources/assets/gregtech/lang/en_US.lang
+++ b/src/main/resources/assets/gregtech/lang/en_US.lang
@@ -854,6 +854,9 @@ achievement.ic2.itemArmorQuantumBoots.desc=Pickup this item to see the recipe in
achievement.item.graviChestPlate=Gravi Chestplate
achievement.item.graviChestPlate.desc=Pickup this item to see the recipe in NEI
+achievement.gt.blockreinforced.12=Raw Deep Dark Portal Block
+achievement.gt.blockreinforced.12.desc=Pickup this item to see the recipe in NEI
+
for.bees.species.clay=Clay
for.bees.species.slimeball=Slimeball
for.bees.species.peat=Peat
diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png
new file mode 100644
index 0000000000..e5cde1022b
--- /dev/null
+++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png
index 72b0694ac9..d1e8d87970 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png
index a8396ee2c8..9e7f633eeb 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png
index 170df57eba..60ee29468d 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png
index 33902261ed..da14e263ec 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png
index 5e010b144a..ef63027fcf 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png
index 23a5518540..f8a83ab2f5 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png
index 4529793d67..7a59b8d4d3 100644
--- a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png
+++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png
Binary files differ