2022-07-28 03:57:50 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2023-06-09 00:58:46 +00:00
|
|
|
From: Telesphoreo <me@telesphoreo.me>
|
|
|
|
Date: Thu, 8 Jun 2023 19:19:37 -0500
|
2022-07-28 03:57:50 +00:00
|
|
|
Subject: [PATCH] Ignore errors thrown when trying to remove minecart entities
|
|
|
|
with content in them
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
2023-06-09 00:58:46 +00:00
|
|
|
index 272095d7a09ab41227d741172735f66fd2798ce1..ea966ea94062be3ed9b6b2c460a316378c016fa7 100644
|
2022-07-28 03:57:50 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
|
|
|
@@ -139,7 +139,12 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
|
|
|
@Override
|
|
|
|
public void remove(Entity.RemovalReason reason) {
|
2023-06-09 00:58:46 +00:00
|
|
|
if (!this.level().isClientSide && reason.shouldDestroy()) {
|
|
|
|
- Containers.dropContents(this.level(), (Entity) this, (Container) this);
|
2022-07-28 03:57:50 +00:00
|
|
|
+ // Scissors start - Ignore errors thrown when trying to remove minecart entities with content in them
|
|
|
|
+ try {
|
2023-06-09 00:58:46 +00:00
|
|
|
+ Containers.dropContents(this.level(), (Entity) this, (Container) this);
|
2022-07-28 03:57:50 +00:00
|
|
|
+ } catch (Exception ignored) {
|
|
|
|
+ }
|
|
|
|
+ // Scissors end
|
|
|
|
}
|
|
|
|
|
|
|
|
super.remove(reason);
|