mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Pufferfish) (#1575)
Upstream has released updates that appear to apply and compile correctly Pufferfish Changes: pufferfish-gg/Pufferfish@c9f4e20 Final 1.20.4 Update pufferfish-gg/Pufferfish@1f3ad02 Final 1.20.4 update, for realzies pufferfish-gg/Pufferfish@b1ab664 Enable SIMD on java 21 pufferfish-gg/Pufferfish@0674c2b 1.21 compiles pufferfish-gg/Pufferfish@98ea973 Fix 1.21 version checkers pufferfish-gg/Pufferfish@68f859c Fix lambda/tick guard patch pufferfish-gg/Pufferfish@eaa18d5 Updated Upstream (Paper) pufferfish-gg/Pufferfish@1d72eea Updated Upstream (Paper) pufferfish-gg/Pufferfish@1d3c743 Update pufferfish version detector stuff pufferfish-gg/Pufferfish@5e30963 Fix crash bug pufferfish-gg/Pufferfish@12571eb Use mojmapped paperclip jar instead (CI only) pufferfish-gg/Pufferfish@4d16ae0 Drop a patch - moonrise includes it pufferfish-gg/Pufferfish@52c2d05 Revert "Drop a patch - moonrise includes it" pufferfish-gg/Pufferfish@bdb56f1 Fix entity interactions with fluids pufferfish-gg/Pufferfish@469e5c1 Updated Upstream (Paper) pufferfish-gg/Pufferfish@d75961f 1.21.1 Update (Updated Upstream (Paper))
This commit is contained in:
@@ -1,45 +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/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
index e702ba0adfe6b6ace68a9f94f6110fe0d4d0258b..84263f85412039811d9e56a292464158675b5418 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -258,6 +258,14 @@ public class Creeper extends Monster implements PowerableMob {
|
||||
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.creeperScale);
|
||||
}
|
||||
|
||||
+ public net.minecraft.world.entity.SpawnGroupData finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor world, net.minecraft.world.DifficultyInstance difficulty, net.minecraft.world.entity.MobSpawnType spawnReason, @Nullable net.minecraft.world.entity.SpawnGroupData entityData) {
|
||||
+ double chance = world.getLevel().purpurConfig.creeperChargedChance;
|
||||
+ if (chance > 0D && random.nextDouble() <= chance) {
|
||||
+ setPowered(true);
|
||||
+ }
|
||||
+ return super.finalizeSpawn(world, difficulty, spawnReason, entityData);
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
protected SoundEvent getHurtSound(DamageSource source) {
|
||||
return SoundEvents.CREEPER_HURT;
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 3b6089eaf8a9af932c7bcc9a37fc7c077eb79870..6722c1bd54c28844c853d477180692a85732e631 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -395,6 +395,7 @@ public class PurpurWorldConfig {
|
||||
public boolean creeperControllable = true;
|
||||
public double creeperMaxHealth = 20.0D;
|
||||
public double creeperScale = 1.0D;
|
||||
+ public double creeperChargedChance = 0.0D;
|
||||
private void creeperSettings() {
|
||||
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
|
||||
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
|
||||
@@ -406,6 +407,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
creeperMaxHealth = getDouble("mobs.creeper.attributes.max_health", creeperMaxHealth);
|
||||
creeperScale = Mth.clamp(getDouble("mobs.creeper.attributes.scale", creeperScale), 0.0625D, 16.0D);
|
||||
+ creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
|
||||
}
|
||||
|
||||
public boolean dolphinRidable = false;
|
||||
Reference in New Issue
Block a user