- Fix in-portal trains sometimes loading in with invalid coordinates, causing a game crash
This commit is contained in:
simibubi 2024-10-23 21:45:24 +02:00
parent ed875d47ac
commit b7f272cad7

View file

@ -791,6 +791,8 @@ public class Carriage {
}
private void createEntity(Level level, boolean loadPassengers) {
if (positionAnchor != null)
serialisedEntity.put("Pos", VecHelper.writeNBT(positionAnchor));
Entity entity = EntityType.create(serialisedEntity, level)
.orElse(null);