mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Config for sculk shrieker can_summon state
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Encode42 <me@encode42.dev>
|
||||
Date: Mon, 4 Jul 2022 13:32:51 -0400
|
||||
Subject: [PATCH] Config for sculk shrieker can_summon state
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||
index e0998215841e500e5982a242e9f4e646402e1521..11038ba560439dab04c54c31a32d63bed2b4698a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||
@@ -130,7 +130,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
- return (BlockState) this.defaultBlockState().setValue(SculkShriekerBlock.WATERLOGGED, ctx.getLevel().getFluidState(ctx.getClickedPos()).getType() == Fluids.WATER);
|
||||
+ return (BlockState) this.defaultBlockState().setValue(SculkShriekerBlock.WATERLOGGED, ctx.getLevel().getFluidState(ctx.getClickedPos()).getType() == Fluids.WATER).setValue(SculkShriekerBlock.CAN_SUMMON, ctx.getLevel().purpurConfig.sculkShriekerCanSummonDefault); // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 6a5572714916937eff21c1b984a2a2f00c561cbe..1ffa1182482cd5581979de3ef20a0dc1178eabf4 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -962,6 +962,11 @@ public class PurpurWorldConfig {
|
||||
fixSandDuping = getBoolean("blocks.sand.fix-duping", fixSandDuping);
|
||||
}
|
||||
|
||||
+ public boolean sculkShriekerCanSummonDefault = false;
|
||||
+ private void sculkShriekerSettings() {
|
||||
+ sculkShriekerCanSummonDefault = getBoolean("blocks.sculk_shrieker.can-summon-default", sculkShriekerCanSummonDefault);
|
||||
+ }
|
||||
+
|
||||
public boolean shulkerBoxAllowOversizedStacks = false;
|
||||
private void shulkerBoxSettings() {
|
||||
shulkerBoxAllowOversizedStacks = getBoolean("blocks.shulker_box.allow-oversized-stacks", shulkerBoxAllowOversizedStacks);
|
||||
Reference in New Issue
Block a user