mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
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.
40 lines
2.8 KiB
Diff
40 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: rafael59r2 <12960698+rafael59r2@users.noreply.github.com>
|
|
Date: Tue, 19 Oct 2021 13:10:44 +0100
|
|
Subject: [PATCH] Add option to disable zombie villagers cure
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
index 811c5c4bc98401bc9314894eb5cb64bf31b03f63..624b19d415dab0c864b96edf4a7063470739a221 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
@@ -224,7 +224,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
|
|
ItemStack itemstack = player.getItemInHand(hand);
|
|
|
|
if (itemstack.is(Items.GOLDEN_APPLE)) {
|
|
- if (this.hasEffect(MobEffects.WEAKNESS)) {
|
|
+ if (this.hasEffect(MobEffects.WEAKNESS) && level().purpurConfig.zombieVillagerCureEnabled) { // Purpur
|
|
itemstack.consume(1, player);
|
|
if (!this.level().isClientSide) {
|
|
this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 23c0edd4a38f47335c492742c9a9accf5feb044c..84d7034b5674fd855835bf97ac33fa3c8294f85b 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -3029,6 +3029,7 @@ public class PurpurWorldConfig {
|
|
public boolean zombieVillagerTakeDamageFromWater = false;
|
|
public int zombieVillagerCuringTimeMin = 3600;
|
|
public int zombieVillagerCuringTimeMax = 6000;
|
|
+ public boolean zombieVillagerCureEnabled = true;
|
|
private void zombieVillagerSettings() {
|
|
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
|
|
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
|
|
@@ -3047,6 +3048,7 @@ public class PurpurWorldConfig {
|
|
zombieVillagerTakeDamageFromWater = getBoolean("mobs.zombie_villager.takes-damage-from-water", zombieVillagerTakeDamageFromWater);
|
|
zombieVillagerCuringTimeMin = getInt("mobs.zombie_villager.curing_time.min", zombieVillagerCuringTimeMin);
|
|
zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax);
|
|
+ zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled);
|
|
}
|
|
|
|
public boolean zombifiedPiglinRidable = false;
|