mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-30 08:06:01 +00:00
First time trying to fix a failed patch this way
This commit is contained in:
parent
08bd23459f
commit
f8d4eb9eaa
@ -6,10 +6,10 @@ Subject: [PATCH] Ignore errors thrown when trying to remove minecart entities
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
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..cd8ede69be1f728663a670085113d842ec0209af 100644
|
index b8fb7b5a347298ada16bc8b818edf1863e3f6040..7ec912bfec20d6b5d91f23341c4e9e3188d1236b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
@@ -192,7 +192,12 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
@@ -139,7 +139,12 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||||
@Override
|
@Override
|
||||||
public void remove(Entity.RemovalReason reason) {
|
public void remove(Entity.RemovalReason reason) {
|
||||||
if (!this.level.isClientSide && reason.shouldDestroy()) {
|
if (!this.level.isClientSide && reason.shouldDestroy()) {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemEntity - Check if items are air before calling setItem
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index 9ca37cbf829ff4240ae79fc283bcf9e7f2c728d2..bc71ca6e082a137d17ee0bf43de72095bd19ab3d 100644
|
index ae4b251e10babb07055d031ff48ac7dd5d4be4a0..36d57256c50fbd5e60c755ea47b608137d92ea50 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -379,11 +379,14 @@ public class ItemEntity extends Entity {
|
@@ -385,11 +385,14 @@ public class ItemEntity extends Entity {
|
||||||
|
|
||||||
CompoundTag nbttagcompound1 = nbt.getCompound("Item");
|
CompoundTag nbttagcompound1 = nbt.getCompound("Item");
|
||||||
|
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Video <videogamesm12@gmail.com>
|
||||||
|
Date: Sun, 13 Mar 2022 21:56:29 -0600
|
||||||
|
Subject: [PATCH] Validate BlockState and SoundEvent values
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
|
index 5dda064813a0eb00438a7df909d51a4b2d48942e..29b8519a1dd954f004bf04145e7246e3d2592b77 100644
|
||||||
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
|
@@ -229,7 +229,7 @@ public final class NbtUtils {
|
||||||
|
if (!nbt.contains("Name", 8)) {
|
||||||
|
return Blocks.AIR.defaultBlockState();
|
||||||
|
} else {
|
||||||
|
- Block block = Registry.BLOCK.get(new ResourceLocation(nbt.getString("Name")));
|
||||||
|
+ Block block = Registry.BLOCK.get(ResourceLocation.tryParse(nbt.getString("Name"))); // Scissors - Validate BlockState
|
||||||
|
BlockState blockState = block.defaultBlockState();
|
||||||
|
if (nbt.contains("Properties", 10)) {
|
||||||
|
CompoundTag compoundTag = nbt.getCompound("Properties");
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
|
index bc01e5014e1355a225bdf5c47f2965290b45e2d2..8eba392e567afb069ae11b8e94ff72f0aa148ee9 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
|
@@ -551,7 +551,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||||
|
this.setCritArrow(nbt.getBoolean("crit"));
|
||||||
|
this.setPierceLevel(nbt.getByte("PierceLevel"));
|
||||||
|
if (nbt.contains("SoundEvent", 8)) {
|
||||||
|
- this.soundEvent = (SoundEvent) Registry.SOUND_EVENT.getOptional(new ResourceLocation(nbt.getString("SoundEvent"))).orElse(this.getDefaultHitGroundSoundEvent());
|
||||||
|
+ this.soundEvent = (SoundEvent) Registry.SOUND_EVENT.getOptional(ResourceLocation.tryParse(nbt.getString("SoundEvent"))).orElse(this.getDefaultHitGroundSoundEvent()); // Scissors - Validate SoundEvents before trying to play them
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setShotFromCrossbow(nbt.getBoolean("ShotFromCrossbow"));
|
Loading…
Reference in New Issue
Block a user