mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
fix placing minecart contraptions
This commit is contained in:
parent
aa5378179f
commit
c3bccb9aa4
1 changed files with 6 additions and 1 deletions
|
@ -87,7 +87,12 @@ public class MountedStorageManager {
|
|||
|
||||
public void initialize() {
|
||||
if (this.isInitialized()) {
|
||||
throw new IllegalStateException("Mounted storage has already been initialized");
|
||||
// originally this threw an exception to try to catch mistakes.
|
||||
// however, in the case where a Contraption is deserialized before its Entity, that would also throw,
|
||||
// since both the deserialization and the onEntityCreated callback initialize the storage.
|
||||
// this case occurs when placing a picked up minecart contraption.
|
||||
// the reverse case is fine since deserialization also resets the manager first.
|
||||
return;
|
||||
}
|
||||
|
||||
this.allItemStorages = ImmutableMap.copyOf(this.itemsBuilder);
|
||||
|
|
Loading…
Add table
Reference in a new issue