Config for sculk shrieker can_summon state

This commit is contained in:
Encode42
2025-01-12 15:16:52 -08:00
committed by granny
parent 1492410092
commit cbd49cce26
3 changed files with 16 additions and 35 deletions

View File

@@ -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

View File

@@ -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;
private void signSettings() {
signAllowColors = getBoolean("blocks.sign.allow-colors", signAllowColors);