mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
New "InternalMultiblock" framework to allow for easier multiblock component management, added "hot" state to superheating elements
This commit is contained in:
1 parent
5dcddaf25b
commit
e6f4102087
19 files changed
+237
-121
No files matched your search
@@ -388,13 +388,43 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
|
||||
|
||||
protected abstract void mergeCaches(List<ItemStack> rejectedItems, MultiblockCache<T> cache, MultiblockCache<T> merge);
|
||||
|
||||
protected void onFormed() {}
|
||||
protected void onFormed()
|
||||
{
|
||||
for(Coord4D coord : structureFound.internalLocations)
|
||||
{
|
||||
TileEntity tile = coord.getTileEntity(pointer.getWorldObj());
|
||||
|
||||
if(tile instanceof TileEntityInternalMultiblock)
|
||||
{
|
||||
((TileEntityInternalMultiblock)tile).setMultiblock(structureFound.inventoryID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void onStructureCreated(T structure, int origX, int origY, int origZ, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax) {}
|
||||
|
||||
public void onStructureDestroyed(T structure) {}
|
||||
public void onStructureDestroyed(T structure)
|
||||
{
|
||||
for(Coord4D coord : structure.internalLocations)
|
||||
{
|
||||
TileEntity tile = coord.getTileEntity(pointer.getWorldObj());
|
||||
|
||||
if(tile instanceof TileEntityInternalMultiblock)
|
||||
{
|
||||
((TileEntityInternalMultiblock)tile).setMultiblock(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void killInnerNode(Coord4D coord) {}
|
||||
public void killInnerNode(Coord4D coord)
|
||||
{
|
||||
TileEntity tile = coord.getTileEntity(pointer.getWorldObj());
|
||||
|
||||
if(tile instanceof TileEntityInternalMultiblock)
|
||||
{
|
||||
((TileEntityInternalMultiblock)tile).setMultiblock(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the protocol and updates all nodes that make a part of the multiblock.
|
||||
|
||||
Reference in new issue
Block a user