mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
option to place end crystal on any block
This commit is contained in:
39
patches/server/0307-place-end-crystal-on-any-block.patch
Normal file
39
patches/server/0307-place-end-crystal-on-any-block.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
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 dc695c518beed770e787d61bcda7e1cd28bc43eb..528f836dfc220dc4b929c321dafc6a78b54d899b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
||||
@@ -26,7 +26,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();
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index ec6c29638935835d590823c5cc35141a7f4d32f2..078102e636803f38facc049952813ff2f8b63594 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -903,6 +903,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()))) {
|
||||
@@ -931,6 +932,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;
|
||||
Reference in New Issue
Block a user