aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/GT_Mod.java1
-rw-r--r--src/main/java/gregtech/api/enums/GT_Values.java4
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaBase_Item.java3
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java356
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java2
6 files changed, 366 insertions, 4 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 7b748aa1e0..4cf75781ab 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -191,6 +191,7 @@ public class GT_Mod implements IGT_Mod {
GT_Values.debugCleanroom = tMainConfig.get(aTextGeneral, "debugCleanroom", false).getBoolean(false);
GT_Values.debugWorldGen = tMainConfig.get(aTextGeneral, "debugWorldGen", false).getBoolean(false);
GT_Values.debugOrevein = tMainConfig.get(aTextGeneral, "debugOrevein", false).getBoolean(false);
+ GT_Values.debugSmallOres = tMainConfig.get(aTextGeneral, "debugSmallOres", false).getBoolean(false);
GT_Values.oreveinPercentage = tMainConfig.get(aTextGeneral, "oreveinPercentage_75",75).getInt(75);
GT_Values.oreveinAttempts = tMainConfig.get(aTextGeneral, "oreveinAttempts_64",64).getInt(64);
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java
index 71e22bb1d7..d6fae23b01 100644
--- a/src/main/java/gregtech/api/enums/GT_Values.java
+++ b/src/main/java/gregtech/api/enums/GT_Values.java
@@ -141,6 +141,10 @@ public class GT_Values {
* Debug parameter for orevein generation.
*/
public static boolean debugOrevein = false;
+ /**
+ * Debug parameter for small ore generation.
+ */
+ public static boolean debugSmallOres = false;
/**
* If you have to give something a World Parameter but there is no World... (Dummy World)
*/
diff --git a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
index 2ae98b9dfb..2f5174beb7 100644
--- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
+++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
@@ -259,7 +259,8 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
return 0;
//REALLY?? THIS IS THE CULPRIT THAT CHARGES ITEMS AT INSTANT!!!
//long tChargeBefore = getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge)));
- long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge)));
+ long tTransfer = aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge);
+ long tChargeBefore = getRealCharge(aStack), tNewCharge = Math.min(Math.abs(tStats[0]), Long.MAX_VALUE - tTransfer >= tChargeBefore ? tChargeBefore + tTransfer : Long.MAX_VALUE);
if (!aSimulate) setCharge(aStack, tNewCharge);
return tNewCharge - tChargeBefore;
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
index efdf8aa1ef..3eab55f0ef 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
@@ -348,3 +348,359 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
}
}
+=======
+package gregtech.api.metatileentity.implementations;
+
+import gregtech.GT_Mod;
+import gregtech.api.enums.*;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe;
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.BaseMetaPipeEntity;
+import gregtech.api.metatileentity.MetaPipeEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.GT_Client;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.ISidedInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityDispenser;
+import net.minecraft.tileentity.TileEntityHopper;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import java.util.ArrayList;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileEntityItemPipe {
+ public final float mThickNess;
+ public final Materials mMaterial;
+ public final int mStepSize;
+ public final int mTickTime;
+ public int mTransferredItems = 0;
+ public byte mLastReceivedFrom = 0, oLastReceivedFrom = 0;
+ public boolean mIsRestrictive = false;
+
+ public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive, int aTickTime) {
+ super(aID, aName, aNameRegional, aInvSlotCount);
+ mIsRestrictive = aIsRestrictive;
+ mThickNess = aThickNess;
+ mMaterial = aMaterial;
+ mStepSize = aStepSize;
+ mTickTime = aTickTime;
+ }
+
+ public GT_MetaPipeEntity_Item(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) {
+ super(aID, aName, aNameRegional, aInvSlotCount);
+ mIsRestrictive = aIsRestrictive;
+ mThickNess = aThickNess;
+ mMaterial = aMaterial;
+ mStepSize = aStepSize;
+ mTickTime = 20;
+ }
+
+ public GT_MetaPipeEntity_Item(String aName, float aThickNess, Materials aMaterial, int aInvSlotCount, int aStepSize, boolean aIsRestrictive) {
+ super(aName, aInvSlotCount);
+ mIsRestrictive = aIsRestrictive;
+ mThickNess = aThickNess;
+ mMaterial = aMaterial;
+ mStepSize = aStepSize;
+ mTickTime = 20;
+ }
+
+ @Override
+ public byte getTileEntityBaseType() {
+ return mMaterial == null ? 4 : (byte) ((mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, mMaterial.mToolQuality)));
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaPipeEntity_Item(mName, mThickNess, mMaterial, mInventory.length, mStepSize, mIsRestrictive);
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
+ if (mIsRestrictive) {
+ if (aConnected) {
+ float tThickNess = getThickNess();
+ if (tThickNess < 0.124F)
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ if (tThickNess < 0.374F)//0.375
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ if (tThickNess < 0.499F)//0.500
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ if (tThickNess < 0.749F)//0.750
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ if (tThickNess < 0.874F)//0.825
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ }
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)};
+ }
+ if (aConnected) {
+ float tThickNess = getThickNess();
+ if (tThickNess < 0.124F)
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ if (tThickNess < 0.374F)//0.375
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ if (tThickNess < 0.499F)//0.500
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ if (tThickNess < 0.749F)//0.750
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ if (tThickNess < 0.874F)//0.825
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ }
+ return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(byte aFacing) {
+ return false;
+ }
+
+ @Override
+ public boolean isValidSlot(int aIndex) {
+ return true;
+ }
+
+ @Override
+ public final boolean renderInside(byte aSide) {
+ return false;
+ }
+
+ @Override
+ public int getProgresstime() {
+ return getPipeContent() * 64;
+ }
+
+ @Override
+ public int maxProgresstime() {
+ return getMaxPipeCapacity() * 64;
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setByte("mLastReceivedFrom", mLastReceivedFrom);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ mLastReceivedFrom = aNBT.getByte("mLastReceivedFrom");
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide() && aTick % 10 == 0) {
+ mConnections = 0;
+ if (aTick % mTickTime == 0) mTransferredItems = 0;
+
+ for (byte i = 0; i < 6; i++) {
+ TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i);
+ if (tTileEntity != null) {
+ boolean temp = GT_Utility.isConnectableNonInventoryPipe(tTileEntity, GT_Utility.getOppositeSide(i));
+ if (tTileEntity instanceof IGregTechTileEntity) {
+ temp = true;
+ if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() == null) continue;
+ if (aBaseMetaTileEntity.getColorization() >= 0) {
+ byte tColor = ((IGregTechTileEntity) tTileEntity).getColorization();
+ if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
+ continue;
+ }
+ }
+ if (((IGregTechTileEntity) tTileEntity).getMetaTileEntity().connectsToItemPipe(GT_Utility.getOppositeSide(i))) {
+ mConnections |= (1 << i);
+ continue;
+ }
+ }
+ if (tTileEntity instanceof IInventory) {
+ temp = true;
+ if (((IInventory) tTileEntity).getSizeInventory() <= 0) {
+ continue;
+ }
+ }
+ if (tTileEntity instanceof ISidedInventory) {
+ temp = true;
+ int[] tSlots = ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(GT_Utility.getOppositeSide(i));
+ if (tSlots == null || tSlots.length <= 0) {
+ continue;
+ }
+ }
+ if (temp) {
+ if (tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(i)).alwaysLookConnected(GT_Utility.getOppositeSide(i), ((ICoverable) tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(i)), ((ICoverable) tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(i)), ((ICoverable) tTileEntity))) {
+ mConnections |= (1 << i);
+ continue;
+ }
+ if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), aBaseMetaTileEntity)) {
+ mConnections |= (1 << i);
+ continue;
+ }
+ if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -1, aBaseMetaTileEntity)) {
+ mConnections |= (1 << i);
+ continue;
+ }
+ if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -1, aBaseMetaTileEntity)) {
+ mConnections |= (1 << i);
+ continue;
+ }
+ }
+ }
+ }
+
+ if (oLastReceivedFrom == mLastReceivedFrom) {
+ doTickProfilingInThisTick = false;
+
+ ArrayList<IMetaTileEntityItemPipe> tPipeList = new ArrayList<IMetaTileEntityItemPipe>();
+
+ for (boolean temp = true; temp && !isInventoryEmpty() && pipeCapacityCheck(); ) {
+ temp = false;
+ tPipeList.clear();
+ for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes(this, new ConcurrentHashMap<IMetaTileEntityItemPipe, Long>(), 0, false, false)).keySet()) {
+ if (temp) break;
+ tPipeList.add(tTileEntity);
+ while (!temp && !isInventoryEmpty() && tTileEntity.sendItemStack(aBaseMetaTileEntity))
+ for (IMetaTileEntityItemPipe tPipe : tPipeList)
+ if (!tPipe.incrementTransferCounter(1)) temp = false;
+ }
+ }
+ }
+
+ if (isInventoryEmpty()) mLastReceivedFrom = 6;
+ oLastReceivedFrom = mLastReceivedFrom;
+ }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate();
+ }
+
+ @Override
+ public boolean incrementTransferCounter(int aIncrement) {
+ mTransferredItems += aIncrement;
+ return pipeCapacityCheck();
+ }
+
+ @Override
+ public boolean sendItemStack(Object aSender) {
+ if (pipeCapacityCheck()) {
+ byte tOffset = (byte) getBaseMetaTileEntity().getRandomNumber(6), tSide = 0;
+ for (byte i = 0; i < 6; i++) {
+ tSide = (byte) ((i + tOffset) % 6);
+ if (isInventoryEmpty() || (tSide != mLastReceivedFrom || aSender != getBaseMetaTileEntity())) {
+ if (insertItemStackIntoTileEntity(aSender, tSide)) return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide) {
+ if (getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsItemsOut(aSide, getBaseMetaTileEntity().getCoverIDAtSide(aSide), getBaseMetaTileEntity().getCoverDataAtSide(aSide), -1, getBaseMetaTileEntity())) {
+ TileEntity tInventory = getBaseMetaTileEntity().getTileEntityAtSide(aSide);
+ if (tInventory != null && !(tInventory instanceof BaseMetaPipeEntity)) {
+ if ((!(tInventory instanceof TileEntityHopper) && !(tInventory instanceof TileEntityDispenser)) || getBaseMetaTileEntity().getMetaIDAtSide(aSide) != GT_Utility.getOppositeSide(aSide)) {
+ return GT_Utility.moveOneItemStack(aSender, tInventory, (byte) 6, GT_Utility.getOppositeSide(aSide), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1) > 0;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean pipeCapacityCheck() {
+ return mTransferredItems <= 0 || getPipeContent() < getMaxPipeCapacity();
+ }
+
+ private int getPipeContent() {
+ return mTransferredItems;
+ }
+
+ private int getMaxPipeCapacity() {
+ return Math.max(1, getPipeCapacity());
+ }
+
+ /**
+ * Amount of ItemStacks this Pipe can conduct per Second.
+ */
+ public int getPipeCapacity() {
+ return mInventory.length;
+ }
+
+ @Override
+ public int getStepSize() {
+ return mStepSize;
+ }
+
+ @Override
+ public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) {
+ return true;
+ }
+
+ @Override
+ public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ if (isInventoryEmpty()) mLastReceivedFrom = aSide;
+ return mLastReceivedFrom == aSide && mInventory[aIndex] == null;
+ }
+
+ @Override
+ public String[] getDescription() {
+ if (mTickTime == 20)
+ return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", "Routing Value: %%%" + mStepSize};
+ else if (mTickTime % 20 == 0)
+ return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + (mTickTime / 20) + " %%%sec", "Routing Value: %%%" + mStepSize};
+ else
+ return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/%%%" + mTickTime + " %%%ticks", "Routing Value: %%%" + mStepSize};
+ }
+
+ private boolean isInventoryEmpty() {
+ for (ItemStack tStack : mInventory) if (tStack != null) return false;
+ return true;
+ }
+
+ @Override
+ public float getThickNess() {
+ if(GT_Mod.instance.isClientSide() && GT_Client.hideValue==1) return 0.0625F;
+ return mThickNess;
+ }
+
+ @Override
+ public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
+ float tSpace = (1f - mThickNess)/2;
+ float tSide0 = tSpace;
+ float tSide1 = 1f - tSpace;
+ float tSide2 = tSpace;
+ float tSide3 = 1f - tSpace;
+ float tSide4 = tSpace;
+ float tSide5 = 1f - tSpace;
+
+ if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 0) != 0){tSide0=tSide2=tSide4=0;tSide3=tSide5=1;}
+ if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 1) != 0){tSide2=tSide4=0;tSide1=tSide3=tSide5=1;}
+ if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 2) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide5=1;}
+ if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 3) != 0){tSide0=tSide4=0;tSide1=tSide3=tSide5=1;}
+ if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 4) != 0){tSide0=tSide2=tSide4=0;tSide1=tSide3=1;}
+ if(getBaseMetaTileEntity().getCoverIDAtSide((byte) 5) != 0){tSide0=tSide2=0;tSide1=tSide3=tSide5=1;}
+
+ byte tConn = ((BaseMetaPipeEntity) getBaseMetaTileEntity()).mConnections;
+ if((tConn & (1 << ForgeDirection.DOWN.ordinal()) ) != 0) tSide0 = 0f;
+ if((tConn & (1 << ForgeDirection.UP.ordinal()) ) != 0) tSide1 = 1f;
+ if((tConn & (1 << ForgeDirection.NORTH.ordinal())) != 0) tSide2 = 0f;
+ if((tConn & (1 << ForgeDirection.SOUTH.ordinal())) != 0) tSide3 = 1f;
+ if((tConn & (1 << ForgeDirection.WEST.ordinal()) ) != 0) tSide4 = 0f;
+ if((tConn & (1 << ForgeDirection.EAST.ordinal()) ) != 0) tSide5 = 1f;
+
+ return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3);
+
+ }
+}
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
index e0a729104e..a299698f6d 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
@@ -12,7 +12,7 @@ import net.minecraft.world.chunk.IChunkProvider;
import java.util.Random;
import static gregtech.api.enums.GT_Values.D1;
-import static gregtech.api.enums.GT_Values.D2;
+import static gregtech.api.enums.GT_Values.debugSmallOres;
public class GT_Worldgen_GT_Ore_SmallPieces
extends GT_Worldgen {
@@ -54,7 +54,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces
count++;
}
}
- if(D2){
+ if(debugSmallOres){
GT_Log.out.println(
"Small Ore:" + this.mWorldGenName +
" @ dim="+aDimensionType+
diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
index 9310e832d8..c6618dca60 100644
--- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
@@ -38,7 +38,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
}
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre) {
- return setOreBlock(aWorld, aX, aY, aZ, aMetaData, isSmallOre, false);
+ return setOreBlock(aWorld, aX, aY, aZ, aMetaData, isSmallOre, true);
}
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre, boolean air) {