combine button

This commit is contained in:
GlodBlock committed 2022-07-24 18:00:10 +08:00
1 parent 5747b4535b
commit 736a4b2051
19 files changed
+514 -108

No files matched your search

@@ -40,6 +40,7 @@ public class PartFluidPatternTerminal extends FCBasePart {
private boolean craftingMode = true;
private boolean substitute = false;
private boolean combine = false;
public PartFluidPatternTerminal(ItemStack is) {
super(is, true);
@@ -81,6 +82,7 @@ public class PartFluidPatternTerminal extends FCBasePart {
super.readFromNBT( data );
this.setCraftingRecipe( data.getBoolean( "craftingMode" ) );
this.setSubstitution( data.getBoolean( "substitute" ) );
this.setCombineMode( data.getBoolean("combine") );
this.pattern.readFromNBT( data, "pattern" );
this.output.readFromNBT( data, "outputList" );
this.crafting.readFromNBT( data, "craftingGrid" );
@@ -92,6 +94,7 @@ public class PartFluidPatternTerminal extends FCBasePart {
super.writeToNBT( data );
data.setBoolean( "craftingMode", this.craftingMode );
data.setBoolean( "substitute", this.substitute );
data.setBoolean( "combine", this.combine );
this.pattern.writeToNBT( data, "pattern" );
this.output.writeToNBT( data, "outputList" );
this.crafting.writeToNBT( data, "craftingGrid" );
@@ -244,11 +247,21 @@ public class PartFluidPatternTerminal extends FCBasePart {
return this.substitute;
}
public boolean shouldCombine()
{
return this.combine;
}
public void setSubstitution( boolean canSubstitute )
{
this.substitute = canSubstitute;
}
public void setCombineMode(boolean shouldCombine)
{
this.combine = shouldCombine;
}
public void onChangeCrafting(IAEItemStack[] newCrafting, IAEItemStack[] newOutput) {
IInventory crafting = this.getInventoryByName("crafting");
IInventory output = this.getInventoryByName("output");
@@ -39,6 +39,7 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
private final AppEngInternalInventory pattern = new AppEngInternalInventory( this, 2 );
private boolean substitute = false;
private boolean combine = false;
public PartFluidPatternTerminalEx(ItemStack is) {
super(is, true);
@@ -79,6 +80,7 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
{
super.readFromNBT( data );
this.setSubstitution( data.getBoolean( "substitute" ) );
this.setCombineMode( data.getBoolean("combine") );
this.pattern.readFromNBT( data, "pattern" );
this.output.readFromNBT( data, "outputList" );
this.crafting.readFromNBT( data, "craftingGrid" );
@@ -89,6 +91,7 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
{
super.writeToNBT( data );
data.setBoolean( "substitute", this.substitute );
data.setBoolean( "combine", this.combine );
this.pattern.writeToNBT( data, "pattern" );
this.output.writeToNBT( data, "outputList" );
this.crafting.writeToNBT( data, "craftingGrid" );
@@ -204,6 +207,16 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
onChangeInventory0(inv, slot, mc, removedStack, newStack);
}
public boolean shouldCombine()
{
return this.combine;
}
public void setCombineMode(boolean shouldCombine)
{
this.combine = shouldCombine;
}
public boolean isSubstitution()
{
return this.substitute;
@@ -52,11 +52,13 @@ public class TileFluidInterface extends TileInterface implements IFluidHandler,
@MENetworkEventSubscribe
public void stateChange(final MENetworkChannelsChanged c) {
fluidDuality.onChannelStateChange(c);
super.stateChange(c);
}
@MENetworkEventSubscribe
public void stateChange(final MENetworkPowerStatusChange c) {
fluidDuality.onPowerStateChange(c);
super.stateChange(c);
}
@Override