mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2025-01-04 21:37:37 +00:00
Some more patches
This commit is contained in:
parent
0d530ef31f
commit
be3f342ab4
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
||||
version=1.20.4-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.20.4
|
||||
paperRef=166761f29f5029f6adb636c033e641da9b527c0f
|
||||
paperRef=dd16335e40dc13843e8ae7c681ca0a166d2e54a0
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -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
|
||||
index eb0351aa12eebcefab1d1d14641fc3c60cbbcab8..cf944848cdebbb6f04f5211e00c876329e86d9cc 100644
|
||||
index a39db702063887cf530f272deaf4f334047cc7d4..1816d8bc0716d06cb3db37730234bd37b100f573 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -425,11 +425,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -444,11 +444,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
CompoundTag nbttagcompound1 = nbt.getCompound("Item");
|
||||
|
@ -31,7 +31,7 @@ index 37f37be56bab171df442b980ff46ff325daae283..deade19d16a7d6870171b9a60806a8ca
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
|
||||
index 50fdb086ffec84edc5138737c95f08ed4757a6f3..da312b4670fc0ac07e4ab798d4793025e362783e 100644
|
||||
index e904bf8b6a7d18a0e846c3b59e2d7f3d6e530e39..65b076b376bf6ab363a3eb62dfa2c96c45624957 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
|
||||
@@ -41,7 +41,11 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
|
@ -18,10 +18,10 @@ index 82b53a7bfb37bfa1752a016a8a454c0b994b9108..b8720020f98ea26da7d3225ddfbb1d9e
|
||||
if (optional.isEmpty()) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
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 8affdd74769aed9aa92a76ba539cd9d27208827c..23e480535bfb4071cde84fc400c2e6acb129e1ae 100644
|
||||
index 42ebd91196ae420eee57f4380abc558555457163..8e81f50b52bc1d3eb25a842d1c41a7a18f53bf27 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -541,7 +541,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -560,7 +560,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
this.setCritArrow(nbt.getBoolean("crit"));
|
||||
this.setPierceLevel(nbt.getByte("PierceLevel"));
|
||||
if (nbt.contains("SoundEvent", 8)) {
|
@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Telesphoreo <me@telesphoreo.me>
|
||||
Date: Sun, 10 Dec 2023 17:13:15 -0600
|
||||
Subject: [PATCH] Do not log invalid items in HoverEvent and ItemFrame
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/HoverEvent.java b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
index b2cc15da40aa7bbcfc234b4e147ed0e53f359efa..dbe9f81e298a931c3e0e5b879dc13b493b3fdb52 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
@@ -280,7 +280,7 @@ public class HoverEvent {
|
||||
return DataResult.success(new HoverEvent.ItemStackInfo(ItemStack.of(compoundTag)));
|
||||
} catch (CommandSyntaxException var2) {
|
||||
return DataResult.error(() -> {
|
||||
- return "Failed to parse item tag: " + var2.getMessage();
|
||||
+ return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
index 69912c5b300b67394dce3876d2d96872033cf156..ebc403ff31385a12e072fd6a419a7787ee76429e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -436,7 +436,7 @@ public class ItemFrame extends HangingEntity {
|
||||
ItemStack itemstack = ItemStack.of(nbttagcompound1);
|
||||
|
||||
if (itemstack.isEmpty()) {
|
||||
- ItemFrame.LOGGER.warn("Unable to load item from: {}", nbttagcompound1);
|
||||
+ // Scissors - ignore invalid items
|
||||
}
|
||||
|
||||
ItemStack itemstack1 = this.getItem();
|
@ -1,41 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Luna <lunahatesgogle@gmail.com>
|
||||
Date: Sun, 20 Mar 2022 09:31:16 -0300
|
||||
Subject: [PATCH] Do not log invalid items in HoverEvent and ItemFrame
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/HoverEvent.java b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
index c0633f9553fb5aa52e8ffc863159521d09cb3bd5..7449a024265c42f28a6c9a1ed8d8f4b9e3096aac 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
@@ -314,7 +314,7 @@ public class HoverEvent {
|
||||
CompoundTag compoundTag = TagParser.parseTag(string);
|
||||
return new HoverEvent.ItemStackInfo(item, i, compoundTag);
|
||||
} catch (CommandSyntaxException var6) {
|
||||
- HoverEvent.LOGGER.warn("Failed to parse tag: {}", string, var6);
|
||||
+ // Scissors - Ignore invalid items
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ public class HoverEvent {
|
||||
CompoundTag compoundTag = TagParser.parseTag(text.getString());
|
||||
return new HoverEvent.ItemStackInfo(ItemStack.of(compoundTag));
|
||||
} catch (CommandSyntaxException var2) {
|
||||
- HoverEvent.LOGGER.warn("Failed to parse item tag: {}", text, var2);
|
||||
+ // Scissors - Ignore invalid items
|
||||
return null;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
index 759ecd79534a7706f7d4a63eb9dacbefcfe54674..9afda54ad70d446672749506822c6abd729b8f1b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -441,7 +441,7 @@ public class ItemFrame extends HangingEntity {
|
||||
ItemStack itemstack = ItemStack.of(nbttagcompound1);
|
||||
|
||||
if (itemstack.isEmpty()) {
|
||||
- ItemFrame.LOGGER.warn("Unable to load item from: {}", nbttagcompound1);
|
||||
+ // Scissors - ignore invalid items
|
||||
}
|
||||
|
||||
ItemStack itemstack1 = this.getItem();
|
Loading…
Reference in New Issue
Block a user