mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Snowman drop and put back pumpkin
This commit is contained in:
committed by
granny
parent
628a35f045
commit
154d9e5591
@@ -1,45 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 3 May 2019 23:58:44 -0500
|
||||
Subject: [PATCH] Snowman drop and put back pumpkin
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
index 0149071cc901beffd583c1ba7617e1355473fc77..aaa581c5fa7a14958b2a7c20996cf70ad4efff04 100644
|
||||
--- a/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
+++ b/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
@@ -205,6 +205,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
||||
}
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
+ // Purpur start
|
||||
+ } else if (level().purpurConfig.snowGolemPutPumpkinBack && !hasPumpkin() && itemstack.getItem() == Blocks.CARVED_PUMPKIN.asItem()) {
|
||||
+ setPumpkin(true);
|
||||
+ if (!player.getAbilities().instabuild) {
|
||||
+ itemstack.shrink(1);
|
||||
+ }
|
||||
+ return InteractionResult.SUCCESS;
|
||||
+ // Purpur end
|
||||
} else {
|
||||
return tryRide(player, hand); // Purpur - Ridables
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 419ebb012056d131d6d1b10c8bd72511a1c4df74..1fa34a6517b4b834354234471f9ed3bcaaf1ee03 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1311,6 +1311,7 @@ public class PurpurWorldConfig {
|
||||
public boolean snowGolemLeaveTrailWhenRidden = false;
|
||||
public double snowGolemMaxHealth = 4.0D;
|
||||
public double snowGolemScale = 1.0D;
|
||||
+ public boolean snowGolemPutPumpkinBack = false;
|
||||
private void snowGolemSettings() {
|
||||
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
|
||||
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
|
||||
@@ -1323,6 +1324,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
snowGolemMaxHealth = getDouble("mobs.snow_golem.attributes.max_health", snowGolemMaxHealth);
|
||||
snowGolemScale = Mth.clamp(getDouble("mobs.snow_golem.attributes.scale", snowGolemScale), 0.0625D, 16.0D);
|
||||
+ snowGolemPutPumpkinBack = getBoolean("mobs.snow_golem.pumpkin-can-be-added-back", snowGolemPutPumpkinBack);
|
||||
}
|
||||
|
||||
public boolean snifferRidable = false;
|
||||
Reference in New Issue
Block a user