Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit ff28727

Browse files
BillyGalbreathgranny
authored andcommitted
End Crystal Cramming
1 parent 5762f11 commit ff28727

3 files changed

Lines changed: 11 additions & 38 deletions

File tree

patches/server/0268-End-Crystal-Cramming.patch

Lines changed: 0 additions & 38 deletions
This file was deleted.

purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@
2525
@Override
2626
protected Entity.MovementEmission getMovementEmission() {
2727
return Entity.MovementEmission.NONE;
28+
@@ -74,6 +_,8 @@
29+
}
30+
}
31+
// Paper end - Fix invulnerable end crystals
32+
+ 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
33+
+
34+
}
35+
36+
@Override
2837
@@ -119,15 +_,17 @@
2938
}
3039
// CraftBukkit end

purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ private void dragonEggSettings() {
923923
public double basedEndCrystalExplosionPower = 6.0D;
924924
public boolean basedEndCrystalExplosionFire = false;
925925
public net.minecraft.world.level.Level.ExplosionInteraction basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
926+
public int endCrystalCramming = 0;
926927
private void endCrystalSettings() {
927928
if (PurpurConfig.version < 31) {
928929
if ("DESTROY".equals(getString("blocks.end-crystal.baseless.explosion-effect", baselessEndCrystalExplosionEffect.name()))) {
@@ -950,6 +951,7 @@ private void endCrystalSettings() {
950951
log(Level.SEVERE, "Unknown value for `blocks.end-crystal.base.explosion-effect`! Using default of `BLOCK`");
951952
basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
952953
}
954+
endCrystalCramming = getInt("blocks.end-crystal.cramming-amount", endCrystalCramming);
953955
}
954956

955957
public boolean farmlandBypassMobGriefing = false;

0 commit comments

Comments
 (0)