mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +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
56 lines
3.0 KiB
Diff
56 lines
3.0 KiB
Diff
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/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
|
index 7fbe1a62e9c67a8bdaf13aaa9fae1d8742d75148..0733f9c057fef17fd79a4769f19b78f4c83a7784 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
|
@@ -184,6 +184,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
|
}
|
|
|
|
return InteractionResult.sidedSuccess(this.level.isClientSide);
|
|
+ // Purpur start
|
|
+ } else if (level.purpurConfig.snowGolemPutPumpkinBack && !hasPumpkin() && itemstack.getItem() == Blocks.CARVED_PUMPKIN.asItem()) {
|
|
+ setPumpkin(false);
|
|
+ if (!player.getAbilities().instabuild) {
|
|
+ itemstack.shrink(1);
|
|
+ }
|
|
+ return InteractionResult.SUCCESS;
|
|
+ // Purpur end
|
|
} else {
|
|
return tryRide(player, hand); // Purpur
|
|
}
|
|
@@ -194,6 +202,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM
|
|
this.level.playSound((Player) null, (Entity) this, SoundEvents.SNOW_GOLEM_SHEAR, shearedSoundCategory, 1.0F, 1.0F);
|
|
if (!this.level.isClientSide()) {
|
|
this.setPumpkin(false);
|
|
+ if (level.purpurConfig.snowGolemDropsPumpkin) // Purpur
|
|
this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), 1.7F);
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 63ec9aee12ccfa08852fe9793008dec984147cd2..f3dc9f8d7afda7d8bcbf42c7a36a7e06ab4e4afc 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -983,6 +983,8 @@ public class PurpurWorldConfig {
|
|
public boolean snowGolemRidableInWater = false;
|
|
public boolean snowGolemLeaveTrailWhenRidden = false;
|
|
public double snowGolemMaxHealth = 4.0D;
|
|
+ public boolean snowGolemDropsPumpkin = true;
|
|
+ public boolean snowGolemPutPumpkinBack = false;
|
|
private void snowGolemSettings() {
|
|
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
|
|
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
|
|
@@ -993,6 +995,8 @@ public class PurpurWorldConfig {
|
|
set("mobs.snow_golem.attributes.max_health", oldValue);
|
|
}
|
|
snowGolemMaxHealth = getDouble("mobs.snow_golem.attributes.max_health", snowGolemMaxHealth);
|
|
+ snowGolemDropsPumpkin = getBoolean("mobs.snow_golem.drop-pumpkin-when-sheared", snowGolemDropsPumpkin);
|
|
+ snowGolemPutPumpkinBack = getBoolean("mobs.snow_golem.pumpkin-can-be-added-back", snowGolemPutPumpkinBack);
|
|
}
|
|
|
|
public boolean squidRidable = false;
|