Fix compatibility with forge older than 1355
This commit is contained in:
parent
7224ac4299
commit
88b575ed3c
5 changed files with 11 additions and 11 deletions
|
@ -449,11 +449,11 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
|
|||
}
|
||||
|
||||
Long[] tStats = getFluidContainerStats(aStack);
|
||||
if (tStats == null || tStats[0] <= 0 || aFluid == null || aFluid.getFluidID() <= 0 || aFluid.amount <= 0) return 0;
|
||||
if (tStats == null || tStats[0] <= 0 || aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0) return 0;
|
||||
|
||||
FluidStack tFluid = getFluidContent(aStack);
|
||||
|
||||
if (tFluid == null || tFluid.getFluidID() <= 0) {
|
||||
if (tFluid == null || tFluid.getFluid().getID() <= 0) {
|
||||
if (aFluid.amount <= tStats[0]) {
|
||||
if (doFill) {
|
||||
setFluidContent(aStack, aFluid);
|
||||
|
|
|
@ -262,9 +262,9 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
|
|||
|
||||
@Override
|
||||
public final int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
|
||||
if (aFluid == null || aFluid.getFluidID() <= 0) return 0;
|
||||
if (aFluid == null || aFluid.getFluid().getID() <= 0) return 0;
|
||||
|
||||
if (mFluid == null || mFluid.getFluidID() <= 0) {
|
||||
if (mFluid == null || mFluid.getFluid().getID() <= 0) {
|
||||
if(aFluid.amount <= getCapacity()) {
|
||||
if (doFill) {
|
||||
mFluid = aFluid.copy();
|
||||
|
|
|
@ -131,9 +131,9 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier
|
|||
|
||||
@Override
|
||||
public int fill(FluidStack aFluid, boolean doFill) {
|
||||
if (aFluid == null || aFluid.getFluidID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) return 0;
|
||||
if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) return 0;
|
||||
|
||||
if (getFillableStack() == null || getFillableStack().getFluidID() <= 0) {
|
||||
if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) {
|
||||
if(aFluid.amount <= getCapacity()) {
|
||||
if (doFill) {
|
||||
setFillableStack(aFluid.copy());
|
||||
|
|
|
@ -881,7 +881,7 @@ public class GT_Utility {
|
|||
if (aFluid == null || aFluid.getFluid() == null) return null;
|
||||
int tmp = 0;
|
||||
try{
|
||||
tmp = aFluid.getFluidID();
|
||||
tmp = aFluid.getFluid().getID();
|
||||
}catch(Exception e){
|
||||
System.err.println(e);
|
||||
}
|
||||
|
|
|
@ -233,9 +233,9 @@ public boolean isCorrectMachinePart(ItemStack aStack) {return true;}
|
|||
public boolean checkRecipe(ItemStack aStack) {
|
||||
if(this.mLastRecipe!=null){;
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput : this.mInputHatches){
|
||||
if(tInput.mFluid!=null&& tInput.mFluid!=null&&tInput.mFluid.getFluidID()==this.mLastRecipe.mFluidInputs[0].getFluidID()&&tInput.mFluid.amount>=this.mLastRecipe.mFluidInputs[0].amount){
|
||||
if(tInput.mFluid!=null&& tInput.mFluid!=null&&tInput.mFluid.getFluid().getID()==this.mLastRecipe.mFluidInputs[0].getFluid().getID()&&tInput.mFluid.amount>=this.mLastRecipe.mFluidInputs[0].amount){
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput2 : this.mInputHatches){
|
||||
if(tInput2.mFluid!=null&& tInput2.mFluid!=null&&tInput2.mFluid.getFluidID()==this.mLastRecipe.mFluidInputs[1].getFluidID()&&tInput2.mFluid.amount>=this.mLastRecipe.mFluidInputs[1].amount&&getMaxInputVoltage()>=this.mLastRecipe.mEUt){
|
||||
if(tInput2.mFluid!=null&& tInput2.mFluid!=null&&tInput2.mFluid.getFluid().getID()==this.mLastRecipe.mFluidInputs[1].getFluid().getID()&&tInput2.mFluid.amount>=this.mLastRecipe.mFluidInputs[1].amount&&getMaxInputVoltage()>=this.mLastRecipe.mEUt){
|
||||
tInput.drain(this.mLastRecipe.mFluidInputs[0].amount, true);
|
||||
tInput2.drain(this.mLastRecipe.mFluidInputs[1].amount, true);
|
||||
this.mEUt = -(this.mLastRecipe.mEUt*tierOverclock());
|
||||
|
@ -255,11 +255,11 @@ public boolean checkRecipe(ItemStack aStack) {
|
|||
FluidStack tFluid = tRecipe.mFluidInputs[0];
|
||||
if(tFluid!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput : this.mInputHatches){
|
||||
if(tFluid.fluid !=null&& tInput.getFluid()!=null && tFluid.fluid.getID()==tInput.getFluid().getFluidID()&&tFluid.amount<=tInput.getFluid().amount){
|
||||
if(tFluid.fluid !=null&& tInput.getFluid()!=null && tFluid.fluid.getID()==tInput.getFluid().getFluid().getID()&&tFluid.amount<=tInput.getFluid().amount){
|
||||
FluidStack tFluid2 = tRecipe.mFluidInputs[1];
|
||||
if(tFluid2!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput2 : this.mInputHatches){
|
||||
if(tFluid2.fluid !=null&& tInput2.getFluid()!=null&&tFluid2.fluid.getID()==tInput2.getFluid().getFluidID()&&tFluid2.amount<=tInput2.getFluid().amount&&getMaxInputVoltage()>=tRecipe.mEUt&&this.mEUStore>=tRecipe.mSpecialValue){
|
||||
if(tFluid2.fluid !=null&& tInput2.getFluid()!=null&&tFluid2.fluid.getID()==tInput2.getFluid().getFluid().getID()&&tFluid2.amount<=tInput2.getFluid().amount&&getMaxInputVoltage()>=tRecipe.mEUt&&this.mEUStore>=tRecipe.mSpecialValue){
|
||||
tInput.drain(tFluid.amount, true);
|
||||
tInput2.drain(tFluid2.amount, true);
|
||||
this.mLastRecipe=tRecipe;
|
||||
|
|
Loading…
Reference in a new issue