[ci-skip] Fix formatting on last patches

This commit is contained in:
jmp
2020-12-02 13:50:12 -08:00
parent 9ac2c732f2
commit b79d04750c
2 changed files with 17 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ If min-shoot-interval-ticks and max-shoot-interval-ticks are both set to
0, snow golems won't shoot any snowballs.
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
index e980da14c..75866d63f 100644
index e980da14cf..e5b3d298f5 100644
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -29,7 +29,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
@@ -18,20 +18,20 @@ index e980da14c..75866d63f 100644
protected void initPathfinder() {
this.goalSelector.a(0, new PathfinderGoalHasRider(this)); // Purpur
- this.goalSelector.a(1, new PathfinderGoalArrowAttack(this, 1.25D, 20, 10.0F));
+ this.goalSelector.a(1, new PathfinderGoalArrowAttack(this, world.purpurConfig.snowGolemAttackDistance, world.purpurConfig.snowGolemSnowBallmin, world.purpurConfig.snowGolemSnowBallmax, world.purpurConfig.snowGolemSnowBallModifier)); // Purpur - configurable snow golem snowball throwing
+ this.goalSelector.a(1, new PathfinderGoalArrowAttack(this, world.purpurConfig.snowGolemAttackDistance, world.purpurConfig.snowGolemSnowBallMin, world.purpurConfig.snowGolemSnowBallMax, world.purpurConfig.snowGolemSnowBallModifier)); // Purpur - configurable snow golem snowball throwing
this.goalSelector.a(2, new PathfinderGoalRandomStrollLand(this, 1.0D, 1.0000001E-5F));
this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
this.goalSelector.a(4, new PathfinderGoalRandomLookaround(this));
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index d9e47a14b..34218ee82 100644
index d9e47a14b2..45a468668f 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -964,12 +964,20 @@ public class PurpurWorldConfig {
public boolean snowGolemLeaveTrailWhenRidden = false;
public boolean snowGolemDropsPumpkin = false;
public boolean snowGolemPutPumpkinBack = false;
+ public int snowGolemSnowBallmin = 20;
+ public int snowGolemSnowBallmax = 20;
+ public int snowGolemSnowBallMin = 20;
+ public int snowGolemSnowBallMax = 20;
+ public float snowGolemSnowBallModifier = 10.0F;
+ public double snowGolemAttackDistance = 1.25D;
private void snowGolemSettings() {
@@ -40,8 +40,8 @@ index d9e47a14b..34218ee82 100644
snowGolemLeaveTrailWhenRidden = getBoolean("mobs.snow_golem.leave-trail-when-ridden", snowGolemLeaveTrailWhenRidden);
snowGolemDropsPumpkin = getBoolean("mobs.snow_golem.drop-pumpkin-when-sheared", snowGolemDropsPumpkin);
snowGolemPutPumpkinBack = getBoolean("mobs.snow_golem.pumpkin-can-be-added-back", snowGolemPutPumpkinBack);
+ snowGolemSnowBallmin = getInt("mobs.snow_golem.min-shoot-interval-ticks", snowGolemSnowBallmin);
+ snowGolemSnowBallmax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallmax);
+ snowGolemSnowBallMin = getInt("mobs.snow_golem.min-shoot-interval-ticks", snowGolemSnowBallMin);
+ snowGolemSnowBallMax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallMax);
+ snowGolemSnowBallModifier = (float) getDouble("mobs.snow_golem.snow-ball-modifier", snowGolemSnowBallModifier);
+ snowGolemAttackDistance = getDouble("mobs.snow_golem.attack-distance", snowGolemAttackDistance);
}

View File

@@ -1,24 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 14 Jan 2016 00:49:14 -0500
Subject: [PATCH] (EMC) Configurable disable give dropping
Subject: [PATCH] EMC - Configurable disable give dropping
Modified patch by Aikar in EMC that allows /give's ability to drop items if the player's inventory is full via settings.disable-give-dropping in purpur.yml
Modified version of a patch by Aikar from EMC. Adds a config option in
purur.yml to disable the /give command from dropping items on the floor
when a player's inventory is full.
diff --git a/src/main/java/net/minecraft/server/CommandGive.java b/src/main/java/net/minecraft/server/CommandGive.java
index 1d22c45af..9537ab1d8 100644
index 1d22c45af8..9662a90156 100644
--- a/src/main/java/net/minecraft/server/CommandGive.java
+++ b/src/main/java/net/minecraft/server/CommandGive.java
@@ -35,6 +35,7 @@ public class CommandGive {
boolean flag = entityplayer.inventory.pickup(itemstack);
EntityItem entityitem;
+ if (net.pl3x.purpur.PurpurConfig.GiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
+ if (net.pl3x.purpur.PurpurConfig.giveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
if (flag && itemstack.isEmpty()) {
itemstack.setCount(1);
entityitem = entityplayer.drop(itemstack, false);
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index c06f7dc24..a8f6c5f57 100644
index c06f7dc24f..f4302410a1 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -188,6 +188,11 @@ public class PurpurConfig {
@@ -26,9 +28,9 @@ index c06f7dc24..a8f6c5f57 100644
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
}
+
+ public static boolean GiveCommandDrops = false;
+ private static void GiveCommandDrops() {
+ GiveCommandDrops = getBoolean("settings.disable-give-dropping", GiveCommandDrops);
+ public static boolean giveCommandDrops = false;
+ private static void giveCommandDrops() {
+ giveCommandDrops = getBoolean("settings.disable-give-dropping", giveCommandDrops);
+ }
public static boolean barrelSixRows = false;