mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
phantom size; slime/magmacube/phantom attack_damage
This commit is contained in:
@@ -2355,7 +2355,7 @@ index 9a6c67b614944f841813ec2892381c3342bc365c..e80176708db486190dd527e3ade5fc69
|
||||
this.wasOnGround = this.entity.isOnGround();
|
||||
this.teleportDelay = 0;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index a2abb8aa1a257ccd2b5dbddc037fffc6eb600758..27791d82b3343f14ff99efd4aed2193ea276b852 100644
|
||||
index a2abb8aa1a257ccd2b5dbddc037fffc6eb600758..8cdacd7ed9a26e6757eeff89545fde21ddb80fd2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -667,7 +667,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2398,7 +2398,7 @@ index a2abb8aa1a257ccd2b5dbddc037fffc6eb600758..27791d82b3343f14ff99efd4aed2193e
|
||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
- if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder
|
||||
+ if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0 && chunk.shouldDoLightning(this.random)) { // Spigot // Paper - disable thunder // Pufferfish - replace random with shouldDoLightning
|
||||
+ if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && /*this.random.nextInt(this.spigotConfig.thunderChance) == 0 &&*/ chunk.shouldDoLightning(this.random)) { // Spigot // Paper - disable thunder // Pufferfish - replace random with shouldDoLightning
|
||||
blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
@@ -3808,7 +3808,7 @@ index ed3518fe7c841d9e1a9c97626acaa3d765a6d76f..da00f75ccc9f8c2e2174d4450479202a
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 7567a8bf848c82b27383f084056cb43c41df6d0c..2b697f0d0b59b5af5aa59850d5e501cde9acf577 100644
|
||||
index 7567a8bf848c82b27383f084056cb43c41df6d0c..9e9cdabefce3767a2e482f7cc5eb69c635ea17a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -94,6 +94,18 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -3820,7 +3820,7 @@ index 7567a8bf848c82b27383f084056cb43c41df6d0c..2b697f0d0b59b5af5aa59850d5e501cd
|
||||
+ // shouldDoLightning compiles down to 29 bytes, which with the default of 35 byte inlining should guarantee an inline
|
||||
+ public final boolean shouldDoLightning(java.util.Random random) {
|
||||
+ if (this.lightningTick-- <= 0) {
|
||||
+ this.lightningTick = random.nextInt(100000) << 1;
|
||||
+ this.lightningTick = random.nextInt(this.level.spigotConfig.thunderChance) << 1;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
|
||||
Reference in New Issue
Block a user