Allow for same-size core upgrades (#6558)

This commit is contained in:
Matthew (or Maya) Peng
2022-02-05 14:58:36 -08:00
committed by GitHub
parent c877c3416e
commit 6a053f2f45

View File

@@ -116,7 +116,7 @@ public class CoreBlock extends StorageBlock{
@Override
public boolean canReplace(Block other){
//coreblocks can upgrade smaller cores
return super.canReplace(other) || (other instanceof CoreBlock && size > other.size);
return super.canReplace(other) || (other instanceof CoreBlock && size >= other.size && other != this);
}
@Override