mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
40 lines
2.5 KiB
Diff
40 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: granny <contact@granny.dev>
|
|
Date: Wed, 23 Aug 2023 01:39:14 -0700
|
|
Subject: [PATCH] place end crystal on any block
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
|
index 5f51e64cb0611a4ba6bdcdcacbcba1063a7f3a5c..8fb564f43e2f1194d2ad68d35c4df6b921d50cfc 100644
|
|
--- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
|
+++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
|
@@ -27,7 +27,7 @@ public class EndCrystalItem extends Item {
|
|
BlockPos blockposition = context.getClickedPos();
|
|
BlockState iblockdata = world.getBlockState(blockposition);
|
|
|
|
- if (!iblockdata.is(Blocks.OBSIDIAN) && !iblockdata.is(Blocks.BEDROCK)) {
|
|
+ if (!world.purpurConfig.endCrystalPlaceAnywhere && !iblockdata.is(Blocks.OBSIDIAN) && !iblockdata.is(Blocks.BEDROCK)) {
|
|
return InteractionResult.FAIL;
|
|
} else {
|
|
BlockPos blockposition1 = blockposition.above(); final BlockPos aboveBlockPosition = blockposition1; // Paper - OBFHELPER
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index d85f95b6ee7c44b3c25dea57d15c7dbb645c9cc8..26e1b0c813885634b4bd3b9913e8fe0b4e3187e0 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -973,6 +973,7 @@ public class PurpurWorldConfig {
|
|
public boolean basedEndCrystalExplosionFire = false;
|
|
public net.minecraft.world.level.Level.ExplosionInteraction basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
|
public int endCrystalCramming = 0;
|
|
+ public boolean endCrystalPlaceAnywhere = false;
|
|
private void endCrystalSettings() {
|
|
if (PurpurConfig.version < 31) {
|
|
if ("DESTROY".equals(getString("blocks.end-crystal.baseless.explosion-effect", baselessEndCrystalExplosionEffect.name()))) {
|
|
@@ -1001,6 +1002,7 @@ public class PurpurWorldConfig {
|
|
basedEndCrystalExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
|
|
}
|
|
endCrystalCramming = getInt("blocks.end-crystal.cramming-amount", endCrystalCramming);
|
|
+ endCrystalPlaceAnywhere = getBoolean("gameplay-mechanics.item.end-crystal.place-anywhere", endCrystalPlaceAnywhere);
|
|
}
|
|
|
|
public boolean farmlandBypassMobGriefing = false;
|