mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
Developed and implemented the foundation for Item/Gas/Energy/Fluid/Heat dynamic side configuration.
As of now, only items are supported, and the actual config GUI has not been changed. Only gameplay difference is three new configurator modes.
This commit is contained in:
1 parent
35518ad01f
commit
d4d7e88c4e
41 files changed
+563
-453
No files matched your search
@@ -14,7 +14,7 @@ import mekanism.common.Mekanism;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.IElectricChest;
|
||||
import mekanism.common.base.IFactory;
|
||||
import mekanism.common.base.IInvConfiguration;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.IRedstoneControl;
|
||||
import mekanism.common.base.IRedstoneControl.RedstoneControl;
|
||||
import mekanism.common.base.ISustainedData;
|
||||
@@ -270,18 +270,14 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof IInvConfiguration)
|
||||
if(tileEntity instanceof ISideConfiguration)
|
||||
{
|
||||
IInvConfiguration config = (IInvConfiguration)tileEntity;
|
||||
ISideConfiguration config = (ISideConfiguration)tileEntity;
|
||||
|
||||
if(stack.stackTagCompound != null && stack.stackTagCompound.hasKey("hasSideData"))
|
||||
{
|
||||
config.getEjector().setEjecting(stack.stackTagCompound.getBoolean("ejecting"));
|
||||
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
config.getConfiguration()[i] = stack.stackTagCompound.getByte("config"+i);
|
||||
}
|
||||
config.getConfig().read(stack.stackTagCompound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user