mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
End Crystal Cramming
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 15 Dec 2022 11:42:15 -0600
|
||||
Subject: [PATCH] End Crystal Cramming
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
index 218263958a90dfd95e4ecb7218c9eeefb069e50d..0967d13f26ee5bbe968322659ee3087685d43292 100644
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
@@ -102,6 +102,7 @@ public class EndCrystal extends Entity {
|
||||
}
|
||||
}
|
||||
// Paper end - Fix invulnerable end crystals
|
||||
+ if (this.level().purpurConfig.endCrystalCramming > 0 && this.level().getEntitiesOfClass(EndCrystal.class, getBoundingBox()).size() > this.level().purpurConfig.endCrystalCramming) this.hurt(this.damageSources().cramming(), 6.0F); // Purpur
|
||||
}
|
||||
|
||||
// Purpur start - Phantoms attracted to crystals and crystals shoot phantoms
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 75d088219ab83ae9e6ca6b95f4551c917c2f79cd..1400039583896ffe6198949e5e627ef58c5abee9 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -924,6 +924,7 @@ public class PurpurWorldConfig {
|
||||
public double basedEndCrystalExplosionPower = 6.0D;
|
||||
public boolean basedEndCrystalExplosionFire = false;
|
||||
public net.minecraft.world.level.Level.ExplosionInteraction basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
+ public int endCrystalCramming = 0;
|
||||
private void endCrystalSettings() {
|
||||
if (PurpurConfig.version < 31) {
|
||||
if ("DESTROY".equals(getString("blocks.end-crystal.baseless.explosion-effect", baselessEndCrystalExplosionEffect.name()))) {
|
||||
@@ -951,6 +952,7 @@ public class PurpurWorldConfig {
|
||||
log(Level.SEVERE, "Unknown value for `blocks.end-crystal.base.explosion-effect`! Using default of `BLOCK`");
|
||||
basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
}
|
||||
+ endCrystalCramming = getInt("blocks.end-crystal.cramming-amount", endCrystalCramming);
|
||||
}
|
||||
|
||||
public boolean farmlandBypassMobGriefing = false;
|
||||
@@ -25,6 +25,15 @@
|
||||
@Override
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.NONE;
|
||||
@@ -74,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
// Paper end - Fix invulnerable end crystals
|
||||
+ if (this.level().purpurConfig.endCrystalCramming > 0 && this.level().getEntitiesOfClass(EndCrystal.class, getBoundingBox()).size() > this.level().purpurConfig.endCrystalCramming) this.hurt(this.damageSources().cramming(), 6.0F); // Purpur - End Crystal Cramming
|
||||
+
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -119,15 +_,17 @@
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -923,6 +923,7 @@ public class PurpurWorldConfig {
|
||||
public double basedEndCrystalExplosionPower = 6.0D;
|
||||
public boolean basedEndCrystalExplosionFire = false;
|
||||
public net.minecraft.world.level.Level.ExplosionInteraction basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
public int endCrystalCramming = 0;
|
||||
private void endCrystalSettings() {
|
||||
if (PurpurConfig.version < 31) {
|
||||
if ("DESTROY".equals(getString("blocks.end-crystal.baseless.explosion-effect", baselessEndCrystalExplosionEffect.name()))) {
|
||||
@@ -950,6 +951,7 @@ public class PurpurWorldConfig {
|
||||
log(Level.SEVERE, "Unknown value for `blocks.end-crystal.base.explosion-effect`! Using default of `BLOCK`");
|
||||
basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
||||
}
|
||||
endCrystalCramming = getInt("blocks.end-crystal.cramming-amount", endCrystalCramming);
|
||||
}
|
||||
|
||||
public boolean farmlandBypassMobGriefing = false;
|
||||
|
||||
Reference in New Issue
Block a user