mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
45 lines
2.3 KiB
Diff
45 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Wed, 10 Jul 2019 20:43:05 -0500
|
|
Subject: [PATCH] Option to toggle milk curing bad omen
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/MilkBucketItem.java b/src/main/java/net/minecraft/world/item/MilkBucketItem.java
|
|
index f33977d95b6db473be4f95075ba99caf90ad0220..56dc04d8875971ee9a5d077a695509af74fe2473 100644
|
|
--- a/src/main/java/net/minecraft/world/item/MilkBucketItem.java
|
|
+++ b/src/main/java/net/minecraft/world/item/MilkBucketItem.java
|
|
@@ -5,6 +5,8 @@ import net.minecraft.server.level.ServerPlayer;
|
|
import net.minecraft.stats.Stats;
|
|
import net.minecraft.world.InteractionHand;
|
|
import net.minecraft.world.InteractionResultHolder;
|
|
+import net.minecraft.world.effect.MobEffectInstance;
|
|
+import net.minecraft.world.effect.MobEffects;
|
|
import net.minecraft.world.entity.LivingEntity;
|
|
import net.minecraft.world.entity.player.Player;
|
|
import net.minecraft.world.level.Level;
|
|
@@ -31,7 +33,9 @@ public class MilkBucketItem extends Item {
|
|
}
|
|
|
|
if (!world.isClientSide) {
|
|
+ MobEffectInstance badOmen = user.getEffect(MobEffects.BAD_OMEN);
|
|
user.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.MILK); // CraftBukkit
|
|
+ if (!world.purpurConfig.milkCuresBadOmen && badOmen != null) user.addEffect(badOmen); // Purpur
|
|
}
|
|
|
|
return stack.isEmpty() ? new ItemStack(Items.BUCKET) : stack;
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 42d9181991d83d44c5bf56960f8c6005353eba91..6a640a0e8db52d0b7c3142d331a172fe1239ba2a 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -189,8 +189,10 @@ public class PurpurWorldConfig {
|
|
}
|
|
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
+ public boolean milkCuresBadOmen = true;
|
|
private void miscGameplayMechanicsSettings() {
|
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
+ milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
}
|
|
|
|
public boolean farmlandGetsMoistFromBelow = false;
|