mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-19 11:49:24 +00:00
Fixed another edge case
This commit is contained in:
1 parent
3286c10be9
commit
8845ff4a2d
1 file changed
+9
-3
@@ -633,14 +633,20 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity
|
||||
|
||||
@Override
|
||||
public boolean doesContainerAccept(Aspect aspect) {
|
||||
return this.isMultiblockFormed() && this.isAccessPoint() && this.canAccept(aspect);
|
||||
if (this.isMultiblockFormed() && this.isAccessPoint()) {
|
||||
TileEssentiaCompressor master = tryFindMasterTile();
|
||||
if (master != null) {
|
||||
return master.canAccept(aspect);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addToContainer(Aspect aspect, int amount) {
|
||||
if (this.doesContainerAccept(aspect) && this.canAccept(aspect)) {
|
||||
if (this.isMultiblockFormed() && this.isAccessPoint()) {
|
||||
TileEssentiaCompressor master = this.tryFindMasterTile();
|
||||
if (master == null) return 0;
|
||||
if (master == null || !master.canAccept(aspect)) return amount;
|
||||
int available = master.currentStorageSize() - master.al.getAmount(aspect);
|
||||
if (available <= 0) return amount;
|
||||
int amountToAdd = Math.min(amount, available);
|
||||
|
||||
Reference in new issue
Block a user