Update to 1.16.2

This commit is contained in:
William Blake Galbreath
2020-08-12 17:32:14 -05:00
parent 162651ff31
commit 6fecfcfebc
146 changed files with 4496 additions and 3624 deletions

View File

@@ -1,44 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 29 Nov 2019 22:37:44 -0600
Subject: [PATCH] Charged creeper naturally spawn
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 5e7f3af37..e8008e3c2 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -23,6 +23,17 @@ public class EntityCreeper extends EntityMonster {
super(entitytypes, world);
}
+ // Purpur start
+ @Override
+ public GroupDataEntity prepare(GeneratorAccess generatoraccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, GroupDataEntity groupdataentity, NBTTagCompound nbttagcompound) {
+ double chance = generatoraccess.getMinecraftWorld().purpurConfig.creeperChargedChance;
+ if (chance > 0D && random.nextDouble() <= chance) {
+ setPowered(true);
+ }
+ return super.prepare(generatoraccess, difficultydamagescaler, enummobspawn, groupdataentity, nbttagcompound);
+ }
+ // Purpur end
+
@Override
protected void initPathfinder() {
this.goalSelector.a(1, new PathfinderGoalFloat(this));
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index d0fd8f9cd..5004d6f77 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -106,6 +106,11 @@ public class PurpurWorldConfig {
turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
}
+ public double creeperChargedChance = 0.0D;
+ private void creeperSettings() {
+ creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
+ }
+
public float giantStepHeight = 2.0F;
public float giantJumpHeight = 1.0F;
public double giantMaxHealth = 100.0D;