-
-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
option to place end crystal on any block
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
ad645dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End crystals can only be placed on Obsidian and nothing else