mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-14 19:34:54 -05:00
Update 0008-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch
This commit is contained in:
parent
d13728a72f
commit
6884a59cf4
1 changed files with 12 additions and 6 deletions
|
@ -1,19 +1,25 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Telesphoreo <me@telesphoreo.me>
|
||||
Date: Tue, 19 Apr 2022 18:27:04 -0500
|
||||
Subject: [PATCH] fix this patch
|
||||
From: Video <videogamesm12@gmail.com>
|
||||
Date: Sun, 13 Mar 2022 08:14:44 -0600
|
||||
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
|
||||
index ef50d9747f2a027e356b05ad8d94ffb2fd4a423e..574afb19e43ec5b17ae2fbee7db36e3164fe0a0b 100644
|
||||
index ef50d9747f2a027e356b05ad8d94ffb2fd4a423e..cd8ede69be1f728663a670085113d842ec0209af 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
@@ -192,7 +192,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||
@@ -192,7 +192,12 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||
@Override
|
||||
public void remove(Entity.RemovalReason reason) {
|
||||
if (!this.level.isClientSide && reason.shouldDestroy()) {
|
||||
- Containers.dropContents(this.level, (Entity) this, (Container) this);
|
||||
+ Containers.dropContents(this.level, this, this);
|
||||
+ // Scissors start - Ignore errors thrown when trying to remove minecart entities with content in them
|
||||
+ try {
|
||||
+ Containers.dropContents(this.level, (Entity) this, (Container) this);
|
||||
+ } catch (Exception ignored) {
|
||||
+ }
|
||||
+ // Scissors end
|
||||
}
|
||||
|
||||
super.remove(reason);
|
Loading…
Reference in a new issue