mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Fill Iris loot in copper chests on the modded host
The modded storage set left out the copper chest variants, so loot was never filled in them and they were skipped by post-load updates.
Upstream: 56178b0e0
This commit is contained in:
1 parent
0d9ea26cc9
commit
0f0760e7f4
2 files changed
+31
-1
No files matched your search
+3
-1
@@ -72,7 +72,9 @@ public final class ModdedBlockResolution {
|
||||
"pink_shulker_box", "gray_shulker_box", "light_gray_shulker_box", "cyan_shulker_box",
|
||||
"purple_shulker_box", "blue_shulker_box", "brown_shulker_box", "green_shulker_box",
|
||||
"red_shulker_box", "black_shulker_box", "barrel", "dispenser", "dropper", "hopper", "furnace",
|
||||
"blast_furnace");
|
||||
"blast_furnace", "copper_chest", "exposed_copper_chest", "weathered_copper_chest",
|
||||
"oxidized_copper_chest", "waxed_copper_chest", "waxed_exposed_copper_chest",
|
||||
"waxed_weathered_copper_chest", "waxed_oxidized_copper_chest");
|
||||
private static final Set<Block> STORAGE_CHEST = storageChestSet();
|
||||
private static final Set<Block> DEEPSLATE = blockSet(
|
||||
"deepslate", "deepslate_bricks", "deepslate_brick_slab", "deepslate_brick_stairs",
|
||||
|
||||
+28
@@ -2,6 +2,7 @@ package art.arcane.iris.modded;
|
||||
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.server.Bootstrap;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
@@ -52,6 +53,33 @@ public class ModdedBlockResolutionContractTest {
|
||||
assertEquals(Blocks.OAK_LOG, state.handle().getBlock());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void copperChestVariantsReceiveIrisLootAndPostLoadUpdates() {
|
||||
for (String key : new String[]{"copper_chest", "exposed_copper_chest", "weathered_copper_chest",
|
||||
"oxidized_copper_chest", "waxed_copper_chest", "waxed_exposed_copper_chest",
|
||||
"waxed_weathered_copper_chest", "waxed_oxidized_copper_chest"}) {
|
||||
ModdedBlockState state = ModdedBlockResolution.getOrNull("minecraft:" + key);
|
||||
assertNotNull(key, state);
|
||||
assertTrue(key, state.isStorage());
|
||||
assertTrue(key, state.isStorageChest());
|
||||
assertTrue(key, state.isUpdatable());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void furnacesAreStorageButNotLootChests() {
|
||||
for (Block block : new Block[]{Blocks.FURNACE, Blocks.BLAST_FURNACE, Blocks.SMOKER}) {
|
||||
assertTrue(block.toString(), ModdedBlockResolution.isStorage(block.defaultBlockState()));
|
||||
assertFalse(block.toString(), ModdedBlockResolution.isStorageChest(block.defaultBlockState()));
|
||||
}
|
||||
for (String key : new String[]{"stone", "ender_chest", "copper_block"}) {
|
||||
ModdedBlockState state = ModdedBlockResolution.getOrNull("minecraft:" + key);
|
||||
assertNotNull(key, state);
|
||||
assertFalse(key, state.isStorage());
|
||||
assertFalse(key, state.isStorageChest());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cactusPlacementRequiresNativeCactusSupport() {
|
||||
assertTrue(ModdedBlockResolution.canPlaceOnto(Blocks.CACTUS, Blocks.CACTUS));
|
||||
|
||||
Reference in new issue
Block a user