Skip to content

Commit 2ef8a38

Browse files
committed
Add config option to disable chest opening, Closes #167
1 parent 9c14724 commit 2ef8a38

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/org/cyclops/colossalchests/GeneralConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class GeneralConfig extends DummyConfig {
3737

3838
@ConfigurableProperty(category = "general", comment = "If the interface input overlay should always be rendered on chests.", isCommandable = true, configLocation = ModConfig.Type.CLIENT)
3939
public static boolean alwaysShowInterfaceOverlay = true;
40+
@ConfigurableProperty(category = "general", comment = "If the lid should open when accessing the chest GUI.", isCommandable = true, configLocation = ModConfig.Type.CLIENT)
41+
public static boolean visuallyOpen = true;
4042

4143
@ConfigurableProperty(category = "general", comment = "Always create full creative-mode chests when formed. Should not be used in survival worlds!", isCommandable = true, configLocation = ModConfig.Type.SERVER)
4244
public static boolean creativeChests = false;

src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,9 @@ public static void lidAnimateTick(Level level, BlockPos pos, BlockState blockSta
490490

491491
@Override
492492
public float getOpenNess(float value) {
493+
if (!GeneralConfig.visuallyOpen) {
494+
return 0;
495+
}
493496
return this.chestLidController.getOpenness(value);
494497
}
495498
}

0 commit comments

Comments
 (0)