From 0b17aab01ea9b47e21c993329798fdfb06f16a5f Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 12 Mar 2022 20:31:12 +0100 Subject: [PATCH] Patch E Prep --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + gradle.properties | 2 +- src/main/java/com/simibubi/create/Create.java | 2 +- .../structureMovement/AbstractContraptionEntity.java | 4 ++-- .../components/structureMovement/Contraption.java | 2 ++ src/main/resources/META-INF/mods.toml | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index be16c9bd9..1a0c4b59f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -49,6 +49,7 @@ body: label: Mod Version description: The version of the mod you were using when the bug occured options: + - "0.4.0e" - "0.4.0d" - "0.4.0c" - "0.4.0b" diff --git a/gradle.properties b/gradle.properties index bf4d53325..b447a7889 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false # mod version info -mod_version = 0.4d +mod_version = 0.4e minecraft_version = 1.18.1 forge_version = 39.1.0 diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 5aa61c54c..c4049703c 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -57,7 +57,7 @@ public class Create { public static final String ID = "create"; public static final String NAME = "Create"; - public static final String VERSION = "0.4d"; + public static final String VERSION = "0.4e"; public static final Logger LOGGER = LogManager.getLogger(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java index dee9a52cf..79b834323 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/AbstractContraptionEntity.java @@ -445,8 +445,6 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionDisassemblyPacket(this.getId(), transform)); - discard(); - contraption.addBlocksToWorld(level, transform); contraption.addPassengersToWorld(level, transform, getPassengers()); @@ -462,6 +460,8 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit ((AbstractContraptionEntity) entity).disassemble(); } + discard(); + ejectPassengers(); moveCollidedEntitiesOnDisassembly(transform); AllSoundEvents.CONTRAPTION_DISASSEMBLE.playOnServer(level, blockPosition()); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 088ee19de..790746d32 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -1129,6 +1129,8 @@ public abstract class Contraption { if (getSeatMapping().isEmpty()) continue; Integer seatIndex = getSeatMapping().get(seatedEntity.getUUID()); + if (seatIndex == null) + continue; BlockPos seatPos = getSeats().get(seatIndex); seatPos = transform.apply(seatPos); if (!(world.getBlockState(seatPos) diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 4936aa7de..4a3ddd01e 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -5,7 +5,7 @@ license="MIT" [[mods]] modId="create" -version="0.4d" +version="0.4e" displayName="Create" #updateJSONURL="" displayURL="https://www.curseforge.com/minecraft/mc-mods/create"