mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Config for sculk shrieker can_summon state
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
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/net/minecraft/world/level/block/SculkShriekerBlock.java b/net/minecraft/world/level/block/SculkShriekerBlock.java
|
|
||||||
index 7990a6c225c27845ccada0df91cf5ed7e4315a88..db2b21d5842fafa48dbde25a461505d03aa9b955 100644
|
|
||||||
--- a/net/minecraft/world/level/block/SculkShriekerBlock.java
|
|
||||||
+++ b/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 71a631b2adcd9f67ae8831a002129b6f76c3a331..5c0e0613c8e25f77b8ca92af09ef9b535e85995d 100644
|
|
||||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
||||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
||||||
@@ -1032,6 +1032,11 @@ public class PurpurWorldConfig {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public boolean sculkShriekerCanSummonDefault = false;
|
|
||||||
+ private void sculkShriekerSettings() {
|
|
||||||
+ sculkShriekerCanSummonDefault = getBoolean("blocks.sculk_shrieker.can-summon-default", sculkShriekerCanSummonDefault);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
public boolean signAllowColors = false;
|
|
||||||
private void signSettings() {
|
|
||||||
signAllowColors = getBoolean("blocks.sign.allow-colors", signAllowColors);
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||||
|
+++ b/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||||
|
@@ -134,7 +_,7 @@
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||||
|
return this.defaultBlockState()
|
||||||
|
- .setValue(WATERLOGGED, Boolean.valueOf(context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER));
|
||||||
|
+ .setValue(WATERLOGGED, Boolean.valueOf(context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER)).setValue(SculkShriekerBlock.CAN_SUMMON, context.getLevel().purpurConfig.sculkShriekerCanSummonDefault); // Purpur - Config for sculk shrieker can_summon state
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@@ -1031,6 +1031,11 @@ public class PurpurWorldConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean sculkShriekerCanSummonDefault = false;
|
||||||
|
private void sculkShriekerSettings() {
|
||||||
|
sculkShriekerCanSummonDefault = getBoolean("blocks.sculk_shrieker.can-summon-default", sculkShriekerCanSummonDefault);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean signAllowColors = false;
|
public boolean signAllowColors = false;
|
||||||
private void signSettings() {
|
private void signSettings() {
|
||||||
signAllowColors = getBoolean("blocks.sign.allow-colors", signAllowColors);
|
signAllowColors = getBoolean("blocks.sign.allow-colors", signAllowColors);
|
||||||
|
|||||||
Reference in New Issue
Block a user