This repository was archived by the owner on Apr 24, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/compasses/expandedstorage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import java .util .Locale ;
77
88public enum EsChestType implements StringRepresentable {
9- TOP (-1 ),
10- BOTTOM (-1 ),
119 FRONT (0 ),
12- BACK (2 ),
13- LEFT (1 ),
10+ BACK (1 ),
11+ LEFT (2 ),
1412 RIGHT (3 ),
13+ TOP (4 ),
14+ BOTTOM (5 ),
1515 SINGLE (-1 );
1616
1717 private final String name ;
Original file line number Diff line number Diff line change 1414import net .minecraft .resources .ResourceLocation ;
1515import net .minecraft .world .WorldlyContainer ;
1616import net .minecraft .world .item .ItemStack ;
17+ import net .minecraft .world .level .block .DoubleBlockCombiner ;
1718import net .minecraft .world .level .block .entity .BlockEntity ;
1819import net .minecraft .world .level .block .entity .BlockEntityType ;
1920import net .minecraft .world .level .block .state .BlockState ;
@@ -48,7 +49,19 @@ public WorldlyContainer getCachedDoubleInventory() {
4849 }
4950
5051 public void setCachedDoubleInventory (OldChestBlockEntity other ) {
51- this .cachedDoubleInventory = VariableSidedInventory .of (this .getInventory (), other .getInventory ());
52+ BlockState state = this .getBlockState ();
53+ if (!(state .getBlock () instanceof AbstractChestBlock )) {
54+ this .cachedDoubleInventory = VariableSidedInventory .of (this .getInventory (), other .getInventory ());
55+ return ;
56+ }
57+
58+ EsChestType type = state .getValue (AbstractChestBlock .CURSED_CHEST_TYPE );
59+
60+ if (AbstractChestBlock .getBlockType (type ) == DoubleBlockCombiner .BlockType .FIRST ) {
61+ this .cachedDoubleInventory = VariableSidedInventory .of (this .getInventory (), other .getInventory ());
62+ } else {
63+ this .cachedDoubleInventory = VariableSidedInventory .of (other .getInventory (), this .getInventory ());
64+ }
5265 }
5366
5467 @ Override
You can’t perform that action at this time.
0 commit comments