Skip to content

Commit c7c5284

Browse files
committed
place end crystal on any block
1 parent cffb22e commit c7c5284

3 files changed

Lines changed: 13 additions & 39 deletions

File tree

patches/server/0282-place-end-crystal-on-any-block.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/net/minecraft/world/item/EndCrystalItem.java
2+
+++ b/net/minecraft/world/item/EndCrystalItem.java
3+
@@ -24,7 +_,7 @@
4+
Level level = context.getLevel();
5+
BlockPos clickedPos = context.getClickedPos();
6+
BlockState blockState = level.getBlockState(clickedPos);
7+
- if (!blockState.is(Blocks.OBSIDIAN) && !blockState.is(Blocks.BEDROCK)) {
8+
+ if (!level.purpurConfig.endCrystalPlaceAnywhere && !blockState.is(Blocks.OBSIDIAN) && !blockState.is(Blocks.BEDROCK)) { // Purpur - place end crystal on any block
9+
return InteractionResult.FAIL;
10+
} else {
11+
BlockPos blockPos = clickedPos.above(); final BlockPos aboveBlockPosition = blockPos; // Paper - OBFHELPER

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ private void dragonEggSettings() {
943943
public boolean basedEndCrystalExplosionFire = false;
944944
public net.minecraft.world.level.Level.ExplosionInteraction basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
945945
public int endCrystalCramming = 0;
946+
public boolean endCrystalPlaceAnywhere = false;
946947
private void endCrystalSettings() {
947948
if (PurpurConfig.version < 31) {
948949
if ("DESTROY".equals(getString("blocks.end-crystal.baseless.explosion-effect", baselessEndCrystalExplosionEffect.name()))) {
@@ -971,6 +972,7 @@ private void endCrystalSettings() {
971972
basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
972973
}
973974
endCrystalCramming = getInt("blocks.end-crystal.cramming-amount", endCrystalCramming);
975+
endCrystalPlaceAnywhere = getBoolean("gameplay-mechanics.item.end-crystal.place-anywhere", endCrystalPlaceAnywhere);
974976
}
975977

976978
public boolean farmlandBypassMobGriefing = false;

0 commit comments

Comments
 (0)