ignore item_model component for don't run with scissors feature alongside custom_model_data component

by default, the "don't run with scissors" feature will not activate for shears that have an `item_model` component or `custom_model_data` component.

adds a new world config option at `gameplay-mechanics.item.shears.damage-if-sprinting-item-model` that allows specifying a custom item model ResourceLocation (`purpurmc:scissors` by default) for use with this feature.
This commit is contained in:
granny
2024-12-06 06:05:14 -08:00
parent 2af2e717b3
commit ffeb49da1e
96 changed files with 429 additions and 424 deletions

View File

@@ -18,10 +18,10 @@ index 41fbe61268c0a16078b5f846ab12bde172872ff7..317e69eb4e3a4c312d5e856a0bff31a9
public static final Item CAMPFIRE = registerBlock(Blocks.CAMPFIRE, settings -> settings.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY));
public static final Item SOUL_CAMPFIRE = registerBlock(
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 54c9a86cea5978215159c59fc882bf003143eec2..18cf2be9270623e6088e02aaeace6b9b4711fe0a 100644
index 51609ddc3890b5a6a9106b6d2960697723651ec2..1e5bb7dc174bd43479534a9cab0b3bf05695ae51 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -213,6 +213,7 @@ public class PurpurWorldConfig {
@@ -214,6 +214,7 @@ public class PurpurWorldConfig {
public int enderPearlCooldown = 20;
public int enderPearlCooldownCreative = 20;
public float enderPearlEndermiteChance = 0.05F;
@@ -29,7 +29,7 @@ index 54c9a86cea5978215159c59fc882bf003143eec2..18cf2be9270623e6088e02aaeace6b9b
private void itemSettings() {
itemImmuneToCactus.clear();
getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> {
@@ -258,6 +259,7 @@ public class PurpurWorldConfig {
@@ -260,6 +261,7 @@ public class PurpurWorldConfig {
enderPearlCooldown = getInt("gameplay-mechanics.item.ender-pearl.cooldown", enderPearlCooldown);
enderPearlCooldownCreative = getInt("gameplay-mechanics.item.ender-pearl.creative-cooldown", enderPearlCooldownCreative);
enderPearlEndermiteChance = (float) getDouble("gameplay-mechanics.item.ender-pearl.endermite-spawn-chance", enderPearlEndermiteChance);