mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
place end crystal on any block
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/EndCrystalItem.java
|
||||
+++ b/net/minecraft/world/item/EndCrystalItem.java
|
||||
@@ -24,7 +_,7 @@
|
||||
Level level = context.getLevel();
|
||||
BlockPos clickedPos = context.getClickedPos();
|
||||
BlockState blockState = level.getBlockState(clickedPos);
|
||||
- if (!blockState.is(Blocks.OBSIDIAN) && !blockState.is(Blocks.BEDROCK)) {
|
||||
+ if (!level.purpurConfig.endCrystalPlaceAnywhere && !blockState.is(Blocks.OBSIDIAN) && !blockState.is(Blocks.BEDROCK)) { // Purpur - place end crystal on any block
|
||||
return InteractionResult.FAIL;
|
||||
} else {
|
||||
BlockPos blockPos = clickedPos.above(); final BlockPos aboveBlockPosition = blockPos; // Paper - OBFHELPER
|
||||
@@ -943,6 +943,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()))) {
|
||||
@@ -971,6 +972,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