mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Fix CME in minecart capability
This commit is contained in:
parent
eaa4688a3f
commit
283998711d
@ -1,5 +1,6 @@
|
|||||||
package com.simibubi.create.content.contraptions.minecart.capability;
|
package com.simibubi.create.content.contraptions.minecart.capability;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -128,6 +129,8 @@ public class CapabilityMinecartController implements ICapabilitySerializable<Com
|
|||||||
queuedRemovals.clear();
|
queuedRemovals.clear();
|
||||||
queued.clear();
|
queued.clear();
|
||||||
|
|
||||||
|
List<UUID> toRemove = new ArrayList<>();
|
||||||
|
|
||||||
for (Entry<UUID, MinecartController> entry : carts.entrySet()) {
|
for (Entry<UUID, MinecartController> entry : carts.entrySet()) {
|
||||||
MinecartController controller = entry.getValue();
|
MinecartController controller = entry.getValue();
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
@ -136,8 +139,12 @@ public class CapabilityMinecartController implements ICapabilitySerializable<Com
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cartsWithCoupling.remove(entry.getKey());
|
toRemove.add(entry.getKey());
|
||||||
keySet.remove(entry.getKey());
|
}
|
||||||
|
|
||||||
|
for (UUID uuid : toRemove) {
|
||||||
|
keySet.remove(uuid);
|
||||||
|
cartsWithCoupling.remove(uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user