Merge branch 'unstable' of https://github.com/Blood-Asp/GT5-Unofficial into unstable

This commit is contained in:
Techlone 2017-06-13 17:44:23 +05:00
commit c8a8687a72
6 changed files with 84 additions and 7 deletions

View file

@ -1,7 +1,7 @@
minecraft.version=1.7.10
forge.version=10.13.4.1566-1.7.10
gt.version=5.09.30pre2
gt.version=5.09.30pre3
ae2.version=rv2-beta-33
applecore.version=1.7.10-1.2.1+107.59407

View file

@ -11,6 +11,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable;
import gregtech.api.interfaces.tileentity.IColoredTileEntity;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IEnergyConnected;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
@ -106,8 +107,30 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
//if (!mCanShock) return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
return AxisAlignedBB.getBoundingBox(aX + 0.0625D, aY + 0.0625D, aZ + 0.0625D, aX + 0.9375D, aY + 0.9375D, aZ + 0.9375D);
float tSpace = (1f - getThickNess())/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);
}
@Override

View file

@ -146,7 +146,30 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
return AxisAlignedBB.getBoundingBox(aX + 0.0625D, aY + 0.0625D, aZ + 0.0625D, aX + 0.9375D, aY + 0.9375D, aZ + 0.9375D);
float tSpace = (1f - getThickNess())/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);
}
@Override

View file

@ -20,6 +20,7 @@ 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;
@ -319,6 +320,30 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
return AxisAlignedBB.getBoundingBox(aX + 0.0625D, aY + 0.0625D, aZ + 0.0625D, aX + 0.9375D, aY + 0.9375D, aZ + 0.9375D);
float tSpace = (1f - getThickNess())/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);
}
}

View file

@ -346,7 +346,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()) return true;
aBaseMetaTileEntity.openGUI(aPlayer);
for(byte i=0;i < 6; i++){
if(aBaseMetaTileEntity.getAirAtSide(i)){
aBaseMetaTileEntity.openGUI(aPlayer);
return true;
}
}
GT_Utility.sendChatToPlayer(aPlayer,"No free Side!");
return true;
}

View file

@ -19,7 +19,7 @@ public class GT_CoverLoader
GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVent", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(1));
GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentCore", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(1));
GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentGold", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_Vent(2));
GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentSpread", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(2));
GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentSpread", 1L), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_Vent(2));
GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorVentDiamond", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_Vent(3));
}
}