End Crystal Cramming

This commit is contained in:
BillyGalbreath
2025-01-12 17:02:20 -08:00
committed by granny
parent 5762f11db9
commit ff2872726c
3 changed files with 11 additions and 38 deletions

View File

@@ -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

View File

@@ -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;