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

@@ -17,10 +17,10 @@ index f33fa55bd8f894389121d38eb811ff739f31c811..44f6949166cdf78e2d197ab5a5affae6
this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Drowned.class).setAlertOthers(ZombifiedPiglin.class));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, (target, world) -> this.okTarget(target)));
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 18cf2be9270623e6088e02aaeace6b9b4711fe0a..acbe91bba0b245fcd4940ea19795babaaf438c80 100644
index 1e5bb7dc174bd43479534a9cab0b3bf05695ae51..7d4570b6cc775e73a64e0a7ec4fa15397636a0f3 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1081,6 +1081,7 @@ public class PurpurWorldConfig {
@@ -1083,6 +1083,7 @@ public class PurpurWorldConfig {
public double drownedJockeyChance = 0.05D;
public boolean drownedJockeyTryExistingChickens = true;
public boolean drownedTakeDamageFromWater = false;
@@ -28,7 +28,7 @@ index 18cf2be9270623e6088e02aaeace6b9b4711fe0a..acbe91bba0b245fcd4940ea19795baba
private void drownedSettings() {
drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable);
drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater);
@@ -1097,6 +1098,7 @@ public class PurpurWorldConfig {
@@ -1099,6 +1100,7 @@ public class PurpurWorldConfig {
drownedJockeyChance = getDouble("mobs.drowned.jockey.chance", drownedJockeyChance);
drownedJockeyTryExistingChickens = getBoolean("mobs.drowned.jockey.try-existing-chickens", drownedJockeyTryExistingChickens);
drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater);