mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Configurable phantom size
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -158,7 +_,11 @@
|
||||
ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData
|
||||
) {
|
||||
this.anchorPoint = this.blockPosition().above(5);
|
||||
- this.setPhantomSize(0);
|
||||
+ // Purpur start - Configurable phantom size
|
||||
+ int min = level.getLevel().purpurConfig.phantomMinSize;
|
||||
+ int max = level.getLevel().purpurConfig.phantomMaxSize;
|
||||
+ this.setPhantomSize(min == max ? min : level.getRandom().nextInt(max + 1 - min) + min);
|
||||
+ // Purpur end - Configurable phantom size
|
||||
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user