This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74d4e6d
commit 398e0bc
Showing
9 changed files
with
721 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
368 changes: 368 additions & 0 deletions
368
.../bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/BW_TT_HeatExchanger.java
Large diffs are not rendered by default.
Oops, something went wrong.
102 changes: 102 additions & 0 deletions
102
...aeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_Abstract_GT_Replacement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement; | ||
|
||
import com.github.technus.tectech.mechanics.constructable.IConstructable; | ||
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; | ||
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; | ||
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; | ||
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; | ||
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; | ||
import gregtech.api.GregTech_API; | ||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity; | ||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity; | ||
import gregtech.api.metatileentity.implementations.*; | ||
import net.minecraft.entity.player.InventoryPlayer; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public abstract class TT_Abstract_GT_Replacement extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { | ||
|
||
protected TT_Abstract_GT_Replacement(int newId, String aName, String aNameRegional) { | ||
super(32765, aName, aNameRegional); | ||
GregTech_API.METATILEENTITIES[32765] = null; | ||
GregTech_API.METATILEENTITIES[newId] = this; | ||
} | ||
|
||
protected TT_Abstract_GT_Replacement(String aName) { | ||
super(aName); | ||
} | ||
|
||
@Override | ||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { | ||
return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", ePowerPass,false,true); | ||
} | ||
|
||
@Override | ||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { | ||
return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, ePowerPass, false, true); | ||
} | ||
|
||
@Override | ||
protected boolean cyclicUpdate_EM() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isMachineBlockUpdateRecursive() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean isCorrectMachinePart(ItemStack aStack) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean explodesOnComponentBreak(ItemStack aStack) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public int getMaxEfficiency(ItemStack aStack) { | ||
return 10000; | ||
} | ||
|
||
@Override | ||
public int getDamageToComponent(ItemStack aStack) { | ||
return 0; | ||
} | ||
|
||
private static final String[] sfStructureDescription = new String[] {"1 - Muffler"}; | ||
|
||
@Override | ||
public String[] getStructureDescription(ItemStack itemStack) { | ||
return sfStructureDescription; | ||
} | ||
|
||
public final boolean addEBFInputsBottom(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { | ||
if (aTileEntity == null) | ||
return false; | ||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); | ||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) | ||
((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); | ||
else | ||
return false; | ||
|
||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) | ||
return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) | ||
return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) | ||
return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) | ||
return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) | ||
return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) | ||
return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) | ||
return this.eEnergyMulti.add((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity); | ||
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DynamoMulti) | ||
return this.eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity); | ||
return false; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...k/crossmod/tectech/tileentites/multi/GT_Replacement/TT_Abstract_GT_Replacement_Coils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement; | ||
|
||
import com.github.bartimaeusnek.crossmod.tectech.helper.IHasCoils; | ||
import gregtech.api.enums.HeatingCoilLevel; | ||
|
||
public abstract class TT_Abstract_GT_Replacement_Coils extends TT_Abstract_GT_Replacement implements IHasCoils { | ||
protected TT_Abstract_GT_Replacement_Coils(int newId, String aName, String aNameRegional) { | ||
super(newId, aName, aNameRegional); | ||
} | ||
|
||
protected TT_Abstract_GT_Replacement_Coils(String aName) { | ||
super(aName); | ||
} | ||
protected HeatingCoilLevel heatingCoilLevel = HeatingCoilLevel.None; | ||
|
||
@Override | ||
public void setCoilHeat(HeatingCoilLevel coilMeta) { | ||
heatingCoilLevel = coilMeta; | ||
} | ||
|
||
@Override | ||
public HeatingCoilLevel getCoilHeat() { | ||
return heatingCoilLevel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.