diff --git a/.imgbotconfig b/.imgbotconfig index b2d90d965..4695974f6 100644 --- a/.imgbotconfig +++ b/.imgbotconfig @@ -1,3 +1,3 @@ "ignoredFiles": [ - "loader-common/src/main/resources/assets/colossalchests/textures/gui/colossal_chest.png" + "loader-common/src/main/resources/assets/colossalchests2/textures/gui/colossal_chest.png" ] diff --git a/README.md b/README.md index afe5de942..4dafc0e40 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![CurseForge](http://cf.way2muchnoise.eu/full_237875_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/colossal-chests) [![Discord](https://img.shields.io/discord/386052815128100865.svg?colorB=7289DA&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAABWAgMAAABnZYq0AAAACVBMVEUAAB38%2FPz%2F%2F%2F%2Bm8P%2F9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhBxwQJhxy2iqrAAABoElEQVRIx7WWzdGEIAyGgcMeKMESrMJ6rILZCiiBg4eYKr%2Fd1ZAfgXFm98sJfAyGNwno3G9sLucgYGpQ4OGVRxQTREMDZjF7ILSWjoiHo1n%2BE03Aw8p7CNY5IhkYd%2F%2F6MtO3f8BNhR1QWnarCH4tr6myl0cWgUVNcfMcXACP1hKrGMt8wcAyxide7Ymcgqale7hN6846uJCkQxw6GG7h2MH4Czz3cLqD1zHu0VOXMfZjHLoYvsdd0Q7ZvsOkafJ1P4QXxrWFd14wMc60h8JKCbyQvImzlFjyGoZTKzohwWR2UzSONHhYXBQOaKKsySsahwGGDnb%2FiYPJw22sCqzirSULYy1qtHhXGbtgrM0oagBV4XiTJok3GoLoDNH8ooTmBm7ZMsbpFzi2bgPGoXWXME6XT%2BRJ4GLddxJ4PpQy7tmfoU2HPN6cKg%2BledKHBKlF8oNSt5w5g5o8eXhu1IOlpl5kGerDxIVT%2BztzKepulD8utXqpChamkzzuo7xYGk%2FkpSYuviLXun5bzdRf0Krejzqyz7Z3p0I1v2d6HmA07dofmS48njAiuMgAAAAASUVORK5CYII%3D)](https://discord.gg/9yDxubB) -For when regular chests are too small +Chests that are quite colossal, and can be upgraded. All stable releases (including deobfuscated builds) can be found on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/colossal-chests/files). diff --git a/buildSrc/src/main/groovy/multiloader-loader-common.gradle b/buildSrc/src/main/groovy/multiloader-loader-common.gradle index 36d488f09..7cef9dda3 100644 --- a/buildSrc/src/main/groovy/multiloader-loader-common.gradle +++ b/buildSrc/src/main/groovy/multiloader-loader-common.gradle @@ -41,3 +41,12 @@ artifacts { commonResources sourceSets.main.resources.sourceDirectories.singleFile } + +// Unit tests in common run against vanilla Minecraft classes. +neoForge { + addModdingDependenciesTo(sourceSets.test) +} + +dependencies { + testImplementation "junit:junit:4.13.2" +} diff --git a/crowdin.yml b/crowdin.yml index b89797f9f..8f9d3ddbb 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -5,8 +5,8 @@ base_path: . preserve_hierarchy: true files: - - source: loader-common/src/main/resources/assets/colossalchests/lang/en_us.json - translation: loader-common/src/main/resources/assets/colossalchests/lang/%locale_with_underscore%.json + - source: loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json + translation: loader-common/src/main/resources/assets/colossalchests2/lang/%locale_with_underscore%.json excluded_target_languages: - en skip_untranslated_strings: true diff --git a/gradle.properties b/gradle.properties index 43d19a0d1..5ce6357ca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,18 @@ # Project -mod_version=1.9.1 -group=org.cyclops.colossalchests +mod_version=2.0.0 +group=org.cyclops.colossalchests2 java_version=21 # Common minecraft_version=1.21.1 -mod_name=ColossalChests +mod_name=ColossalChests2 mod_author=rubensworks (aka kroeser) -mod_id=colossalchests +mod_id=colossalchests2 license=MIT github_url=https://github.com/CyclopsMC/ColossalChests issue_tracker_url=https://github.com/CyclopsMC/ColossalChests/issues display_url=https://www.curseforge.com/minecraft/mc-mods/colossal-chests -description=For when regular chests are too small. +description=Chests that are quite colossal, and can be upgraded. fingerprint=bd0353b3e8a2810d60dd584e256e364bc3bedd44 neo_form_version=1.21-20240613.152323 parchment_version=2024.06.23 diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/GeneralConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/GeneralConfig.java deleted file mode 100644 index c1fad72cb..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/GeneralConfig.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.cyclops.colossalchests; - -import org.cyclops.cyclopscore.config.ConfigurablePropertyCommon; -import org.cyclops.cyclopscore.config.ModConfigLocation; -import org.cyclops.cyclopscore.config.extendedconfig.DummyConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * A config with general options for this mod. - * @author rubensworks - * - */ -public class GeneralConfig extends DummyConfigCommon { - - @ConfigurablePropertyCommon(category = "general", comment = "If items should be ejected from the chests if one of the structure blocks are removed.", configLocation = ModConfigLocation.SERVER) - public static boolean ejectItemsOnDestroy = false; - - @ConfigurablePropertyCommon(category = "general", comment = "If the higher tier metal variants (including diamond, obsidian and netherite) can be crafted.", configLocation = ModConfigLocation.SERVER) - public static boolean metalVariants = true; - - @ConfigurablePropertyCommon(category = "core", comment = "Maximum buffer byte size for adaptive inventory slots fragmentation.") - public static int maxPacketBufferSize = 20000; - - @ConfigurablePropertyCommon(category = "general", comment = "If the interface input overlay should always be rendered on chests.", isCommandable = true, configLocation = ModConfigLocation.CLIENT) - public static boolean alwaysShowInterfaceOverlay = true; - @ConfigurablePropertyCommon(category = "general", comment = "If the lid should open when accessing the chest GUI.", isCommandable = true, configLocation = ModConfigLocation.CLIENT) - public static boolean visuallyOpen = true; - - @ConfigurablePropertyCommon(category = "general", comment = "Always create full creative-mode chests when formed. Should not be used in survival worlds!", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static boolean creativeChests = false; - - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorWood = 1; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorCopper = 1.666; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorIron = 2; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorSilver = 2.666; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorGold = 3; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorDiamond = 4; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorObsidian = 4; - @ConfigurablePropertyCommon(category = "general", comment = "Multiplier for the number of inventory slots for this chest material.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static double chestInventoryMaterialFactorNetherite = 5; - - public GeneralConfig(M mod) { - super(mod, "general"); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/RegistryEntries.java b/loader-common/src/main/java/org/cyclops/colossalchests/RegistryEntries.java deleted file mode 100644 index b5101c197..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/RegistryEntries.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.cyclops.colossalchests; - -import net.minecraft.advancements.CriterionTrigger; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.MenuType; -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.colossalchests.advancement.criterion.ChestFormedTrigger; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.colossalchests.blockentity.BlockEntityInterface; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChest; -import org.cyclops.colossalchests.inventory.container.ContainerUncolossalChest; -import org.cyclops.cyclopscore.config.DeferredHolderCommon; - -/** - * Referenced registry entries. - * @author rubensworks - */ -public class RegistryEntries { - - public static final DeferredHolderCommon ITEM_CHEST = DeferredHolderCommon.create(Registries.ITEM, ResourceLocation.parse("minecraft:chest")); - public static final DeferredHolderCommon ITEM_UPGRADE_TOOL = DeferredHolderCommon.create(Registries.ITEM, ResourceLocation.parse("colossalchests:upgrade_tool")); - public static final DeferredHolderCommon ITEM_UPGRADE_TOOL_REVERSE = DeferredHolderCommon.create(Registries.ITEM, ResourceLocation.parse("colossalchests:upgrade_tool_reverse")); - - public static final DeferredHolderCommon BLOCK_UNCOLOSSAL_CHEST = DeferredHolderCommon.create(Registries.BLOCK, ResourceLocation.parse("colossalchests:uncolossal_chest")); - - public static final DeferredHolderCommon, BlockEntityType> BLOCK_ENTITY_COLOSSAL_CHEST = DeferredHolderCommon.create(Registries.BLOCK_ENTITY_TYPE, ResourceLocation.parse("colossalchests:colossal_chest")); - public static final DeferredHolderCommon, BlockEntityType> BLOCK_ENTITY_INTERFACE = DeferredHolderCommon.create(Registries.BLOCK_ENTITY_TYPE, ResourceLocation.parse("colossalchests:interface")); - public static final DeferredHolderCommon, BlockEntityType> BLOCK_ENTITY_UNCOLOSSAL_CHEST = DeferredHolderCommon.create(Registries.BLOCK_ENTITY_TYPE, ResourceLocation.parse("colossalchests:uncolossal_chest")); - - public static final DeferredHolderCommon, MenuType> CONTAINER_COLOSSAL_CHEST = DeferredHolderCommon.create(Registries.MENU, ResourceLocation.parse("colossalchests:colossal_chest")); - public static final DeferredHolderCommon, MenuType> CONTAINER_UNCOLOSSAL_CHEST = DeferredHolderCommon.create(Registries.MENU, ResourceLocation.parse("colossalchests:uncolossal_chest")); - - public static final DeferredHolderCommon, ChestFormedTrigger> TRIGGER_CHEST_FORMED = DeferredHolderCommon.create(Registries.TRIGGER_TYPE, ResourceLocation.parse("colossalchests:chest_formed")); - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/advancement/criterion/ChestFormedTrigger.java b/loader-common/src/main/java/org/cyclops/colossalchests/advancement/criterion/ChestFormedTrigger.java deleted file mode 100644 index ec6911740..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/advancement/criterion/ChestFormedTrigger.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.cyclops.colossalchests.advancement.criterion; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.advancements.critereon.ContextAwarePredicate; -import net.minecraft.advancements.critereon.EntityPredicate; -import net.minecraft.advancements.critereon.SimpleCriterionTrigger; -import net.minecraft.server.level.ServerPlayer; -import org.apache.commons.lang3.tuple.Pair; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.cyclopscore.advancement.criterion.ICriterionInstanceTestable; - -import java.util.Optional; - -/** - * Triggers when a colossal chest is formed. - * @author rubensworks - */ -public class ChestFormedTrigger extends SimpleCriterionTrigger { - - public static final Codec CODEC = RecordCodecBuilder.create( - p_311401_ -> p_311401_.group( - EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(ChestFormedTrigger.Instance::player), - ChestMaterial.CODEC.optionalFieldOf("material").forGetter(ChestFormedTrigger.Instance::material), - Codec.INT.optionalFieldOf("minimumSize").forGetter(ChestFormedTrigger.Instance::minimumSize) - ) - .apply(p_311401_, ChestFormedTrigger.Instance::new) - ); - - public void test(ServerPlayer player, ChestMaterial material, int size) { - this.trigger(player, (instance) -> instance.test(player, Pair.of(material, size))); - } - - @Override - public Codec codec() { - return CODEC; - } - - public static record Instance( - Optional player, - Optional material, - Optional minimumSize - ) implements SimpleCriterionTrigger.SimpleInstance, ICriterionInstanceTestable> { - @Override - public boolean test(ServerPlayer player, Pair data) { - return this.material.map(mat -> mat == data.getLeft()).orElse(true) - && this.minimumSize.map(size -> size <= data.getRight()).orElse(true); - } - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/advancement/criterion/ChestFormedTriggerConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/advancement/criterion/ChestFormedTriggerConfig.java deleted file mode 100644 index bdf4b21e3..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/advancement/criterion/ChestFormedTriggerConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.advancement.criterion; - -import org.cyclops.cyclopscore.config.extendedconfig.CriterionTriggerConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * @author rubensworks - * - */ -public class ChestFormedTriggerConfig extends CriterionTriggerConfigCommon { - - /** - * Make a new instance. - */ - public ChestFormedTriggerConfig(M mod) { - super( - mod, - "chest_formed", - new ChestFormedTrigger() - ); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestMaterial.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestMaterial.java deleted file mode 100644 index 73fd07c5f..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestMaterial.java +++ /dev/null @@ -1,166 +0,0 @@ -package org.cyclops.colossalchests.block; - -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.gson.JsonSyntaxException; -import com.mojang.serialization.Codec; -import net.minecraft.core.Vec3i; -import net.minecraft.world.inventory.MenuType; -import org.cyclops.colossalchests.GeneralConfig; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChest; -import org.cyclops.cyclopscore.block.multi.AllowedBlock; -import org.cyclops.cyclopscore.block.multi.CubeDetector; -import org.cyclops.cyclopscore.block.multi.CubeSizeValidator; -import org.cyclops.cyclopscore.block.multi.ExactBlockCountValidator; -import org.cyclops.cyclopscore.block.multi.HollowCubeDetector; -import org.cyclops.cyclopscore.block.multi.MaximumSizeValidator; -import org.cyclops.cyclopscore.block.multi.MinimumSizeValidator; - -import java.util.List; -import java.util.Map; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -/** - * @author rubensworks - */ -public class ChestMaterial { - - public static final Codec CODEC = Codec.stringResolver( - ChestMaterial::getName, - ChestMaterial::valueOfSafe - ); - - public static final List VALUES = Lists.newArrayList(); - public static final Map KEYED_VALUES = Maps.newHashMap(); - - public static final ChestMaterial WOOD = new ChestMaterial("wood", () -> GeneralConfig.chestInventoryMaterialFactorWood); - public static final ChestMaterial COPPER = new ChestMaterial("copper", () -> GeneralConfig.chestInventoryMaterialFactorCopper); - public static final ChestMaterial IRON = new ChestMaterial("iron", () -> GeneralConfig.chestInventoryMaterialFactorIron); - public static final ChestMaterial SILVER = new ChestMaterial("silver", () -> GeneralConfig.chestInventoryMaterialFactorSilver); - public static final ChestMaterial GOLD = new ChestMaterial("gold", () -> GeneralConfig.chestInventoryMaterialFactorGold); - public static final ChestMaterial DIAMOND = new ChestMaterial("diamond", () -> GeneralConfig.chestInventoryMaterialFactorDiamond); - public static final ChestMaterial OBSIDIAN = new ChestMaterial("obsidian", () -> GeneralConfig.chestInventoryMaterialFactorObsidian); - public static final ChestMaterial NETHERITE = new ChestMaterial("netherite", () -> GeneralConfig.chestInventoryMaterialFactorNetherite); - - private final String name; - private final Supplier inventoryMultiplier; - private final int index; - - private ColossalChest blockCore; - private Interface blockInterface; - private ChestWall blockWall; - private CubeDetector chestDetector = null; - private MenuType container; - - public ChestMaterial(String name, Supplier inventoryMultiplier) { - this.name = name; - this.inventoryMultiplier = inventoryMultiplier; - this.index = ChestMaterial.VALUES.size(); - ChestMaterial.VALUES.add(this); - ChestMaterial.KEYED_VALUES.put(getName(), this); - } - - public static ChestMaterial valueOf(String materialString) { - return KEYED_VALUES.get(materialString.toLowerCase()); - } - - public static ChestMaterial valueOfSafe(String materialString) { - ChestMaterial ret = valueOf(materialString); - if (ret == null) { - throw new JsonSyntaxException("Could not find a colossal chest material by name " + materialString - + ". Allowed values: " - + ChestMaterial.VALUES.stream().map(ChestMaterial::getName).collect(Collectors.toList())); - } - return ret; - } - - public String getName() { - return name; - } - - public double getInventoryMultiplier() { - return this.inventoryMultiplier.get(); - } - - public String getUnlocalizedName() { - return "material." + Reference.MOD_ID + "." + getName(); - } - - public boolean isExplosionResistant() { - return this == OBSIDIAN || this == NETHERITE; - } - - public int ordinal() { - return this.index; - } - - public ColossalChest getBlockCore() { - return blockCore; - } - - public void setBlockCore(ColossalChest blockCore) { - if (this.blockCore != null) { - throw new IllegalStateException("Tried registering multiple core blocks for " + this.getName()); - } - this.blockCore = blockCore; - } - - public Interface getBlockInterface() { - return blockInterface; - } - - public void setBlockInterface(Interface blockInterface) { - if (this.blockInterface != null) { - throw new IllegalStateException("Tried registering multiple core blocks for " + this.getName()); - } - this.blockInterface = blockInterface; - } - - public ChestWall getBlockWall() { - return blockWall; - } - - public void setBlockWall(ChestWall blockWall) { - if (this.blockWall != null) { - throw new IllegalStateException("Tried registering multiple core blocks for " + this.getName()); - } - this.blockWall = blockWall; - } - - public void setContainer(MenuType container) { - if (this.container != null) { - throw new IllegalStateException("Tried registering multiple containers for " + this.getName()); - } - this.container = container; - } - - public MenuType getContainer() { - return container; - } - - public CubeDetector getChestDetector() { - if (chestDetector == null) { - chestDetector = new HollowCubeDetector( - new AllowedBlock[]{ - new AllowedBlock(getBlockWall()), - new AllowedBlock(getBlockCore()).addCountValidator(new ExactBlockCountValidator(1)), - new AllowedBlock(getBlockInterface()) - }, - Lists.newArrayList(getBlockCore(), getBlockWall(), getBlockInterface()) - ) - .addSizeValidator(new MinimumSizeValidator(new Vec3i(1, 1, 1))) - .addSizeValidator(new CubeSizeValidator()) - .addSizeValidator(new MaximumSizeValidator(BlockEntityColossalChest.getMaxSize()) { - @Override - public Vec3i getMaximumSize() { - return BlockEntityColossalChest.getMaxSize(); - } - }); - } - return chestDetector; - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestWall.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestWall.java deleted file mode 100644 index 88210af64..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestWall.java +++ /dev/null @@ -1,147 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Vec3i; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.LevelWriter; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.RenderShape; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.phys.BlockHitResult; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.cyclopscore.block.multi.CubeDetector; -import org.cyclops.cyclopscore.helper.IModHelpers; - -/** - * Part of the Colossal Blood Chest multiblock structure. - * @author rubensworks - * - */ -public class ChestWall extends Block implements CubeDetector.IDetectionListener, IBlockChestMaterial { - - public static final BooleanProperty ENABLED = ColossalChest.ENABLED; - - protected final ChestMaterial material; - - public ChestWall(Block.Properties properties, ChestMaterial material) { - super(properties); - this.material = material; - - material.setBlockWall(this); - - this.registerDefaultState(this.stateDefinition.any() - .setValue(ENABLED, false)); - } - - @Override - public String getDescriptionId() { - String baseKey = super.getDescriptionId(); - return baseKey.substring(0, baseKey.lastIndexOf('_')); - } - - @Override - public ChestMaterial getMaterial() { - return material; - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(ENABLED); - } - - @Override - public RenderShape getRenderShape(BlockState blockState) { - return blockState.getValue(ENABLED) ? RenderShape.ENTITYBLOCK_ANIMATED : super.getRenderShape(blockState); - } - - @Override - public boolean propagatesSkylightDown(BlockState blockState, BlockGetter blockReader, BlockPos blockPos) { - return blockState.getValue(ENABLED); - } - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { - super.setPlacedBy(world, pos, state, placer, stack); - ColossalChest.triggerDetector(this.material, world, pos, true, placer instanceof Player ? (Player) placer : null, canBlockSnapshotsBeCaptured()); - } - - @Override - public void onPlace(BlockState blockStateNew, Level world, BlockPos blockPos, BlockState blockStateOld, boolean isMoving) { - super.onPlace(blockStateNew, world, blockPos, blockStateOld, isMoving); - if(!isCaptureBlockSnapshots(world) && blockStateNew.getBlock() != blockStateOld.getBlock() && !blockStateNew.getValue(ENABLED)) { - ColossalChest.triggerDetector(this.material, world, blockPos, true, null, true); - } - } - - protected boolean canBlockSnapshotsBeCaptured() { - return false; - } - - protected boolean isCaptureBlockSnapshots(Level level) { - return false; - } - - @Override - public void destroy(LevelAccessor world, BlockPos blockPos, BlockState blockState) { - if(blockState.getValue(ENABLED)) ColossalChest.triggerDetector(material, world, blockPos, false, null, true); - super.destroy(world, blockPos, blockState); - } - - @Override - public void onDetect(LevelReader world, BlockPos location, Vec3i size, boolean valid, BlockPos originCorner) { - Block block = world.getBlockState(location).getBlock(); - if(block == this) { - boolean change = !world.getBlockState(location).getValue(ENABLED); - ((LevelWriter) world).setBlock(location, world.getBlockState(location).setValue(ENABLED, valid), IModHelpers.get().getMinecraftHelpers().getBlockNotifyClient()); - if(change) { - BlockEntityColossalChest.detectStructure(world, location, size, valid, originCorner); - } - } - } - - @Override - public InteractionResult useWithoutItem(BlockState blockState, Level world, BlockPos blockPos, Player player, BlockHitResult rayTraceResult) { - if(blockState.getValue(ENABLED)) { - BlockPos tileLocation = ColossalChest.getCoreLocation(material, world, blockPos); - if(tileLocation != null) { - return world.getBlockState(tileLocation).useWithoutItem(world, player, rayTraceResult.withPosition(tileLocation)); - } - } else { - ColossalChest.addPlayerChatError(material, world, blockPos, player); - return InteractionResult.FAIL; - } - return super.useWithoutItem(blockState, world, blockPos, player, rayTraceResult); - } - - @Override - public boolean canSurvive(BlockState blockState, LevelReader world, BlockPos blockPos) { - return super.canSurvive(blockState, world, blockPos) && ColossalChest.canPlace(world, blockPos); - } - - public void onBlockExplodedCommon(BlockState state, Level world, BlockPos pos, Explosion explosion) { - if(world.getBlockState(pos).getValue(ENABLED)) ColossalChest.triggerDetector(material, world, pos, false, null, true); - // IForgeBlock.super.onBlockExploded(state, world, pos, explosion); - world.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); - wasExploded(world, pos, explosion); - } - - @Override - public float getExplosionResistance() { - if (this.material.isExplosionResistant()) { - return 10000F; - } - return 0; - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestWallConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestWallConfig.java deleted file mode 100644 index 3a7a03ddc..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/ChestWallConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; -import org.jetbrains.annotations.Nullable; - -import java.util.function.BiFunction; -import java.util.function.Function; - -/** - * @author rubensworks - */ -public class ChestWallConfig extends BlockConfigCommon { - public ChestWallConfig(M mod, String namedId, Function, ? extends Block> blockConstructor, @Nullable BiFunction, Block, ? extends Item> itemConstructor) { - super(mod, namedId, blockConstructor, itemConstructor); - } - - public Block.Properties getProperties() { - return Block.Properties.of() - .strength(5.0F) - .sound(SoundType.WOOD) - .requiresCorrectToolForDrops() - .noOcclusion() - .isValidSpawn((state, level, pos, entityType) -> false); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/ColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/ColossalChest.java deleted file mode 100644 index bb3ae56a8..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/ColossalChest.java +++ /dev/null @@ -1,336 +0,0 @@ -package org.cyclops.colossalchests.block; - -import com.mojang.serialization.MapCodec; -import net.minecraft.ChatFormatting; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; -import net.minecraft.core.component.DataComponents; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.HoverEvent; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TextColor; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.util.RandomSource; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.MenuProvider; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.LevelWriter; -import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.RenderShape; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.entity.BlockEntityTicker; -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.Vec3; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.cyclopscore.block.BlockWithEntityGuiCommon; -import org.cyclops.cyclopscore.block.multi.CubeDetector; -import org.cyclops.cyclopscore.block.multi.DetectionResult; -import org.cyclops.cyclopscore.blockentity.CyclopsBlockEntityCommon; -import org.cyclops.cyclopscore.datastructure.Wrapper; -import org.cyclops.cyclopscore.helper.IBlockEntityHelpers; -import org.cyclops.cyclopscore.helper.IModHelpers; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; -import org.spongepowered.asm.mixin.Interface; - -import javax.annotation.Nullable; -import java.util.function.BiFunction; - -/** - * A machine that can infuse stuff with blood. - * - * @author rubensworks - */ -public class ColossalChest extends BlockWithEntityGuiCommon implements CubeDetector.IDetectionListener, IBlockChestMaterial { - - public static final BooleanProperty ENABLED = BlockStateProperties.ENABLED; - - protected final ChestMaterial material; - public final MapCodec codec; - - public ColossalChest(BlockBehaviour.Properties properties, ChestMaterial material, BiFunction blockEntitySupplier) { - super(properties, blockEntitySupplier); - this.material = material; - this.codec = BlockBehaviour.simpleCodec((props) -> new ColossalChest(props, material, blockEntitySupplier)); - - material.setBlockCore(this); - - this.registerDefaultState(this.stateDefinition.any() - .setValue(ENABLED, false)); - } - - @org.jetbrains.annotations.Nullable - @Override - public MenuProvider getMenuProvider(BlockState p_49234_, Level p_49235_, BlockPos p_49236_) { - return super.getMenuProvider(p_49234_, p_49235_, p_49236_); - } - - @Override - @Nullable - public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { - return level.isClientSide ? BaseEntityBlock.createTickerHelper(blockEntityType, RegistryEntries.BLOCK_ENTITY_COLOSSAL_CHEST.value(), BlockEntityColossalChest::lidAnimateTick) : null; - } - - @Override - public void tick(BlockState blockState, ServerLevel level, BlockPos pos, RandomSource random) { - if (level.getBlockEntity(pos) instanceof BlockEntityColossalChest uncolossalChest) { - uncolossalChest.recheckOpen(); - } - } - - @Override - public String getDescriptionId() { - String baseKey = super.getDescriptionId(); - return baseKey.substring(0, baseKey.lastIndexOf('_')); - } - - @Override - public ChestMaterial getMaterial() { - return material; - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(ENABLED); - } - - public static boolean canPlace(LevelReader world, BlockPos pos) { - for(Direction side : Direction.values()) { - BlockState blockState = world.getBlockState(pos.relative(side)); - Block block = blockState.getBlock(); - if((block instanceof ColossalChest || block instanceof ChestWall || block instanceof Interface) - && blockState.getProperties().contains(ENABLED) && blockState.getValue(ENABLED)) { - return false; - } - } - return true; - } - - @Override - protected MapCodec codec() { - return codec; - } - - @Override - public RenderShape getRenderShape(BlockState blockState) { - return blockState.getValue(ENABLED) ? RenderShape.ENTITYBLOCK_ANIMATED : super.getRenderShape(blockState); - } - - @Override - public boolean propagatesSkylightDown(BlockState blockState, BlockGetter blockReader, BlockPos blockPos) { - return blockState.getValue(ENABLED); - } - - public static DetectionResult triggerDetector(ChestMaterial material, LevelAccessor world, BlockPos blockPos, boolean valid, @Nullable Player player, boolean changeState) { - DetectionResult detectionResult = material.getChestDetector().detect(world, blockPos, valid ? null : blockPos, new MaterialValidationAction(), changeState); - if (player instanceof ServerPlayer && detectionResult.getError() == null) { - BlockState blockState = world.getBlockState(blockPos); - if (blockState.getValue(ENABLED)) { - BlockEntityColossalChest tile = IModHelpers.get().getBlockEntityHelpers().get(world, blockPos, BlockEntityColossalChest.class).orElse(null); - if (tile == null) { - BlockPos corePos = getCoreLocation(material, world, blockPos); - tile = IModHelpers.get().getBlockEntityHelpers().get(world, corePos, BlockEntityColossalChest.class).orElse(null); - } - - RegistryEntries.TRIGGER_CHEST_FORMED.value().test((ServerPlayer) player, material, tile.getSizeSingular()); - } - } - return detectionResult; - } - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { - super.setPlacedBy(world, pos, state, placer, stack); - if (stack.has(DataComponents.CUSTOM_NAME)) { - BlockEntityColossalChest tile = IModHelpers.get().getBlockEntityHelpers().get(world, pos, BlockEntityColossalChest.class).orElse(null); - if (tile != null) { - tile.setCustomName(stack.getHoverName()); - tile.setSize(Vec3i.ZERO); - } - } - triggerDetector(this.material, world, pos, true, placer instanceof Player ? (Player) placer : null, true); - } - - @Override - public void onPlace(BlockState blockStateNew, Level world, BlockPos blockPos, BlockState blockStateOld, boolean isMoving) { - super.onPlace(blockStateNew, world, blockPos, blockStateOld, isMoving); - if(!isCaptureBlockSnapshots(world) && blockStateNew.getBlock() != blockStateOld.getBlock() && !blockStateNew.getValue(ENABLED)) { - triggerDetector(this.material, world, blockPos, true, null, true); - } - } - - protected boolean isCaptureBlockSnapshots(Level level) { - return false; - } - - @Override - public void onDetect(LevelReader world, BlockPos location, Vec3i size, boolean valid, BlockPos originCorner) { - Block block = world.getBlockState(location).getBlock(); - if(block == this) { - ((LevelWriter) world).setBlock(location, world.getBlockState(location).setValue(ENABLED, valid), IModHelpers.get().getMinecraftHelpers().getBlockNotifyClient()); - BlockEntityColossalChest tile = IModHelpers.get().getBlockEntityHelpers().get(world, location, BlockEntityColossalChest.class).orElse(null); - if(tile != null) { - tile.setMaterial(this.material); - tile.setSize(valid ? size : Vec3i.ZERO); - tile.setCenter(new Vec3( - originCorner.getX() + ((double) size.getX()) / 2, - originCorner.getY() + ((double) size.getY()) / 2, - originCorner.getZ() + ((double) size.getZ()) / 2 - )); - tile.addInterface(location); - } - } - } - - /** - * Get the core block location. - * @param material The chest material. - * @param world The world. - * @param blockPos The start position to search from. - * @return The found location. - */ - public static @Nullable BlockPos getCoreLocation(ChestMaterial material, LevelReader world, BlockPos blockPos) { - final Wrapper tileLocationWrapper = new Wrapper(); - material.getChestDetector().detect(world, blockPos, null, (location, blockState) -> { - if (blockState.getBlock() instanceof ColossalChest) { - tileLocationWrapper.set(location); - } - return null; - }, false); - return tileLocationWrapper.get(); - } - - /** - * Show the structure forming error in the given player chat window. - * @param material The chest material. - * @param world The world. - * @param blockPos The start position. - * @param player The player. - */ - public static void addPlayerChatError(ChestMaterial material, Level world, BlockPos blockPos, Player player) { - if(!world.isClientSide && player.getItemInHand(player.getUsedItemHand()).isEmpty()) { - DetectionResult result = material.getChestDetector().detect(world, blockPos, null, new MaterialValidationAction(), false); - if (result != null && result.getError() != null) { - addPlayerChatError(player, result.getError()); - } else { - player.sendSystemMessage(Component.translatable("multiblock.colossalchests.error.unexpected")); - } - } - } - - public static void addPlayerChatError(Player player, Component error) { - MutableComponent chat = Component.literal(""); - Component prefix = Component.literal("[") - .append(Component.translatable("multiblock.colossalchests.error.prefix")) - .append(Component.literal("]: ")) - .setStyle(Style.EMPTY. - withColor(TextColor.fromLegacyFormat(ChatFormatting.GRAY)). - withHoverEvent(new HoverEvent( - HoverEvent.Action.SHOW_TEXT, - Component.translatable("multiblock.colossalchests.error.prefix.info") - )) - ); - chat.append(prefix); - chat.append(error); - player.sendSystemMessage(chat); - } - - @Override - public void writeExtraGuiData(FriendlyByteBuf packetBuffer, Level world, Player player, BlockPos blockPos, BlockHitResult rayTraceResult) { - IBlockEntityHelpers blockEntityHelpers = IModHelpers.get().getBlockEntityHelpers(); - blockEntityHelpers.setUnsafeBlockEntityGetter(true); // Required for Fabric as this is called on the network thread - blockEntityHelpers.get(world, blockPos, BlockEntityColossalChest.class).ifPresent(tile -> packetBuffer.writeInt(tile.getInventory().getContainerSize())); - blockEntityHelpers.setUnsafeBlockEntityGetter(false); // Required for Fabric as this is called on the network thread - } - - @Override - public InteractionResult useWithoutItem(BlockState blockState, Level world, BlockPos blockPos, Player player, BlockHitResult rayTraceResult) { - if(!(blockState.getValue(ENABLED))) { - ColossalChest.addPlayerChatError(material, world, blockPos, player); - return InteractionResult.FAIL; - } - return super.useWithoutItem(blockState, world, blockPos, player, rayTraceResult); - } - - @Override - public void destroy(LevelAccessor world, BlockPos blockPos, BlockState blockState) { - if(blockState.getValue(ENABLED)) ColossalChest.triggerDetector(material, world, blockPos, false, null, true); - super.destroy(world, blockPos, blockState); - } - - @Override - public boolean canSurvive(BlockState blockState, LevelReader world, BlockPos blockPos) { - return super.canSurvive(blockState, world, blockPos) && ColossalChest.canPlace(world, blockPos); - } - - @Override - public void onRemove(BlockState oldState, Level world, BlockPos blockPos, BlockState newState, boolean isMoving) { - if (oldState.getBlock().getClass() != newState.getBlock().getClass()) { - IModHelpers.get().getBlockEntityHelpers().get(world, blockPos, BlockEntityColossalChest.class) - .ifPresent(tile -> { - // Last inventory overrides inventory when the chest is in a disabled state. - SimpleInventoryCommon lastInventory = tile.getLastValidInventory(); - IModHelpers.get().getInventoryHelpers().dropItems(world, lastInventory != null ? lastInventory : tile.getInventory(), blockPos); - }); - super.onRemove(oldState, world, blockPos, newState, isMoving); - } - } - - public void onBlockExplodedCommon(BlockState state, Level world, BlockPos pos, Explosion explosion) { - if(world.getBlockState(pos).getValue(ENABLED)) ColossalChest.triggerDetector(material, world, pos, false, null, true); - // IForgeBlock.super.onBlockExploded(state, world, pos, explosion); - world.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); - wasExploded(world, pos, explosion); - } - - @Override - public float getExplosionResistance() { - if (this.material.isExplosionResistant()) { - return 10000F; - } - return 0; - } - - private static class MaterialValidationAction implements CubeDetector.IValidationAction { - private final Wrapper requiredMaterial; - - public MaterialValidationAction() { - this.requiredMaterial = new Wrapper(null); - } - - @Override - public Component onValidate(BlockPos blockPos, BlockState blockState) { - ChestMaterial material = null; - if (blockState.getBlock() instanceof IBlockChestMaterial) { - material = ((IBlockChestMaterial) blockState.getBlock()).getMaterial(); - } - if(requiredMaterial.get() == null) { - requiredMaterial.set(material); - return null; - } - return requiredMaterial.get() == material ? null : Component.translatable( - "multiblock.colossalchests.error.material", Component.translatable(material.getUnlocalizedName()), - IModHelpers.get().getLocationHelpers().toCompactString(blockPos), - Component.translatable(requiredMaterial.get().getUnlocalizedName())); - } - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfig.java deleted file mode 100644 index c7c144ea9..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfig.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import org.cyclops.cyclopscore.config.ConfigurablePropertyCommon; -import org.cyclops.cyclopscore.config.ModConfigLocation; -import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; -import org.jetbrains.annotations.Nullable; - -import java.util.function.BiFunction; -import java.util.function.Function; - -/** - * @author rubensworks - */ -public class ColossalChestConfig extends BlockConfigCommon { - - @ConfigurablePropertyCommon(namedId="colossal_chest", category = "machine", comment = "The maximum size a colossal chest can have.", isCommandable = true, configLocation = ModConfigLocation.SERVER) - public static int maxSize = 20; - - @ConfigurablePropertyCommon(namedId="colossal_chest", category = "general", comment = "If the chest should visually open when someone uses it.", isCommandable = true, configLocation = ModConfigLocation.CLIENT) - public static boolean chestAnimation = true; - - public ColossalChestConfig(M mod, String namedId, Function, ? extends Block> blockConstructor, @Nullable BiFunction, Block, ? extends Item> itemConstructor) { - super(mod, namedId, blockConstructor, itemConstructor); - } - - public Block.Properties getProperties() { - return Block.Properties.of() - .strength(5.0F) - .sound(SoundType.WOOD) - .requiresCorrectToolForDrops() - .noOcclusion() - .isValidSpawn((state, level, pos, entityType) -> false); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/IBlockChestMaterial.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/IBlockChestMaterial.java deleted file mode 100644 index 23da88628..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/IBlockChestMaterial.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.cyclops.colossalchests.block; - -/** - * @author rubensworks - */ -public interface IBlockChestMaterial { - - public ChestMaterial getMaterial(); - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/Interface.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/Interface.java deleted file mode 100644 index 0f7c56c51..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/Interface.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.cyclops.colossalchests.block; - -import com.mojang.serialization.MapCodec; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Vec3i; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.LevelWriter; -import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.RenderShape; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.phys.BlockHitResult; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.colossalchests.blockentity.BlockEntityInterface; -import org.cyclops.cyclopscore.block.BlockWithEntityCommon; -import org.cyclops.cyclopscore.block.multi.CubeDetector; -import org.cyclops.cyclopscore.blockentity.CyclopsBlockEntityCommon; -import org.cyclops.cyclopscore.helper.IModHelpers; - -import java.util.function.BiFunction; - -/** - * Part of the Colossal Blood Chest multiblock structure. - * @author rubensworks - * - */ -public class Interface extends BlockWithEntityCommon implements CubeDetector.IDetectionListener, IBlockChestMaterial { - - public static final BooleanProperty ENABLED = ColossalChest.ENABLED; - - protected final ChestMaterial material; - public final MapCodec codec; - - public Interface(Block.Properties properties, ChestMaterial material, BiFunction blockEntitySupplier) { - super(properties, blockEntitySupplier); - this.material = material; - this.codec = BlockBehaviour.simpleCodec((props) -> new Interface(props, material, blockEntitySupplier)); - - material.setBlockInterface(this); - - this.registerDefaultState(this.stateDefinition.any() - .setValue(ENABLED, false)); - } - - @Override - public String getDescriptionId() { - String baseKey = super.getDescriptionId(); - return baseKey.substring(0, baseKey.lastIndexOf('_')); - } - - @Override - public ChestMaterial getMaterial() { - return material; - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(ENABLED); - } - - @Override - protected MapCodec codec() { - return codec; - } - - @Override - public RenderShape getRenderShape(BlockState blockState) { - return blockState.getValue(ENABLED) ? RenderShape.ENTITYBLOCK_ANIMATED : super.getRenderShape(blockState); - } - - @Override - public boolean propagatesSkylightDown(BlockState blockState, BlockGetter blockReader, BlockPos blockPos) { - return blockState.getValue(ENABLED); - } - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { - super.setPlacedBy(world, pos, state, placer, stack); - ColossalChest.triggerDetector(this.material, world, pos, true, placer instanceof Player ? (Player) placer : null, canBlockSnapshotsBeCaptured()); - } - - @Override - public void onPlace(BlockState blockStateNew, Level world, BlockPos blockPos, BlockState blockStateOld, boolean isMoving) { - super.onPlace(blockStateNew, world, blockPos, blockStateOld, isMoving); - if(!isCaptureBlockSnapshots(world) && blockStateNew.getBlock() != blockStateOld.getBlock() && !blockStateNew.getValue(ENABLED)) { - ColossalChest.triggerDetector(this.material, world, blockPos, true, null, true); - } - } - - protected boolean canBlockSnapshotsBeCaptured() { - return false; - } - - protected boolean isCaptureBlockSnapshots(Level level) { - return false; - } - - @Override - public void destroy(LevelAccessor world, BlockPos blockPos, BlockState blockState) { - if(blockState.getValue(ENABLED)) ColossalChest.triggerDetector(material, world, blockPos, false, null, true); - super.destroy(world, blockPos, blockState); - } - - @Override - public void onDetect(LevelReader world, BlockPos location, Vec3i size, boolean valid, BlockPos originCorner) { - Block block = world.getBlockState(location).getBlock(); - if(block == this) { - boolean change = !(Boolean) world.getBlockState(location).getValue(ENABLED); - ((LevelWriter) world).setBlock(location, world.getBlockState(location).setValue(ENABLED, valid), IModHelpers.get().getMinecraftHelpers().getBlockNotifyClient()); - if(change) { - BlockPos tileLocation = ColossalChest.getCoreLocation(material, world, location); - BlockEntityInterface tile = IModHelpers.get().getBlockEntityHelpers().get(world, location, BlockEntityInterface.class).orElse(null); - if(tile != null && tileLocation != null) { - tile.setCorePosition(tileLocation); - BlockEntityColossalChest core = IModHelpers.get().getBlockEntityHelpers().get(world, tileLocation, BlockEntityColossalChest.class).orElse(null); - if (core != null) { - core.addInterface(location); - } - } - } - } - } - - public void onBlockExplodedCommon(BlockState state, Level world, BlockPos pos, Explosion explosion) { - if(world.getBlockState(pos).getValue(ENABLED)) ColossalChest.triggerDetector(material, world, pos, false, null, true); - // IForgeBlock.super.onBlockExploded(state, world, pos, explosion); - world.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); - wasExploded(world, pos, explosion); - } - - @Override - public float getExplosionResistance() { - if (this.material.isExplosionResistant()) { - return 10000F; - } - return 0; - } - - @Override - public InteractionResult useWithoutItem(BlockState blockState, Level world, BlockPos blockPos, Player player, BlockHitResult rayTraceResult) { - if(blockState.getValue(ENABLED)) { - BlockPos tileLocation = ColossalChest.getCoreLocation(material, world, blockPos); - if(tileLocation != null) { - return world.getBlockState(tileLocation).useWithoutItem(world, player, rayTraceResult.withPosition(tileLocation)); - } - } else { - ColossalChest.addPlayerChatError(material, world, blockPos, player); - return InteractionResult.FAIL; - } - return super.useWithoutItem(blockState, world, blockPos, player, rayTraceResult); - } - - @Override - public boolean canSurvive(BlockState blockState, LevelReader world, BlockPos blockPos) { - return super.canSurvive(blockState, world, blockPos) && ColossalChest.canPlace(world, blockPos); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/InterfaceConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/InterfaceConfig.java deleted file mode 100644 index a5fd01b04..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/InterfaceConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; -import org.jetbrains.annotations.Nullable; - -import java.util.function.BiFunction; -import java.util.function.Function; - -/** - * @author rubensworks - */ -public class InterfaceConfig extends BlockConfigCommon { - public InterfaceConfig(M mod, String namedId, Function, ? extends Block> blockConstructor, @Nullable BiFunction, Block, ? extends Item> itemConstructor) { - super(mod, namedId, blockConstructor, itemConstructor); - } - - public Block.Properties getProperties() { - return Block.Properties.of() - .strength(5.0F) - .sound(SoundType.WOOD) - .requiresCorrectToolForDrops() - .noOcclusion() - .isValidSpawn((state, level, pos, entityType) -> false); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/UncolossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/UncolossalChest.java deleted file mode 100644 index 4ae11c0a9..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/UncolossalChest.java +++ /dev/null @@ -1,185 +0,0 @@ -package org.cyclops.colossalchests.block; - -import com.mojang.serialization.MapCodec; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.core.component.DataComponents; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.util.RandomSource; -import net.minecraft.world.Containers; -import net.minecraft.world.MenuProvider; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.level.block.BaseEntityBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.HorizontalDirectionalBlock; -import net.minecraft.world.level.block.Mirror; -import net.minecraft.world.level.block.RenderShape; -import net.minecraft.world.level.block.Rotation; -import net.minecraft.world.level.block.SimpleWaterloggedBlock; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.entity.BlockEntityTicker; -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.level.block.state.properties.DirectionProperty; -import net.minecraft.world.level.material.FluidState; -import net.minecraft.world.level.material.Fluids; -import net.minecraft.world.level.pathfinder.PathComputationType; -import net.minecraft.world.phys.shapes.CollisionContext; -import net.minecraft.world.phys.shapes.VoxelShape; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; -import org.cyclops.cyclopscore.block.BlockWithEntityGuiCommon; -import org.cyclops.cyclopscore.blockentity.CyclopsBlockEntityCommon; -import org.cyclops.cyclopscore.helper.IModHelpers; - -import javax.annotation.Nullable; - -import java.util.function.BiFunction; - -/** - * A small chest. - * - * @author rubensworks - */ -public class UncolossalChest extends BlockWithEntityGuiCommon implements SimpleWaterloggedBlock { - - public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; - public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; - private final VoxelShape SHAPE = Block.box(5.0D, 0.0D, 5.0D, 11.0D, 6, 11.0D); - - public final MapCodec codec; - - public UncolossalChest(Block.Properties properties) { - this(properties, BlockEntityUncolossalChest::new); - } - - public UncolossalChest(Block.Properties properties, BiFunction blockEntitySupplier) { - super(properties, blockEntitySupplier); - this.codec = BlockBehaviour.simpleCodec((props) -> new UncolossalChest(props, blockEntitySupplier)); - - this.registerDefaultState(this.stateDefinition.any() - .setValue(FACING, Direction.NORTH) - .setValue(WATERLOGGED, false)); - } - - @Override - protected MapCodec codec() { - return codec; - } - - @Override - @Nullable - public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { - return level.isClientSide ? BaseEntityBlock.createTickerHelper(blockEntityType, RegistryEntries.BLOCK_ENTITY_UNCOLOSSAL_CHEST.value(), BlockEntityUncolossalChest::lidAnimateTick) : null; - } - - @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(FACING).add(WATERLOGGED); - } - - public BlockState updateShape(BlockState blockState, Direction facing, BlockState facingState, LevelAccessor world, BlockPos currentPos, BlockPos facingPos) { - if (blockState.getValue(WATERLOGGED)) { - world.scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); - } - - return super.updateShape(blockState, facing, facingState, world, currentPos, facingPos); - } - - @Nullable - @Override - public BlockState getStateForPlacement(BlockPlaceContext blockItemUseContext) { - Direction facing = blockItemUseContext.getHorizontalDirection().getOpposite(); - return super.getStateForPlacement(blockItemUseContext) - .setValue(FACING, facing); - } - - @Override - public VoxelShape getShape(BlockState blockState, BlockGetter world, BlockPos pos, CollisionContext context) { - return SHAPE; - } - - @Override - public RenderShape getRenderShape(BlockState state) { - return RenderShape.ENTITYBLOCK_ANIMATED; - } - - @Override - public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { - super.setPlacedBy(world, pos, state, placer, stack); - if (stack.has(DataComponents.CUSTOM_NAME)) { - BlockEntityUncolossalChest tile = IModHelpers.get().getBlockEntityHelpers().get(world, pos, BlockEntityUncolossalChest.class).orElse(null); - if (tile != null) { - tile.setCustomName(stack.getHoverName()); - } - } - } - - @Override - public void tick(BlockState blockState, ServerLevel level, BlockPos pos, RandomSource random) { - if (level.getBlockEntity(pos) instanceof BlockEntityUncolossalChest uncolossalChest) { - uncolossalChest.recheckOpen(); - } - } - - @Override - public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockStateNew, boolean p_60519_) { - if (!blockState.is(blockStateNew.getBlock())) { - IModHelpers.get().getBlockEntityHelpers().get(level, blockPos, BlockEntityUncolossalChest.class) - .ifPresent(blockEntity -> { - Containers.dropContents(level, blockPos, blockEntity.getInventory()); - level.updateNeighbourForOutputSignal(blockPos, this); - }); - super.onRemove(blockState, level, blockPos, blockStateNew, p_60519_); - } - } - - @Override - public FluidState getFluidState(BlockState blockState) { - return blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState); - } - - @Override - public boolean hasAnalogOutputSignal(BlockState blockState) { - return true; - } - - @Override - public int getAnalogOutputSignal(BlockState blockState, Level world, BlockPos pos) { - return IModHelpers.get().getBlockEntityHelpers().get(world, pos, BlockEntityUncolossalChest.class) - .map(tile -> AbstractContainerMenu.getRedstoneSignalFromContainer(tile.getInventory())) - .orElse(0); - } - - @Override - public BlockState rotate(BlockState blockState, Rotation rotation) { - return blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))); - } - - @Override - public BlockState mirror(BlockState blockState, Mirror mirror) { - return blockState.rotate(mirror.getRotation(blockState.getValue(FACING))); - } - - @Override - protected boolean isPathfindable(BlockState p_60475_, PathComputationType p_60478_) { - return false; - } - - @Nullable - @Override - public MenuProvider getMenuProvider(BlockState p_220052_1_, Level p_220052_2_, BlockPos p_220052_3_) { - return super.getMenuProvider(p_220052_1_, p_220052_2_, p_220052_3_); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfig.java deleted file mode 100644 index 917529a4f..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; -import org.jetbrains.annotations.Nullable; - -import java.util.function.BiFunction; -import java.util.function.Function; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public abstract class UncolossalChestConfig extends BlockConfigCommon { - - public UncolossalChestConfig(M mod, String namedId, Function, ? extends Block> blockConstructor, @Nullable BiFunction, Block, ? extends Item> itemConstructor) { - super(mod, namedId, blockConstructor, itemConstructor); - } - - public Block.Properties getProperties() { - return Block.Properties.of() - .strength(5.0F) - .requiresCorrectToolForDrops() - .sound(SoundType.WOOD); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChest.java deleted file mode 100644 index b8d610765..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChest.java +++ /dev/null @@ -1,466 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.Vec3i; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.Tag; -import net.minecraft.network.chat.Component; -import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; -import net.minecraft.sounds.SoundEvent; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.sounds.SoundSource; -import net.minecraft.world.Container; -import net.minecraft.world.MenuProvider; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.ChestLidController; -import net.minecraft.world.level.block.entity.ContainerOpenersCounter; -import net.minecraft.world.level.block.entity.LidBlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.Vec3; -import org.cyclops.colossalchests.GeneralConfig; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.block.ColossalChestConfig; -import org.cyclops.colossalchests.inventory.InventoryColossalChest; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChest; -import org.cyclops.cyclopscore.blockentity.CyclopsBlockEntityCommon; -import org.cyclops.cyclopscore.datastructure.EnumFacingMap; -import org.cyclops.cyclopscore.helper.DirectionHelpers; -import org.cyclops.cyclopscore.helper.IModHelpers; -import org.cyclops.cyclopscore.inventory.INBTInventory; -import org.cyclops.cyclopscore.inventory.LargeInventoryCommon; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; -import org.cyclops.cyclopscore.persist.nbt.NBTPersist; - -import javax.annotation.Nullable; -import java.util.Collections; -import java.util.List; -import java.util.Random; - -/** - * A machine that can infuse things with blood. - * @author rubensworks - * - */ -public class BlockEntityColossalChest extends CyclopsBlockEntityCommon implements MenuProvider, LidBlockEntity { - - private final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() { - protected void onOpen(Level level, BlockPos pos, BlockState blockState) { - BlockEntityColossalChest.playSound(level, pos, blockState, SoundEvents.CHEST_OPEN, getSizeSingular()); - } - - protected void onClose(Level level, BlockPos pos, BlockState blockState) { - BlockEntityColossalChest.playSound(level, pos, blockState, SoundEvents.CHEST_CLOSE, getSizeSingular()); - } - - protected void openerCountChanged(Level level, BlockPos pos, BlockState blockState, int p_155364_, int p_155365_) { - BlockEntityColossalChest.this.signalOpenCount(level, pos, blockState, p_155364_, p_155365_); - } - - protected boolean isOwnContainer(Player player) { - if (!(player.containerMenu instanceof ContainerColossalChest)) { - return false; - } else { - Container container = ((ContainerColossalChest)player.containerMenu).getContainerInventory(); - return container == BlockEntityColossalChest.this.getInventory(); - } - } - }; - private final ChestLidController chestLidController = new ChestLidController(); - - private SimpleInventoryCommon lastValidInventory = null; - protected SimpleInventoryCommon inventory = null; - - @NBTPersist - private Vec3i size = IModHelpers.get().getLocationHelpers().copyLocation(Vec3i.ZERO); - @NBTPersist - private Vec3 renderOffset = new Vec3(0, 0, 0); - private Component customName = null; - @NBTPersist - private int materialId = 0; - @NBTPersist - private int rotation = 0; - @NBTPersist(useDefaultValue = false) - private List interfaceLocations = Lists.newArrayList(); - - private boolean recreateNullInventory = true; - - private EnumFacingMap facingSlots = EnumFacingMap.newMap(); - - public BlockEntityColossalChest(BlockPos blockPos, BlockState blockState) { - super(RegistryEntries.BLOCK_ENTITY_COLOSSAL_CHEST.value(), blockPos, blockState); - } - - /** - * @return the size - */ - public Vec3i getSize() { - return size; - } - - /** - * Set the size. - * This will also handle the change in inventory size. - * @param size the size to set - */ - public void setSize(Vec3i size) { - this.size = size; - facingSlots.clear(); - if(isStructureComplete()) { - setInventory(constructInventory()); - - // Move all items from the last valid inventory into the new one - // If the new inventory would be smaller than the old one, the remaining - // items will be ejected into the world for slot index larger than the new size. - if(this.lastValidInventory != null) { - int slot = 0; - while(slot < Math.min(this.lastValidInventory.getContainerSize(), this.inventory.getContainerSize())) { - ItemStack contents = this.lastValidInventory.getItem(slot); - if (!contents.isEmpty()) { - this.inventory.setItem(slot, contents); - this.lastValidInventory.setItem(slot, ItemStack.EMPTY); - } - slot++; - } - if(slot < this.lastValidInventory.getContainerSize()) { - IModHelpers.get().getInventoryHelpers().dropItems(getLevel(), this.lastValidInventory, getBlockPos()); - } - this.lastValidInventory = null; - } - } else { - interfaceLocations.clear(); - if(this.inventory != null) { - if(GeneralConfig.ejectItemsOnDestroy) { - IModHelpers.get().getInventoryHelpers().dropItems(getLevel(), this.inventory, getBlockPos()); - this.lastValidInventory = null; - } else { - this.lastValidInventory = this.inventory; - } - } - setInventory(createInventoryLarge(0, 0)); - } - - // Send an immediate update - onDirty(); - IModHelpers.get().getBlockHelpers().markForUpdate(getLevel(), getBlockPos()); - } - - public void setMaterial(ChestMaterial material) { - this.materialId = material.ordinal(); - } - - public ChestMaterial getMaterial() { - return ChestMaterial.VALUES.get(this.materialId); - } - - public SimpleInventoryCommon getLastValidInventory() { - return lastValidInventory; - } - - public void setLastValidInventory(SimpleInventoryCommon lastValidInventory) { - this.lastValidInventory = lastValidInventory; - } - - public int getSizeSingular() { - return getSize().getX() + 1; - } - - protected boolean isClientSide() { - return getLevel() != null && getLevel().isClientSide; - } - - /** - * Create an inventory that can hold this chest's contents. - * Loaders can override this to change how such inventories are identified. - * @param size The amount of slots. - * @param stackLimit The stack limit for each slot. - * @return The inventory. - */ - protected InventoryColossalChest createInventory(int size, int stackLimit) { - return new InventoryColossalChest(this, size, stackLimit); - } - - /** - * Create an inventory that is never exposed to other blocks, such as the client-side copy. - * Loaders can override this to change how such inventories are identified. - * @param size The amount of slots. - * @param stackLimit The stack limit for each slot. - * @return The inventory. - */ - protected LargeInventoryCommon createInventoryLarge(int size, int stackLimit) { - return new LargeInventoryCommon(size, stackLimit); - } - - protected LargeInventoryCommon constructInventory() { - if (!isClientSide() && GeneralConfig.creativeChests) { - return constructInventoryDebug(); - } - LargeInventoryCommon inv = !isClientSide() ? createInventory(calculateInventorySize(), 64) - : createInventoryLarge(calculateInventorySize(), 64); - inv.addDirtyMarkListener(this); - - return inv; - } - - protected LargeInventoryCommon constructInventoryDebug() { - LargeInventoryCommon inv = !isClientSide() ? createInventory(calculateInventorySize(), 64) - : createInventoryLarge(calculateInventorySize(), 64); - Random random = new Random(); - for (int i = 0; i < inv.getContainerSize(); i++) { - inv.setItem(i, new ItemStack(Iterables.get(BuiltInRegistries.ITEM, - random.nextInt(BuiltInRegistries.ITEM.size())))); - } - return inv; - } - - @Override - public CompoundTag getUpdateTag(HolderLookup.Provider provider) { - // Don't send the inventory to the client. - // The client will receive the data once the gui is opened. - SimpleInventoryCommon oldInventory = this.inventory; - SimpleInventoryCommon oldLastInventory = this.lastValidInventory; - this.inventory = null; - this.lastValidInventory = null; - this.recreateNullInventory = false; - CompoundTag tag = super.getUpdateTag(provider); - this.inventory = oldInventory; - this.lastValidInventory = oldLastInventory; - this.recreateNullInventory = true; - return tag; - } - - @Override - public void read(CompoundTag tag, HolderLookup.Provider provider) { - SimpleInventoryCommon oldInventory = this.inventory; - SimpleInventoryCommon oldLastInventory = this.lastValidInventory; - - if (getLevel() != null && getLevel().isClientSide) { - // Don't read the inventory on the client. - // The client will receive the data once the gui is opened. - this.inventory = null; - this.lastValidInventory = null; - this.recreateNullInventory = false; - } - super.read(tag, provider); - if (getLevel() != null && getLevel().isClientSide) { - this.inventory = oldInventory; - this.lastValidInventory = oldLastInventory; - this.recreateNullInventory = true; - } else { - getInventory().read(provider, tag.getCompound("inventory")); - if (tag.contains("lastValidInventory", Tag.TAG_COMPOUND)) { - this.lastValidInventory = createInventoryLarge(tag.getInt("lastValidInventorySize"), this.inventory.getMaxStackSize()); - this.lastValidInventory.read(provider, tag.getCompound("lastValidInventory")); - } - } - - if (tag.contains("CustomName", Tag.TAG_STRING)) { - this.customName = Component.Serializer.fromJson(tag.getString("CustomName"), provider); - } - } - - @Override - public void saveAdditional(CompoundTag tag, HolderLookup.Provider provider) { - super.saveAdditional(tag, provider); - if (this.customName != null) { - tag.putString("CustomName", Component.Serializer.toJson(this.customName, provider)); - } - if (this.inventory != null) { - CompoundTag subTag = new CompoundTag(); - this.inventory.write(provider, subTag); - tag.put("inventory", subTag); - } - if (this.lastValidInventory != null) { - CompoundTag subTag = new CompoundTag(); - this.lastValidInventory.write(provider, subTag); - tag.put("lastValidInventory", subTag); - tag.putInt("lastValidInventorySize", this.lastValidInventory.getContainerSize()); - } - } - - @Override - public ClientboundBlockEntityDataPacket getUpdatePacket() { - return ClientboundBlockEntityDataPacket.create(this, (blockEntity, provider) -> getUpdateTag(provider)); - } - - protected int calculateInventorySize() { - int size = getSizeSingular(); - if (size == 1) { - return 0; - } - return (int) Math.ceil((Math.pow(size, 3) * 27) * getMaterial().getInventoryMultiplier() / 9) * 9; - } - - public void setInventory(SimpleInventoryCommon inventory) { - this.inventory = inventory; - } - - protected void ensureInventoryInitialized() { - if (getLevel() != null && getLevel().isClientSide && (inventory == null || inventory.getContainerSize() != calculateInventorySize())) { - setInventory(constructInventory()); - } - } - - public INBTInventory getInventory() { - if(lastValidInventory != null) { - return createInventory(0, 0); - } - ensureInventoryInitialized(); - if(inventory == null && this.recreateNullInventory) { - setInventory(constructInventory()); - } - return inventory; - } - - @Override - public boolean canInteractWith(Player entityPlayer) { - return getSizeSingular() > 1 && super.canInteractWith(entityPlayer); - } - - public void setCenter(Vec3 center) { - Direction rotation; - double dx = Math.abs(center.x - getBlockPos().getX()); - double dz = Math.abs(center.z - getBlockPos().getZ()); - boolean equal = (center.x - getBlockPos().getX()) == (center.z - getBlockPos().getZ()); - if(dx > dz || (!equal && getSizeSingular() == 2)) { - rotation = DirectionHelpers.getEnumFacingFromXSign((int) Math.round(center.x - getBlockPos().getX())); - } else { - rotation = DirectionHelpers.getEnumFacingFromZSing((int) Math.round(center.z - getBlockPos().getZ())); - } - this.setRotation(rotation); - this.renderOffset = new Vec3(getBlockPos().getX() - center.x, getBlockPos().getY() - center.y, getBlockPos().getZ() - center.z); - } - - public void setRotation(Direction rotation) { - this.rotation = rotation.ordinal(); - } - - @Override - public Direction getRotation() { - return Direction.from3DDataValue(this.rotation); - } - - public Vec3 getRenderOffset() { - return this.renderOffset; - } - - public void setRenderOffset(Vec3 renderOffset) { - this.renderOffset = renderOffset; - } - - /** - * Callback for when a structure has been detected for a spirit furnace block. - * @param world The world. - * @param location The location of one block of the structure. - * @param size The size of the structure. - * @param valid If the structure is being validated(/created), otherwise invalidated. - * @param originCorner The origin corner - */ - public static void detectStructure(LevelReader world, BlockPos location, Vec3i size, boolean valid, BlockPos originCorner) { - - } - - /** - * @return If the structure is valid. - */ - public boolean isStructureComplete() { - return !getSize().equals(Vec3i.ZERO); - } - - public static Vec3i getMaxSize() { - int size = ColossalChestConfig.maxSize - 1; - return new Vec3i(size, size, size); - } - - public boolean hasCustomName() { - return customName != null; - } - - public void setCustomName(Component name) { - this.customName = name; - } - - public void addInterface(Vec3i blockPos) { - interfaceLocations.add(blockPos); - } - - public List getInterfaceLocations() { - return Collections.unmodifiableList(interfaceLocations); - } - - @Override - public Component getDisplayName() { - return hasCustomName() ? customName : Component.translatable("general.colossalchests.colossalchest", - Component.translatable(getMaterial().getUnlocalizedName()), getSizeSingular()); - } - - @Nullable - @Override - public AbstractContainerMenu createMenu(int id, Inventory playerInventory, Player playerEntity) { - return new ContainerColossalChest(id, playerInventory, this.getInventory()); - } - - static void playSound(Level level, BlockPos pos, BlockState blockState, SoundEvent soundEvent, int size) { - float increaseAngle = 0.15F / Math.min(5, size); - level.playSound((Player)null, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, soundEvent, SoundSource.BLOCKS, - (float) (0.5F + (0.5F * Math.log(size))), - level.random.nextFloat() * 0.1F + 0.45F + increaseAngle); - } - - @Override - public boolean triggerEvent(int eventType, int value) { - if (eventType == 1) { - this.chestLidController.shouldBeOpen(value > 0); - return true; - } else { - return super.triggerEvent(eventType, value); - } - } - - public void startOpen(Player player) { - if (!this.remove && !player.isSpectator()) { - this.openersCounter.incrementOpeners(player, this.getLevel(), this.getBlockPos(), this.getBlockState()); - } - - } - - public void stopOpen(Player player) { - if (!this.remove && !player.isSpectator()) { - this.openersCounter.decrementOpeners(player, this.getLevel(), this.getBlockPos(), this.getBlockState()); - } - } - - public void recheckOpen() { - if (!this.remove) { - this.openersCounter.recheckOpeners(this.getLevel(), this.getBlockPos(), this.getBlockState()); - } - } - - protected void signalOpenCount(Level level, BlockPos pos, BlockState blockState, int p_155336_, int value) { - Block block = blockState.getBlock(); - level.blockEvent(pos, block, 1, value); - } - - public static void lidAnimateTick(Level level, BlockPos pos, BlockState blockState, BlockEntityColossalChest blockEntity) { - blockEntity.chestLidController.tickLid(); - } - - @Override - public float getOpenNess(float value) { - if (!GeneralConfig.visuallyOpen) { - return 0; - } - return this.chestLidController.getOpenness(value); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfig.java deleted file mode 100644 index 68610e16a..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfig.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.client.render.blockentity.RenderTileEntityColossalChest; -import org.cyclops.cyclopscore.config.extendedconfig.BlockEntityConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; - -import java.util.stream.Collectors; - -/** - * Config for the {@link BlockEntityColossalChest}. - * @author rubensworks - * - */ -public class BlockEntityColossalChestConfig extends BlockEntityConfigCommon { - - public BlockEntityColossalChestConfig(M mod) { - super( - mod, - "colossal_chest", - (eConfig) -> new BlockEntityType<>(((BlockEntityColossalChestConfig) eConfig).getBlockEntitySupplier(), - ChestMaterial.VALUES.stream() - .map(ChestMaterial::getBlockCore) - .collect(Collectors.toSet()), null) - ); - } - - protected BlockEntityType.BlockEntitySupplier getBlockEntitySupplier() { - return BlockEntityColossalChest::new; - } - - protected BlockEntityRendererProvider getBlockEntityRendererProvider() { - return RenderTileEntityColossalChest::new; - } - - @Override - public void onForgeRegistered() { - super.onForgeRegistered(); - if (getMod().getModHelpers().getMinecraftHelpers().isClientSide()) { - getMod().getProxy().registerRenderer(getInstance(), getBlockEntityRendererProvider()); - } - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterface.java b/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterface.java deleted file mode 100644 index a186969cb..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterface.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Vec3i; -import net.minecraft.world.level.block.state.BlockState; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.cyclopscore.blockentity.CyclopsBlockEntityCommon; -import org.cyclops.cyclopscore.helper.IModHelpers; -import org.cyclops.cyclopscore.persist.nbt.NBTPersist; - -import java.lang.ref.WeakReference; - -/** - * A machine that can infuse things with blood. - * @author rubensworks - * - */ -public class BlockEntityInterface extends CyclopsBlockEntityCommon { - - @NBTPersist - private Vec3i corePosition = null; - private WeakReference coreReference = new WeakReference(null); - - public BlockEntityInterface(BlockPos blockPos, BlockState blockState) { - super(RegistryEntries.BLOCK_ENTITY_INTERFACE.value(), blockPos, blockState); - } - - public Vec3i getCorePosition() { - return corePosition; - } - - public void setCorePosition(Vec3i corePosition) { - this.corePosition = corePosition; - coreReference = new WeakReference(null); - } - - public BlockEntityColossalChest getCore() { - if(corePosition == null) { - return null; - } - if (coreReference.get() == null) { - coreReference = new WeakReference<>( - IModHelpers.get().getBlockEntityHelpers().get(getLevel(), new BlockPos(corePosition), BlockEntityColossalChest.class).orElse(null)); - } - return coreReference.get(); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfig.java deleted file mode 100644 index 0ab1b2771..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfig.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.cyclopscore.config.extendedconfig.BlockEntityConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; - -import java.util.stream.Collectors; - -/** - * Config for the {@link BlockEntityInterface}. - * @author rubensworks - * - */ -public class BlockEntityInterfaceConfig extends BlockEntityConfigCommon { - - public BlockEntityInterfaceConfig(M mod, BlockEntityType.BlockEntitySupplier blockEntitySupplier) { - super( - mod, - "interface", - (eConfig) -> new BlockEntityType<>(blockEntitySupplier, - ChestMaterial.VALUES.stream() - .map(ChestMaterial::getBlockInterface) - .collect(Collectors.toSet()), null) - ); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChest.java deleted file mode 100644 index b8485d61b..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChest.java +++ /dev/null @@ -1,187 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.core.HolderLookup; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.Tag; -import net.minecraft.network.chat.Component; -import net.minecraft.sounds.SoundEvent; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.sounds.SoundSource; -import net.minecraft.world.Container; -import net.minecraft.world.MenuProvider; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.ChestLidController; -import net.minecraft.world.level.block.entity.ContainerOpenersCounter; -import net.minecraft.world.level.block.entity.LidBlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.block.UncolossalChest; -import org.cyclops.colossalchests.inventory.InventoryUncolossalChest; -import org.cyclops.colossalchests.inventory.container.ContainerUncolossalChest; -import org.cyclops.cyclopscore.blockentity.CyclopsBlockEntityCommon; -import org.cyclops.cyclopscore.helper.IModHelpers; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; - -import javax.annotation.Nullable; - -/** - * A machine that can infuse things with blood. - * @author rubensworks - * - */ -public class BlockEntityUncolossalChest extends CyclopsBlockEntityCommon implements MenuProvider, LidBlockEntity { - - private final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() { - protected void onOpen(Level level, BlockPos pos, BlockState blockState) { - BlockEntityUncolossalChest.playSound(level, pos, blockState, SoundEvents.CHEST_OPEN); - } - - protected void onClose(Level level, BlockPos pos, BlockState blockState) { - BlockEntityUncolossalChest.playSound(level, pos, blockState, SoundEvents.CHEST_CLOSE); - } - - protected void openerCountChanged(Level level, BlockPos pos, BlockState blockState, int p_155364_, int p_155365_) { - BlockEntityUncolossalChest.this.signalOpenCount(level, pos, blockState, p_155364_, p_155365_); - } - - protected boolean isOwnContainer(Player player) { - if (!(player.containerMenu instanceof ContainerUncolossalChest)) { - return false; - } else { - Container container = ((ContainerUncolossalChest)player.containerMenu).getContainerInventory(); - return container == BlockEntityUncolossalChest.this.getInventory(); - } - } - }; - private final ChestLidController chestLidController = new ChestLidController(); - - private Component customName = null; - - private SimpleInventoryCommon inventory = null; - - public BlockEntityUncolossalChest(BlockPos blockPos, BlockState blockState) { - super(RegistryEntries.BLOCK_ENTITY_UNCOLOSSAL_CHEST.value(), blockPos, blockState); - } - - /** - * Create the inventory that holds this chest's contents. - * Loaders can override this to change how such inventories are identified. - * @return The inventory. - */ - protected InventoryUncolossalChest createInventory() { - return new InventoryUncolossalChest(this, 5, 64); - } - - public SimpleInventoryCommon getInventory() { - // Constructed lazily, so that loaders can override createInventory without it being called from the constructor - if (this.inventory == null) { - this.inventory = createInventory(); - this.inventory.addDirtyMarkListener(this); - } - return this.inventory; - } - - @Override - public void read(CompoundTag tag, HolderLookup.Provider provider) { - super.read(tag, provider); - getInventory().read(provider, tag.getCompound("inventory")); - if (tag.contains("CustomName", Tag.TAG_STRING)) { - this.customName = Component.Serializer.fromJson(tag.getString("CustomName"), provider); - } - } - - @Override - public void saveAdditional(CompoundTag tag, HolderLookup.Provider provider) { - super.saveAdditional(tag, provider); - CompoundTag subTag = new CompoundTag(); - getInventory().write(provider, subTag); - tag.put("inventory", subTag); - if (this.customName != null) { - tag.putString("CustomName", Component.Serializer.toJson(this.customName, provider)); - } - } - - static void playSound(Level level, BlockPos pos, BlockState blockState, SoundEvent soundEvent) { - level.playSound((Player)null, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, soundEvent, SoundSource.BLOCKS, 0.5F, level.random.nextFloat() * 0.2F + 1.15F); - } - - @Override - public boolean triggerEvent(int eventType, int value) { - if (eventType == 1) { - this.chestLidController.shouldBeOpen(value > 0); - return true; - } else { - return super.triggerEvent(eventType, value); - } - } - - public void startOpen(Player player) { - if (!this.remove && !player.isSpectator()) { - this.openersCounter.incrementOpeners(player, this.getLevel(), this.getBlockPos(), this.getBlockState()); - } - - } - - public void stopOpen(Player player) { - if (!this.remove && !player.isSpectator()) { - this.openersCounter.decrementOpeners(player, this.getLevel(), this.getBlockPos(), this.getBlockState()); - } - } - - public void recheckOpen() { - if (!this.remove) { - this.openersCounter.recheckOpeners(this.getLevel(), this.getBlockPos(), this.getBlockState()); - } - } - - protected void signalOpenCount(Level level, BlockPos pos, BlockState blockState, int p_155336_, int value) { - Block block = blockState.getBlock(); - level.blockEvent(pos, block, 1, value); - } - - public static void lidAnimateTick(Level level, BlockPos pos, BlockState blockState, BlockEntityUncolossalChest blockEntity) { - blockEntity.chestLidController.tickLid(); - } - - @Override - public float getOpenNess(float value) { - return this.chestLidController.getOpenness(value); - } - - public boolean hasCustomName() { - return customName != null; - } - - public void setCustomName(Component name) { - this.customName = name; - } - - @Override - public Component getDisplayName() { - return hasCustomName() ? customName : Component.translatable("general.colossalchests.uncolossalchest"); - } - - @Override - public Direction getRotation() { - // World is null in itemstack renderer - if (getLevel() == null) { - return Direction.SOUTH; - } - - BlockState blockState = getLevel().getBlockState(getBlockPos()); - if(blockState.getBlock() != RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value()) return Direction.NORTH; - return IModHelpers.get().getBlockHelpers().getSafeBlockStateProperty(blockState, UncolossalChest.FACING, Direction.NORTH); - } - - @Nullable - @Override - public AbstractContainerMenu createMenu(int id, Inventory playerInventory, Player playerEntity) { - return new ContainerUncolossalChest(id, playerInventory, this.getInventory()); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfig.java deleted file mode 100644 index ef640df46..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfig.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import com.google.common.collect.Sets; -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.client.render.blockentity.RenderTileEntityUncolossalChest; -import org.cyclops.cyclopscore.config.extendedconfig.BlockEntityConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link BlockEntityUncolossalChest}. - * @author rubensworks - * - */ -public class BlockEntityUncolossalChestConfig extends BlockEntityConfigCommon { - - public BlockEntityUncolossalChestConfig(M mod) { - super( - mod, - "uncolossal_chest", - (eConfig) -> new BlockEntityType<>(((BlockEntityUncolossalChestConfig) eConfig).getBlockEntitySupplier(), - Sets.newHashSet(RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value()), null) - ); - } - - protected BlockEntityType.BlockEntitySupplier getBlockEntitySupplier() { - return BlockEntityUncolossalChest::new; - } - - @Override - public void onForgeRegistered() { - super.onForgeRegistered(); - if (getMod().getModHelpers().getMinecraftHelpers().isClientSide()) { - getMod().getProxy().registerRenderer(getInstance(), RenderTileEntityUncolossalChest::new); - } - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/client/gui/container/ContainerScreenColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/client/gui/container/ContainerScreenColossalChest.java deleted file mode 100644 index c24db7178..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/client/gui/container/ContainerScreenColossalChest.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.cyclops.colossalchests.client.gui.container; - -import com.google.common.collect.Lists; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.core.NonNullList; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.inventory.ClickType; -import net.minecraft.world.inventory.Slot; -import net.minecraft.world.item.ItemStack; -import org.cyclops.colossalchests.ColossalChestsInstance; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChest; -import org.cyclops.colossalchests.network.packet.ServerboundContainerClickPacketOverride; -import org.cyclops.cyclopscore.client.gui.component.button.ButtonArrow; -import org.cyclops.cyclopscore.client.gui.container.ContainerScreenScrollingCommon; - -import java.util.List; - -/** - * GUI for the {@link org.cyclops.colossalchests.block.ColossalChest}. - * @author rubensworks - * - */ -public class ContainerScreenColossalChest extends ContainerScreenScrollingCommon { - - private static final int TEXTUREWIDTH = 195; - private static final int TEXTUREHEIGHT = 194; - - public ContainerScreenColossalChest(ContainerColossalChest container, Inventory inventory, Component title) { - super(container, inventory, title); - } - - @Override - public void init() { - super.init(); - addRenderableWidget(new ButtonArrow(this.leftPos + 173, this.topPos + 7, Component.translatable("gui.cyclopscore.up"), (button) -> scrollRelative(1), ButtonArrow.Direction.NORTH)); - addRenderableWidget(new ButtonArrow(this.leftPos + 173, this.topPos + 129, Component.translatable("gui.cyclopscore.down"), (button) -> scrollRelative(-1), ButtonArrow.Direction.SOUTH)); - } - - protected void scrollRelative(int direction) { - int multiplier = Minecraft.getInstance().player.isCrouching() ? 9 : 1; - this.getScrollbar().scrollRelative(direction * multiplier); - } - - @Override - protected boolean isSearchEnabled() { - return false; - } - - @Override - protected boolean isSubsetRenderSlots() { - return true; - } - - @Override - protected ResourceLocation constructGuiTexture() { - return ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "textures/gui/colossal_chest.png"); - } - - @Override - protected int getBaseXSize() { - return TEXTUREWIDTH; - } - - @Override - protected int getBaseYSize() { - return TEXTUREHEIGHT; - } - - protected void drawForgegroundString(GuiGraphics guiGraphics) { - guiGraphics.drawString(this.font, getTitle().getString(), 8 + offsetX, 6 + offsetY, 4210752, false); - } - - @Override - protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) { - drawForgegroundString(guiGraphics); - //super.drawGuiContainerForegroundLayer(matrixStack, mouseX, mouseY); - } - - @Override - protected void slotClicked(Slot slotIn, int slotId, int clickedButton, ClickType clickType) { - if (slotIn != null) { - slotId = slotIn.index; - } - // Send our own packet, to avoid C0EPacketClickWindow to be sent to the server what would trigger an overflowable S30PacketWindowItems - handleInventoryMouseClick(this.container.containerId, slotId, clickedButton, clickType, this.minecraft.player); - } - - // Adapted from MultiPlayerGameMode#handleInventoryMouseClick - protected void handleInventoryMouseClick(int windowId, int slotId, int mouseButtonClicked, ClickType clickType, Player playerIn) { - AbstractContainerMenu abstractcontainermenu = playerIn.containerMenu; - NonNullList nonnulllist = abstractcontainermenu.slots; - int i = nonnulllist.size(); - List list = Lists.newArrayListWithCapacity(i); - - for(Slot slot : nonnulllist) { - list.add(slot.getItem().copy()); - } - - abstractcontainermenu.clicked(slotId, mouseButtonClicked, clickType, playerIn); - Int2ObjectMap changedSlots = new Int2ObjectOpenHashMap<>(); - - for(int j = 0; j < i; ++j) { - ItemStack itemstack = list.get(j); - ItemStack itemstack1 = nonnulllist.get(j).getItem(); - if (!ItemStack.matches(itemstack, itemstack1)) { - changedSlots.put(j, itemstack1.copy()); - } - } - - // Original: this.connection.send(new ServerboundContainerClickPacket(p_171800_, abstractcontainermenu.getStateId(), p_171801_, p_171802_, p_171803_, abstractcontainermenu.getCarried().copy(), changedSloits)); - ColossalChestsInstance.MOD.getPacketHandlerCommon().sendToServer(new ServerboundContainerClickPacketOverride(windowId, abstractcontainermenu.getStateId(), slotId, mouseButtonClicked, clickType, abstractcontainermenu.getCarried().copy(), changedSlots)); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/client/gui/container/ContainerScreenUncolossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/client/gui/container/ContainerScreenUncolossalChest.java deleted file mode 100644 index a616a4af8..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/client/gui/container/ContainerScreenUncolossalChest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cyclops.colossalchests.client.gui.container; - -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Inventory; -import org.cyclops.colossalchests.inventory.container.ContainerUncolossalChest; -import org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtendedCommon; - -/** - * @author rubensworks - */ -public class ContainerScreenUncolossalChest extends ContainerScreenExtendedCommon { - public ContainerScreenUncolossalChest(ContainerUncolossalChest container, Inventory inventory, Component title) { - super(container, inventory, title); - } - - @Override - protected void renderLabels(GuiGraphics guiGraphics, int p_146979_1_, int p_146979_2_) { - //super.drawGuiContainerForegroundLayer(matrixStack, p_146979_1_, p_146979_2_); - guiGraphics.drawString(this.font, getTitle().getString(), 8 + offsetX, 6 + offsetY, 4210752, false); - } - - @Override - protected ResourceLocation constructGuiTexture() { - return ResourceLocation.parse("textures/gui/container/hopper.png"); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityChestBase.java b/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityChestBase.java deleted file mode 100644 index fc43b0113..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityChestBase.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Axis; -import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.model.geom.ModelPart; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.Sheets; -import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.client.renderer.blockentity.ChestRenderer; -import net.minecraft.client.resources.model.Material; -import net.minecraft.core.Direction; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.entity.LidBlockEntity; -import net.minecraft.world.level.block.state.properties.ChestType; - -import java.util.Calendar; - -/** - * A modified copy of {@link ChestRenderer}. - * @author rubensworks - */ -public abstract class RenderTileEntityChestBase implements BlockEntityRenderer { - - private final ModelPart lid; - private final ModelPart bottom; - private final ModelPart lock; - private final ModelPart doubleLeftLid; - private final ModelPart doubleLeftBottom; - private final ModelPart doubleLeftLock; - private final ModelPart doubleRightLid; - private final ModelPart doubleRightBottom; - private final ModelPart doubleRightLock; - private boolean xmasTextures; - - public RenderTileEntityChestBase(BlockEntityRendererProvider.Context context) { - Calendar calendar = Calendar.getInstance(); - if (calendar.get(2) + 1 == 12 && calendar.get(5) >= 24 && calendar.get(5) <= 26) { - this.xmasTextures = true; - } - - ModelPart modelpart = context.bakeLayer(ModelLayers.CHEST); - this.bottom = modelpart.getChild("bottom"); - this.lid = modelpart.getChild("lid"); - this.lock = modelpart.getChild("lock"); - ModelPart modelpart1 = context.bakeLayer(ModelLayers.DOUBLE_CHEST_LEFT); - this.doubleLeftBottom = modelpart1.getChild("bottom"); - this.doubleLeftLid = modelpart1.getChild("lid"); - this.doubleLeftLock = modelpart1.getChild("lock"); - ModelPart modelpart2 = context.bakeLayer(ModelLayers.DOUBLE_CHEST_RIGHT); - this.doubleRightBottom = modelpart2.getChild("bottom"); - this.doubleRightLid = modelpart2.getChild("lid"); - this.doubleRightLock = modelpart2.getChild("lock"); - } - - protected abstract Direction getDirection(T tileEntityIn); - - protected Material getMaterial(T tileEntity) { - return Sheets.chooseMaterial(tileEntity, ChestType.SINGLE, this.xmasTextures); - } - - protected void handleRotation(T tile, PoseStack matrixStack) { - float f = getDirection(tile).toYRot(); - matrixStack.mulPose(Axis.YP.rotationDegrees(-f)); - } - - public void render(T tileEntityIn, float partialTicks, PoseStack matrixStackIn, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) { - matrixStackIn.pushPose(); - matrixStackIn.translate(0.5D, 0.5D, 0.5D); - handleRotation(tileEntityIn, matrixStackIn); - matrixStackIn.translate(-0.5D, -0.5D, -0.5D); - - float f1 = tileEntityIn.getOpenNess(partialTicks); - f1 = 1.0F - f1; - f1 = 1.0F - f1 * f1 * f1; - Material material = this.getMaterial(tileEntityIn); - VertexConsumer ivertexbuilder = material.buffer(bufferIn, RenderType::entityCutout); - this.render(matrixStackIn, ivertexbuilder, this.lid, this.lock, this.bottom, f1, combinedLightIn, combinedOverlayIn); - - matrixStackIn.popPose(); - } - - private void render(PoseStack p_228871_1_, VertexConsumer p_228871_2_, net.minecraft.client.model.geom.ModelPart p_228871_3_, ModelPart p_228871_4_, ModelPart p_228871_5_, float p_228871_6_, int p_228871_7_, int p_228871_8_) { - p_228871_3_.xRot = -(p_228871_6_ * ((float)Math.PI / 2F)); - p_228871_4_.xRot = p_228871_3_.xRot; - p_228871_3_.render(p_228871_1_, p_228871_2_, p_228871_7_, p_228871_8_); - p_228871_4_.render(p_228871_1_, p_228871_2_, p_228871_7_, p_228871_8_); - p_228871_5_.render(p_228871_1_, p_228871_2_, p_228871_7_, p_228871_8_); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityColossalChest.java deleted file mode 100644 index 8bcf48c6c..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityColossalChest.java +++ /dev/null @@ -1,200 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import com.google.common.collect.Maps; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Axis; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.Sheets; -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.Material; -import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.InventoryMenu; -import net.minecraft.world.phys.Vec3; -import org.cyclops.colossalchests.GeneralConfig; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.joml.Matrix4f; - -import java.util.Calendar; -import java.util.Map; - -/** - * Renderer for the {@link org.cyclops.colossalchests.block.ColossalChest}. - * @author rubensworks - * - */ -public class RenderTileEntityColossalChest extends RenderTileEntityChestBase { - - public static final Map TEXTURES_CHEST = Maps.newHashMap(); - public static final Map TEXTURES_INTERFACE = Maps.newHashMap(); - static { - Calendar calendar = Calendar.getInstance(); - boolean christmas = calendar.get(Calendar.MONTH) + 1 == 12 && calendar.get(Calendar.DATE) >= 24 && calendar.get(Calendar.DATE) <= 26; - TEXTURES_CHEST.put(ChestMaterial.WOOD, ResourceLocation.parse("entity/chest/" + (christmas ? "christmas" : "normal") + "")); - TEXTURES_CHEST.put(ChestMaterial.COPPER, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_copper")); - TEXTURES_CHEST.put(ChestMaterial.IRON, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_iron")); - TEXTURES_CHEST.put(ChestMaterial.SILVER, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_silver")); - TEXTURES_CHEST.put(ChestMaterial.GOLD, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_gold")); - TEXTURES_CHEST.put(ChestMaterial.DIAMOND, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_diamond")); - TEXTURES_CHEST.put(ChestMaterial.OBSIDIAN, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_obsidian")); - TEXTURES_CHEST.put(ChestMaterial.NETHERITE, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "models/chest_netherite")); - - TEXTURES_INTERFACE.put(ChestMaterial.WOOD, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_wood")); - TEXTURES_INTERFACE.put(ChestMaterial.COPPER, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_copper")); - TEXTURES_INTERFACE.put(ChestMaterial.IRON, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_iron")); - TEXTURES_INTERFACE.put(ChestMaterial.SILVER, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_silver")); - TEXTURES_INTERFACE.put(ChestMaterial.GOLD, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_gold")); - TEXTURES_INTERFACE.put(ChestMaterial.DIAMOND, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_diamond")); - TEXTURES_INTERFACE.put(ChestMaterial.OBSIDIAN, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_obsidian")); - TEXTURES_INTERFACE.put(ChestMaterial.NETHERITE, ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "blocks/interface_netherite")); - } - - public RenderTileEntityColossalChest(BlockEntityRendererProvider.Context context) { - super(context); - } - - @Override - protected void handleRotation(BlockEntityColossalChest tile, PoseStack matrixStack) { - // Move origin to center of chest - if(tile.isStructureComplete()) { - Vec3 renderOffset = tile.getRenderOffset(); - matrixStack.translate(-renderOffset.x, -renderOffset.y, -renderOffset.z); - } - - // Rotate - super.handleRotation(tile, matrixStack); - - // Move chest slightly higher - matrixStack.translate(0F, tile.getSizeSingular() * 0.0625F, 0F); - - // Scale - float size = tile.getSizeSingular() * 1.125F; - matrixStack.scale(size, size, size); - } - - @Override - public void render(BlockEntityColossalChest tile, float partialTicks, PoseStack matrixStack, MultiBufferSource renderTypeBuffer, int combinedLightIn, int combinedOverlayIn) { - if (tile.isStructureComplete()) { - matrixStack.pushPose(); - - super.render(tile, partialTicks, matrixStack, renderTypeBuffer, combinedLightIn, combinedOverlayIn); - - // Render interface overlays - if(tile.isStructureComplete() && tile.getOpenNess(0) == 0 && (GeneralConfig.alwaysShowInterfaceOverlay || Minecraft.getInstance().player.isCrouching())) { - matrixStack.pushPose(); - Material materialInterface = getMaterialInterface(tile); - VertexConsumer buffer = materialInterface.buffer(renderTypeBuffer, RenderType::text); - for (Vec3i interfaceLocation : tile.getInterfaceLocations()) { - float translateX = interfaceLocation.getX() - tile.getBlockPos().getX(); - float translateY = interfaceLocation.getY() - tile.getBlockPos().getY(); - float translateZ = interfaceLocation.getZ() - tile.getBlockPos().getZ(); - matrixStack.translate(translateX, translateY, translateZ); - renderInterface(matrixStack, buffer, materialInterface.sprite(), interfaceLocation.equals(tile.getBlockPos()), combinedLightIn); - matrixStack.translate(-translateX, -translateY, -translateZ); - } - matrixStack.popPose(); - } - matrixStack.popPose(); - } - } - - @Override - public boolean shouldRenderOffScreen(BlockEntityColossalChest tile) { - return true; - } - - @Override - protected Direction getDirection(BlockEntityColossalChest tile) { - return tile.getRotation().getOpposite(); - } - - @Override - protected Material getMaterial(BlockEntityColossalChest tile) { - return new Material(Sheets.CHEST_SHEET, TEXTURES_CHEST.get(tile.getMaterial())); - } - - protected Material getMaterialInterface(BlockEntityColossalChest tile) { - return new Material(InventoryMenu.BLOCK_ATLAS, TEXTURES_INTERFACE.get(tile.getMaterial())); - } - - protected void setMatrixOrientation(PoseStack matrixStack, Direction direction) { - float translateX = -1F - direction.getStepX(); - float translateY = direction.getStepY(); - float translateZ = direction.getStepZ(); - if (direction == Direction.NORTH) { - translateZ += 1F; - translateX += 2F; - translateY -= 1F; - } else if (direction == Direction.EAST) { - translateX += 3F; - translateY -= 1F; - translateZ += 1F; - } else if (direction == Direction.WEST) { - translateY -= 1F; - } else if (direction == Direction.SOUTH) { - translateX += 1F; - translateY -= 1F; - } else if (direction == Direction.UP) { - translateX += 1F; - translateZ += 1F; - } else if (direction == Direction.DOWN) { - translateX += 1F; - } - matrixStack.translate(translateX * 16, translateY * 16, translateZ * 16); - - short rotationY = 0; - short rotationX = 0; - if (direction == Direction.SOUTH) { - rotationY = 0; - } else if (direction == Direction.NORTH) { - rotationY = 180; - } else if (direction == Direction.EAST) { - rotationY = 90; - } else if (direction == Direction.WEST) { - rotationY = -90; - } else if (direction == Direction.UP) { - rotationX = -90; - } else if (direction == Direction.DOWN) { - rotationX = 90; - } - matrixStack.mulPose(Axis.YP.rotationDegrees(rotationY)); - matrixStack.mulPose(Axis.XP.rotationDegrees(rotationX)); - } - - protected void renderInterface(PoseStack matrixStack, VertexConsumer buffer, TextureAtlasSprite sprite, boolean core, int combinedLightIn) { - for (Direction side : Direction.values()) { - matrixStack.pushPose(); - float scale = 0.063F; - matrixStack.scale(scale, scale, scale); - matrixStack.scale(1, -1, 1); - - setMatrixOrientation(matrixStack, side); - float indent = -0.2F; - if (side == Direction.UP) indent = -15.8F; - if (side == Direction.DOWN) indent *= 2; - int alpha = 255; - float posMin = core ? 5F : 6F; - float posMax = 16F - posMin; - - float uvScale = posMin / 16F; - float uMin = (sprite.getU1() - sprite.getU0()) * uvScale + sprite.getU0(); - float uMax = (sprite.getU1() - sprite.getU0()) * (1 - uvScale) + sprite.getU0(); - float vMin = (sprite.getV1() - sprite.getV0()) * uvScale + sprite.getV0(); - float vMax = (sprite.getV1() - sprite.getV0()) * (1 - uvScale) + sprite.getV0(); - - Matrix4f matrix = matrixStack.last().pose(); - buffer.addVertex(matrix, posMax, posMax, indent).setColor(255, 255, 255, alpha).setUv(uMin, vMax).setLight(combinedLightIn); - buffer.addVertex(matrix, posMax, posMin, indent).setColor(255, 255, 255, alpha).setUv(uMin, vMin).setLight(combinedLightIn); - buffer.addVertex(matrix, posMin, posMin, indent).setColor(255, 255, 255, alpha).setUv(uMax, vMin).setLight(combinedLightIn); - buffer.addVertex(matrix, posMin, posMax, indent).setColor(255, 255, 255, alpha).setUv(uMax, vMax).setLight(combinedLightIn); - matrixStack.popPose(); - } - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityUncolossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityUncolossalChest.java deleted file mode 100644 index 6d7dd0cbe..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityUncolossalChest.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import com.mojang.blaze3d.vertex.PoseStack; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.core.Direction; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; - -/** - * Renderer for the {@link org.cyclops.colossalchests.block.ColossalChest}. - * @author rubensworks - * - */ -public class RenderTileEntityUncolossalChest extends RenderTileEntityChestBase { - - public RenderTileEntityUncolossalChest(BlockEntityRendererProvider.Context context) { - super(context); - } - - @Override - protected Direction getDirection(BlockEntityUncolossalChest tile) { - return tile.getRotation(); - } - - @Override - public void render(BlockEntityUncolossalChest tile, float partialTicks, PoseStack matrixStack, MultiBufferSource renderTypeBuffer, int combinedLightIn, int combinedOverlayIn) { - matrixStack.pushPose(); - matrixStack.translate(0.325F, 0F, 0.325F); - float size = 0.3F * 1.125F; - matrixStack.scale(size, size, size); - super.render(tile, partialTicks, matrixStack, renderTypeBuffer, combinedLightIn, combinedOverlayIn); - matrixStack.popPose(); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/gametest/GameTestsCommon.java b/loader-common/src/main/java/org/cyclops/colossalchests/gametest/GameTestsCommon.java deleted file mode 100644 index f7a305e51..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/gametest/GameTestsCommon.java +++ /dev/null @@ -1,1506 +0,0 @@ -package org.cyclops.colossalchests.gametest; - -import com.google.common.collect.Sets; -import net.minecraft.advancements.AdvancementHolder; -import net.minecraft.advancements.CriteriaTriggers; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.gametest.framework.GameTest; -import net.minecraft.gametest.framework.GameTestHelper; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.InteractionHand; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.item.crafting.CraftingInput; -import net.minecraft.world.item.crafting.Recipe; -import net.minecraft.world.item.crafting.RecipeInput; -import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.item.crafting.SmithingRecipeInput; -import net.minecraft.world.level.GameType; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.HopperBlock; -import net.minecraft.world.level.block.entity.HopperBlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.Vec3; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.block.*; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * @author rubensworks - */ -public class GameTestsCommon { - - public static final String TEMPLATE_EMPTY = Reference.MOD_ID + ":empty10"; - public static final BlockPos POS = BlockPos.ZERO.offset(1, 0, 1); - - @GameTest(template = TEMPLATE_EMPTY) - public void testUncolossalPlacementDirection(GameTestHelper helper) { - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value()); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - helper.placeAt(player, itemStack, POS, Direction.SOUTH); - - helper.succeedWhen(() -> { - helper.assertBlockPresent(RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value(), POS.south()); - helper.assertBlockProperty(POS.south(), UncolossalChest.FACING, Direction.NORTH); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testUncolossalPlacementDirectionOpposite(GameTestHelper helper) { - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value()); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - helper.placeAt(player, itemStack, POS, Direction.NORTH); - - helper.succeedWhen(() -> { - helper.assertBlockPresent(RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value(), POS.north()); - helper.assertBlockProperty(POS.north(), UncolossalChest.FACING, Direction.NORTH); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testUncolossalHoppers(GameTestHelper helper) { - // Place hopper above and below chest - helper.setBlock(POS.above(), Blocks.HOPPER); - helper.setBlock(POS, RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value()); - helper.setBlock(POS.below(), Blocks.HOPPER); - - // Throw apple in hopper - helper.spawnItem(Items.APPLE, POS.above().above()); - - // Expect apple to be in final hopper - helper.succeedWhen(() -> assertHopperContains(helper, POS.below(), new ItemStack(Items.APPLE))); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood2x2(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.WOOD, 2); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.WOOD, 2)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.WOOD, 3); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.WOOD, 3)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.WOOD, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.WOOD, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.WOOD, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.WOOD, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3MissingCore(GameTestHelper helper) { - Set excluded = Sets.newHashSet(POS); - createChest(helper, POS, ChestMaterial.WOOD, 3, excluded); - - helper.succeedWhen(() -> assertChestInvalid(helper, POS, ChestMaterial.WOOD, 3, excluded, Sets.newHashSet())); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3MissingWall(GameTestHelper helper) { - Set excluded = Sets.newHashSet(POS.above()); - createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(excluded)); - - helper.succeedWhen(() -> assertChestInvalid(helper, POS, ChestMaterial.WOOD, 3, excluded, Sets.newHashSet())); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3MissingWallMultiple(GameTestHelper helper) { - Set excluded = Sets.newHashSet(POS.above(), POS.above().above(), POS.above().north()); - createChest(helper, POS, ChestMaterial.WOOD, 3, excluded); - - helper.succeedWhen(() -> assertChestInvalid(helper, POS, ChestMaterial.WOOD, 3, excluded, Sets.newHashSet())); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalCopper5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.COPPER, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.COPPER, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalCopper9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.COPPER, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.COPPER, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalIron5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.IRON, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.IRON, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalIron9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.IRON, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.IRON, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalSilver5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.SILVER, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.SILVER, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalSilver9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.SILVER, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.SILVER, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalGold5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.GOLD, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.GOLD, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalGold9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.GOLD, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.GOLD, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalDiamond5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.DIAMOND, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.DIAMOND, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalDiamond9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.DIAMOND, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.DIAMOND, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalObsidian5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.OBSIDIAN, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.OBSIDIAN, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalObsidian9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.OBSIDIAN, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.OBSIDIAN, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalNetherite5x5(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.NETHERITE, 5); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.NETHERITE, 5)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalNetherite9x9(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.NETHERITE, 9); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.NETHERITE, 9)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood5x5HopperInsert(GameTestHelper helper) { - createChest(helper, POS.above().south(), ChestMaterial.WOOD, 5); - - // Place hopper towards core - helper.setBlock(POS.above(), Blocks.HOPPER - .defaultBlockState() - .setValue(HopperBlock.FACING, Direction.SOUTH)); - - // Throw items in hopper - helper.spawnItem(Items.APPLE, POS.above().above()); - helper.spawnItem(Items.WHITE_WOOL, POS.above().above()); - helper.spawnItem(Items.ACACIA_LEAVES, POS.above().above()); - - // Expect items to be in chest - helper.succeedWhen(() -> { - assertCoreContains(helper, POS.above().south(), new ItemStack(Items.APPLE)); - assertCoreContains(helper, POS.above().south(), new ItemStack(Items.WHITE_WOOL)); - assertCoreContains(helper, POS.above().south(), new ItemStack(Items.ACACIA_LEAVES)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood5x5HopperExtract(GameTestHelper helper) { - BlockEntityColossalChest core = createChest(helper, POS.above().south(), ChestMaterial.WOOD, 5); - - // Place hopper below core - helper.setBlock(POS.south(), Blocks.HOPPER - .defaultBlockState() - .setValue(HopperBlock.FACING, Direction.SOUTH)); - - // Initialize items in core - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - core.getInventory().setItem(1, new ItemStack(Items.WHITE_WOOL)); - core.getInventory().setItem(2, new ItemStack(Items.ACACIA_LEAVES)); - - // Expect items to be in hopper - helper.succeedWhen(() -> { - assertHopperContains(helper, POS.south(), new ItemStack(Items.APPLE)); - assertHopperContains(helper, POS.south(), new ItemStack(Items.WHITE_WOOL)); - assertHopperContains(helper, POS.south(), new ItemStack(Items.ACACIA_LEAVES)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood5x5HopperInsertExtract(GameTestHelper helper) { - BlockEntityColossalChest core = createChest(helper, POS.above().south(), ChestMaterial.WOOD, 5); - - // Place hopper towards core - helper.setBlock(POS.above(), Blocks.HOPPER - .defaultBlockState() - .setValue(HopperBlock.FACING, Direction.SOUTH)); - - // Place hopper below core - helper.setBlock(POS.south(), Blocks.HOPPER - .defaultBlockState() - .setValue(HopperBlock.FACING, Direction.SOUTH)); - - // Throw items in hopper - helper.spawnItem(Items.APPLE, POS.above().above()); - helper.spawnItem(Items.WHITE_WOOL, POS.above().above()); - helper.spawnItem(Items.ACACIA_LEAVES, POS.above().above()); - - // Expect items to be in hopper - helper.succeedWhen(() -> { - assertHopperContains(helper, POS.south(), new ItemStack(Items.APPLE)); - assertHopperContains(helper, POS.south(), new ItemStack(Items.WHITE_WOOL)); - assertHopperContains(helper, POS.south(), new ItemStack(Items.ACACIA_LEAVES)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood5x5Interfaces(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.WOOD, 5, Sets.newHashSet(), Sets.newHashSet(POS.north().above(), POS.south().above())); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.WOOD, 5, Sets.newHashSet(POS.north().above(), POS.south().above()), true)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalDiamond5x5Interfaces(GameTestHelper helper) { - createChest(helper, POS, ChestMaterial.DIAMOND, 5, Sets.newHashSet(), Sets.newHashSet(POS.north().above(), POS.south().above())); - - helper.succeedWhen(() -> assertChestValid(helper, POS, ChestMaterial.DIAMOND, 5, Sets.newHashSet(POS.north().above(), POS.south().above()), true)); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3InterfacesMissingWall(GameTestHelper helper) { - Set excluded = Sets.newHashSet(POS.above()); - createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(excluded), Sets.newHashSet(POS.north())); - - helper.succeedWhen(() -> assertChestInvalid(helper, POS, ChestMaterial.WOOD, 3, excluded, Sets.newHashSet(POS.north()))); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood5x5InterfacesHopperInsertExtract(GameTestHelper helper) { - createChest(helper, POS.above(), ChestMaterial.WOOD, 5, Sets.newHashSet(), Sets.newHashSet(POS.offset(0, 5, 0), POS.above().south())); - - // Place hopper towards top interface - helper.setBlock(POS.offset(0, 5, 0).above(), Blocks.HOPPER - .defaultBlockState() - .setValue(HopperBlock.FACING, Direction.DOWN)); - - // Place hopper below bottom interface - helper.setBlock(POS.south(), Blocks.HOPPER - .defaultBlockState() - .setValue(HopperBlock.FACING, Direction.DOWN)); - - // Throw items in top hopper - helper.spawnItem(Items.APPLE, POS.offset(0, 5, 0).above().above()); - helper.spawnItem(Items.WHITE_WOOL, POS.offset(0, 5, 0).above().above()); - helper.spawnItem(Items.ACACIA_LEAVES, POS.offset(0, 5, 0).above().above()); - - // Expect items to be in hopper - helper.succeedWhen(() -> { - assertHopperContains(helper, POS.south(), new ItemStack(Items.APPLE)); - assertHopperContains(helper, POS.south(), new ItemStack(Items.WHITE_WOOL)); - assertHopperContains(helper, POS.south() , new ItemStack(Items.ACACIA_LEAVES)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.COPPER, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3UpgradeInsufficientItems(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockWall(), 22)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult == InteractionResult.FAIL, "Interaction must fail"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.WOOD, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockWall(), 22)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockWall(), 22)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalCopper3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.COPPER, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.IRON.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.IRON.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.IRON.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.IRON, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalIron3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.IRON, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.SILVER.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.SILVER.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.SILVER.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.SILVER, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalSilver3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.SILVER, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.GOLD.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.GOLD.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.GOLD.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.GOLD, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalGold3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.GOLD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.DIAMOND.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.DIAMOND.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.DIAMOND.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.DIAMOND, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalDiamond3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.DIAMOND, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.OBSIDIAN.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.OBSIDIAN.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.OBSIDIAN.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.OBSIDIAN, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalObsidian3x3Upgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.OBSIDIAN, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.NETHERITE.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.NETHERITE.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.NETHERITE.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.NETHERITE, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.NETHERITE.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.NETHERITE.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.NETHERITE.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalCopper3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.COPPER, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.WOOD.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.WOOD.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.WOOD.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.WOOD, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalCopper3x3DowngradeInsufficientItems(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.COPPER, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.WOOD.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.WOOD.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.WOOD.getBlockWall(), 22)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult == InteractionResult.FAIL, "Interaction must fail"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.COPPER, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockWall(), 22)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.WOOD.getBlockWall(), 22)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalIron3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.IRON, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.COPPER.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.COPPER, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.COPPER.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalSilver3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.SILVER, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.IRON.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.IRON.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.IRON.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.IRON, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.IRON.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalGold3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.GOLD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.SILVER.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.SILVER.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.SILVER.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.SILVER, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.SILVER.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalDiamond3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.DIAMOND, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.GOLD.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.GOLD.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.GOLD.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.GOLD, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.GOLD.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalObsidian3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.OBSIDIAN, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.DIAMOND.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.DIAMOND.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.DIAMOND.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.DIAMOND, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.DIAMOND.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalNetherite3x3Downgrade(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.NETHERITE, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - - // Upgrade - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(RegistryEntries.ITEM_UPGRADE_TOOL_REVERSE); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - player.getInventory().add(new ItemStack(ChestMaterial.OBSIDIAN.getBlockCore(), 1)); - player.getInventory().add(new ItemStack(ChestMaterial.OBSIDIAN.getBlockInterface(), 2)); - player.getInventory().add(new ItemStack(ChestMaterial.OBSIDIAN.getBlockWall(), 23)); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(POS.getCenter(), Direction.NORTH, helper.absolutePos(POS), false))); - helper.assertTrue(interactionResult.indicateItemUse(), "Interaction must succeed"); - - helper.succeedWhen(() -> { - // Chest must be transformed and keep inventory - assertChestValid(helper, POS, ChestMaterial.OBSIDIAN, 3, interfaces, false); - assertCoreContains(helper, POS, new ItemStack(Items.APPLE)); - - // Player items must be swapped - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockCore(), 1)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockInterface(), 2)); - assertPlayerInventoryNotContains(helper, player, new ItemStack(ChestMaterial.OBSIDIAN.getBlockWall(), 23)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.NETHERITE.getBlockCore(), 1)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.NETHERITE.getBlockInterface(), 2)); - assertPlayerInventoryContains(helper, player, new ItemStack(ChestMaterial.NETHERITE.getBlockWall(), 23)); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3BreakPlaceWall(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.DIAMOND)); - - // Break wall - destroyBlock(helper, POS.east()); - - // Replace wall - helper.setBlock(POS.east(), ChestMaterial.WOOD.getBlockWall()); - - helper.succeedWhen(() -> { - assertChestValid(helper, POS, ChestMaterial.WOOD, 3, interfaces, false); - - // Chest must still contain item, and there must be no dropped items on the ground - assertCoreContains(helper, POS, new ItemStack(Items.DIAMOND)); - helper.assertItemEntityNotPresent(Items.DIAMOND); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3BreakPlaceWallAsPlayer(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.DIAMOND)); - - // Break wall - destroyBlock(helper, POS.east()); - - // Replace wall - setBlockAsPlayer(helper, POS.east(), ChestMaterial.WOOD.getBlockWall()); - - helper.succeedWhen(() -> { - assertChestValid(helper, POS, ChestMaterial.WOOD, 3, interfaces, false); - - // Chest must still contain item, and there must be no dropped items on the ground - assertCoreContains(helper, POS, new ItemStack(Items.DIAMOND)); - helper.assertItemEntityNotPresent(Items.DIAMOND); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3BreakPlaceInterface(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.DIAMOND)); - - // Break interface - destroyBlock(helper, POS.east().above()); - - // Replace interface - helper.setBlock(POS.east().above(), ChestMaterial.WOOD.getBlockInterface()); - - helper.succeedWhen(() -> { - assertChestValid(helper, POS, ChestMaterial.WOOD, 3, interfaces, false); - - // Chest must still contain item, and there must be no dropped items on the ground - assertCoreContains(helper, POS, new ItemStack(Items.DIAMOND)); - helper.assertItemEntityNotPresent(Items.DIAMOND); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3BreakPlaceInterfaceAsPlayer(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS, ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.DIAMOND)); - - // Break interface - destroyBlock(helper, POS.east().above()); - - // Replace interface - setBlockAsPlayer(helper, POS.east().above(), ChestMaterial.WOOD.getBlockInterface()); - - helper.succeedWhen(() -> { - assertChestValid(helper, POS, ChestMaterial.WOOD, 3, interfaces, false); - - // Chest must still contain item, and there must be no dropped items on the ground - assertCoreContains(helper, POS, new ItemStack(Items.DIAMOND)); - helper.assertItemEntityNotPresent(Items.DIAMOND); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3BreakPlaceCore(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.offset(4, 1, 4).east().above(), POS.offset(4, 1, 4).south().above()); - BlockEntityColossalChest core = createChest(helper, POS.offset(4, 1, 4), ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.DIAMOND)); - core.getInventory().setItem(1, new ItemStack(Items.ACACIA_LEAVES)); - core.getInventory().setItem(2, new ItemStack(Items.WHITE_WOOL)); - - // Break core - destroyBlock(helper, POS.offset(4, 1, 4)); - - // Replace core - helper.setBlock(POS.offset(4, 1, 4), ChestMaterial.WOOD.getBlockCore()); - - helper.succeedWhen(() -> { - // Chest must not contain item, and all items must be dropped on the ground - assertChestValid(helper, POS.offset(4, 1, 4), ChestMaterial.WOOD, 3, interfaces, true); - helper.assertItemEntityPresent(Items.DIAMOND); - helper.assertItemEntityPresent(Items.ACACIA_LEAVES); - helper.assertItemEntityPresent(Items.WHITE_WOOL); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3BreakPlaceCoreAsPlayer(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.offset(4, 1, 4).east().above(), POS.offset(4, 1, 4).south().above()); - BlockEntityColossalChest core = createChest(helper, POS.offset(4, 1, 4), ChestMaterial.WOOD, 3, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.DIAMOND)); - core.getInventory().setItem(1, new ItemStack(Items.ACACIA_LEAVES)); - core.getInventory().setItem(2, new ItemStack(Items.WHITE_WOOL)); - - // Break core - destroyBlock(helper, POS.offset(4, 1, 4)); - - // Replace core - setBlockAsPlayer(helper, POS.offset(4, 1, 4), ChestMaterial.WOOD.getBlockCore()); - - helper.succeedWhen(() -> { - // Chest must not contain item, and all items must be dropped on the ground - assertChestValid(helper, POS.offset(4, 1, 4), ChestMaterial.WOOD, 3, interfaces, true); - helper.assertItemEntityPresent(Items.DIAMOND); - helper.assertItemEntityPresent(Items.ACACIA_LEAVES); - helper.assertItemEntityPresent(Items.WHITE_WOOL); - }); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalWood3x3DestroyTnt(GameTestHelper helper) { - HashSet interfaces = Sets.newHashSet(POS.east().above(), POS.south().above()); - BlockEntityColossalChest core = createChest(helper, POS.above(), ChestMaterial.WOOD, 2, Sets.newHashSet(), interfaces); - - // Insert item - core.getInventory().setItem(0, new ItemStack(Items.APPLE)); - core.getInventory().setItem(1, new ItemStack(Items.ACACIA_LEAVES)); - - // Destroy chest with TNT - helper.setBlock(POS.above().offset(2, 0, 0), Blocks.TNT); - helper.setBlock(POS.above().offset(2, 1, 0), Blocks.REDSTONE_BLOCK); - - helper.succeedWhen(() -> { - // Chest and contents must be dropped - helper.assertItemEntityPresent(Items.APPLE); - helper.assertItemEntityPresent(Items.ACACIA_LEAVES); - helper.assertItemEntityPresent(ChestMaterial.WOOD.getBlockCore().asItem()); - helper.assertItemEntityPresent(ChestMaterial.WOOD.getBlockInterface().asItem()); - helper.assertItemEntityPresent(ChestMaterial.WOOD.getBlockWall().asItem()); - }); - } - - protected BlockEntityColossalChest createChest(GameTestHelper helper, BlockPos pos, ChestMaterial material, int dimension) { - return this.createChest(helper, pos, material, dimension, Sets.newHashSet()); - } - - protected BlockEntityColossalChest createChest(GameTestHelper helper, BlockPos pos, ChestMaterial material, int dimension, Set exclude) { - return createChest(helper, pos, material, dimension, exclude, Sets.newHashSet()); - } - - protected BlockEntityColossalChest createChest(GameTestHelper helper, BlockPos pos, ChestMaterial material, int dimension, Set exclude, Set interfaces) { - for (int x = 0; x < dimension; x++) { - for (int y = 0; y < dimension; y++) { - for (int z = 0; z < dimension; z++) { - BlockPos poso = pos.offset(x, y, z); - if (!exclude.contains(poso)) { - if (x == 0 && y == 0 && z == 0) { - helper.setBlock(poso, material.getBlockCore()); - } else if (x == 0 || y == 0 || z == 0 || x == dimension - 1 || y == dimension - 1 || z == dimension - 1) { - if (interfaces.contains(poso)) { - helper.setBlock(poso, material.getBlockInterface()); - } else { - helper.setBlock(poso, material.getBlockWall()); - } - } - } - } - } - } - return exclude.contains(pos) ? null : helper.getBlockEntity(pos); - } - - protected int chestSize(int dimension, ChestMaterial material) { - return (int) Math.ceil((Math.pow(dimension, 3) * 27) * material.getInventoryMultiplier() / 9) * 9; - } - - protected void assertChestValid(GameTestHelper helper, BlockPos pos, ChestMaterial material, int dimension) { - assertChestValid(helper, pos, material, dimension, Sets.newHashSet(), true); - } - - protected void assertChestValid(GameTestHelper helper, BlockPos pos, ChestMaterial material, int dimension, Set interfaces, boolean mustBeEmpty) { - int inventorySize = chestSize(dimension, material); - for (int x = 0; x < dimension; x++) { - for (int y = 0; y < dimension; y++) { - for (int z = 0; z < dimension; z++) { - BlockPos poso = pos.offset(x, y, z); - if (x == 0 && y == 0 && z == 0) { - helper.assertBlockPresent(material.getBlockCore(), poso); - helper.assertBlockProperty(poso, ColossalChest.ENABLED, true); - helper.assertBlockEntityData(poso, (BlockEntityColossalChest be) -> be.getInventory().getContainerSize() == inventorySize, () -> "Inventory is not of size " + inventorySize); - if (mustBeEmpty) { - helper.assertBlockEntityData(poso, (BlockEntityColossalChest be) -> be.getInventory().isEmpty(), () -> "Inventory is not empty"); - } - } else if (x == 0 || y == 0 || z == 0 || x == dimension - 1 || y == dimension - 1 || z == dimension - 1) { - if (interfaces.contains(poso)) { - helper.assertBlockPresent(material.getBlockInterface(), poso); - helper.assertBlockProperty(poso, Interface.ENABLED, true); - } else { - helper.assertBlockPresent(material.getBlockWall(), poso); - helper.assertBlockProperty(poso, ChestWall.ENABLED, true); - } - } - } - } - } - } - - protected void assertChestInvalid(GameTestHelper helper, BlockPos pos, ChestMaterial material, int dimension, Set exclude, Set interfaces) { - for (int x = 0; x < dimension; x++) { - for (int y = 0; y < dimension; y++) { - for (int z = 0; z < dimension; z++) { - BlockPos poso = pos.offset(x, y, z); - if (exclude.contains(poso)) { - helper.assertBlockPresent(Blocks.AIR, poso); - } else { - if (x == 0 && y == 0 && z == 0) { - helper.assertBlockPresent(material.getBlockCore(), poso); - helper.assertBlockProperty(poso, ColossalChest.ENABLED, false); - helper.assertBlockEntityData(poso, (BlockEntityColossalChest be) -> be.getInventory().getContainerSize() == 0, () -> "Inventory is not of size zero"); - helper.assertBlockEntityData(poso, (BlockEntityColossalChest be) -> be.getInventory().isEmpty(), () -> "Inventory is not empty"); - } else if (x == 0 || y == 0 || z == 0 || x == dimension - 1 || y == dimension - 1 || z == dimension - 1) { - if (interfaces.contains(poso)) { - helper.assertBlockPresent(material.getBlockInterface(), poso); - helper.assertBlockProperty(poso, Interface.ENABLED, false); - } else { - helper.assertBlockPresent(material.getBlockWall(), poso); - helper.assertBlockProperty(poso, ChestWall.ENABLED, false); - } - } - } - } - } - } - } - - protected void assertHopperContains(GameTestHelper helper, BlockPos pos, ItemStack itemStack) { - helper.assertBlockEntityData(pos, (HopperBlockEntity be) -> { - for (int i = 0; i < be.getContainerSize(); i++) { - if (ItemStack.isSameItemSameComponents(be.getItem(i), itemStack)) { - return true; - } - } - return false; - }, () -> "Hopper does not contain item"); - } - - protected void assertCoreContains(GameTestHelper helper, BlockPos pos, ItemStack itemStack) { - helper.assertBlockEntityData(pos, (BlockEntityColossalChest be) -> { - for (int i = 0; i < be.getInventory().getContainerSize(); i++) { - if (ItemStack.isSameItemSameComponents(be.getInventory().getItem(i), itemStack)) { - return true; - } - } - return false; - }, () -> "Colossal chest core does not contain item"); - } - - protected void assertPlayerInventoryContains(GameTestHelper helper, Player player, ItemStack itemStack) { - boolean contains = false; - for (int i = 0; i < player.getInventory().getContainerSize(); i++) { - if (ItemStack.isSameItemSameComponents(player.getInventory().getItem(i), itemStack)) { - contains = true; - break; - } - } - helper.assertTrue(contains, "Player does not contain item"); - } - - protected void assertPlayerInventoryNotContains(GameTestHelper helper, Player player, ItemStack itemStack) { - boolean contains = false; - for (int i = 0; i < player.getInventory().getContainerSize(); i++) { - if (ItemStack.isSameItemSameComponents(player.getInventory().getItem(i), itemStack)) { - contains = true; - break; - } - } - helper.assertFalse(contains, "Player does contain item"); - } - - protected void destroyBlock(GameTestHelper helper, BlockPos pos) { - BlockState blockState = helper.getBlockState(pos); - boolean removed = helper.getLevel().removeBlock(helper.absolutePos(pos), false); - if (removed) { - blockState.getBlock().destroy(helper.getLevel(), helper.absolutePos(pos), blockState); - } - } - - private void setBlockAsPlayer(GameTestHelper helper, BlockPos pos, Block block) { - Player player = helper.makeMockPlayer(GameType.SURVIVAL); - ItemStack itemStack = new ItemStack(block); - player.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - InteractionResult interactionResult = itemStack.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND, new BlockHitResult(pos.getCenter(), Direction.DOWN, helper.absolutePos(pos), false))); - helper.assertTrue(interactionResult.consumesAction(), "Block placement as player failed"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testRecipeChestWallNetherite(GameTestHelper helper) { - assertRecipeResult(helper, RecipeType.SMITHING, new SmithingRecipeInput( - new ItemStack(Items.GOLD_INGOT), - new ItemStack(ChestMaterial.DIAMOND.getBlockWall()), - new ItemStack(Items.NETHERITE_SCRAP) - ), new ItemStack(ChestMaterial.NETHERITE.getBlockWall())); - - helper.succeed(); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testRecipeColossalChestNetherite(GameTestHelper helper) { - assertRecipeResult(helper, RecipeType.CRAFTING, CraftingInput.of(2, 1, List.of( - new ItemStack(ChestMaterial.NETHERITE.getBlockWall()), - new ItemStack(Items.IRON_INGOT) - )), new ItemStack(ChestMaterial.NETHERITE.getBlockCore())); - - helper.succeed(); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testRecipeInterfaceNetherite(GameTestHelper helper) { - ItemStack cobblestone = new ItemStack(Items.COBBLESTONE); - assertRecipeResult(helper, RecipeType.CRAFTING, CraftingInput.of(3, 3, List.of( - ItemStack.EMPTY, cobblestone, ItemStack.EMPTY, - cobblestone, new ItemStack(ChestMaterial.NETHERITE.getBlockWall()), cobblestone, - ItemStack.EMPTY, cobblestone, ItemStack.EMPTY - )), new ItemStack(ChestMaterial.NETHERITE.getBlockInterface())); - - helper.succeed(); - } - - private > void assertRecipeResult(GameTestHelper helper, RecipeType recipeType, - I input, ItemStack expected) { - ItemStack result = helper.getLevel().getRecipeManager() - .getRecipeFor(recipeType, input, helper.getLevel()) - .map(recipe -> recipe.value().assemble(input, helper.getLevel().registryAccess())) - .orElse(ItemStack.EMPTY); - helper.assertTrue(ItemStack.isSameItem(result, expected), - "Expected recipe result " + expected.getItem() + ", but got " + result.getItem()); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementRootNegative(GameTestHelper helper) { - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - serverPlayer.getInventory().add(new ItemStack(Items.DIRT)); - CriteriaTriggers.INVENTORY_CHANGED.trigger(serverPlayer, serverPlayer.getInventory(), new ItemStack(Items.DIRT)); - - helper.succeedWhen(() -> assertAdvancementNotDone(helper, serverPlayer, ResourceLocation.parse("colossalchests:root"))); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementRoot(GameTestHelper helper) { - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - serverPlayer.getInventory().add(new ItemStack(Items.CHEST)); - CriteriaTriggers.INVENTORY_CHANGED.trigger(serverPlayer, serverPlayer.getInventory(), new ItemStack(Items.CHEST)); - - helper.succeedWhen(() -> assertAdvancementDone(helper, serverPlayer, ResourceLocation.parse("colossalchests:root"))); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementUncolossalNegative(GameTestHelper helper) { - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - placeBlockAsServerPlayer(helper, serverPlayer, POS, Blocks.CHEST); - - helper.succeedWhen(() -> assertAdvancementNotDone(helper, serverPlayer, ResourceLocation.parse("colossalchests:uncolossal"))); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementUncolossal(GameTestHelper helper) { - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - placeBlockAsServerPlayer(helper, serverPlayer, POS, RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value()); - - helper.succeedWhen(() -> assertAdvancementDone(helper, serverPlayer, ResourceLocation.parse("colossalchests:uncolossal"))); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseWoodNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.COPPER, "colossalchests:base/wood"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseCopperNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/copper"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseIronNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/iron"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseSilverNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/silver"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseGoldNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/gold"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseDiamondNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/diamond"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseObsidianNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/obsidian"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseNetheriteNegative(GameTestHelper helper) { - testAdvancementBaseNegative(helper, ChestMaterial.WOOD, "colossalchests:base/netherite"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseWood(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.WOOD, "colossalchests:base/wood"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseCopper(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.COPPER, "colossalchests:base/copper"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseIron(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.IRON, "colossalchests:base/iron"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseSilver(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.SILVER, "colossalchests:base/silver"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseGold(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.GOLD, "colossalchests:base/gold"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseDiamond(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.DIAMOND, "colossalchests:base/diamond"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseObsidian(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.OBSIDIAN, "colossalchests:base/obsidian"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementBaseNetherite(GameTestHelper helper) { - testAdvancementBase(helper, ChestMaterial.NETHERITE, "colossalchests:base/netherite"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeWoodNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.WOOD, "colossalchests:size/wood"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeCopperNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.COPPER, "colossalchests:size/copper"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeIronNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.IRON, "colossalchests:size/iron"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeSilverNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.SILVER, "colossalchests:size/silver"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeGoldNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.GOLD, "colossalchests:size/gold"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeDiamondNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.DIAMOND, "colossalchests:size/diamond"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeObsidianNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.OBSIDIAN, "colossalchests:size/obsidian"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeNetheriteNegative(GameTestHelper helper) { - testAdvancementSizeNegative(helper, ChestMaterial.NETHERITE, "colossalchests:size/netherite"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeWood(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.WOOD, "colossalchests:size/wood"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeCopper(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.COPPER, "colossalchests:size/copper"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeIron(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.IRON, "colossalchests:size/iron"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeSilver(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.SILVER, "colossalchests:size/silver"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeGold(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.GOLD, "colossalchests:size/gold"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeDiamond(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.DIAMOND, "colossalchests:size/diamond"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeObsidian(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.OBSIDIAN, "colossalchests:size/obsidian"); - } - - @GameTest(template = TEMPLATE_EMPTY) - public void testAdvancementSizeNetherite(GameTestHelper helper) { - testAdvancementSize(helper, ChestMaterial.NETHERITE, "colossalchests:size/netherite"); - } - - private void testAdvancementBaseNegative(GameTestHelper helper, ChestMaterial material, String advancementId) { - BlockPos excludedWall = POS.offset(1, 0, 0); - createChest(helper, POS, material, 2, Sets.newHashSet(excludedWall)); - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - placeBlockAsServerPlayer(helper, serverPlayer, excludedWall, material.getBlockWall()); - - helper.succeedWhen(() -> assertAdvancementNotDone(helper, serverPlayer, ResourceLocation.parse(advancementId))); - } - - private void testAdvancementSizeNegative(GameTestHelper helper, ChestMaterial material, String advancementId) { - BlockPos excludedWall = POS.offset(1, 0, 0); - createChest(helper, POS, material, 2, Sets.newHashSet(excludedWall)); - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - placeBlockAsServerPlayer(helper, serverPlayer, excludedWall, material.getBlockWall()); - - helper.succeedWhen(() -> assertAdvancementNotDone(helper, serverPlayer, ResourceLocation.parse(advancementId))); - } - - private void testAdvancementBase(GameTestHelper helper, ChestMaterial material, String advancementId) { - BlockPos excludedWall = POS.offset(1, 0, 0); - createChest(helper, POS, material, 2, Sets.newHashSet(excludedWall)); - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - placeBlockAsServerPlayer(helper, serverPlayer, excludedWall, material.getBlockWall()); - - helper.succeedWhen(() -> assertAdvancementDone(helper, serverPlayer, ResourceLocation.parse(advancementId))); - } - - private void testAdvancementSize(GameTestHelper helper, ChestMaterial material, String advancementId) { - BlockPos chestStart = BlockPos.ZERO; - BlockPos excludedWall = chestStart.offset(9, 0, 0); - createChest(helper, chestStart, material, 10, Sets.newHashSet(excludedWall)); - ServerPlayer serverPlayer = makeMockServerPlayer(helper); - placeBlockAsServerPlayer(helper, serverPlayer, excludedWall, material.getBlockWall()); - - helper.succeedWhen(() -> assertAdvancementDone(helper, serverPlayer, ResourceLocation.parse(advancementId))); - } - - @SuppressWarnings("removal") - private ServerPlayer makeMockServerPlayer(GameTestHelper helper) { - return helper.makeMockServerPlayerInLevel(); - } - - private void placeBlockAsServerPlayer(GameTestHelper helper, ServerPlayer serverPlayer, BlockPos pos, Block block) { - ItemStack itemStack = new ItemStack(block); - serverPlayer.setItemInHand(InteractionHand.MAIN_HAND, itemStack); - itemStack.useOn(new UseOnContext(serverPlayer, InteractionHand.MAIN_HAND, - new BlockHitResult(Vec3.atCenterOf(helper.absolutePos(pos)), Direction.DOWN, helper.absolutePos(pos), false))); - } - - private void assertAdvancementNotDone(GameTestHelper helper, ServerPlayer player, ResourceLocation advancementId) { - AdvancementHolder holder = helper.getLevel().getServer().getAdvancements().get(advancementId); - helper.assertTrue(holder != null, "Advancement " + advancementId + " not found"); - helper.assertTrue( - !player.getAdvancements().getOrStartProgress(holder).isDone(), - "Advancement " + advancementId + " should not have been obtained"); - } - - private void assertAdvancementDone(GameTestHelper helper, ServerPlayer player, ResourceLocation advancementId) { - AdvancementHolder holder = helper.getLevel().getServer().getAdvancements().get(advancementId); - helper.assertTrue(holder != null, "Advancement " + advancementId + " not found"); - helper.assertTrue( - player.getAdvancements().getOrStartProgress(holder).isDone(), - "Advancement " + advancementId + " has not been obtained"); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/InventoryColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/InventoryColossalChest.java deleted file mode 100644 index 5191da1c1..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/InventoryColossalChest.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.cyclops.colossalchests.inventory; - -import net.minecraft.world.entity.player.Player; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.cyclopscore.inventory.IndexedInventoryCommon; - -/** - * The inventory that holds a colossal chest's contents, which forwards opening and closing to the chest. - * @author rubensworks - */ -public class InventoryColossalChest extends IndexedInventoryCommon { - - private final BlockEntityColossalChest chest; - - public InventoryColossalChest(BlockEntityColossalChest chest, int size, int stackLimit) { - super(size, stackLimit); - this.chest = chest; - } - - @Override - public void startOpen(Player entityPlayer) { - if (!entityPlayer.isSpectator()) { - super.startOpen(entityPlayer); - this.chest.startOpen(entityPlayer); - } - } - - @Override - public void stopOpen(Player entityPlayer) { - if (!entityPlayer.isSpectator()) { - super.stopOpen(entityPlayer); - this.chest.stopOpen(entityPlayer); - } - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/InventoryUncolossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/InventoryUncolossalChest.java deleted file mode 100644 index a28c32624..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/InventoryUncolossalChest.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.cyclops.colossalchests.inventory; - -import net.minecraft.world.entity.player.Player; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; - -/** - * The inventory that holds an uncolossal chest's contents, which forwards opening and closing to the chest. - * @author rubensworks - */ -public class InventoryUncolossalChest extends SimpleInventoryCommon { - - private final BlockEntityUncolossalChest chest; - - public InventoryUncolossalChest(BlockEntityUncolossalChest chest, int size, int stackLimit) { - super(size, stackLimit); - this.chest = chest; - } - - @Override - public void startOpen(Player entityPlayer) { - if (!entityPlayer.isSpectator()) { - super.startOpen(entityPlayer); - this.chest.startOpen(entityPlayer); - } - } - - @Override - public void stopOpen(Player entityPlayer) { - if (!entityPlayer.isSpectator()) { - super.stopOpen(entityPlayer); - this.chest.stopOpen(entityPlayer); - } - } - - @Override - public boolean stillValid(Player entityplayer) { - return super.stillValid(entityplayer) - && this.chest.getLevel().getBlockEntity(this.chest.getBlockPos()) == this.chest; - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java deleted file mode 100644 index 60626e0fc..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChest.java +++ /dev/null @@ -1,277 +0,0 @@ -package org.cyclops.colossalchests.inventory.container; - -import com.google.common.collect.Lists; -import com.google.gson.JsonParseException; -import net.minecraft.core.NonNullList; -import net.minecraft.nbt.*; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.network.ServerGamePacketListenerImpl; -import net.minecraft.world.Container; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.inventory.ContainerListener; -import net.minecraft.world.inventory.ResultSlot; -import net.minecraft.world.inventory.Slot; -import net.minecraft.world.item.ItemStack; -import org.apache.logging.log4j.Level; -import org.cyclops.colossalchests.ColossalChestsInstance; -import org.cyclops.colossalchests.GeneralConfig; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetContentPacketWindow; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetSlotPacketLarge; -import org.cyclops.cyclopscore.inventory.LargeInventoryCommon; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; -import org.cyclops.cyclopscore.inventory.container.ContainerExtendedCommon; -import org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainerCommon; -import org.cyclops.cyclopscore.inventory.slot.SlotExtended; - -import java.io.UnsupportedEncodingException; -import java.util.Collections; -import java.util.List; - -/** - * Container for the {@link org.cyclops.colossalchests.block.ColossalChest}. - * @author rubensworks - * - */ -public class ContainerColossalChest extends ScrollingInventoryContainerCommon { - - private static final int INVENTORY_OFFSET_X = 9; - private static final int INVENTORY_OFFSET_Y = 112; - - private static final int CHEST_INVENTORY_OFFSET_X = 9; - private static final int CHEST_INVENTORY_OFFSET_Y = 18; - /** - * Amount of visible rows in the chest. - */ - public static final int CHEST_INVENTORY_ROWS = 5; - /** - * Amount of columns in the chest. - */ - public static final int CHEST_INVENTORY_COLUMNS = 9; - - - private final List chestSlots; - private final NonNullList inventoryItemStacks; - private int lastInventoryState = -2; - private boolean firstDetectionCheck = true; - - public ContainerColossalChest(int id, Inventory playerInventory, FriendlyByteBuf data) { - this(id, playerInventory, new LargeInventoryCommon(data.readInt(), 64)); - } - - public ContainerColossalChest(int id, Inventory playerInventory, Container inventory) { - super(RegistryEntries.CONTAINER_COLOSSAL_CHEST.value(), id, playerInventory, inventory, Collections.emptyList(), (item, pattern) -> true); - - this.chestSlots = Lists.newArrayListWithCapacity(getSizeInventory()); - this.inventoryItemStacks = NonNullList.withSize(getSizeInventory(), ItemStack.EMPTY); - this.addChestSlots(getSizeInventory() / CHEST_INVENTORY_COLUMNS, CHEST_INVENTORY_COLUMNS); - this.addPlayerInventory(playerInventory, INVENTORY_OFFSET_X, INVENTORY_OFFSET_Y); - updateFilter(""); - } - - @SuppressWarnings("unchecked") - @Override - protected List getUnfilteredItems() { - return this.chestSlots; - } - - protected void addChestSlots(int rows, int columns) { - for (int row = 0; row < rows; row++) { - for (int column = 0; column < columns; column++) { - Slot slot = makeSlot(inventory, column + row * columns, CHEST_INVENTORY_OFFSET_X + column * 18, CHEST_INVENTORY_OFFSET_Y + row * 18); - addSlot(slot); - chestSlots.add(slot); - } - } - } - - protected Slot makeSlot(Container inventory, int index, int row, int column) { - return new SlotExtended(inventory, index, row, column); - } - - @Override - public int getColumns() { - return CHEST_INVENTORY_COLUMNS; - } - - @Override - public int getPageSize() { - return CHEST_INVENTORY_ROWS; - } - - protected void disableSlot(int slotIndex) { - Slot slot = getSlot(slotIndex); - // Yes I know this is ugly. - // If you are reading this and know a better way, please tell me. - ContainerExtendedCommon.setSlotPosX(slot, Integer.MIN_VALUE); - ContainerExtendedCommon.setSlotPosY(slot, Integer.MIN_VALUE); - } - - protected void enableSlot(int slotIndex, int row, int column) { - Slot slot = getSlot(slotIndex); - // Yes I know this is ugly. - // If you are reading this and know a better way, please tell me. - ContainerExtendedCommon.setSlotPosX(slot, CHEST_INVENTORY_OFFSET_X + column * 18); - ContainerExtendedCommon.setSlotPosY(slot, CHEST_INVENTORY_OFFSET_Y + row * 18); - } - - @Override - public void onScroll(int firstRow) { - for(int i = 0; i < getUnfilteredItemCount(); i++) { - disableSlot(i); - } - super.onScroll(firstRow); - } - - @Override - protected void enableElementAt(int visibleIndex, int elementIndex, Slot element) { - super.enableElementAt(visibleIndex, elementIndex, element); - int column = visibleIndex % getColumns(); - int row = (visibleIndex - column) / getColumns(); - enableSlot(elementIndex, row, column); - } - - @Override - public void addSlotListener(ContainerListener listener) { - if (this.containerListeners.contains(listener)) { - throw new IllegalArgumentException("Listener already listening"); - } else { - this.containerListeners.add(listener); - if (this.player instanceof ServerPlayer serverPlayer && serverPlayer.containerListener == listener) { - updateCraftingInventory(serverPlayer, getItems()); - } else { - // TODO: rm? - //listener.refreshContainer(this, this.getItems()); - } - this.broadcastChanges(); - } - } - - @Override - public void broadcastChanges() { - int newState = ((SimpleInventoryCommon) inventory).getState(); - if (lastInventoryState != newState) { - lastInventoryState = newState; - detectAndSendChangesOverride(); - } - } - - // Custom implementation of Container#detectAndSendChanges - protected void detectAndSendChangesOverride() { - for (int i = 0; i < this.getSizeInventory(); ++i) { - ItemStack itemstack = this.slots.get(i).getItem(); - ItemStack itemstack1 = this.inventoryItemStacks.get(i); - - if (!ItemStack.matches(itemstack1, itemstack)) { - itemstack1 = itemstack.isEmpty() ? ItemStack.EMPTY : itemstack.copy(); - this.inventoryItemStacks.set(i, itemstack1); - - if (!firstDetectionCheck) { - for (int j = 0; j < this.containerListeners.size(); ++j) { - ContainerListener listener = this.containerListeners.get(j); - if (this.player instanceof ServerPlayer serverPlayer && serverPlayer.containerListener == listener) { - sendSlotContentsToPlayer(serverPlayer, this, i, itemstack1); - } else { - listener.slotChanged(this, i, itemstack1); - } - } - } - } - } - firstDetectionCheck = false; - } - - // Adapted from EntityPlayerMP#sendSlotContents - protected void sendSlotContentsToPlayer(ServerPlayer player, AbstractContainerMenu containerToSend, int slotInd, ItemStack stack) { - if (!(containerToSend.getSlot(slotInd) instanceof ResultSlot)) { - ColossalChestsInstance.MOD.getPacketHandlerCommon().sendToPlayer( - new ClientboundContainerSetSlotPacketLarge(containerToSend.containerId, getStateId(), slotInd, stack), player); - } - } - - protected int getTagSize(Tag tag) { - if (tag instanceof NumericTag || tag instanceof EndTag) { - return 1; - } - if (tag instanceof CompoundTag) { - CompoundTag compound = (CompoundTag) tag; - int size = 0; - for (String key : compound.getAllKeys()) { - try { - size += key.getBytes("UTF-8").length; - } catch (UnsupportedEncodingException e) {} - size += getTagSize(compound.get(key)); - } - return size; - } - if (tag instanceof ByteArrayTag) { - return ((ByteArrayTag) tag).getAsByteArray().length; - } - if (tag instanceof IntArrayTag) { - return ((IntArrayTag) tag).getAsIntArray().length * 32; - } - if (tag instanceof ListTag) { - ListTag list = (ListTag) tag; - int size = 0; - for (int i = 0; i < list.size(); i++) { - size += getTagSize(list.get(i)); - } - return size; - } - if (tag instanceof StringTag) { - try { - return ((StringTag) tag).getAsString().getBytes("UTF-8").length + 1; - } catch (UnsupportedEncodingException e) {} - } - return tag.toString().length(); - } - - // Modified from ServerPlayer#updateCraftingInventory - public void updateCraftingInventory(ServerPlayer player, List allItems) { - int maxBufferSize = GeneralConfig.maxPacketBufferSize; - // Custom packet sending to be able to handle large inventories - ServerGamePacketListenerImpl playerNetServerHandler = player.connection; - // Modification of logic in EntityPlayerMP#updateCraftingInventory - CompoundTag sendBuffer = new CompoundTag(); - ListTag sendList = new ListTag(); - sendBuffer.put("stacks", sendList); - int i = 0; - int bufferSize = 0; - int sent = 0; - for (ItemStack itemStack : allItems) { - if (itemStack != null) { - CompoundTag tag = new CompoundTag(); - tag.putInt("slot", i); - try { - tag.put("stack", ItemStack.OPTIONAL_CODEC.encodeStart(player.registryAccess().createSerializationContext(NbtOps.INSTANCE), itemStack) - .getOrThrow(JsonParseException::new)); - } catch (JsonParseException e) { - ColossalChestsInstance.MOD.log(Level.ERROR, "Error while attempting to send a stack to a client " + itemStack); - e.printStackTrace(); - } - int tagSize = getTagSize(tag); - if (bufferSize + tagSize + 100 < maxBufferSize) { - sendList.add(tag); - bufferSize += tagSize; - } else { - // Flush - ColossalChestsInstance.MOD.getPacketHandlerCommon().sendToPlayer(new ClientboundContainerSetContentPacketWindow(containerId, getStateId(), sendBuffer), player); - sendBuffer = new CompoundTag(); - sendList = new ListTag(); - sendList.add(tag); - sendBuffer.put("stacks", sendList); - bufferSize = tagSize; - } - } - i++; - } - if (sendList.size() > 0) { - // Flush - ColossalChestsInstance.MOD.getPacketHandlerCommon().sendToPlayer(new ClientboundContainerSetContentPacketWindow(containerId, getStateId(), sendBuffer), player); - } - playerNetServerHandler.send(new ClientboundContainerSetSlotPacket(-1, getStateId(), -1, getCarried())); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChestConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChestConfig.java deleted file mode 100644 index 75f1b7aa6..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChestConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.cyclops.colossalchests.inventory.container; - -import net.minecraft.world.flag.FeatureFlags; -import org.cyclops.cyclopscore.config.extendedconfig.GuiConfigCommon; -import org.cyclops.cyclopscore.config.extendedconfig.GuiConfigScreenFactoryProvider; -import org.cyclops.cyclopscore.init.IModBase; -import org.cyclops.cyclopscore.inventory.container.ContainerTypeDataCommon; - -/** - * Config for {@link ContainerColossalChest}. - * @author rubensworks - */ -public class ContainerColossalChestConfig extends GuiConfigCommon { - - public ContainerColossalChestConfig(M mod) { - super(mod, - "colossal_chest", - eConfig -> new ContainerTypeDataCommon<>(ContainerColossalChest::new, FeatureFlags.VANILLA_SET)); - } - - @Override - public GuiConfigScreenFactoryProvider getScreenFactoryProvider() { - return new ContainerColossalChestConfigScreenFactoryProvider(); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChestConfigScreenFactoryProvider.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChestConfigScreenFactoryProvider.java deleted file mode 100644 index 749b6ee6c..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerColossalChestConfigScreenFactoryProvider.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.cyclops.colossalchests.inventory.container; - -import net.minecraft.client.gui.screens.MenuScreens; -import net.minecraft.client.gui.screens.Screen; -import net.minecraft.client.gui.screens.inventory.MenuAccess; -import org.cyclops.colossalchests.client.gui.container.ContainerScreenColossalChest; -import org.cyclops.cyclopscore.client.gui.ScreenFactorySafe; -import org.cyclops.cyclopscore.config.extendedconfig.GuiConfigScreenFactoryProvider; - -/** - * @author rubensworks - */ -public class ContainerColossalChestConfigScreenFactoryProvider extends GuiConfigScreenFactoryProvider { - @Override - public > MenuScreens.ScreenConstructor getScreenFactory() { - return new ScreenFactorySafe<>(ContainerScreenColossalChest::new); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChest.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChest.java deleted file mode 100644 index 127c12f7b..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.cyclops.colossalchests.inventory.container; - -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.Container; -import net.minecraft.world.SimpleContainer; -import net.minecraft.world.entity.player.Inventory; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.cyclopscore.inventory.container.InventoryContainerCommon; - -/** - * @author rubensworks - */ -public class ContainerUncolossalChest extends InventoryContainerCommon { - - public ContainerUncolossalChest(int id, Inventory playerInventory, FriendlyByteBuf buf) { - this(id, playerInventory, new SimpleContainer(5)); - } - - public ContainerUncolossalChest(int id, Inventory playerInventory, Container inventory) { - super(RegistryEntries.CONTAINER_UNCOLOSSAL_CHEST.value(), id, playerInventory, inventory); - - this.addInventory(inventory, 0, 44, 20, 1, getSizeInventory()); - this.addPlayerInventory(playerInventory, 8, 51); - } - - @Override - protected int getSizeInventory() { - return 5; - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChestConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChestConfig.java deleted file mode 100644 index 61dbdb441..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChestConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.cyclops.colossalchests.inventory.container; - -import net.minecraft.world.flag.FeatureFlags; -import org.cyclops.cyclopscore.config.extendedconfig.GuiConfigCommon; -import org.cyclops.cyclopscore.config.extendedconfig.GuiConfigScreenFactoryProvider; -import org.cyclops.cyclopscore.init.IModBase; -import org.cyclops.cyclopscore.inventory.container.ContainerTypeDataCommon; - -/** - * Config for {@link ContainerUncolossalChest}. - * @author rubensworks - */ -public class ContainerUncolossalChestConfig extends GuiConfigCommon { - - public ContainerUncolossalChestConfig(M mod) { - super(mod, - "uncolossal_chest", - eConfig -> new ContainerTypeDataCommon<>(ContainerUncolossalChest::new, FeatureFlags.VANILLA_SET)); - } - - @Override - public GuiConfigScreenFactoryProvider getScreenFactoryProvider() { - return new ContainerUncolossalChestConfigScreenFactoryProvider(); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChestConfigScreenFactoryProvider.java b/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChestConfigScreenFactoryProvider.java deleted file mode 100644 index 27603014e..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/inventory/container/ContainerUncolossalChestConfigScreenFactoryProvider.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.cyclops.colossalchests.inventory.container; - -import net.minecraft.client.gui.screens.MenuScreens; -import net.minecraft.client.gui.screens.Screen; -import net.minecraft.client.gui.screens.inventory.MenuAccess; -import org.cyclops.colossalchests.client.gui.container.ContainerScreenUncolossalChest; -import org.cyclops.cyclopscore.client.gui.ScreenFactorySafe; -import org.cyclops.cyclopscore.config.extendedconfig.GuiConfigScreenFactoryProvider; - -/** - * @author rubensworks - */ -public class ContainerUncolossalChestConfigScreenFactoryProvider extends GuiConfigScreenFactoryProvider { - @Override - public > MenuScreens.ScreenConstructor getScreenFactory() { - return new ScreenFactorySafe<>(ContainerScreenUncolossalChest::new); - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemBlockMaterial.java b/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemBlockMaterial.java deleted file mode 100644 index e8f421d48..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemBlockMaterial.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cyclops.colossalchests.item; - -import net.minecraft.ChatFormatting; -import net.minecraft.network.chat.Component; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.block.Block; -import org.cyclops.colossalchests.block.ChestMaterial; - -import java.util.List; - -/** - * @author rubensworks - */ -public class ItemBlockMaterial extends BlockItem { - - private final ChestMaterial material; - - public ItemBlockMaterial(Block block, Properties builder, ChestMaterial material) { - super(block, builder); - this.material = material; - } - - @Override - public void appendHoverText(ItemStack itemStack, Item.TooltipContext context, List list, TooltipFlag flag) { - list.add(Component.translatable(material.getUnlocalizedName()).withStyle(ChatFormatting.BLUE)); - super.appendHoverText(itemStack, context, list, flag); - - } -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemUpgradeTool.java b/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemUpgradeTool.java deleted file mode 100644 index 4a9d29405..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemUpgradeTool.java +++ /dev/null @@ -1,239 +0,0 @@ -package org.cyclops.colossalchests.item; - -import com.google.common.collect.Lists; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; -import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.InteractionHand; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.Vec3; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.block.ChestWall; -import org.cyclops.colossalchests.block.ColossalChest; -import org.cyclops.colossalchests.block.IBlockChestMaterial; -import org.cyclops.colossalchests.block.Interface; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.colossalchests.blockentity.BlockEntityInterface; -import org.cyclops.cyclopscore.block.multi.DetectionResult; -import org.cyclops.cyclopscore.datastructure.Wrapper; -import org.cyclops.cyclopscore.helper.IInventoryHelpers; -import org.cyclops.cyclopscore.helper.IModHelpers; -import org.cyclops.cyclopscore.inventory.PlayerInventoryIterator; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; - -import java.util.List; - -/** - * An item to upgrade chests to the next tier. - * @author rubensworks - */ -public class ItemUpgradeTool extends Item { - - private final boolean upgrade; - - public ItemUpgradeTool(Properties properties, boolean upgrade) { - super(properties); - this.upgrade = upgrade; - } - - public boolean isUpgrade() { - return upgrade; - } - - @Override - public InteractionResult useOn(UseOnContext context) { - ItemStack itemStack = context.getItemInHand(); - BlockState blockState = context.getLevel().getBlockState(context.getClickedPos()); - if (blockState.getBlock() instanceof IBlockChestMaterial - && IModHelpers.get().getBlockHelpers().getSafeBlockStateProperty(blockState, ColossalChest.ENABLED, false)) { - // Determine the chest core location - BlockPos tileLocation = ColossalChest.getCoreLocation(((IBlockChestMaterial) blockState.getBlock()).getMaterial(), context.getLevel(), context.getClickedPos()); - final BlockEntityColossalChest tile = IModHelpers.get().getBlockEntityHelpers().get(context.getLevel(), tileLocation, BlockEntityColossalChest.class).orElse(null); - - // Determine the new material type - ChestMaterial newType = transformType(itemStack, tile.getMaterial()); - if (newType == null) { - if(context.getLevel().isClientSide()) { - return InteractionResult.PASS; - } - ColossalChest.addPlayerChatError(context.getPlayer(), Component.translatable( - "multiblock.colossalchests.error.upgradeLimit")); - return InteractionResult.FAIL; - } - - // Loop over the up/downgrade tiers until one works. - Component firstError = null; - do { - Component error = attemptTransform(context.getLevel(), context.getClickedPos(), context.getPlayer(), tile, newType, tile.getMaterial(), context.getHand()); - if (error != null) { - if (firstError == null) { - firstError = error; - } - } else { - return context.getLevel().isClientSide() ? InteractionResult.PASS : InteractionResult.SUCCESS; - } - } while((newType = transformType(itemStack, newType)) != null); - - ColossalChest.addPlayerChatError(context.getPlayer(), firstError); - return context.getLevel().isClientSide() ? InteractionResult.PASS : InteractionResult.FAIL; - } - return context.getLevel().isClientSide() ? InteractionResult.PASS : InteractionResult.SUCCESS; - } - - protected Component attemptTransform(final Level world, BlockPos pos, Player player, - final BlockEntityColossalChest tile, final ChestMaterial newType, - final ChestMaterial currentType, InteractionHand hand) { - Vec3i size = tile.getSize(); - - // Calculate required item blocks - ChestMaterial validMaterial = null; - Wrapper requiredCoresCount = new Wrapper<>(0); - Wrapper requiredInterfacesCount = new Wrapper<>(0); - Wrapper requiredWallsCount = new Wrapper<>(0); - for (ChestMaterial material : ChestMaterial.VALUES) { - DetectionResult result = material.getChestDetector().detect(world, pos, null, (location, blockState) -> { - if (blockState.getBlock() instanceof ColossalChest) { - requiredCoresCount.set(requiredCoresCount.get() + 1); - } else if (blockState.getBlock() instanceof Interface) { - requiredInterfacesCount.set(requiredInterfacesCount.get() + 1); - } else if (blockState.getBlock() instanceof ChestWall) { - requiredWallsCount.set(requiredWallsCount.get() + 1); - } - return null; - }, false); - if (result.getError() == null) { - validMaterial = material; - break; - } - } - - ItemStack requiredCores = new ItemStack(newType.getBlockCore(), requiredCoresCount.get()); - ItemStack requiredInterfaces = new ItemStack(newType.getBlockInterface(), requiredInterfacesCount.get()); - ItemStack requiredWalls = new ItemStack(newType.getBlockWall(), requiredWallsCount.get()); - - if (validMaterial == null) { - return Component.translatable("multiblock.colossalchests.error.unexpected"); - } - - // Check required items in inventory - if (!(consumeItems(player, requiredCores, true) - && consumeItems(player, requiredInterfaces, true) - && consumeItems(player, requiredWalls, true))) { - return Component.translatable( - "multiblock.colossalchests.error.upgrade", requiredCores.getCount(), - requiredInterfaces.getCount(), requiredWalls.getCount(), Component.translatable(newType.getUnlocalizedName())); - } - - // Actually consume the items - consumeItems(player, requiredCores.copy(), false); - consumeItems(player, requiredInterfaces.copy(), false); - consumeItems(player, requiredWalls.copy(), false); - - // Update the chest material and move the contents to the new tile - if(!world.isClientSide) { - tile.setSize(Vec3i.ZERO); - SimpleInventoryCommon oldInventory = tile.getLastValidInventory(); - Direction oldRotation = tile.getRotation(); - Vec3 oldRenderOffset = tile.getRenderOffset(); - List oldInterfaceLocations = Lists.newArrayList(tile.getInterfaceLocations()); - Wrapper coreLocation = new Wrapper<>(null); - List interfaceLocations = Lists.newArrayList(); - validMaterial.getChestDetector().detect(world, pos, null, (location, blockState) -> { - BlockState blockStateNew = null; - if (blockState.getBlock() instanceof ColossalChest) { - coreLocation.set(location); - blockStateNew = newType.getBlockCore().defaultBlockState(); - } else if (blockState.getBlock() instanceof Interface) { - blockStateNew = newType.getBlockInterface().defaultBlockState(); - interfaceLocations.add(location); - } else if (blockState.getBlock() instanceof ChestWall) { - blockStateNew = newType.getBlockWall().defaultBlockState(); - } - - world.setBlock(location, blockStateNew.setValue(ColossalChest.ENABLED, blockState.getValue(ColossalChest.ENABLED)), - IModHelpers.get().getMinecraftHelpers().getBlockNotifyClient()); - if (blockState.getBlock() instanceof ColossalChest - || blockState.getBlock() instanceof Interface) { - tile.addInterface(location); - } - return null; - }, false); - - // From this point on, use the new tile entity - BlockEntityColossalChest tileNew = IModHelpers.get().getBlockEntityHelpers().get(world, coreLocation.get(), BlockEntityColossalChest.class) - .orElseThrow(() -> new IllegalStateException("Could not find a colossal chest core location during upgrading.")); - tileNew.setLastValidInventory(oldInventory); - tileNew.setMaterial(newType); - tileNew.setRotation(oldRotation); - tileNew.setRenderOffset(oldRenderOffset); - for (Vec3i oldInterfaceLocation : oldInterfaceLocations) { - tileNew.addInterface(oldInterfaceLocation); - } - tileNew.setSize(size); // To trigger the chest size to be updated - - // Set the core position into the newly transformed interfaces - for (BlockPos interfaceLocation : interfaceLocations) { - BlockEntityInterface tileInterface = IModHelpers.get().getBlockEntityHelpers().get(world, interfaceLocation, BlockEntityInterface.class) - .orElseThrow(() -> new IllegalStateException("Could not find a colossal chest interface location during upgrading.")); - tileInterface.setCorePosition(coreLocation.get()); - } - - if (player instanceof ServerPlayer serverPlayer) { - RegistryEntries.TRIGGER_CHEST_FORMED.value().test(serverPlayer, newType, size.getX() + 1); - } - } - - // Add the lower tier items to the players inventory again. - ItemStack returnedCores = new ItemStack(currentType.getBlockCore(), requiredCores.getCount()); - ItemStack returnedInterfaces = new ItemStack(currentType.getBlockInterface(), requiredInterfaces.getCount()); - ItemStack returnedWalls = new ItemStack(currentType.getBlockWall(), requiredWalls.getCount()); - IInventoryHelpers inventoryHelpers = IModHelpers.get().getInventoryHelpers(); - inventoryHelpers.tryReAddToStack(player, ItemStack.EMPTY, returnedCores, hand); - inventoryHelpers.tryReAddToStack(player, ItemStack.EMPTY, returnedInterfaces, hand); - inventoryHelpers.tryReAddToStack(player, ItemStack.EMPTY, returnedWalls, hand); - - return null; - } - - protected boolean consumeItems(Player player, ItemStack consumeStack, boolean simulate) { - if (player.isCreative()) { - return true; - } - PlayerInventoryIterator it = new PlayerInventoryIterator(player); - int validItems = 0; - while (it.hasNext()) { - ItemStack stack = it.next(); - if (!stack.isEmpty()) { - if (ItemStack.isSameItemSameComponents(stack, consumeStack)) { - int previousValidItems = validItems; - validItems += stack.getCount(); - validItems = Math.min(consumeStack.getCount(), validItems); - if (!simulate) { - stack.shrink(validItems - previousValidItems); - it.replace(stack.getCount() == 0 ? ItemStack.EMPTY : stack); - } - } - } - } - return validItems == consumeStack.getCount(); - } - - protected ChestMaterial transformType(ItemStack itemStack, ChestMaterial type) { - if (upgrade && type.ordinal() < ChestMaterial.VALUES.size() - 1) { - return ChestMaterial.VALUES.get(type.ordinal() + 1); - } else if (!upgrade && type.ordinal() > 0) { - return ChestMaterial.VALUES.get(type.ordinal() - 1); - } - return null; - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemUpgradeToolConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemUpgradeToolConfig.java deleted file mode 100644 index 283e20034..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/item/ItemUpgradeToolConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.item; - -import net.minecraft.world.item.Item; -import org.cyclops.cyclopscore.config.extendedconfig.ItemConfigCommon; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the facade. - * @author rubensworks - */ -public class ItemUpgradeToolConfig extends ItemConfigCommon { - - public ItemUpgradeToolConfig(M mod, boolean upgrade) { - super( - mod, - "upgrade_tool" + (upgrade ? "" : "_reverse"), - (eConfig) -> new ItemUpgradeTool(new Item.Properties() - .stacksTo(1), - upgrade) - ); - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ClientboundContainerSetContentPacketWindow.java b/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ClientboundContainerSetContentPacketWindow.java deleted file mode 100644 index 56fe4531e..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ClientboundContainerSetContentPacketWindow.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.cyclops.colossalchests.network.packet; - -import net.minecraft.core.HolderLookup; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.ListTag; -import net.minecraft.nbt.Tag; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import org.cyclops.colossalchests.Reference; -import org.cyclops.cyclopscore.network.CodecField; -import org.cyclops.cyclopscore.network.PacketCodec; - -/** - * Packet for sending fragmented window items as an alternative to - * {@link ClientboundContainerSetContentPacket}. - * @author rubensworks - * - */ -public class ClientboundContainerSetContentPacketWindow extends PacketCodec { - - public static final Type TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "clientbound_container_set_content_packet_window")); - public static final StreamCodec CODEC = getCodec(ClientboundContainerSetContentPacketWindow::new); - - @CodecField - private int windowId; - @CodecField - private int stateId; - @CodecField - private CompoundTag itemStacks; - - public ClientboundContainerSetContentPacketWindow() { - super(TYPE); - } - - public ClientboundContainerSetContentPacketWindow(int windowId, int stateId, CompoundTag itemStacks) { - super(TYPE); - this.windowId = windowId; - this.stateId = stateId; - this.itemStacks = itemStacks; - } - - @Override - public boolean isAsync() { - return false; - } - - @Override - public void actionClient(Level world, Player player) { - // Modified code from NetHandlerPlayClient#handleWindowItems - if (windowId == 0) { - putStacksInSlotsWithOffset(world.registryAccess(), player.inventoryMenu); - } else if (windowId == player.containerMenu.containerId) { - putStacksInSlotsWithOffset(world.registryAccess(), player.containerMenu); - } - } - - protected void putStacksInSlotsWithOffset(HolderLookup.Provider provider, AbstractContainerMenu container) { - ListTag list = itemStacks.getList("stacks", Tag.TAG_COMPOUND); - for (int i = 0; i < list.size(); i++) { - CompoundTag tag = list.getCompound(i); - int slot = tag.getInt("slot"); - ItemStack stack = ItemStack.parseOptional(provider, tag.getCompound("stack")); - container.setItem(slot, this.stateId, stack); - } - } - - @Override - public void actionServer(Level world, ServerPlayer player) { - - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ClientboundContainerSetSlotPacketLarge.java b/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ClientboundContainerSetSlotPacketLarge.java deleted file mode 100644 index c1a95cc0f..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ClientboundContainerSetSlotPacketLarge.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.cyclops.colossalchests.network.packet; - -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import org.cyclops.colossalchests.Reference; -import org.cyclops.cyclopscore.network.CodecField; -import org.cyclops.cyclopscore.network.PacketCodec; - -/** - * Packet for setting slots with id's larger than max short size (65535). - * {@link ClientboundContainerSetSlotPacket}. - * @author rubensworks - * - */ -public class ClientboundContainerSetSlotPacketLarge extends PacketCodec { - - public static final Type TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "clientbound_container_set_slot_packet_large")); - public static final StreamCodec CODEC = getCodec(ClientboundContainerSetSlotPacketLarge::new); - - @CodecField - private int windowId; - @CodecField - private int stateId; - @CodecField - private int slot; - @CodecField - private ItemStack itemStack; - - public ClientboundContainerSetSlotPacketLarge() { - super(TYPE); - } - - public ClientboundContainerSetSlotPacketLarge(int windowId, int stateId, int slot, ItemStack itemStack) { - super(TYPE); - this.windowId = windowId; - this.stateId = stateId; - this.slot = slot; - this.itemStack = itemStack; - } - - @Override - public boolean isAsync() { - return false; - } - - @Override - public void actionClient(Level world, Player player) { - // Modified code from NetHandlerPlayClient#handleSetSlot - if (windowId == player.containerMenu.containerId) { - player.containerMenu.setItem(slot, stateId, itemStack); - } - } - - @Override - public void actionServer(Level world, ServerPlayer player) { - - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ServerboundContainerClickPacketOverride.java b/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ServerboundContainerClickPacketOverride.java deleted file mode 100644 index a4a3e59c8..000000000 --- a/loader-common/src/main/java/org/cyclops/colossalchests/network/packet/ServerboundContainerClickPacketOverride.java +++ /dev/null @@ -1,130 +0,0 @@ -package org.cyclops.colossalchests.network.packet; - -import com.google.common.collect.Lists; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; -import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -import net.minecraft.core.NonNullList; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamCodec; -import net.minecraft.network.protocol.game.ServerboundContainerClickPacket; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.ClickType; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChest; -import org.cyclops.cyclopscore.network.CodecField; -import org.cyclops.cyclopscore.network.PacketCodec; - -import java.util.ArrayList; -import java.util.function.IntFunction; - -/** - * Packet for window clicks to the server as an alternative to - * {@link ServerboundContainerClickPacket}. - * @author rubensworks - * - */ -public class ServerboundContainerClickPacketOverride extends PacketCodec { - - public static final Type TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "serverbound_container_click_packet_override")); - public static final StreamCodec CODEC = getCodec(ServerboundContainerClickPacketOverride::new); - - @CodecField - private int windowId; - @CodecField - private int stateId; - @CodecField - private int slotId; - @CodecField - private int usedButton; - @CodecField - private ItemStack clickedItem; - @CodecField - private String mode; - private Int2ObjectMap changedSlots; - - public ServerboundContainerClickPacketOverride() { - super(TYPE); - } - - public ServerboundContainerClickPacketOverride(int windowId, int stateId, int slotId, int usedButton, ClickType mode, ItemStack clickedItem, Int2ObjectMap changedSlots) { - super(TYPE); - this.windowId = windowId; - this.stateId = stateId; - this.slotId = slotId; - this.usedButton = usedButton; - this.clickedItem = clickedItem != null ? clickedItem.copy() : null; - this.mode = mode.name(); - this.changedSlots = changedSlots; - } - - @Override - public void encode(RegistryFriendlyByteBuf output) { - super.encode(output); - output.writeMap(this.changedSlots, FriendlyByteBuf::writeInt, (b, i) -> ItemStack.OPTIONAL_STREAM_CODEC.encode(output, i)); - } - - @Override - public void decode(RegistryFriendlyByteBuf input) { - super.decode(input); - IntFunction> intfunction = FriendlyByteBuf.limitValue(Int2ObjectOpenHashMap::new, 128); - this.changedSlots = Int2ObjectMaps.unmodifiable(input.readMap(intfunction, FriendlyByteBuf::readInt, b -> ItemStack.OPTIONAL_STREAM_CODEC.decode(input))); - } - - @Override - public boolean isAsync() { - return false; - } - - @Override - public void actionClient(Level world, Player player) { - - } - - // Adapted from ServerGamePacketListenerImpl#handleContainerClick - @Override - public void actionServer(Level world, ServerPlayer player) { - player.resetLastActionTime(); - if (player.containerMenu.containerId == windowId) { - if (player.isSpectator()) { - ArrayList arraylist = Lists.newArrayList(); - - for (int i = 0; i < player.containerMenu.slots.size(); ++i) { - arraylist.add((player.containerMenu.slots.get(i)).getItem()); - } - - ((ContainerColossalChest) player.containerMenu).updateCraftingInventory(player, arraylist); - } else { - boolean flag = this.stateId != player.containerMenu.getStateId(); - player.containerMenu.suppressRemoteUpdates(); - player.containerMenu.clicked(slotId, usedButton, ClickType.valueOf(mode), player); - - for(Int2ObjectMap.Entry entry : Int2ObjectMaps.fastIterable(changedSlots)) { - player.containerMenu.setRemoteSlotNoCopy(entry.getIntKey(), entry.getValue()); - } - - player.containerMenu.setRemoteCarried(clickedItem); - player.containerMenu.resumeRemoteUpdates(); - if (flag) { - // Original: player.containerMenu.broadcastFullState(); - - NonNullList nonnulllist1 = NonNullList.create(); - - for (int j = 0; j < player.containerMenu.slots.size(); ++j) { - nonnulllist1.add(player.containerMenu.slots.get(j).getItem()); - } - - ((ContainerColossalChest) player.containerMenu).updateCraftingInventory(player, nonnulllist1); - } else { - player.containerMenu.broadcastChanges(); - } - } - } - } - -} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/ColossalChestsInstance.java b/loader-common/src/main/java/org/cyclops/colossalchests2/ColossalChestsInstance.java similarity index 81% rename from loader-common/src/main/java/org/cyclops/colossalchests/ColossalChestsInstance.java rename to loader-common/src/main/java/org/cyclops/colossalchests2/ColossalChestsInstance.java index e7d9088e0..3aa8191ec 100644 --- a/loader-common/src/main/java/org/cyclops/colossalchests/ColossalChestsInstance.java +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/ColossalChestsInstance.java @@ -1,4 +1,4 @@ -package org.cyclops.colossalchests; +package org.cyclops.colossalchests2; import org.cyclops.cyclopscore.init.IModBase; diff --git a/loader-common/src/main/java/org/cyclops/colossalchests2/GeneralConfig.java b/loader-common/src/main/java/org/cyclops/colossalchests2/GeneralConfig.java new file mode 100644 index 000000000..d16c2c82c --- /dev/null +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/GeneralConfig.java @@ -0,0 +1,86 @@ +package org.cyclops.colossalchests2; + +import org.cyclops.cyclopscore.config.ConfigurablePropertyCommon; +import org.cyclops.cyclopscore.config.ModConfigLocation; +import org.cyclops.cyclopscore.config.extendedconfig.DummyConfigCommon; +import org.cyclops.cyclopscore.init.IModBase; + +/** + * A config with general options for this mod. + * @author rubensworks + * + */ +public class GeneralConfig extends DummyConfigCommon { + + public static final int MIN_SIZE = 2; + public static final int HARD_MAX_SIZE = 10; + public static final int HARD_MAX_SLOTS = 81; + + @ConfigurablePropertyCommon(category = "chest", comment = "The number of slots of a chest without upgrades.", minimalValue = 1, maximalValue = HARD_MAX_SLOTS, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int baseSlots = 27; + @ConfigurablePropertyCommon(category = "chest", comment = "The maximum number of slots of a chest, including upgrades.", minimalValue = 1, maximalValue = HARD_MAX_SLOTS, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int maxSlots = HARD_MAX_SLOTS; + + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 2.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize2 = 4; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 3.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize3 = 16; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 4.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize4 = 64; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 5.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize5 = 256; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 6.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize6 = 1024; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 7.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize7 = 4096; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 8.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize8 = 16384; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 9.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize9 = 65536; + @ConfigurablePropertyCommon(category = "chest", comment = "Stacks per slot for a chest with an outer size of 10.", minimalValue = 1, isCommandable = true, configLocation = ModConfigLocation.SERVER) + public static int depthSize10 = 262144; + + public GeneralConfig(M mod) { + super(mod, "general"); + } + + // Config values are not range-checked when loaded, so getters clamp them. + + /** + * @return The number of slots without upgrades, within [1, {@link #getMaxSlots()}]. + */ + public static int getBaseSlots() { + return Math.clamp(baseSlots, 1, getMaxSlots()); + } + + /** + * @return The maximum number of slots, within [1, {@link #HARD_MAX_SLOTS}]. + */ + public static int getMaxSlots() { + return Math.clamp(maxSlots, 1, HARD_MAX_SLOTS); + } + + /** + * @param size The outer edge length of a chest structure. + * @return Stacks per slot for that size before upgrades, at least 1. + */ + public static long getDepthForSize(int size) { + return Math.max(1, getConfiguredDepthForSize(size)); + } + + private static int getConfiguredDepthForSize(int size) { + return switch (size) { + case 2 -> depthSize2; + case 3 -> depthSize3; + case 4 -> depthSize4; + case 5 -> depthSize5; + case 6 -> depthSize6; + case 7 -> depthSize7; + case 8 -> depthSize8; + case 9 -> depthSize9; + case 10 -> depthSize10; + default -> throw new IllegalArgumentException("Size out of range [" + MIN_SIZE + ", " + HARD_MAX_SIZE + "]: " + size); + }; + } + +} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests/Reference.java b/loader-common/src/main/java/org/cyclops/colossalchests2/Reference.java similarity index 59% rename from loader-common/src/main/java/org/cyclops/colossalchests/Reference.java rename to loader-common/src/main/java/org/cyclops/colossalchests2/Reference.java index 01a3faa66..6fbf8a63b 100644 --- a/loader-common/src/main/java/org/cyclops/colossalchests/Reference.java +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/Reference.java @@ -1,4 +1,4 @@ -package org.cyclops.colossalchests; +package org.cyclops.colossalchests2; /** * Class that can hold basic static things that are better not hard-coded @@ -10,10 +10,8 @@ public class Reference { // Mod info - public static final String MOD_ID = "colossalchests"; - public static final String GA_TRACKING_ID = "UA-65307010-5"; + public static final String MOD_ID = "colossalchests2"; // MOD ID's - public static final String MOD_IRONCHEST = "ironchest"; public static final String MOD_COMMONCAPABILITIES = "commoncapabilities"; } diff --git a/loader-common/src/main/java/org/cyclops/colossalchests2/RegistryEntries.java b/loader-common/src/main/java/org/cyclops/colossalchests2/RegistryEntries.java new file mode 100644 index 000000000..a00359d69 --- /dev/null +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/RegistryEntries.java @@ -0,0 +1,16 @@ +package org.cyclops.colossalchests2; + +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import org.cyclops.cyclopscore.config.DeferredHolderCommon; + +/** + * Referenced registry entries. + * @author rubensworks + */ +public class RegistryEntries { + + public static final DeferredHolderCommon ITEM_CHEST = DeferredHolderCommon.create(Registries.ITEM, ResourceLocation.parse("minecraft:chest")); + +} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests2/config/ChestTables.java b/loader-common/src/main/java/org/cyclops/colossalchests2/config/ChestTables.java new file mode 100644 index 000000000..ece1f0fd8 --- /dev/null +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/config/ChestTables.java @@ -0,0 +1,47 @@ +package org.cyclops.colossalchests2.config; + +import com.google.common.collect.ImmutableMap; +import net.minecraft.resources.ResourceLocation; +import org.cyclops.colossalchests2.Reference; + +import java.util.Map; + +/** + * Data-driven values for materials. + * Each material and (later) each upgrade is its own file in its owner's namespace, + * so mods and datapacks can add entries without overwriting each other: + *
    + *
  • data/[namespace]/colossalchests2/material/[name].json
  • + *
  • data/[namespace]/colossalchests2/upgrade/[name].json for upgrade values and per-material limits (not loaded yet)
  • + *
+ * Chest-wide values such as slot counts and depth by size are in {@link org.cyclops.colossalchests2.GeneralConfig}. + * @param materials Material properties by material id. + * @author rubensworks + */ +public record ChestTables(Map materials) { + + public static final ChestTables DEFAULT = new ChestTables( + ImmutableMap.builder() + .put(id("wood"), new MaterialProperties(1, 3, false)) + .put(id("copper"), new MaterialProperties(2, 4, false)) + .put(id("iron"), new MaterialProperties(3, 5, false)) + .put(id("gold"), new MaterialProperties(4, 6, false)) + .put(id("diamond"), new MaterialProperties(5, 7, false)) + .put(id("obsidian"), new MaterialProperties(6, 8, true)) + .put(id("netherite"), new MaterialProperties(7, 10, true)) + .build() + ); + + /** + * @param material A material id. + * @return The properties of the material, or the defaults if no file defines it. + */ + public MaterialProperties getMaterial(ResourceLocation material) { + return materials.getOrDefault(material, MaterialProperties.DEFAULT); + } + + private static ResourceLocation id(String path) { + return ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, path); + } + +} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests2/config/ChestTablesLoader.java b/loader-common/src/main/java/org/cyclops/colossalchests2/config/ChestTablesLoader.java new file mode 100644 index 000000000..c567de4ce --- /dev/null +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/config/ChestTablesLoader.java @@ -0,0 +1,45 @@ +package org.cyclops.colossalchests2.config; + +import com.google.common.collect.ImmutableMap; +import com.google.gson.JsonElement; +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import net.minecraft.resources.ResourceLocation; + +import java.util.Map; + +/** + * Holds the active {@link ChestTables}. + * Parsing works, but nothing loads these files from datapacks yet, so {@link #get()} returns the defaults. + * @author rubensworks + */ +public class ChestTablesLoader { + + public static final String DIRECTORY_MATERIAL = "colossalchests2/material"; + + private static ChestTables current = ChestTables.DEFAULT; + + public static ChestTables get() { + return current; + } + + public static void set(ChestTables tables) { + current = tables; + } + + /** + * Build the tables from the loaded data files. + * @param materials Material files by material id. + * @return The tables. + */ + public static ChestTables fromJson(Map materials) { + ImmutableMap.Builder builder = ImmutableMap.builder(); + materials.forEach((id, json) -> builder.put(id, parse(MaterialProperties.CODEC, json, "material " + id))); + return new ChestTables(builder.build()); + } + + public static T parse(Codec codec, JsonElement json, String source) { + return codec.parse(JsonOps.INSTANCE, json).getOrThrow(error -> new IllegalArgumentException("Invalid " + source + ": " + error)); + } + +} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests2/config/MaterialProperties.java b/loader-common/src/main/java/org/cyclops/colossalchests2/config/MaterialProperties.java new file mode 100644 index 000000000..17b076164 --- /dev/null +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/config/MaterialProperties.java @@ -0,0 +1,26 @@ +package org.cyclops.colossalchests2.config; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import org.cyclops.colossalchests2.GeneralConfig; + +/** + * Tunable properties of a chest material, loaded from data/[namespace]/colossalchests2/material/[name].json. + * All fields are optional, so fields added later never break existing datapacks. + * Per-material upgrade limits are declared by each upgrade, not here. + * @param upgradeSlots Number of core upgrade slots. + * @param maxSize Maximum structure size (outer edge length). + * @param blastResistant If the blocks resist explosions. + * @author rubensworks + */ +public record MaterialProperties(int upgradeSlots, int maxSize, boolean blastResistant) { + + public static final MaterialProperties DEFAULT = new MaterialProperties(1, 3, false); + + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.intRange(0, 64).optionalFieldOf("upgrade_slots", DEFAULT.upgradeSlots()).forGetter(MaterialProperties::upgradeSlots), + Codec.intRange(GeneralConfig.MIN_SIZE, GeneralConfig.HARD_MAX_SIZE).optionalFieldOf("max_size", DEFAULT.maxSize()).forGetter(MaterialProperties::maxSize), + Codec.BOOL.optionalFieldOf("blast_resistant", DEFAULT.blastResistant()).forGetter(MaterialProperties::blastResistant) + ).apply(i, MaterialProperties::new)); + +} diff --git a/loader-common/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsCommon.java b/loader-common/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsCommon.java new file mode 100644 index 000000000..35987c04d --- /dev/null +++ b/loader-common/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsCommon.java @@ -0,0 +1,28 @@ +package org.cyclops.colossalchests2.gametest; + +import net.minecraft.core.BlockPos; +import net.minecraft.gametest.framework.GameTest; +import net.minecraft.gametest.framework.GameTestHelper; +import net.minecraft.world.level.block.Blocks; +import org.cyclops.colossalchests2.Reference; +import org.cyclops.colossalchests2.config.ChestTables; +import org.cyclops.colossalchests2.config.ChestTablesLoader; + +/** + * @author rubensworks + */ +public class GameTestsCommon { + + public static final String TEMPLATE_EMPTY = Reference.MOD_ID + ":empty10"; + public static final BlockPos POS = BlockPos.ZERO.offset(1, 0, 1); + + @GameTest(template = TEMPLATE_EMPTY) + public void testHarness(GameTestHelper helper) { + // Proves the mod's template and classes load on this loader. + helper.setBlock(POS, Blocks.CHEST); + helper.assertBlockPresent(Blocks.CHEST, POS); + helper.assertValueEqual(ChestTablesLoader.get().materials().size(), ChestTables.DEFAULT.materials().size(), "material count"); + helper.succeed(); + } + +} diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_copper.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_copper.json deleted file mode 100644 index 34f4b9d03..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_copper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_copper" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_diamond.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_diamond.json deleted file mode 100644 index 3b7a3e760..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_diamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_diamond" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_gold.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_gold.json deleted file mode 100644 index a70bc87c3..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_gold.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_gold" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_iron.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_iron.json deleted file mode 100644 index 207a86094..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_iron" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_netherite.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_netherite.json deleted file mode 100644 index a20c9ff05..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_netherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_netherite" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_obsidian.json deleted file mode 100644 index 53c82c3c8..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_obsidian.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_obsidian" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_silver.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_silver.json deleted file mode 100644 index 5b5367f15..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_silver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_silver" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_wood.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_wood.json deleted file mode 100644 index fd45ee833..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/chest_wall_wood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/chest_wall_wood" }, - "enabled=true": { "model": "colossalchests:block/chest_wall_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_copper.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_copper.json deleted file mode 100644 index d5d1dfcff..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_copper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_copper" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_diamond.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_diamond.json deleted file mode 100644 index 64ed67698..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_diamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_diamond" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_gold.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_gold.json deleted file mode 100644 index a2aa161b3..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_gold.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_gold" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_iron.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_iron.json deleted file mode 100644 index 285d02f52..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_iron" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_netherite.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_netherite.json deleted file mode 100644 index 2a4d4442b..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_netherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_netherite" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_obsidian.json deleted file mode 100644 index 3f194ecd1..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_obsidian.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_obsidian" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_silver.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_silver.json deleted file mode 100644 index 263ab570d..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_silver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_silver" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_wood.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_wood.json deleted file mode 100644 index 32216cad5..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/colossal_chest_wood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/colossal_chest_wood" }, - "enabled=true": { "model": "colossalchests:block/colossal_chest_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_copper.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_copper.json deleted file mode 100644 index 94b8cc0c4..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_copper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_copper" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_diamond.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_diamond.json deleted file mode 100644 index 4c36171e9..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_diamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_diamond" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_gold.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_gold.json deleted file mode 100644 index 6d3b2262e..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_gold.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_gold" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_iron.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_iron.json deleted file mode 100644 index a2f5db9fd..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_iron" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_netherite.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_netherite.json deleted file mode 100644 index 3e0f132aa..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_netherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_netherite" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_obsidian.json deleted file mode 100644 index 56a8fdb2c..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_obsidian.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_obsidian" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_silver.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_silver.json deleted file mode 100644 index e39dcde1f..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_silver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_silver" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_wood.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_wood.json deleted file mode 100644 index d7666fd6c..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/interface_wood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "enabled=false": { "model": "colossalchests:block/interface_wood" }, - "enabled=true": { "model": "colossalchests:block/interface_off" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/blockstates/uncolossal_chest.json b/loader-common/src/main/resources/assets/colossalchests/blockstates/uncolossal_chest.json deleted file mode 100644 index eeb8bd51a..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/blockstates/uncolossal_chest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "": { "model": "colossalchests:block/uncolossal_chest" } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/af_za.json b/loader-common/src/main/resources/assets/colossalchests/lang/af_za.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/af_za.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/ar_sa.json b/loader-common/src/main/resources/assets/colossalchests/lang/ar_sa.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/ar_sa.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/ca_es.json b/loader-common/src/main/resources/assets/colossalchests/lang/ca_es.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/ca_es.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/cs_cz.json b/loader-common/src/main/resources/assets/colossalchests/lang/cs_cz.json deleted file mode 100644 index 7b8852045..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/cs_cz.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_comment": "Multiblok", - "itemGroup.colossalchests": "Colossal Chests", - "general.colossalchests.description": "Když jsou bežné truhly příliš malé.", - "general.colossalchests.colossalchest": "%s kolosální truhla (%s)", - "general.colossalchests.uncolossalchest": "Unkolosální truhla", - "advancement.colossalchests.wood": "Dřevěná kolosální truhla", - "advancement.colossalchests.wood.desc": "Stvoř dřevenou kolosální truhlu", - "advancement.colossalchests.copper": "Měděná kolosální truhla", - "advancement.colossalchests.copper.desc": "Stvoř měděnou kolosální truhlu", - "advancement.colossalchests.iron": "Železná kolosální truhla", - "advancement.colossalchests.iron.desc": "Stvoř železnou kolosální truhlu", - "advancement.colossalchests.silver": "Stříbrná kolosální truhla", - "advancement.colossalchests.silver.desc": "Stvoř stříbrnou kolosální truhlu", - "advancement.colossalchests.gold": "Zlatá kolosální truhla", - "advancement.colossalchests.gold.desc": "Stvoř zlatou kolosální truhlu", - "advancement.colossalchests.diamond": "Diamantová kolosální truhla", - "advancement.colossalchests.diamond.desc": "Stvoř diamantovou kolosální truhlu", - "advancement.colossalchests.obsidian": "Obsidiánová kolosální truhla", - "advancement.colossalchests.obsidian.desc": "Stvoř obsidiánovou kolosální truhlu", - "advancement.colossalchests.uncolossal": "Nejkolosálnější ze všech!", - "advancement.colossalchests.uncolossal.desc": "Získej unkolosální truhlu", - "advancement.colossalchests.large.wood": "Skvělá dřevená kolosální truhla", - "advancement.colossalchests.large.wood.desc": "Vytvoř dřevenou kolosální truhlu o velikosti alespoň 10x10x10", - "advancement.colossalchests.large.copper": "Skvělá měděná kolosální truhla", - "advancement.colossalchests.large.copper.desc": "Vytvoř měděnou kolosální truhlu o velikosti alespoň 10x10x10", - "advancement.colossalchests.large.iron": "Skvělá železná kolosální truhla", - "advancement.colossalchests.large.iron.desc": "Vytvoř železnou kolosální truhlu o velikosti alespoň 10x10x10", - "advancement.colossalchests.large.silver": "Skvělá stříbrná kolosální truhla", - "advancement.colossalchests.large.silver.desc": "Vytvoř stříbrnou kolosální truhlu o velikosti alespoň 10x10x10", - "advancement.colossalchests.large.gold": "Skvělá zlatá kolosální truhla", - "advancement.colossalchests.large.gold.desc": "Vytvoř zlatou kolosální truhlu o velikosti alespoň 10x10x10", - "advancement.colossalchests.large.diamond": "Skvělá diamantová kolosální truhla", - "advancement.colossalchests.large.diamond.desc": "Vytvoř diamantovou kolosální truhlu o velikosti alespoň 10x10x10", - "advancement.colossalchests.large.obsidian": "Skvělá obsidiánová kolosální truhla", - "advancement.colossalchests.large.obsidian.desc": "Vytvo obsidiánovou kolosální truhlu o velikosti alespoň 10x10x10", - "block.colossalchests.colossal_chest": "Jádro kolosální truhly", - "block.colossalchests.colossal_chest.info": "Je potřeba jedno jádro pro vytvoření Kolosální truhly", - "block.colossalchests.chest_wall": "Stěna kolosální truhly", - "block.colossalchests.chest_wall.info": "Použita pro sestavení Kolosální truhly", - "block.colossalchests.interface": "Rozhraní kolosální truhly", - "block.colossalchests.interface.info": "Pro interakci s trubkami a násypkami", - "block.colossalchests.uncolossal_chest": "Unkolosální truhla", - "block.colossalchests.uncolossal_chest.info": "Nejkolosálnější ze všech!", - "item.colossalchests.upgrade_tool": "Nástroj pro vylepšení truhly", - "item.colossalchests.upgrade_tool.info": "Vylepší kolosální truhlu na následující úroveň když máš všechny vyžadované předměty v inventáři.", - "item.colossalchests.upgrade_tool_reverse": "Nástroj pro snížení truhly", - "item.colossalchests.upgrade_tool_reverse.info": "Sníží úroveň kolosální truhly na předchozí úroveň, když máš všechny vyžadované předměty v inventáři. UPOZORNĚNÍ: Předměty mohou vypadnout pokud se truhla stane příliš malou.", - "material.colossalchests.wood": "Dřevená", - "material.colossalchests.copper": "Měděná", - "material.colossalchests.iron": "Železná", - "material.colossalchests.silver": "Stříbrná", - "material.colossalchests.gold": "Zlatá", - "material.colossalchests.diamond": "Diamantová", - "material.colossalchests.obsidian": "Obsidánová", - "multiblock.colossalchests.error.prefix": "ColossalChests", - "multiblock.colossalchests.error.prefix.info": "Chyba multiblokové struktury \"Kolosální truhla\"", - "multiblock.colossalchests.error.unexpected": "Neočekávaná chyba struktury \"Kolosální truhla\".", - "multiblock.colossalchests.error.material": "Nalezen blok materiálu %s v %s, zatímco %s byl očekáván.", - "multiblock.colossalchests.error.upgrade": "Nedostatek předmětů pro vylepšení této truhly, potřebuješ %s jader, %s rozhraní a %s stěn alespoň z materiálu %s." -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/da_dk.json b/loader-common/src/main/resources/assets/colossalchests/lang/da_dk.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/da_dk.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/de_de.json b/loader-common/src/main/resources/assets/colossalchests/lang/de_de.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/de_de.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/el_gr.json b/loader-common/src/main/resources/assets/colossalchests/lang/el_gr.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/el_gr.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/en_us.json b/loader-common/src/main/resources/assets/colossalchests/lang/en_us.json deleted file mode 100644 index 5a297191f..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/en_us.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_comment": "General", - "itemGroup.colossalchests": "Colossal Chests", - "general.colossalchests.description": "For when regular chests are too small.", - "general.colossalchests.colossalchest": "%s Colossal Chest (%s)", - "general.colossalchests.uncolossalchest": "Uncolossal Chest", - - "_comment": "Advancements", - "advancement.colossalchests.wood": "Wooden Colossal Chest", - "advancement.colossalchests.wood.desc": "Form a wooden Colossal Chest", - "advancement.colossalchests.copper": "Copper Colossal Chest", - "advancement.colossalchests.copper.desc": "Form a copper Colossal Chest", - "advancement.colossalchests.iron": "Iron Colossal Chest", - "advancement.colossalchests.iron.desc": "Form an iron Colossal Chest", - "advancement.colossalchests.silver": "Silver Colossal Chest", - "advancement.colossalchests.silver.desc": "Form a silver Colossal Chest", - "advancement.colossalchests.gold": "Gold Colossal Chest", - "advancement.colossalchests.gold.desc": "Form a golden Colossal Chest", - "advancement.colossalchests.diamond": "Diamond Colossal Chest", - "advancement.colossalchests.diamond.desc": "Form a diamond Colossal Chest", - "advancement.colossalchests.obsidian": "Obsidian Colossal Chest", - "advancement.colossalchests.obsidian.desc": "Form an obsidian Colossal Chest", - "advancement.colossalchests.netherite": "Netherite Colossal Chest", - "advancement.colossalchests.netherite.desc": "Form a netherite Colossal Chest", - "advancement.colossalchests.uncolossal": "The most colossal of 'em all!", - "advancement.colossalchests.uncolossal.desc": "Obtain an Uncolossal Chest", - "advancement.colossalchests.large.wood": "Epic Wooden Colossal Chest", - "advancement.colossalchests.large.wood.desc": "Form a wooden Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.copper": "Epic Copper Colossal Chest", - "advancement.colossalchests.large.copper.desc": "Form a copper Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.iron": "Epic Iron Colossal Chest", - "advancement.colossalchests.large.iron.desc": "Form an iron Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.silver": "Epic Silver Colossal Chest", - "advancement.colossalchests.large.silver.desc": "Form a silver Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.gold": "Epic Gold Colossal Chest", - "advancement.colossalchests.large.gold.desc": "Form a golden Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.diamond": "Epic Diamond Colossal Chest", - "advancement.colossalchests.large.diamond.desc": "Form a diamond Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.obsidian": "Epic Obsidian Colossal Chest", - "advancement.colossalchests.large.obsidian.desc": "Form an obsidian Colossal Chest of at least 10x10x10", - "advancement.colossalchests.large.netherite": "Epic Netherite Colossal Chest", - "advancement.colossalchests.large.netherite.desc": "Form a netherite Colossal Chest of at least 10x10x10", - - "_comment": "Blocks", - "block.colossalchests.colossal_chest": "Colossal Chest Core", - "block.colossalchests.colossal_chest.info": "Exactly one required to build a Colossal Chest structure", - "block.colossalchests.chest_wall": "Colossal Chest Wall", - "block.colossalchests.chest_wall.info": "Used to build a Colossal Chest structure", - "block.colossalchests.interface": "Colossal Chest Interface", - "block.colossalchests.interface.info": "To interact with pipes and hoppers", - "block.colossalchests.uncolossal_chest": "Uncolossal Chest", - "block.colossalchests.uncolossal_chest.info": "The most colossal of 'em all!", - - "_comment": "Items", - "item.colossalchests.upgrade_tool": "Chest Upgrade Tool", - "item.colossalchests.upgrade_tool.info": "Upgrade a Colossal Chest to the next tier when having all required items in your inventory.", - "item.colossalchests.upgrade_tool_reverse": "Chest Downgrade Tool", - "item.colossalchests.upgrade_tool_reverse.info": "Downgrade a Colossal Chest to the previous tier when having all required items in your inventory. WARNING: items may pop out if the chest becomes too small for the contents.", - - "_comment": "Materials", - "material.colossalchests.wood": "Wood", - "material.colossalchests.copper": "Copper", - "material.colossalchests.iron": "Iron", - "material.colossalchests.silver": "Silver", - "material.colossalchests.gold": "Gold", - "material.colossalchests.diamond": "Diamond", - "material.colossalchests.obsidian": "Obsidian", - "material.colossalchests.netherite": "Netherite", - - "_comment": "Multiblock", - "multiblock.colossalchests.error.prefix": "ColossalChests", - "multiblock.colossalchests.error.prefix.info": "Colossal Chest multiblock structure error", - "multiblock.colossalchests.error.unexpected": "Unexpected Colossal Chest structure error.", - "multiblock.colossalchests.error.material": "Found a block of material %s at %s, while %s was expected.", - "multiblock.colossalchests.error.upgrade": "Not enough items for upgrading this chest, you need %s cores, %s interfaces and %s walls of at least the material %s.", - "multiblock.colossalchests.error.upgradeLimit": "You can not transform this chest any further." -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/es_es.json b/loader-common/src/main/resources/assets/colossalchests/lang/es_es.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/es_es.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/fi_fi.json b/loader-common/src/main/resources/assets/colossalchests/lang/fi_fi.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/fi_fi.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/fr_fr.json b/loader-common/src/main/resources/assets/colossalchests/lang/fr_fr.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/fr_fr.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/he_il.json b/loader-common/src/main/resources/assets/colossalchests/lang/he_il.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/he_il.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/hu_hu.json b/loader-common/src/main/resources/assets/colossalchests/lang/hu_hu.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/hu_hu.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/it_it.json b/loader-common/src/main/resources/assets/colossalchests/lang/it_it.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/it_it.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/ja_jp.json b/loader-common/src/main/resources/assets/colossalchests/lang/ja_jp.json deleted file mode 100644 index 5d3755ebd..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/ja_jp.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_comment": "Multiblock", - "itemGroup.colossalchests": "Colossal Chests", - "general.colossalchests.description": "通常のチェストが小さすぎると感じるあなたに", - "general.colossalchests.colossalchest": "%sの巨大チェスト(%s)", - "general.colossalchests.uncolossalchest": "巨大ではないチェスト", - "advancement.colossalchests.wood": "木の巨大チェスト", - "advancement.colossalchests.wood.desc": "木の巨大チェストを作る", - "advancement.colossalchests.copper": "銅の巨大チェスト", - "advancement.colossalchests.copper.desc": "銅の巨大チェストを作る", - "advancement.colossalchests.iron": "鉄の巨大チェスト", - "advancement.colossalchests.iron.desc": "鉄の巨大チェストを作る", - "advancement.colossalchests.silver": "銀の巨大チェスト", - "advancement.colossalchests.silver.desc": "銀の巨大チェストを作る", - "advancement.colossalchests.gold": "金の巨大チェスト", - "advancement.colossalchests.gold.desc": "金の巨大チェストを作る", - "advancement.colossalchests.diamond": "ダイヤモンドの巨大チェスト", - "advancement.colossalchests.diamond.desc": "ダイヤモンドの巨大チェストを作る", - "advancement.colossalchests.obsidian": "黒曜石の巨大チェスト", - "advancement.colossalchests.obsidian.desc": "黒曜石の巨大チェストを作る", - "advancement.colossalchests.uncolossal": "一番巨大なチェスト!", - "advancement.colossalchests.uncolossal.desc": "巨大ではないチェストを作る", - "advancement.colossalchests.large.wood": "最大の木の巨大チェスト", - "advancement.colossalchests.large.wood.desc": "10x10x10の木の巨大チェストを作る", - "advancement.colossalchests.large.copper": "最大の銅の巨大チェスト", - "advancement.colossalchests.large.copper.desc": "10x10x10の銅の巨大チェストを作る", - "advancement.colossalchests.large.iron": "最大の鉄の巨大チェスト", - "advancement.colossalchests.large.iron.desc": "10x10x10の鉄の巨大チェストを作る", - "advancement.colossalchests.large.silver": "最大の銀の巨大チェスト", - "advancement.colossalchests.large.silver.desc": "10x10x10の銀の巨大チェストを作る", - "advancement.colossalchests.large.gold": "最大の金の巨大チェスト", - "advancement.colossalchests.large.gold.desc": "10x10x10の金の巨大チェストを作る", - "advancement.colossalchests.large.diamond": "最大のダイヤモンドの巨大チェスト", - "advancement.colossalchests.large.diamond.desc": "10x10x10のダイヤモンドの巨大チェストを作る", - "advancement.colossalchests.large.obsidian": "最大の黒曜石の巨大チェスト", - "advancement.colossalchests.large.obsidian.desc": "10x10x10の黒曜石の巨大チェストを作る", - "block.colossalchests.colossal_chest": "巨大チェストのコア", - "block.colossalchests.colossal_chest.info": "巨大チェストの作成に必要です", - "block.colossalchests.chest_wall": "巨大チェストの壁", - "block.colossalchests.chest_wall.info": "巨大チェストの作成に使用します", - "block.colossalchests.interface": "巨大チェストのインターフェース", - "block.colossalchests.interface.info": "パイプやホッパーと接続します", - "block.colossalchests.uncolossal_chest": "巨大ではないチェスト", - "block.colossalchests.uncolossal_chest.info": "一番巨大なチェスト!", - "item.colossalchests.upgrade_tool": "チェスト強化ツール", - "item.colossalchests.upgrade_tool.info": "インベントリ内に必要なアイテムがあるとき、巨大チェストを次のランクに強化します", - "item.colossalchests.upgrade_tool_reverse": "チェスト弱化ツール", - "item.colossalchests.upgrade_tool_reverse.info": "インベントリ内に必要なアイテムがあるとき、巨大チェストを前のランクに弱化します。警告:チェストが小さすぎる場合、アイテムがドロップします", - "material.colossalchests.wood": "木", - "material.colossalchests.copper": "銅", - "material.colossalchests.iron": "鉄", - "material.colossalchests.silver": "銀", - "material.colossalchests.gold": "金", - "material.colossalchests.diamond": "ダイヤモンド", - "material.colossalchests.obsidian": "黒曜石", - "multiblock.colossalchests.error.prefix": "ColossalChests", - "multiblock.colossalchests.error.prefix.info": "巨大チェストのマルチブロック構造エラー", - "multiblock.colossalchests.error.unexpected": "予期しない巨大チェストの構造エラー", - "multiblock.colossalchests.error.material": "%sの%sが予想されていましたが、%sが見つかりました", - "multiblock.colossalchests.error.upgrade": "このチェストを強化するのに十分なアイテムがありません。%4$sの素材の少なくとも%1$s個のコア、%2$s個のインターフェース、%3$s個の壁が必要です" -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/ko_kr.json b/loader-common/src/main/resources/assets/colossalchests/lang/ko_kr.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/ko_kr.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/nl_nl.json b/loader-common/src/main/resources/assets/colossalchests/lang/nl_nl.json deleted file mode 100644 index 300d94628..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/nl_nl.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_comment": "Bloksamenstelling", - "itemGroup.colossalchests": "Colossal Chests", - "general.colossalchests.description": "Voor wanneer gewone kisten te klein zijn.", - "general.colossalchests.colossalchest": "Reusachtige %s kist (%s)", - "general.colossalchests.uncolossalchest": "Niet-reusachtige kist", - "advancement.colossalchests.wood": "Reusachtige houten kist", - "advancement.colossalchests.wood.desc": "Bouw een reusachtige houten kist", - "advancement.colossalchests.copper": "Reusachtige koperen kist", - "advancement.colossalchests.copper.desc": "Bouw een reusachtige koperen kist", - "advancement.colossalchests.iron": "Reusachtige ijzeren kist", - "advancement.colossalchests.iron.desc": "Bouw een reusachtige ijzeren kist", - "advancement.colossalchests.silver": "Reusachtige zilveren kist", - "advancement.colossalchests.silver.desc": "Bouw een reusachtige zilveren kist", - "advancement.colossalchests.gold": "Reusachtige gouden kist", - "advancement.colossalchests.gold.desc": "Bouw een reusachtige gouden kist", - "advancement.colossalchests.diamond": "Reusachtige diamanten kist", - "advancement.colossalchests.diamond.desc": "Bouw een reusachtige diamanten kist", - "advancement.colossalchests.obsidian": "Reusachtige obsidianen kist", - "advancement.colossalchests.obsidian.desc": "Bouw een reusachtige obsidianen kist", - "advancement.colossalchests.uncolossal": "Niets zo reusachtig als deze!", - "advancement.colossalchests.uncolossal.desc": "Verkrijg een niet-reusachtige kist", - "advancement.colossalchests.large.wood": "Immens reusachtige houten kist", - "advancement.colossalchests.large.wood.desc": "Bouw een reusachtige houten kist van ten minste 10x10x10", - "advancement.colossalchests.large.copper": "Immens reusachtige koperen kist", - "advancement.colossalchests.large.copper.desc": "Bouw een reusachtige koperen kist van ten minste 10x10x10", - "advancement.colossalchests.large.iron": "Immens reusachtige ijzeren kist", - "advancement.colossalchests.large.iron.desc": "Bouw een reusachtige ijzeren kist van ten minste 10x10x10", - "advancement.colossalchests.large.silver": "Immens reusachtige zilveren kist", - "advancement.colossalchests.large.silver.desc": "Bouw een reusachtige zilveren kist van ten minste 10x10x10", - "advancement.colossalchests.large.gold": "Immens reusachtige gouden kist", - "advancement.colossalchests.large.gold.desc": "Bouw een reusachtige gouden kist van ten minste 10x10x10", - "advancement.colossalchests.large.diamond": "Immens reusachtige diamanten kist", - "advancement.colossalchests.large.diamond.desc": "Bouw een reusachtige diamanten kist van ten minste 10x10x10", - "advancement.colossalchests.large.obsidian": "Immens reusachtige obsidianen kist", - "advancement.colossalchests.large.obsidian.desc": "Bouw een reusachtige obsidianen kist van ten minste 10x10x10", - "block.colossalchests.colossal_chest": "Reusachtige kistkern", - "block.colossalchests.colossal_chest.info": "Precies één is vereist voor het bouwen van een reusachtige kistconstructie", - "block.colossalchests.chest_wall": "Reusachtige kistwand", - "block.colossalchests.chest_wall.info": "Wordt gebruikt voor het bouwen van een reusachtige kistconstructie", - "block.colossalchests.interface": "Reusachtige kistinterface", - "block.colossalchests.interface.info": "Voor interactie met kabels en trechters", - "block.colossalchests.uncolossal_chest": "Niet-reusachtige kist", - "block.colossalchests.uncolossal_chest.info": "Niets zo reusachtig als deze!", - "item.colossalchests.upgrade_tool": "Kistupgradegereedschap", - "item.colossalchests.upgrade_tool.info": "Upgrade een reusachtige kist naar de volgende rang wanneer je alle vereiste voorwerpen in je inventaris hebt.", - "item.colossalchests.upgrade_tool_reverse": "Kistdowngradegereedschap", - "item.colossalchests.upgrade_tool_reverse.info": "Downgrade een reusachtige kist naar de vorige rang wanneer je alle vereiste voorwerpen in je inventaris hebt. WAARSCHUWING: voorwerpen kunnen uit de kist vallen als deze te klein wordt voor de inhoud.", - "material.colossalchests.wood": "houten", - "material.colossalchests.copper": "koperen", - "material.colossalchests.iron": "ijzeren", - "material.colossalchests.silver": "zilveren", - "material.colossalchests.gold": "gouden", - "material.colossalchests.diamond": "diamanten", - "material.colossalchests.obsidian": "obsidiaan", - "multiblock.colossalchests.error.prefix": "ColossalChests", - "multiblock.colossalchests.error.prefix.info": "Constructiefout bloksamenstelling reusachtige kist", - "multiblock.colossalchests.error.unexpected": "Onverwachte constructiefout reusachtige kist.", - "multiblock.colossalchests.error.material": "Een blok gevonden van materiaal %s op %s, terwijl %s werd verwacht.", - "multiblock.colossalchests.error.upgrade": "Niet genoeg voorwerpen om deze kist te upgraden, je hebt %s kernen, %s interfaces en %s wanden nodig van tenminste het materiaal %s.", - "multiblock.colossalchests.error.upgradeLimit": "Je kunt deze kist niet verder upgraden." -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/no_no.json b/loader-common/src/main/resources/assets/colossalchests/lang/no_no.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/no_no.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/pl_pl.json b/loader-common/src/main/resources/assets/colossalchests/lang/pl_pl.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/pl_pl.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/pt_br.json b/loader-common/src/main/resources/assets/colossalchests/lang/pt_br.json deleted file mode 100644 index 6d0431e37..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/pt_br.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "general.colossalchests.description": "Para quando baús normais são pequenos demais.", - "general.colossalchests.colossalchest": "Baú Colossal de %s (%s)", - "general.colossalchests.uncolossalchest": "Baú Incolossal", - "advancement.colossalchests.wood": "Baú Colossal de Madeira", - "advancement.colossalchests.wood.desc": "Forme um Baú Colossal de Madeira", - "advancement.colossalchests.copper": "Baú Colossal de Cobre", - "advancement.colossalchests.copper.desc": "Forme um Baú Colossal de Cobre", - "advancement.colossalchests.iron": "Baú Colossal de Ferro", - "advancement.colossalchests.iron.desc": "Forme um Baú Colossal de Ferro", - "advancement.colossalchests.silver": "Baú Colossal de Prata", - "advancement.colossalchests.silver.desc": "Forme um Baú Colossal de Prata", - "advancement.colossalchests.gold": "Baú Colossal de Ouro", - "advancement.colossalchests.gold.desc": "Forme um Baú Colossal de Ouro", - "advancement.colossalchests.diamond": "Baú Colossal de Diamante", - "advancement.colossalchests.diamond.desc": "Forme um Baú Colossal de Diamante", - "advancement.colossalchests.obsidian": "Baú Colossal de Obsidian", - "advancement.colossalchests.obsidian.desc": "Forme um Baú Colossal de Obsidian", - "advancement.colossalchests.uncolossal": "O mais colossal de todos!", - "advancement.colossalchests.uncolossal.desc": "Obtenha um Baú Incolossal", - "advancement.colossalchests.large.wood": "Baú Colossal de Madeira Épico", - "advancement.colossalchests.large.wood.desc": "Forme um Baú Colossal de Madeira de pelo menos 10x10x10", - "advancement.colossalchests.large.copper": "Baú Colossal de Cobre Épico", - "advancement.colossalchests.large.copper.desc": "Forme um Baú Colossal de Cobre de pelo menos 10x10x10", - "advancement.colossalchests.large.iron": "Baú Colossal de Ferro Épico", - "advancement.colossalchests.large.iron.desc": "Forme um Baú Colossal de Ferro de pelo menos 10x10x10", - "advancement.colossalchests.large.silver": "Baú Colossal de Prata Épico", - "advancement.colossalchests.large.silver.desc": "Forme um Baú Colossal de Prata de pelo menos 10x10x10", - "advancement.colossalchests.large.gold": "Baú Colossal de Ouro Épico", - "advancement.colossalchests.large.gold.desc": "Forme um Baú Colossal de Ouro de pelo menos 10x10x10", - "advancement.colossalchests.large.diamond": "Baú Colossal de Diamante Épico", - "advancement.colossalchests.large.diamond.desc": "Forme um Baú Colossal de Diamante de pelo menos 10x10x10", - "advancement.colossalchests.large.obsidian": "Baú Colossal de Obsidian Épico", - "advancement.colossalchests.large.obsidian.desc": "Forme um Baú Colossal de Obsidian de pelo menos 10x10x10", - "block.colossalchests.colossal_chest": "Núcleo de Baú Colossal", - "block.colossalchests.colossal_chest.info": "Exatamente um é necessário para construir a estrutura de um Baú Colossal", - "block.colossalchests.chest_wall": "Parede de Baú Colossal", - "block.colossalchests.chest_wall.info": "Usada para construir a estrutura de um Baú Colossal", - "block.colossalchests.interface": "Interface de Baú Colossal", - "block.colossalchests.interface.info": "Para interagir com canos e funis", - "block.colossalchests.uncolossal_chest": "Baú Incolossal", - "block.colossalchests.uncolossal_chest.info": "O mais colossal de todos!", - "item.colossalchests.upgrade_tool": "Ferramenta de Melhoria de Baú", - "item.colossalchests.upgrade_tool.info": "Melhora um Baú Colossal para o próximo nível ao ter todos os itens necessários no seu inventário.", - "item.colossalchests.upgrade_tool_reverse": "Ferramenta de Rebaixamento de Baú", - "item.colossalchests.upgrade_tool_reverse.info": "Rebaixa um Baú Colossal para o nível anterior ao ter todos os itens necessários no seu inventário. AVISO: itens podem ejetar se o baú se tornar pequeno demais para o conteúdo.", - "material.colossalchests.wood": "Madeira", - "material.colossalchests.copper": "Cobre", - "material.colossalchests.iron": "Ferro", - "material.colossalchests.silver": "Prata", - "material.colossalchests.gold": "Ouro", - "material.colossalchests.diamond": "Diamante", - "multiblock.colossalchests.error.prefix.info": "Erro na estrutura multiblock do Baú Colossal", - "multiblock.colossalchests.error.unexpected": "Erro inesperado na estrutura do Baú Colossal.", - "multiblock.colossalchests.error.material": "Encontrado um bloco do material %s em %s, quando %s era esperado.", - "multiblock.colossalchests.error.upgrade": "Não há itens suficientes para melhorar este baú. Você precisa de %s núcleos, %s interfaces e %s paredes de, no mínimo, o material %s.", - "multiblock.colossalchests.error.upgradeLimit": "Você não pode mais transformar este baú." -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/pt_pt.json b/loader-common/src/main/resources/assets/colossalchests/lang/pt_pt.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/pt_pt.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/ro_ro.json b/loader-common/src/main/resources/assets/colossalchests/lang/ro_ro.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/ro_ro.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/ru_ru.json b/loader-common/src/main/resources/assets/colossalchests/lang/ru_ru.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/ru_ru.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/sr_sp.json b/loader-common/src/main/resources/assets/colossalchests/lang/sr_sp.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/sr_sp.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/sv_se.json b/loader-common/src/main/resources/assets/colossalchests/lang/sv_se.json deleted file mode 100644 index c7c8d816f..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/sv_se.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "general.colossalchests.description": "När de vanliga kistorna är för småa.", - "general.colossalchests.colossalchest": "Kolossal %skista (%s)", - "general.colossalchests.uncolossalchest": "Okolossal kista", - "advancement.colossalchests.wood": "Kolossal träkista", - "advancement.colossalchests.wood.desc": "Skapa en kolossal träkista", - "advancement.colossalchests.copper": "Kolossal kopparkista", - "advancement.colossalchests.copper.desc": "Skapa en kolossal kopparkista", - "advancement.colossalchests.iron": "Kolossal järnkista", - "advancement.colossalchests.iron.desc": "Skapa en kolossal järnkista", - "advancement.colossalchests.silver": "Kolossal silverkista", - "advancement.colossalchests.silver.desc": "Skapa en kolossal silverkista", - "advancement.colossalchests.gold": "Kolossal guldkista", - "advancement.colossalchests.gold.desc": "Skapa en kolossal guldkista", - "advancement.colossalchests.diamond": "Kolossal diamantkista", - "advancement.colossalchests.diamond.desc": "Skapa en kolossal diamantkista", - "advancement.colossalchests.obsidian": "Kolossal obsidiankista", - "advancement.colossalchests.obsidian.desc": "Skapa en kolossal obsidiankista", - "advancement.colossalchests.uncolossal": "Den mest kolossala av dem alla!", - "advancement.colossalchests.uncolossal.desc": "Skaffa en okolossal kista", - "advancement.colossalchests.large.wood": "Episk kolossal träkista", - "advancement.colossalchests.large.wood.desc": "Skapa en kolossal träkista på minst 10x10x10", - "advancement.colossalchests.large.copper": "Episk kolossal kopparkista", - "advancement.colossalchests.large.copper.desc": "Skapa en kolossal kopparkista på minst 10x10x10", - "advancement.colossalchests.large.iron": "Episk kolossal järnkista", - "advancement.colossalchests.large.iron.desc": "Skapa en kolossal järnkista på minst 10x10x10", - "advancement.colossalchests.large.silver": "Episk kolossal silverkista", - "advancement.colossalchests.large.silver.desc": "Skapa en kolossal silverkista på minst 10x10x10", - "advancement.colossalchests.large.gold": "Episk kolossal guldkista", - "advancement.colossalchests.large.gold.desc": "Skapa en kolossal guldkista på minst 10x10x10", - "advancement.colossalchests.large.diamond": "Episk kolossal diamantkista", - "advancement.colossalchests.large.diamond.desc": "Skapa en kolossal diamantkista på minst 10x10x10", - "advancement.colossalchests.large.obsidian": "Episk kolossal obsidiankista", - "advancement.colossalchests.large.obsidian.desc": "Skapa en kolossal obsidiankista på minst 10x10x10", - "block.colossalchests.colossal_chest": "Kärna för kolossal kista", - "block.colossalchests.colossal_chest.info": "Precis en krävs för att bygga en kolossal kiststruktur", - "block.colossalchests.chest_wall": "Vägg för kolossal kista", - "block.colossalchests.chest_wall.info": "Används för att bygga en kolossal kiststruktur", - "block.colossalchests.interface": "Gränssnitt för kolossal kista", - "block.colossalchests.interface.info": "För att interagera med rör och trattar", - "block.colossalchests.uncolossal_chest": "Okolossal kista", - "block.colossalchests.uncolossal_chest.info": "Den mest kolossala av dem alla!", - "item.colossalchests.upgrade_tool": "Kistuppgraderingsverktyg", - "item.colossalchests.upgrade_tool.info": "Uppgradera en kolossal kista till nästa nivå när du har alla nödvändiga föremål i din utrustning.", - "material.colossalchests.wood": "trä", - "material.colossalchests.copper": "koppar", - "material.colossalchests.iron": "järn", - "material.colossalchests.silver": "silver", - "material.colossalchests.gold": "guld", - "material.colossalchests.diamond": "diamant", - "material.colossalchests.obsidian": "obsidian", - "multiblock.colossalchests.error.prefix.info": "Flerblocksstrukturfel i kolossal kista", - "multiblock.colossalchests.error.unexpected": "Oväntat strukturfel i kolossal kista.", - "multiblock.colossalchests.error.material": "Hittade ett block av materialet %s på %s, men %s förväntades.", - "multiblock.colossalchests.error.upgrade": "Inte tillräckligt många föremål för att uppgradera denna kista. Du behöver %s kärna, %s gränssnitt och %s väggar av åtminstone materialet %s." -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/tr_tr.json b/loader-common/src/main/resources/assets/colossalchests/lang/tr_tr.json deleted file mode 100644 index 643201287..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/tr_tr.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_comment": "Çoklu Blok", - "itemGroup.colossalchests": "Devasa Sandıklar", - "general.colossalchests.description": "Normal sandıkların çok küçük olduğu zamanlar için.", - "general.colossalchests.colossalchest": "%s Devasa Sandık (%s)", - "general.colossalchests.uncolossalchest": "Devasa Olmayan Sandık", - "advancement.colossalchests.wood": "Devasa Ahşap Sandık", - "advancement.colossalchests.wood.desc": "Devasa Ahşap Sandık oluştur", - "advancement.colossalchests.copper": "Devasa Bakır Sandık", - "advancement.colossalchests.copper.desc": "Devasa Bakır Sandık oluştur", - "advancement.colossalchests.iron": "Devasa Demir Sandık", - "advancement.colossalchests.iron.desc": "Devasa Demir Sandık oluştur", - "advancement.colossalchests.silver": "Devasa Gümüş Sandık", - "advancement.colossalchests.silver.desc": "Devasa Gümüş Sandık oluştur", - "advancement.colossalchests.gold": "Devasa Altın Sandık", - "advancement.colossalchests.gold.desc": "Devasa Altın Sandık oluştur", - "advancement.colossalchests.diamond": "Devasa Elmas Sandık", - "advancement.colossalchests.diamond.desc": "Devasa Elmas Sandık oluştur", - "advancement.colossalchests.obsidian": "Devasa Obsidiyen Sandık", - "advancement.colossalchests.obsidian.desc": "Devasa Obsidiyen Sandık oluştur", - "advancement.colossalchests.uncolossal": "Hepsinden daha devasa!", - "advancement.colossalchests.uncolossal.desc": "Devasa Olmayan Sandık elde et", - "advancement.colossalchests.large.wood": "Destansı Devasa Ahşap Sandık", - "advancement.colossalchests.large.wood.desc": "En az 10x10x10 boyutlarında ahşaptan Devasa Sandık oluştur", - "advancement.colossalchests.large.copper": "Destansı Devasa Bakır Sandık", - "advancement.colossalchests.large.copper.desc": "En az 10x10x10 boyutlarında bakırdan Devasa Sandık oluştur", - "advancement.colossalchests.large.iron": "Destansı Devasa Demir Sandık", - "advancement.colossalchests.large.iron.desc": "En az 10x10x10 boyutlarında demirden Devasa Sandık oluştur", - "advancement.colossalchests.large.silver": "Destansı Devasa Gümüş Sandık", - "advancement.colossalchests.large.silver.desc": "En az 10x10x10 boyutlarında gümüşten Devasa Sandık oluştur", - "advancement.colossalchests.large.gold": "Destansı Devasa Altın Sandık", - "advancement.colossalchests.large.gold.desc": "En az 10x10x10 boyutlarında altından Devasa Sandık oluştur", - "advancement.colossalchests.large.diamond": "Destansı Devasa Elmas Sandık", - "advancement.colossalchests.large.diamond.desc": "En az 10x10x10 boyutlarında elmastan Devasa Sandık oluştur", - "advancement.colossalchests.large.obsidian": "Destansı Devasa Obsidiyen Sandık", - "advancement.colossalchests.large.obsidian.desc": "En az 10x10x10 boyutlarında obsidiyenden Devasa Sandık", - "block.colossalchests.colossal_chest": "Devasa Sandık Çekirdeği", - "block.colossalchests.colossal_chest.info": "Devasa Sandık yapısı inşa etmek için tam olarak bir tane gerekli", - "block.colossalchests.chest_wall": "Devasa Sandık Duvarı", - "block.colossalchests.chest_wall.info": "Devasa Sandık yapısı inşa etmek için kullanılır", - "block.colossalchests.interface": "Devasa Sandık Arayüzü", - "block.colossalchests.interface.info": "Borular ve hunilerle etkileşim için", - "block.colossalchests.uncolossal_chest": "Devasa Olmayan Sandık", - "block.colossalchests.uncolossal_chest.info": "Hepsinden daha devasa!", - "item.colossalchests.upgrade_tool": "Sandık Yükseltme Aleti", - "item.colossalchests.upgrade_tool.info": "Envanterinizde gerekli tüm eşyalara sahip olduğunuzda Devasa Sandığı bir sonraki seviyeye yükseltin.", - "item.colossalchests.upgrade_tool_reverse": "Sandık Alçaltma Aleti", - "item.colossalchests.upgrade_tool_reverse.info": "Envanterinizde gerekli tüm eşyalara sahip olduğunuzda Devasa Sandığı bir önceki seviyeye düşürün. UYARI: Sandık içindekiler için çok küçük hale gelirse eşyalar fırlayabilir.", - "material.colossalchests.wood": "Ahşap", - "material.colossalchests.copper": "Bakır", - "material.colossalchests.iron": "Demir", - "material.colossalchests.silver": "Gümüş", - "material.colossalchests.gold": "Altın", - "material.colossalchests.diamond": "Elmas", - "material.colossalchests.obsidian": "Obsidiyen", - "multiblock.colossalchests.error.prefix": "DevasaSandıklar", - "multiblock.colossalchests.error.prefix.info": "Devasa Sandık çoklu blok yapı hatası", - "multiblock.colossalchests.error.unexpected": "Beklenmedik Devasa Sandık yapı hatası.", - "multiblock.colossalchests.error.material": "%s malzeme bloğu %s konumunda, %s beklenirken bulundu.", - "multiblock.colossalchests.error.upgrade": "Bu sandığı yükseltmek için yeterli eşya yok, %s çekirdek, %s arayüz ve %s duvarın %s malzemesi hâline ihtiyacınız var.", - "multiblock.colossalchests.error.upgradeLimit": "Bu sandığı daha fazla dönüştüremezsin." -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/uk_ua.json b/loader-common/src/main/resources/assets/colossalchests/lang/uk_ua.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/uk_ua.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/vi_vn.json b/loader-common/src/main/resources/assets/colossalchests/lang/vi_vn.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/vi_vn.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/zh_cn.json b/loader-common/src/main/resources/assets/colossalchests/lang/zh_cn.json deleted file mode 100644 index 004cacce1..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/zh_cn.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "itemGroup.colossalchests": "巨型箱子", - "general.colossalchests.description": "因为常规的箱子太小了。", - "general.colossalchests.colossalchest": "%s巨型箱子(%s)", - "general.colossalchests.uncolossalchest": "微缩箱子", - "advancement.colossalchests.wood": "木质巨型箱子", - "advancement.colossalchests.wood.desc": "搭建一个木质巨型箱子", - "advancement.colossalchests.copper": "铜巨型箱子", - "advancement.colossalchests.copper.desc": "搭建一个铜巨型箱子", - "advancement.colossalchests.iron": "铁巨型箱子", - "advancement.colossalchests.iron.desc": "搭建一个铁巨型箱子", - "advancement.colossalchests.silver": "银巨型箱子", - "advancement.colossalchests.silver.desc": "搭建一个银巨型箱子", - "advancement.colossalchests.gold": "金巨型箱子", - "advancement.colossalchests.gold.desc": "搭建一个金巨型箱子", - "advancement.colossalchests.diamond": "钻石巨型箱子", - "advancement.colossalchests.diamond.desc": "搭建一个钻石巨型箱子", - "advancement.colossalchests.obsidian": "黑曜石巨型箱子", - "advancement.colossalchests.obsidian.desc": "搭建一个黑曜石巨型箱子", - "advancement.colossalchests.uncolossal": "它们之中最大的箱子!", - "advancement.colossalchests.uncolossal.desc": "获得一个微缩箱子", - "advancement.colossalchests.large.wood": "史诗级木质巨型箱子", - "advancement.colossalchests.large.wood.desc": "搭建一个大小至少为10x10x10木质巨型箱子", - "advancement.colossalchests.large.copper": "史诗级铜巨型箱子", - "advancement.colossalchests.large.copper.desc": "搭建一个大小至少为10x10x10铜巨型箱子", - "advancement.colossalchests.large.iron": "史诗级铁巨型箱子", - "advancement.colossalchests.large.iron.desc": "搭建一个大小至少为10x10x10铁巨型箱子", - "advancement.colossalchests.large.silver": "史诗级银巨型箱子", - "advancement.colossalchests.large.silver.desc": "搭建一个大小至少为10x10x10银巨型箱子", - "advancement.colossalchests.large.gold": "史诗级金巨型箱子", - "advancement.colossalchests.large.gold.desc": "搭建一个大小至少为10x10x10金巨型箱子", - "advancement.colossalchests.large.diamond": "史诗级钻石巨型箱子", - "advancement.colossalchests.large.diamond.desc": "搭建一个大小至少为10x10x10钻石巨型箱子", - "advancement.colossalchests.large.obsidian": "史诗级黑曜石巨型箱子", - "advancement.colossalchests.large.obsidian.desc": "搭建一个大小至少为10x10x10黑曜石巨型箱子", - "block.colossalchests.colossal_chest": "巨型箱子核心", - "block.colossalchests.colossal_chest.info": "每个巨型箱子仅需一个", - "block.colossalchests.chest_wall": "巨型箱子箱壁", - "block.colossalchests.chest_wall.info": "巨型箱子的主体结构", - "block.colossalchests.interface": "巨型箱子交界面", - "block.colossalchests.interface.info": "用于和管道或漏斗相连", - "block.colossalchests.uncolossal_chest": "微缩箱子", - "block.colossalchests.uncolossal_chest.info": "这才是最大的箱子!!!", - "item.colossalchests.upgrade_tool": "箱子升级工具", - "item.colossalchests.upgrade_tool.info": "在物品栏拥有所需材料的前提下将箱子升级到下一个等级。", - "material.colossalchests.wood": "木质", - "material.colossalchests.copper": "铜", - "material.colossalchests.iron": "铁", - "material.colossalchests.silver": "银", - "material.colossalchests.gold": "金", - "material.colossalchests.diamond": "钻石", - "material.colossalchests.obsidian": "黑曜石", - "multiblock.colossalchests.error.prefix": "巨型箱子", - "multiblock.colossalchests.error.prefix.info": "巨型箱子结构错误", - "multiblock.colossalchests.error.unexpected": "不可预料的巨型箱子结构错误。", - "multiblock.colossalchests.error.material": "在%2$s发现了材料:%1$s,但那里本应使用%3$s。", - "multiblock.colossalchests.error.upgrade": "升级箱子材料不足,你需要%s个核心,%s个交界面,以及%s个箱壁。所需材料为%s。" -} diff --git a/loader-common/src/main/resources/assets/colossalchests/lang/zh_tw.json b/loader-common/src/main/resources/assets/colossalchests/lang/zh_tw.json deleted file mode 100644 index 0967ef424..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/lang/zh_tw.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_copper.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_copper.json deleted file mode 100644 index a2a313ffa..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_copper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_copper" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_diamond.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_diamond.json deleted file mode 100644 index 471e190ef..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_diamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_diamond" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_gold.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_gold.json deleted file mode 100644 index f3dc67c70..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_gold.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_gold" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_iron.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_iron.json deleted file mode 100644 index ba0243f0c..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_iron" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_netherite.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_netherite.json deleted file mode 100644 index 9a8d9565e..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_netherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_netherite" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_obsidian.json deleted file mode 100644 index 9608b3366..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_obsidian.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_obsidian" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_off.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_off.json deleted file mode 100644 index a9181ce52..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_off.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/empty" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_silver.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_silver.json deleted file mode 100644 index d1e776548..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_silver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_silver" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_wood.json b/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_wood.json deleted file mode 100644 index 27a08e794..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/chest_wall_wood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/chest_wall_wood" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_copper.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_copper.json deleted file mode 100644 index ad90c2602..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_copper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_copper" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_diamond.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_diamond.json deleted file mode 100644 index ceac9ef42..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_diamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_diamond" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_gold.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_gold.json deleted file mode 100644 index e6878d4d2..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_gold.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_gold" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_iron.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_iron.json deleted file mode 100644 index a3bc7500d..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_iron" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_netherite.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_netherite.json deleted file mode 100644 index 4f928bdb0..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_netherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_netherite" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_obsidian.json deleted file mode 100644 index 0d6ddc818..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_obsidian.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_obsidian" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_off.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_off.json deleted file mode 100644 index a9181ce52..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_off.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/empty" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_silver.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_silver.json deleted file mode 100644 index 703f90339..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_silver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_silver" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_wood.json b/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_wood.json deleted file mode 100644 index 0cacdaf4f..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/colossal_chest_wood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/colossal_chest_wood" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_copper.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_copper.json deleted file mode 100644 index b45334a78..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_copper.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_copper" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_diamond.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_diamond.json deleted file mode 100644 index 1c3b39134..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_diamond.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_diamond" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_gold.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_gold.json deleted file mode 100644 index e2c125f0e..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_gold.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_gold" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_iron.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_iron.json deleted file mode 100644 index 35e5e8072..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_iron.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_iron" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_netherite.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_netherite.json deleted file mode 100644 index e3b5d6548..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_netherite.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_netherite" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_obsidian.json deleted file mode 100644 index 30d1c177b..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_obsidian.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_obsidian" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_off.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_off.json deleted file mode 100644 index a9181ce52..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_off.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/empty" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_silver.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_silver.json deleted file mode 100644 index da0c99347..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_silver.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_silver" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_wood.json b/loader-common/src/main/resources/assets/colossalchests/models/block/interface_wood.json deleted file mode 100644 index d482afaa7..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/interface_wood.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "colossalchests:blocks/interface_wood" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/block/uncolossal_chest.json b/loader-common/src/main/resources/assets/colossalchests/models/block/uncolossal_chest.json deleted file mode 100644 index ff2bacd85..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/block/uncolossal_chest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "textures": { - "texture": "minecraft:entity/chest/normal", - "particle": "colossalchests:blocks/chest_wall_wood" - }, - "elements": [ - { - "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { - "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { - "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_copper.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_copper.json deleted file mode 100644 index a009d61c0..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_copper" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_diamond.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_diamond.json deleted file mode 100644 index 9db8cd899..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_diamond.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_diamond" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_gold.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_gold.json deleted file mode 100644 index d0eb9b82b..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_gold.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_gold" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_iron.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_iron.json deleted file mode 100644 index ed027c974..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_iron.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_iron" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_netherite.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_netherite.json deleted file mode 100644 index d9d91349a..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_netherite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_netherite" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_obsidian.json deleted file mode 100644 index 23215a071..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_obsidian.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_obsidian" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_silver.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_silver.json deleted file mode 100644 index ea47b6810..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_silver.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_silver" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_wood.json b/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_wood.json deleted file mode 100644 index 0e2d6b07e..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/chest_wall_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/chest_wall_wood" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_copper.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_copper.json deleted file mode 100644 index 601ae029e..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_copper" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_diamond.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_diamond.json deleted file mode 100644 index e03642d91..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_diamond.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_diamond" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_gold.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_gold.json deleted file mode 100644 index 9fc0f8452..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_gold.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_gold" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_iron.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_iron.json deleted file mode 100644 index b1cebe606..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_iron.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_iron" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_netherite.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_netherite.json deleted file mode 100644 index 7e1bd4189..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_netherite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_netherite" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_obsidian.json deleted file mode 100644 index 30cc5975b..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_obsidian.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_obsidian" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_silver.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_silver.json deleted file mode 100644 index b372980f5..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_silver.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_silver" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_wood.json b/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_wood.json deleted file mode 100644 index 01a77c077..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/colossal_chest_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/colossal_chest_wood" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_copper.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_copper.json deleted file mode 100644 index 504a95601..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_copper" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_diamond.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_diamond.json deleted file mode 100644 index 033443d47..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_diamond.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_diamond" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_gold.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_gold.json deleted file mode 100644 index a2238f470..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_gold.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_gold" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_iron.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_iron.json deleted file mode 100644 index bb96b54b2..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_iron.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_iron" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_netherite.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_netherite.json deleted file mode 100644 index 526eb4a19..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_netherite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_netherite" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_obsidian.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_obsidian.json deleted file mode 100644 index 4c953d43d..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_obsidian.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_obsidian" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_silver.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_silver.json deleted file mode 100644 index 7fe4a9cac..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_silver.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_silver" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_wood.json b/loader-common/src/main/resources/assets/colossalchests/models/item/interface_wood.json deleted file mode 100644 index b45e738bc..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/interface_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "colossalchests:block/interface_wood" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/uncolossal_chest.json b/loader-common/src/main/resources/assets/colossalchests/models/item/uncolossal_chest.json deleted file mode 100644 index 7ab6c3e21..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/uncolossal_chest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/chest" -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/upgrade_tool.json b/loader-common/src/main/resources/assets/colossalchests/models/item/upgrade_tool.json deleted file mode 100644 index 53c55ba7d..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/upgrade_tool.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "cyclopscore:item/flat", - "textures": { - "layer0": "colossalchests:items/upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/models/item/upgrade_tool_reverse.json b/loader-common/src/main/resources/assets/colossalchests/models/item/upgrade_tool_reverse.json deleted file mode 100644 index ee102c347..000000000 --- a/loader-common/src/main/resources/assets/colossalchests/models/item/upgrade_tool_reverse.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "cyclopscore:item/flat", - "textures": { - "layer0": "colossalchests:items/upgrade_tool_reverse" - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_silver.png b/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_silver.png deleted file mode 100644 index 820a662a4..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_silver.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_silver.png b/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_silver.png deleted file mode 100644 index 96905c683..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_silver.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/empty.png b/loader-common/src/main/resources/assets/colossalchests/textures/blocks/empty.png deleted file mode 100644 index 25b7dd2ea..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/empty.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_silver.png b/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_silver.png deleted file mode 100644 index 900b6f582..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_silver.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/gui/colossal_chest.png b/loader-common/src/main/resources/assets/colossalchests/textures/gui/colossal_chest.png deleted file mode 100644 index 8e4eed96d..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/gui/colossal_chest.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/items/upgrade_tool.png b/loader-common/src/main/resources/assets/colossalchests/textures/items/upgrade_tool.png deleted file mode 100755 index f89e0223f..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/items/upgrade_tool.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/items/upgrade_tool_reverse.png b/loader-common/src/main/resources/assets/colossalchests/textures/items/upgrade_tool_reverse.png deleted file mode 100755 index bc23f484b..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/items/upgrade_tool_reverse.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_copper.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_copper.png deleted file mode 100644 index 7b90e8d66..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_copper.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_diamond.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_diamond.png deleted file mode 100644 index c9b400046..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_diamond.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_gold.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_gold.png deleted file mode 100644 index eb993029e..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_gold.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_iron.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_iron.png deleted file mode 100644 index f4449d249..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_iron.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_netherite.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_netherite.png deleted file mode 100644 index 86531abe7..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_netherite.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_obsidian.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_obsidian.png deleted file mode 100644 index 49c4c4b4f..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_obsidian.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_silver.png b/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_silver.png deleted file mode 100644 index 1ba1441ce..000000000 Binary files a/loader-common/src/main/resources/assets/colossalchests/textures/models/chest_silver.png and /dev/null differ diff --git a/loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json b/loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json new file mode 100644 index 000000000..15e08a95b --- /dev/null +++ b/loader-common/src/main/resources/assets/colossalchests2/lang/en_us.json @@ -0,0 +1,4 @@ +{ + "itemGroup.colossalchests2": "Colossal Chests 2", + "general.colossalchests2.description": "Chests that are quite colossal, and can be upgraded." +} diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_copper.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_copper.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_copper.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_copper.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_diamond.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_diamond.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_diamond.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_diamond.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_gold.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_gold.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_gold.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_gold.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_iron.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_iron.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_iron.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_iron.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_netherite.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_netherite.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_netherite.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_netherite.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_obsidian.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_obsidian.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_obsidian.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_obsidian.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_wood.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_wood.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/chest_wall_wood.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/chest_wall_wood.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_copper.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_copper.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_copper.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_copper.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_diamond.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_diamond.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_diamond.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_diamond.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_gold.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_gold.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_gold.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_gold.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_iron.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_iron.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_iron.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_iron.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_netherite.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_netherite.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_netherite.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_netherite.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_obsidian.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_obsidian.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_obsidian.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_obsidian.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_wood.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_wood.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/colossal_chest_wood.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/colossal_chest_wood.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_copper.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_copper.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_copper.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_copper.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_diamond.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_diamond.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_diamond.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_diamond.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_gold.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_gold.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_gold.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_gold.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_iron.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_iron.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_iron.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_iron.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_netherite.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_netherite.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_netherite.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_netherite.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_obsidian.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_obsidian.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_obsidian.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_obsidian.png diff --git a/loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_wood.png b/loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_wood.png similarity index 100% rename from loader-common/src/main/resources/assets/colossalchests/textures/blocks/interface_wood.png rename to loader-common/src/main/resources/assets/colossalchests2/textures/blocks/interface_wood.png diff --git a/loader-common/src/main/resources/assets/minecraft/atlases/blocks.json b/loader-common/src/main/resources/assets/minecraft/atlases/blocks.json deleted file mode 100644 index ef9146841..000000000 --- a/loader-common/src/main/resources/assets/minecraft/atlases/blocks.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "sources": [ - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_copper" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_diamond" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_gold" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_iron" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_netherite" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_obsidian" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_silver" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/chest_wall_wood" - }, - - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_copper" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_diamond" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_gold" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_iron" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_netherite" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_obsidian" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_silver" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/colossal_chest_wood" - }, - - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/empty" - }, - - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_copper" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_diamond" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_gold" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_iron" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_netherite" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_obsidian" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_silver" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:blocks/interface_wood" - }, - - { - "type": "minecraft:single", - "resource": "colossalchests:items/upgrade_tool" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:items/upgrade_tool_reverse" - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/assets/minecraft/atlases/chests.json b/loader-common/src/main/resources/assets/minecraft/atlases/chests.json deleted file mode 100644 index 43aad887f..000000000 --- a/loader-common/src/main/resources/assets/minecraft/atlases/chests.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "sources": [ - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_copper" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_diamond" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_gold" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_iron" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_netherite" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_obsidian" - }, - { - "type": "minecraft:single", - "resource": "colossalchests:models/chest_silver" - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/colossalchests.accesswidener b/loader-common/src/main/resources/colossalchests2.accesswidener similarity index 100% rename from loader-common/src/main/resources/colossalchests.accesswidener rename to loader-common/src/main/resources/colossalchests2.accesswidener diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/copper.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/copper.json deleted file mode 100644 index 29bb7792f..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/copper.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_copper" - }, - "title": { - "translate": "advancement.colossalchests.copper" - }, - "description": { - "translate": "advancement.colossalchests.copper.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "COPPER" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/diamond.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/diamond.json deleted file mode 100644 index 16350f502..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/diamond.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_diamond" - }, - "title": { - "translate": "advancement.colossalchests.diamond" - }, - "description": { - "translate": "advancement.colossalchests.diamond.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "DIAMOND" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/gold.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/gold.json deleted file mode 100644 index 7a0b12973..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/gold.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_gold" - }, - "title": { - "translate": "advancement.colossalchests.gold" - }, - "description": { - "translate": "advancement.colossalchests.gold.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "GOLD" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/iron.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/iron.json deleted file mode 100644 index 772f1ce5d..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/iron.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_iron" - }, - "title": { - "translate": "advancement.colossalchests.iron" - }, - "description": { - "translate": "advancement.colossalchests.iron.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "IRON" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/netherite.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/netherite.json deleted file mode 100644 index 44701e571..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/netherite.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_netherite" - }, - "title": { - "translate": "advancement.colossalchests.netherite" - }, - "description": { - "translate": "advancement.colossalchests.netherite.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "NETHERITE" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/obsidian.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/obsidian.json deleted file mode 100644 index 92f7b12c4..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/obsidian.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_obsidian" - }, - "title": { - "translate": "advancement.colossalchests.obsidian" - }, - "description": { - "translate": "advancement.colossalchests.obsidian.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "OBSIDIAN" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/silver.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/silver.json deleted file mode 100644 index 642ba2b17..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/silver.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_silver" - }, - "title": { - "translate": "advancement.colossalchests.silver" - }, - "description": { - "translate": "advancement.colossalchests.silver.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "SILVER" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/base/wood.json b/loader-common/src/main/resources/data/colossalchests/advancement/base/wood.json deleted file mode 100644 index bea422e8d..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/base/wood.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:chest_wall_wood" - }, - "title": { - "translate": "advancement.colossalchests.wood" - }, - "description": { - "translate": "advancement.colossalchests.wood.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "WOOD" - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/root.json b/loader-common/src/main/resources/data/colossalchests/advancement/root.json deleted file mode 100644 index 1a4bf03ad..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/root.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_wood" - }, - "title": { - "translate": "itemGroup.colossalchests" - }, - "description": { - "translate": "general.colossalchests.description" - }, - "background": "textures/gui/advancements/backgrounds/adventure.png", - "show_toast": false, - "announce_to_chat": false - }, - "rewards": { - "recipes": [ - "colossalchests:uncolossal_chest", - "colossalchests:colossal_chest_wood", - "colossalchests:chest_wall_wood", - "colossalchests:interface_wood", - "colossalchests:colossal_chest_iron", - "colossalchests:chest_wall_iron", - "colossalchests:interface_iron", - "colossalchests:colossal_chest_copper", - "colossalchests:chest_wall_copper", - "colossalchests:interface_copper", - "colossalchests:colossal_chest_gold", - "colossalchests:chest_wall_gold", - "colossalchests:interface_gold", - "colossalchests:colossal_chest_diamond", - "colossalchests:chest_wall_diamond", - "colossalchests:interface_diamond", - "colossalchests:colossal_chest_obsidian", - "colossalchests:chest_wall_obsidian", - "colossalchests:interface_obsidian", - "colossalchests:colossal_chest_netherite", - "colossalchests:chest_wall_netherite", - "colossalchests:interface_netherite", - "colossalchests:upgrade_tool", - "colossalchests:upgrade_tool_2", - "colossalchests:upgrade_tool_reverse" - ] - }, - "criteria": { - "criteria_0": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "minecraft:chest" - ] - } - ] - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/copper.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/copper.json deleted file mode 100644 index 393f8144f..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/copper.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_copper" - }, - "title": { - "translate": "advancement.colossalchests.large.copper" - }, - "description": { - "translate": "advancement.colossalchests.large.copper.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/copper", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "COPPER", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/diamond.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/diamond.json deleted file mode 100644 index c48d393f6..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_diamond" - }, - "title": { - "translate": "advancement.colossalchests.large.diamond" - }, - "description": { - "translate": "advancement.colossalchests.large.diamond.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/diamond", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "DIAMOND", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/gold.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/gold.json deleted file mode 100644 index d1206a21b..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_gold" - }, - "title": { - "translate": "advancement.colossalchests.large.gold" - }, - "description": { - "translate": "advancement.colossalchests.large.gold.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/gold", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "GOLD", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/iron.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/iron.json deleted file mode 100644 index 306b80e64..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_iron" - }, - "title": { - "translate": "advancement.colossalchests.large.iron" - }, - "description": { - "translate": "advancement.colossalchests.large.iron.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/iron", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "IRON", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/netherite.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/netherite.json deleted file mode 100644 index d99d777cb..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/netherite.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_netherite" - }, - "title": { - "translate": "advancement.colossalchests.large.netherite" - }, - "description": { - "translate": "advancement.colossalchests.large.netherite.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/netherite", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "NETHERITE", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/obsidian.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/obsidian.json deleted file mode 100644 index cc8f5b6b9..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_obsidian" - }, - "title": { - "translate": "advancement.colossalchests.large.obsidian" - }, - "description": { - "translate": "advancement.colossalchests.large.obsidian.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/obsidian", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "OBSIDIAN", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/silver.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/silver.json deleted file mode 100644 index f3bc79f79..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/silver.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_silver" - }, - "title": { - "translate": "advancement.colossalchests.large.silver" - }, - "description": { - "translate": "advancement.colossalchests.large.silver.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/silver", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "SILVER", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/size/wood.json b/loader-common/src/main/resources/data/colossalchests/advancement/size/wood.json deleted file mode 100644 index aac1399ce..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/size/wood.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:colossal_chest_wood" - }, - "title": { - "translate": "advancement.colossalchests.large.wood" - }, - "description": { - "translate": "advancement.colossalchests.large.wood.desc" - }, - "frame": "challenge" - }, - "parent": "colossalchests:base/wood", - "criteria": { - "criteria_0": { - "trigger": "colossalchests:chest_formed", - "conditions": { - "material": "WOOD", - "minimumSize": 10 - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/advancement/uncolossal.json b/loader-common/src/main/resources/data/colossalchests/advancement/uncolossal.json deleted file mode 100644 index d9d0356a0..000000000 --- a/loader-common/src/main/resources/data/colossalchests/advancement/uncolossal.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "display": { - "icon": { - "id": "colossalchests:uncolossal_chest" - }, - "title": { - "translate": "advancement.colossalchests.uncolossal" - }, - "description": { - "translate": "advancement.colossalchests.uncolossal.desc" - } - }, - "parent": "colossalchests:root", - "criteria": { - "criteria_0": { - "trigger": "minecraft:placed_block", - "conditions": { - "location": [ - { - "condition": "minecraft:block_state_property", - "block": "colossalchests:uncolossal_chest" - } - ] - } - } - } -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_copper.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_copper.json deleted file mode 100644 index dd0e33787..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_copper.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_copper" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_diamond.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_diamond.json deleted file mode 100644 index 8afc9c1ed..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_diamond.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_diamond" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_gold.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_gold.json deleted file mode 100644 index 28ebc7720..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_gold.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_gold" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_iron.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_iron.json deleted file mode 100644 index 2a7b7bcdb..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_iron.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_iron" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_netherite.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_netherite.json deleted file mode 100644 index df249f245..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_netherite.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_netherite" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_obsidian.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_obsidian.json deleted file mode 100644 index 07bc0a1c7..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_obsidian.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_obsidian" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_silver.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_silver.json deleted file mode 100644 index fca8c33ff..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_silver.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_silver" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_wood.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_wood.json deleted file mode 100644 index 15664df87..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/chest_wall_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:chest_wall_wood" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_copper.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_copper.json deleted file mode 100644 index 442ed6caa..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_copper.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_copper" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_diamond.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_diamond.json deleted file mode 100644 index 9b7575776..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_diamond.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_diamond" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_gold.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_gold.json deleted file mode 100644 index d5650b6cb..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_gold.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_gold" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_iron.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_iron.json deleted file mode 100644 index f5924e259..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_iron.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_iron" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_netherite.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_netherite.json deleted file mode 100644 index a2fb7790d..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_netherite.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_netherite" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_obsidian.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_obsidian.json deleted file mode 100644 index f86689cb8..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_obsidian.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_obsidian" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_silver.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_silver.json deleted file mode 100644 index 8bf25bc86..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_silver.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_silver" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_wood.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_wood.json deleted file mode 100644 index fa3d27e87..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/colossal_chest_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:colossal_chest_wood" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_copper.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_copper.json deleted file mode 100644 index 0bd2f1c70..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_copper.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_copper" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_diamond.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_diamond.json deleted file mode 100644 index 19004c78a..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_diamond.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_diamond" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_gold.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_gold.json deleted file mode 100644 index 4e85d6ad1..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_gold.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_gold" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_iron.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_iron.json deleted file mode 100644 index 1175136cd..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_iron.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_iron" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_netherite.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_netherite.json deleted file mode 100644 index 47ef78916..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_netherite.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_netherite" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_obsidian.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_obsidian.json deleted file mode 100644 index 05d70ec7b..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_obsidian.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_obsidian" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_silver.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_silver.json deleted file mode 100644 index 51a51d52d..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_silver.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_silver" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_wood.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_wood.json deleted file mode 100644 index 900d3fd49..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/interface_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:interface_wood" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/uncolossal_chest.json b/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/uncolossal_chest.json deleted file mode 100644 index ffc05c380..000000000 --- a/loader-common/src/main/resources/data/colossalchests/loot_table/blocks/uncolossal_chest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "colossalchests:uncolossal_chest" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/copper.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/copper.json new file mode 100644 index 000000000..f1e1a0dff --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/copper.json @@ -0,0 +1 @@ +{ "upgrade_slots": 2, "max_size": 4 } diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/diamond.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/diamond.json new file mode 100644 index 000000000..1d893a6a1 --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/diamond.json @@ -0,0 +1 @@ +{ "upgrade_slots": 5, "max_size": 7 } diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/gold.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/gold.json new file mode 100644 index 000000000..ab4042893 --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/gold.json @@ -0,0 +1 @@ +{ "upgrade_slots": 4, "max_size": 6 } diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/iron.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/iron.json new file mode 100644 index 000000000..88dc0fb8b --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/iron.json @@ -0,0 +1 @@ +{ "upgrade_slots": 3, "max_size": 5 } diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/netherite.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/netherite.json new file mode 100644 index 000000000..65b71497f --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/netherite.json @@ -0,0 +1 @@ +{ "upgrade_slots": 7, "max_size": 10, "blast_resistant": true } diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/obsidian.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/obsidian.json new file mode 100644 index 000000000..e7ece6558 --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/obsidian.json @@ -0,0 +1 @@ +{ "upgrade_slots": 6, "max_size": 8, "blast_resistant": true } diff --git a/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/wood.json b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/wood.json new file mode 100644 index 000000000..5f1a0ea16 --- /dev/null +++ b/loader-common/src/main/resources/data/colossalchests2/colossalchests2/material/wood.json @@ -0,0 +1 @@ +{ "upgrade_slots": 1, "max_size": 3 } diff --git a/loader-common/src/main/resources/data/colossalchests/structure/empty10.nbt b/loader-common/src/main/resources/data/colossalchests2/structure/empty10.nbt similarity index 100% rename from loader-common/src/main/resources/data/colossalchests/structure/empty10.nbt rename to loader-common/src/main/resources/data/colossalchests2/structure/empty10.nbt diff --git a/loader-common/src/main/resources/data/minecraft/tags/block/mineable/axe.json b/loader-common/src/main/resources/data/minecraft/tags/block/mineable/axe.json deleted file mode 100644 index 8c0e30e15..000000000 --- a/loader-common/src/main/resources/data/minecraft/tags/block/mineable/axe.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "replace": false, - "values": [ - "colossalchests:chest_wall_wood", - "colossalchests:colossal_chest_wood", - "colossalchests:interface_wood", - "colossalchests:uncolossal_chest" - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json b/loader-common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json deleted file mode 100644 index a920915ea..000000000 --- a/loader-common/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "replace": false, - "values": [ - "colossalchests:chest_wall_copper", - "colossalchests:colossal_chest_copper", - "colossalchests:interface_copper", - "colossalchests:chest_wall_diamond", - "colossalchests:colossal_chest_diamond", - "colossalchests:interface_diamond", - "colossalchests:chest_wall_gold", - "colossalchests:colossal_chest_gold", - "colossalchests:interface_gold", - "colossalchests:chest_wall_iron", - "colossalchests:colossal_chest_iron", - "colossalchests:interface_iron", - "colossalchests:chest_wall_netherite", - "colossalchests:colossal_chest_netherite", - "colossalchests:interface_netherite", - "colossalchests:chest_wall_obsidian", - "colossalchests:colossal_chest_obsidian", - "colossalchests:interface_obsidian", - "colossalchests:chest_wall_silver", - "colossalchests:colossal_chest_silver", - "colossalchests:interface_silver" - ] -} \ No newline at end of file diff --git a/loader-common/src/main/resources/pack.mcmeta b/loader-common/src/main/resources/pack.mcmeta index b2bb043a7..b38e9bc2f 100644 --- a/loader-common/src/main/resources/pack.mcmeta +++ b/loader-common/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "colossalchests resources", + "description": "colossalchests2 resources", "pack_format": 15, "forge:resource_pack_format": 15, "forge:data_pack_format": 15 diff --git a/loader-common/src/test/java/org/cyclops/colossalchests2/TestGeneralConfig.java b/loader-common/src/test/java/org/cyclops/colossalchests2/TestGeneralConfig.java new file mode 100644 index 000000000..c881b2236 --- /dev/null +++ b/loader-common/src/test/java/org/cyclops/colossalchests2/TestGeneralConfig.java @@ -0,0 +1,76 @@ +package org.cyclops.colossalchests2; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +/** + * @author rubensworks + */ +public class TestGeneralConfig { + + @Test + public void testDepthForEverySize() { + long[] expected = {4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144}; + for (int size = GeneralConfig.MIN_SIZE; size <= GeneralConfig.HARD_MAX_SIZE; size++) { + assertEquals("size " + size, expected[size - GeneralConfig.MIN_SIZE], GeneralConfig.getDepthForSize(size)); + } + } + + @Test + public void testDepthFollowsConfig() { + int old = GeneralConfig.depthSize3; + try { + GeneralConfig.depthSize3 = 7; + assertEquals(7, GeneralConfig.getDepthForSize(3)); + } finally { + GeneralConfig.depthSize3 = old; + } + } + + @Test + public void testDepthClampedToOne() { + int old = GeneralConfig.depthSize3; + try { + GeneralConfig.depthSize3 = -5; + assertEquals(1, GeneralConfig.getDepthForSize(3)); + } finally { + GeneralConfig.depthSize3 = old; + } + } + + @Test + public void testSlotsDefaults() { + assertEquals(27, GeneralConfig.getBaseSlots()); + assertEquals(81, GeneralConfig.getMaxSlots()); + } + + @Test + public void testSlotsClamped() { + int oldBase = GeneralConfig.baseSlots; + int oldMax = GeneralConfig.maxSlots; + try { + GeneralConfig.maxSlots = 500; + GeneralConfig.baseSlots = 0; + assertEquals(GeneralConfig.HARD_MAX_SLOTS, GeneralConfig.getMaxSlots()); + assertEquals(1, GeneralConfig.getBaseSlots()); + GeneralConfig.maxSlots = 9; + GeneralConfig.baseSlots = 27; + assertEquals(9, GeneralConfig.getBaseSlots()); + } finally { + GeneralConfig.baseSlots = oldBase; + GeneralConfig.maxSlots = oldMax; + } + } + + @Test(expected = IllegalArgumentException.class) + public void testDepthTooSmall() { + GeneralConfig.getDepthForSize(1); + } + + @Test(expected = IllegalArgumentException.class) + public void testDepthTooLarge() { + GeneralConfig.getDepthForSize(11); + } + +} diff --git a/loader-common/src/test/java/org/cyclops/colossalchests2/config/TestChestTables.java b/loader-common/src/test/java/org/cyclops/colossalchests2/config/TestChestTables.java new file mode 100644 index 000000000..d408b6606 --- /dev/null +++ b/loader-common/src/test/java/org/cyclops/colossalchests2/config/TestChestTables.java @@ -0,0 +1,62 @@ +package org.cyclops.colossalchests2.config; + +import com.google.common.collect.Maps; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import net.minecraft.resources.ResourceLocation; +import org.junit.Test; + +import java.io.InputStreamReader; +import java.io.Reader; +import java.nio.charset.StandardCharsets; +import java.util.Map; +import java.util.Objects; + +import static org.junit.Assert.assertEquals; + +/** + * @author rubensworks + */ +public class TestChestTables { + + private static final ResourceLocation TIN = ResourceLocation.fromNamespaceAndPath("othermod", "tin"); + + private static JsonElement read(String path) throws Exception { + try (Reader reader = new InputStreamReader(Objects.requireNonNull( + TestChestTables.class.getResourceAsStream("/data/colossalchests2/" + path), path), StandardCharsets.UTF_8)) { + return JsonParser.parseReader(reader); + } + } + + @Test + public void testShippedFilesMatchDefaults() throws Exception { + Map materials = Maps.newHashMap(); + for (ResourceLocation id : ChestTables.DEFAULT.materials().keySet()) { + materials.put(id, read(ChestTablesLoader.DIRECTORY_MATERIAL + "/" + id.getPath() + ".json")); + } + assertEquals(ChestTables.DEFAULT, ChestTablesLoader.fromJson(materials)); + } + + @Test + public void testMissingFieldsUseDefaults() { + ChestTables tables = ChestTablesLoader.fromJson(Map.of(TIN, JsonParser.parseString("{\"max_size\": 4}"))); + assertEquals(new MaterialProperties(MaterialProperties.DEFAULT.upgradeSlots(), 4, false), tables.getMaterial(TIN)); + } + + @Test + public void testUnknownFieldsIgnored() { + ChestTables tables = ChestTablesLoader.fromJson(Map.of(TIN, JsonParser.parseString("{\"max_size\": 4, \"future_field\": 1}"))); + assertEquals(4, tables.getMaterial(TIN).maxSize()); + } + + @Test + public void testUnknownMaterialUsesDefaults() { + assertEquals(MaterialProperties.DEFAULT, ChestTables.DEFAULT.getMaterial(TIN)); + } + + @Test(expected = IllegalArgumentException.class) + public void testMaterialOutOfRangeRejected() { + ChestTablesLoader.fromJson(Map.of(TIN, JsonParser.parseString("{\"max_size\": 11}"))); + } + +} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/ColossalChestsFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/ColossalChestsFabric.java deleted file mode 100644 index b409062e9..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/ColossalChestsFabric.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.cyclops.colossalchests; - -import net.fabricmc.api.ModInitializer; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; -import org.cyclops.colossalchests.advancement.criterion.ChestFormedTriggerConfig; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.block.ChestWallConfigFabric; -import org.cyclops.colossalchests.block.ColossalChestConfigFabric; -import org.cyclops.colossalchests.block.InterfaceConfigFabric; -import org.cyclops.colossalchests.block.UncolossalChestConfigFabric; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChestConfigFabric; -import org.cyclops.colossalchests.blockentity.BlockEntityInterfaceConfigFabric; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChestConfigFabric; -import org.cyclops.colossalchests.condition.ConditionMetalVariantsSettingConfig; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChestConfig; -import org.cyclops.colossalchests.inventory.container.ContainerUncolossalChestConfig; -import org.cyclops.colossalchests.item.ItemUpgradeToolConfig; -import org.cyclops.colossalchests.proxy.ClientProxyFabric; -import org.cyclops.colossalchests.proxy.CommonProxyFabric; -import org.cyclops.cyclopscore.config.ConfigHandlerCommon; -import org.cyclops.cyclopscore.init.ModBaseFabric; -import org.cyclops.cyclopscore.proxy.IClientProxyCommon; -import org.cyclops.cyclopscore.proxy.ICommonProxyCommon; - -/** - * The main mod class of ColossalChests. - * @author rubensworks - */ -public class ColossalChestsFabric extends ModBaseFabric implements ModInitializer { - - /** - * The unique instance of this mod. - */ - public static ColossalChestsFabric _instance; - - public ColossalChestsFabric() { - super(Reference.MOD_ID, (instance) -> { - ColossalChestsInstance.MOD = instance; - _instance = instance; - }); - } - - @Override - protected IClientProxyCommon constructClientProxy() { - return new ClientProxyFabric(); - } - - @Override - protected ICommonProxyCommon constructCommonProxy() { - return new CommonProxyFabric(); - } - - @Override - protected boolean hasDefaultCreativeModeTab() { - return true; - } - - @Override - protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTab.Builder builder) { - return super.constructDefaultCreativeModeTab(builder) - .icon(() -> new ItemStack(RegistryEntries.ITEM_CHEST)); - } - - @Override - protected void onConfigsRegister(ConfigHandlerCommon configHandler) { - super.onConfigsRegister(configHandler); - - configHandler.addConfigurable(new GeneralConfig<>(this)); - - for (ChestMaterial material : ChestMaterial.VALUES) { - configHandler.addConfigurable(new ChestWallConfigFabric<>(this, material)); - configHandler.addConfigurable(new ColossalChestConfigFabric<>(this, material)); - configHandler.addConfigurable(new InterfaceConfigFabric<>(this, material)); - } - configHandler.addConfigurable(new UncolossalChestConfigFabric<>(this)); - - configHandler.addConfigurable(new ItemUpgradeToolConfig<>(this, true)); - configHandler.addConfigurable(new ItemUpgradeToolConfig<>(this, false)); - - configHandler.addConfigurable(new BlockEntityColossalChestConfigFabric<>(this)); - configHandler.addConfigurable(new BlockEntityInterfaceConfigFabric<>(this)); - configHandler.addConfigurable(new BlockEntityUncolossalChestConfigFabric<>(this)); - - configHandler.addConfigurable(new ContainerColossalChestConfig<>(this)); - configHandler.addConfigurable(new ContainerUncolossalChestConfig<>(this)); - - configHandler.addConfigurable(new ConditionMetalVariantsSettingConfig()); - - configHandler.addConfigurable(new ChestFormedTriggerConfig<>(this)); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigFabric.java deleted file mode 100644 index bcd781221..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigFabric.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link ChestWall}. - * @author rubensworks - * - */ -public class ChestWallConfigFabric extends ChestWallConfig { - - public ChestWallConfigFabric(M mod, ChestMaterial material) { - super( - mod, - "chest_wall_" + material.getName(), - eConfig -> new ChestWallFabric(((ChestWallConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ChestWallFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ChestWallFabric.java deleted file mode 100644 index 9d9b9458c..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ChestWallFabric.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.level.Level; -import org.cyclops.cyclopscore.events.IBlockExplodedEvent; - -/** - * @author rubensworks - */ -public class ChestWallFabric extends ChestWall { - public ChestWallFabric(Properties properties, ChestMaterial material) { - super(properties, material); - IBlockExplodedEvent.EVENT.register((blockState, level, blockPos, explosion, biConsumer) -> { - if (blockState.getBlock() == this) { - onBlockExplodedCommon(blockState, level, blockPos, explosion); - } - }); - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return false; - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigFabric.java deleted file mode 100644 index 78369fd3b..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigFabric.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public class ColossalChestConfigFabric extends ColossalChestConfig { - - public ColossalChestConfigFabric(M mod, ChestMaterial material) { - super( - mod, - "colossal_chest_" + material.getName(), - eConfig -> new ColossalChestFabric(((ColossalChestConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ColossalChestFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ColossalChestFabric.java deleted file mode 100644 index 1a826cd8c..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/ColossalChestFabric.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.level.Level; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChestFabric; -import org.cyclops.cyclopscore.events.IBlockExplodedEvent; - -/** - * @author rubensworks - */ -public class ColossalChestFabric extends ColossalChest { - public ColossalChestFabric(Properties properties, ChestMaterial material) { - super(properties, material, BlockEntityColossalChestFabric::new); - IBlockExplodedEvent.EVENT.register((blockState, level, blockPos, explosion, biConsumer) -> { - if (blockState.getBlock() == this) { - onBlockExplodedCommon(blockState, level, blockPos, explosion); - } - }); - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return false; - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigFabric.java deleted file mode 100644 index 7bc292ba7..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigFabric.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link Interface}. - * @author rubensworks - * - */ -public class InterfaceConfigFabric extends InterfaceConfig { - - public InterfaceConfigFabric(M mod, ChestMaterial material) { - super( - mod, - "interface_" + material.getName(), - eConfig -> new InterfaceFabric(((InterfaceConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/InterfaceFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/InterfaceFabric.java deleted file mode 100644 index 8f144983e..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/InterfaceFabric.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.level.Level; -import org.cyclops.colossalchests.blockentity.BlockEntityInterface; -import org.cyclops.cyclopscore.events.IBlockExplodedEvent; - -/** - * @author rubensworks - */ -public class InterfaceFabric extends Interface { - public InterfaceFabric(Properties properties, ChestMaterial material) { - super(properties, material, BlockEntityInterface::new); - IBlockExplodedEvent.EVENT.register((blockState, level, blockPos, explosion, biConsumer) -> { - if (blockState.getBlock() == this) { - onBlockExplodedCommon(blockState, level, blockPos, explosion); - } - }); - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return false; - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigFabric.java deleted file mode 100644 index 9033f79fa..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigFabric.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChestFabric; -import org.cyclops.colossalchests.client.render.blockentity.ItemStackTileEntityUncolossalChestRenderFabric; -import org.cyclops.cyclopscore.datastructure.Wrapper; -import org.cyclops.cyclopscore.init.ModBaseFabric; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public class UncolossalChestConfigFabric extends UncolossalChestConfig { - - public UncolossalChestConfigFabric(M mod) { - super( - mod, - "uncolossal_chest", - eConfig -> new UncolossalChest(((UncolossalChestConfig) eConfig).getProperties(), BlockEntityUncolossalChestFabric::new), - (eConfig, block) -> new BlockItem(block, new Item.Properties()) - ); - } - - @Override - public void onForgeRegistered() { - super.onForgeRegistered(); - - if (getMod().getModHelpers().getMinecraftHelpers().isClientSide()) { - Wrapper renderer = new Wrapper<>(); - BuiltinItemRendererRegistry.INSTANCE.register(getItemInstance(), (stack, mode, matrices, vertexConsumers, light, overlay) -> { - if (renderer.get() == null) { - renderer.set(new ItemStackTileEntityUncolossalChestRenderFabric()); - } - renderer.get().renderByItem(stack, mode, matrices, vertexConsumers, light, overlay); - }); - } - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigFabric.java deleted file mode 100644 index bf8cd1af2..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigFabric.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; -import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.cyclopscore.init.ModBaseFabric; - -/** - * @author rubensworks - */ -public class BlockEntityColossalChestConfigFabric extends BlockEntityColossalChestConfig { - public BlockEntityColossalChestConfigFabric(M mod) { - super(mod); - } - - @Override - protected BlockEntityType.BlockEntitySupplier getBlockEntitySupplier() { - return BlockEntityColossalChestFabric::new; - } - - @Override - public void onForgeRegistered() { - super.onForgeRegistered(); - // If this would cause performance issues, we could implement a custom Storage instead of InventoryStorage that makes better use of Storage's capabilities. - // If so, also use this in BlockEntityInterfaceConfigFabric - // Pass no direction: our inventories expose all slots to all sides, - // and a direction would make Fabric allocate a new sided wrapper per slot on every lookup. - ItemStorage.SIDED.registerForBlockEntity((blockEntity, context) -> InventoryStorage.of(blockEntity.getInventory(), null), getInstance()); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestFabric.java deleted file mode 100644 index e1af8085d..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestFabric.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.state.BlockState; -import org.cyclops.colossalchests.inventory.InventoryColossalChestFabric; -import org.cyclops.colossalchests.inventory.InventoryLargeFabric; -import org.cyclops.cyclopscore.inventory.LargeInventoryCommon; - -/** - * @author rubensworks - */ -public class BlockEntityColossalChestFabric extends BlockEntityColossalChest { - - public BlockEntityColossalChestFabric(BlockPos blockPos, BlockState blockState) { - super(blockPos, blockState); - } - - @Override - protected InventoryColossalChestFabric createInventory(int size, int stackLimit) { - return new InventoryColossalChestFabric(this, size, stackLimit); - } - - @Override - protected LargeInventoryCommon createInventoryLarge(int size, int stackLimit) { - return new InventoryLargeFabric(size, stackLimit); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigFabric.java deleted file mode 100644 index 95a188470..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigFabric.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; -import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; -import org.cyclops.cyclopscore.init.ModBaseFabric; - -/** - * @author rubensworks - */ -public class BlockEntityInterfaceConfigFabric extends BlockEntityInterfaceConfig { - public BlockEntityInterfaceConfigFabric(M mod) { - super(mod, BlockEntityInterface::new); - } - - @Override - public void onForgeRegistered() { - super.onForgeRegistered(); - // Pass no direction: our inventories expose all slots to all sides, - // and a direction would make Fabric allocate a new sided wrapper per slot on every lookup. - ItemStorage.SIDED.registerForBlockEntity((blockEntity, context) -> { - BlockEntityColossalChest core = blockEntity.getCore(); - if (core != null) { - return InventoryStorage.of(core.getInventory(), null); - } - return null; - }, getInstance()); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigFabric.java deleted file mode 100644 index 60ac8b454..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigFabric.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; -import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.cyclopscore.init.ModBaseFabric; - -/** - * @author rubensworks - */ -public class BlockEntityUncolossalChestConfigFabric extends BlockEntityUncolossalChestConfig { - public BlockEntityUncolossalChestConfigFabric(M mod) { - super(mod); - } - - @Override - protected BlockEntityType.BlockEntitySupplier getBlockEntitySupplier() { - return BlockEntityUncolossalChestFabric::new; - } - - @Override - public void onForgeRegistered() { - super.onForgeRegistered(); - // Pass no direction: our inventories expose all slots to all sides, - // and a direction would make Fabric allocate a new sided wrapper per slot on every lookup. - ItemStorage.SIDED.registerForBlockEntity((blockEntity, context) -> InventoryStorage.of(blockEntity.getInventory(), null), getInstance()); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestFabric.java deleted file mode 100644 index 0be927bb2..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestFabric.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.state.BlockState; -import org.cyclops.colossalchests.inventory.InventoryUncolossalChestFabric; - -/** - * @author rubensworks - */ -public class BlockEntityUncolossalChestFabric extends BlockEntityUncolossalChest { - - public BlockEntityUncolossalChestFabric(BlockPos blockPos, BlockState blockState) { - super(blockPos, blockState); - } - - @Override - protected InventoryUncolossalChestFabric createInventory() { - return new InventoryUncolossalChestFabric(this, 5, 64); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderFabric.java deleted file mode 100644 index feb4c4487..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderFabric.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import net.minecraft.core.BlockPos; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; -import org.cyclops.cyclopscore.client.render.blockentity.ItemStackBlockEntityRendererBase; - -/** - * @author rubensworks - */ -public class ItemStackTileEntityUncolossalChestRenderFabric extends ItemStackBlockEntityRendererBase { - - public ItemStackTileEntityUncolossalChestRenderFabric() { - super(() -> new BlockEntityUncolossalChest(BlockPos.ZERO, RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value().defaultBlockState())); - } - -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSetting.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSetting.java deleted file mode 100644 index 3c3fecbc5..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSetting.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.cyclops.colossalchests.condition; - -import com.mojang.serialization.MapCodec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.fabricmc.fabric.api.resource.conditions.v1.ResourceCondition; -import net.fabricmc.fabric.api.resource.conditions.v1.ResourceConditionType; -import net.minecraft.core.HolderLookup; -import net.minecraft.resources.ResourceLocation; -import org.cyclops.colossalchests.GeneralConfig; -import org.cyclops.colossalchests.Reference; -import org.jetbrains.annotations.Nullable; - -/** - * A recipe condition for checking if the {@link GeneralConfig#metalVariants} setting is enabled. - * @author rubensworks - */ -public record ConditionMetalVariantsSetting() implements ResourceCondition { - - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( - builder -> builder.point(new ConditionMetalVariantsSetting()) - ); - public static final ResourceConditionType TYPE = ResourceConditionType.create( - ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, "metal_variants_enabled"), - CODEC - ); - - @Override - public ResourceConditionType getType() { - return TYPE; - } - - @Override - public boolean test(@Nullable HolderLookup.Provider registryLookup) { - return GeneralConfig.metalVariants; - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfig.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfig.java deleted file mode 100644 index 2c0add1b7..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cyclops.colossalchests.condition; - -import org.cyclops.colossalchests.ColossalChestsFabric; -import org.cyclops.cyclopscore.config.extendedconfig.ConditionConfigFabric; - -/** - * Config for the metal variants setting recipe condition. - * @author rubensworks - */ -public class ConditionMetalVariantsSettingConfig extends ConditionConfigFabric { - - public ConditionMetalVariantsSettingConfig() { - super( - ColossalChestsFabric._instance, - "metal_variants_enabled", - ConditionMetalVariantsSetting.TYPE - ); - } - -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/gametest/GameTestsFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/gametest/GameTestsFabric.java deleted file mode 100644 index f175790e6..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/gametest/GameTestsFabric.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.cyclops.colossalchests.gametest; - -import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage; -import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; -import net.fabricmc.fabric.api.transfer.v1.storage.Storage; -import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; -import net.minecraft.core.BlockPos; -import net.minecraft.gametest.framework.GameTest; -import net.minecraft.gametest.framework.GameTestHelper; -import net.minecraft.world.item.Items; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; - -/** - * Game tests for Fabric-only behaviour. - * @author rubensworks - */ -public class GameTestsFabric extends GameTestsCommon { - - /** - * Two separate chests must never share a single item storage. - * Regression test for #208. - */ - @GameTest(template = TEMPLATE_EMPTY) - public void testColossalItemStorageIsPerChest(GameTestHelper helper) { - BlockPos posFirst = new BlockPos(1, 0, 1); - BlockPos posSecond = new BlockPos(5, 0, 1); - BlockEntityColossalChest coreFirst = createChest(helper, posFirst, ChestMaterial.WOOD, 3); - BlockEntityColossalChest coreSecond = createChest(helper, posSecond, ChestMaterial.WOOD, 3); - - // Look up the second chest first: both chests are empty and equally sized, - // so a storage cache keyed on inventory contents would hand the first chest the second chest's storage. - Storage storageSecond = ItemStorage.SIDED.find(helper.getLevel(), helper.absolutePos(posSecond), null); - Storage storageFirst = ItemStorage.SIDED.find(helper.getLevel(), helper.absolutePos(posFirst), null); - helper.assertTrue(storageFirst != null && storageSecond != null, "Chest cores expose no item storage"); - - try (Transaction transaction = Transaction.openOuter()) { - helper.assertValueEqual(storageFirst.insert(ItemVariant.of(Items.APPLE), 64, transaction), 64L, "inserted item count"); - transaction.commit(); - } - - helper.assertFalse(coreFirst.getInventory().isEmpty(), "Inserted items did not end up in the targeted chest"); - helper.assertTrue(coreSecond.getInventory().isEmpty(), "Inserted items ended up in another chest"); - - helper.succeed(); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryColossalChestFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryColossalChestFabric.java deleted file mode 100644 index d6b13d5f7..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryColossalChestFabric.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cyclops.colossalchests.inventory; - -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; - -/** - * An {@link InventoryColossalChest} that is identified by its instance instead of its contents. - * - * Fabric's {@code InventoryStorage} caches its wrappers in a map keyed on the container, - * and compares those keys with equals. - * {@code SimpleInventoryCommon} considers any two inventories with equally-sized and equal contents to be equal, - * and its hash code changes on every modification, - * so two empty chests of the same size would share a single storage wrapper, - * and items inserted into one chest would end up in the other. - * - * @author rubensworks - */ -public class InventoryColossalChestFabric extends InventoryColossalChest { - - public InventoryColossalChestFabric(BlockEntityColossalChest chest, int size, int stackLimit) { - super(chest, size, stackLimit); - } - - @Override - public boolean equals(Object o) { - return this == o; - } - - @Override - public int hashCode() { - return System.identityHashCode(this); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryLargeFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryLargeFabric.java deleted file mode 100644 index 923d2175c..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryLargeFabric.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.cyclops.colossalchests.inventory; - -import org.cyclops.cyclopscore.inventory.LargeInventoryCommon; - -/** - * A {@link LargeInventoryCommon} that is identified by its instance instead of its contents. - * - * See {@link InventoryColossalChestFabric} for why this is needed. - * - * @author rubensworks - */ -public class InventoryLargeFabric extends LargeInventoryCommon { - - public InventoryLargeFabric(int size, int stackLimit) { - super(size, stackLimit); - } - - @Override - public boolean equals(Object o) { - return this == o; - } - - @Override - public int hashCode() { - return System.identityHashCode(this); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryUncolossalChestFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryUncolossalChestFabric.java deleted file mode 100644 index 19afce93b..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/inventory/InventoryUncolossalChestFabric.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.cyclops.colossalchests.inventory; - -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; - -/** - * An {@link InventoryUncolossalChest} that is identified by its instance instead of its contents. - * - * See {@link InventoryColossalChestFabric} for why this is needed. - * - * @author rubensworks - */ -public class InventoryUncolossalChestFabric extends InventoryUncolossalChest { - - public InventoryUncolossalChestFabric(BlockEntityUncolossalChest chest, int size, int stackLimit) { - super(chest, size, stackLimit); - } - - @Override - public boolean equals(Object o) { - return this == o; - } - - @Override - public int hashCode() { - return System.identityHashCode(this); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/proxy/CommonProxyFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests/proxy/CommonProxyFabric.java deleted file mode 100644 index c9668e51e..000000000 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/proxy/CommonProxyFabric.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cyclops.colossalchests.proxy; - -import org.cyclops.colossalchests.ColossalChestsFabric; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetContentPacketWindow; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetSlotPacketLarge; -import org.cyclops.colossalchests.network.packet.ServerboundContainerClickPacketOverride; -import org.cyclops.cyclopscore.init.ModBaseFabric; -import org.cyclops.cyclopscore.network.IPacketHandler; -import org.cyclops.cyclopscore.proxy.CommonProxyComponentFabric; - -/** - * Proxy for server and client side. - * @author rubensworks - * - */ -public class CommonProxyFabric extends CommonProxyComponentFabric { - - @Override - public ModBaseFabric getMod() { - return ColossalChestsFabric._instance; - } - - @Override - public void registerPackets(IPacketHandler packetHandler) { - super.registerPackets(packetHandler); - - // Register packets. - packetHandler.register(ClientboundContainerSetContentPacketWindow.class, ClientboundContainerSetContentPacketWindow.TYPE, ClientboundContainerSetContentPacketWindow.CODEC); - packetHandler.register(ServerboundContainerClickPacketOverride.class, ServerboundContainerClickPacketOverride.TYPE, ServerboundContainerClickPacketOverride.CODEC); - packetHandler.register(ClientboundContainerSetSlotPacketLarge.class, ClientboundContainerSetSlotPacketLarge.TYPE, ClientboundContainerSetSlotPacketLarge.CODEC); - } -} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests2/ColossalChestsFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests2/ColossalChestsFabric.java new file mode 100644 index 000000000..e0287e2b5 --- /dev/null +++ b/loader-fabric/src/main/java/org/cyclops/colossalchests2/ColossalChestsFabric.java @@ -0,0 +1,58 @@ +package org.cyclops.colossalchests2; + +import net.fabricmc.api.ModInitializer; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import org.cyclops.colossalchests2.proxy.ClientProxyFabric; +import org.cyclops.colossalchests2.proxy.CommonProxyFabric; +import org.cyclops.cyclopscore.config.ConfigHandlerCommon; +import org.cyclops.cyclopscore.init.ModBaseFabric; +import org.cyclops.cyclopscore.proxy.IClientProxyCommon; +import org.cyclops.cyclopscore.proxy.ICommonProxyCommon; + +/** + * The main mod class of ColossalChests. + * @author rubensworks + */ +public class ColossalChestsFabric extends ModBaseFabric implements ModInitializer { + + /** + * The unique instance of this mod. + */ + public static ColossalChestsFabric _instance; + + public ColossalChestsFabric() { + super(Reference.MOD_ID, (instance) -> { + ColossalChestsInstance.MOD = instance; + _instance = instance; + }); + } + + @Override + protected IClientProxyCommon constructClientProxy() { + return new ClientProxyFabric(); + } + + @Override + protected ICommonProxyCommon constructCommonProxy() { + return new CommonProxyFabric(); + } + + @Override + protected boolean hasDefaultCreativeModeTab() { + return true; + } + + @Override + protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTab.Builder builder) { + return super.constructDefaultCreativeModeTab(builder) + .icon(() -> new ItemStack(RegistryEntries.ITEM_CHEST)); + } + + @Override + protected void onConfigsRegister(ConfigHandlerCommon configHandler) { + super.onConfigsRegister(configHandler); + + configHandler.addConfigurable(new GeneralConfig<>(this)); + } +} diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests/proxy/ClientProxyFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxyFabric.java similarity index 81% rename from loader-fabric/src/main/java/org/cyclops/colossalchests/proxy/ClientProxyFabric.java rename to loader-fabric/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxyFabric.java index b6bf944fb..35b1668ad 100644 --- a/loader-fabric/src/main/java/org/cyclops/colossalchests/proxy/ClientProxyFabric.java +++ b/loader-fabric/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxyFabric.java @@ -1,6 +1,6 @@ -package org.cyclops.colossalchests.proxy; +package org.cyclops.colossalchests2.proxy; -import org.cyclops.colossalchests.ColossalChestsFabric; +import org.cyclops.colossalchests2.ColossalChestsFabric; import org.cyclops.cyclopscore.init.ModBaseFabric; import org.cyclops.cyclopscore.proxy.ClientProxyComponentFabric; diff --git a/loader-fabric/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxyFabric.java b/loader-fabric/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxyFabric.java new file mode 100644 index 000000000..9634af2d3 --- /dev/null +++ b/loader-fabric/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxyFabric.java @@ -0,0 +1,19 @@ +package org.cyclops.colossalchests2.proxy; + +import org.cyclops.colossalchests2.ColossalChestsFabric; +import org.cyclops.cyclopscore.init.ModBaseFabric; +import org.cyclops.cyclopscore.proxy.CommonProxyComponentFabric; + +/** + * Proxy for server and client side. + * @author rubensworks + * + */ +public class CommonProxyFabric extends CommonProxyComponentFabric { + + @Override + public ModBaseFabric getMod() { + return ColossalChestsFabric._instance; + } + +} diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json deleted file mode 100644 index 92ae6cd1a..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/copper" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json deleted file mode 100644 index c3e19b4eb..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "item": "minecraft:diamond" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json deleted file mode 100644 index 0fa2efc83..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/gold" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json deleted file mode 100644 index 8a88c6709..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/iron" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json deleted file mode 100644 index 2d1d70d06..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:smithing_transform", - "template": { - "item": "minecraft:gold_ingot" - }, - "base": { - "item": "colossalchests:chest_wall_diamond" - }, - "addition": { - "item": "minecraft:netherite_scrap" - }, - "result": { - "id": "colossalchests:chest_wall_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json deleted file mode 100644 index 8738d3346..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "PPP", - "PLP", - "PPP" - ], - "key": { - "P": { - "item": "minecraft:obsidian" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json deleted file mode 100644 index 74fcab719..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/silver" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json deleted file mode 100644 index 29d3384a5..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "PPP", - "PLP", - "PPP" - ], - "key": { - "P": { - "tag": "minecraft:planks" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_wood" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json deleted file mode 100644 index ca7ddf7c3..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_copper" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json deleted file mode 100644 index 04f22a03b..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_diamond" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json deleted file mode 100644 index 702d6238a..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_gold" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json deleted file mode 100644 index 9efe9168c..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_iron" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json deleted file mode 100644 index 065d9caac..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_netherite" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json deleted file mode 100644 index 215224b9e..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_obsidian" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json deleted file mode 100644 index de6cc9cad..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_silver" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json deleted file mode 100644 index 31bfb21a9..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_wood" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_wood" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_copper.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_copper.json deleted file mode 100644 index 8b8d5d4e7..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_copper.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_copper" - } - }, - "result": { - "id": "colossalchests:interface_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_diamond.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_diamond.json deleted file mode 100644 index e7751d47e..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_diamond" - } - }, - "result": { - "id": "colossalchests:interface_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_gold.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_gold.json deleted file mode 100644 index 2605c64dc..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_gold" - } - }, - "result": { - "id": "colossalchests:interface_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_iron.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_iron.json deleted file mode 100644 index 09477b4cf..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_iron" - } - }, - "result": { - "id": "colossalchests:interface_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_netherite.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_netherite.json deleted file mode 100644 index 773c892d9..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_netherite.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_netherite" - } - }, - "result": { - "id": "colossalchests:interface_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_obsidian.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_obsidian.json deleted file mode 100644 index d6b7c58ce..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_obsidian" - } - }, - "result": { - "id": "colossalchests:interface_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_silver.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_silver.json deleted file mode 100644 index cd236040a..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_silver.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_silver" - } - }, - "result": { - "id": "colossalchests:interface_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_wood.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_wood.json deleted file mode 100644 index 173d7b017..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/interface_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_wood" - } - }, - "result": { - "id": "colossalchests:interface_wood" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json deleted file mode 100644 index f8776f24b..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_wood" - }, - { - "tag": "minecraft:planks" - } - ], - "result": { - "id": "colossalchests:uncolossal_chest" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool.json deleted file mode 100644 index 3c9285435..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "minecraft:stick" - }, - { - "item": "colossalchests:chest_wall_wood" - }, - { - "item": "minecraft:stick" - } - ], - "result": { - "id": "colossalchests:upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json deleted file mode 100644 index 143dfc10d..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:upgrade_tool_reverse" - } - ], - "result": { - "id": "colossalchests:upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json b/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json deleted file mode 100644 index d11f748cc..000000000 --- a/loader-fabric/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:upgrade_tool" - } - ], - "result": { - "id": "colossalchests:upgrade_tool_reverse" - } -} \ No newline at end of file diff --git a/loader-fabric/src/main/resources/fabric.mod.json b/loader-fabric/src/main/resources/fabric.mod.json index 90eb292e3..91fa556c6 100644 --- a/loader-fabric/src/main/resources/fabric.mod.json +++ b/loader-fabric/src/main/resources/fabric.mod.json @@ -19,14 +19,13 @@ "environment": "*", "entrypoints": { "main": [ - "org.cyclops.colossalchests.ColossalChestsFabric" + "org.cyclops.colossalchests2.ColossalChestsFabric" ], "fabric-gametest": [ - "org.cyclops.colossalchests.gametest.GameTestsCommon", - "org.cyclops.colossalchests.gametest.GameTestsFabric" + "org.cyclops.colossalchests2.gametest.GameTestsCommon" ] }, - "accessWidener" : "colossalchests.accesswidener", + "accessWidener" : "colossalchests2.accesswidener", "depends": { "cyclopscore": ">=${cyclopscore_version_semver}", diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/ColossalChestsForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/ColossalChestsForge.java deleted file mode 100644 index 76d9b66bc..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/ColossalChestsForge.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.cyclops.colossalchests; - -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fml.common.Mod; -import org.cyclops.colossalchests.advancement.criterion.ChestFormedTriggerConfig; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.block.ChestWallConfigForge; -import org.cyclops.colossalchests.block.ColossalChestConfigForge; -import org.cyclops.colossalchests.block.InterfaceConfigForge; -import org.cyclops.colossalchests.block.UncolossalChestConfigForge; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChestConfigForge; -import org.cyclops.colossalchests.blockentity.BlockEntityInterfaceConfigForge; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChestConfigForge; -import org.cyclops.colossalchests.condition.ConditionMetalVariantsSettingConfigForge; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChestConfig; -import org.cyclops.colossalchests.inventory.container.ContainerUncolossalChestConfig; -import org.cyclops.colossalchests.item.ItemUpgradeToolConfig; -import org.cyclops.colossalchests.proxy.ClientProxyForge; -import org.cyclops.colossalchests.proxy.CommonProxyForge; -import org.cyclops.cyclopscore.config.ConfigHandlerCommon; -import org.cyclops.cyclopscore.init.ModBaseForge; -import org.cyclops.cyclopscore.proxy.IClientProxyCommon; -import org.cyclops.cyclopscore.proxy.ICommonProxyCommon; - -/** - * The main mod class of ColossalChests. - * @author rubensworks - * - */ -@Mod(Reference.MOD_ID) -public class ColossalChestsForge extends ModBaseForge { - - /** - * The unique instance of this mod. - */ - public static ColossalChestsForge _instance; - - public ColossalChestsForge() { - super(Reference.MOD_ID, (instance) -> { - _instance = instance; - ColossalChestsInstance.MOD = instance; - }); - } - - @Override - protected IClientProxyCommon constructClientProxy() { - return new ClientProxyForge(); - } - - @Override - protected ICommonProxyCommon constructCommonProxy() { - return new CommonProxyForge(); - } - - @Override - protected boolean hasDefaultCreativeModeTab() { - return true; - } - - @Override - protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTab.Builder builder) { - return super.constructDefaultCreativeModeTab(builder) - .icon(() -> new ItemStack(RegistryEntries.ITEM_CHEST)); - } - - @Override - protected void onConfigsRegister(ConfigHandlerCommon configHandler) { - super.onConfigsRegister(configHandler); - - configHandler.addConfigurable(new GeneralConfig<>(this)); - - for (ChestMaterial material : ChestMaterial.VALUES) { - configHandler.addConfigurable(new ChestWallConfigForge<>(this, material)); - configHandler.addConfigurable(new ColossalChestConfigForge<>(this, material)); - configHandler.addConfigurable(new InterfaceConfigForge<>(this, material)); - } - configHandler.addConfigurable(new UncolossalChestConfigForge<>(this)); - - configHandler.addConfigurable(new ItemUpgradeToolConfig<>(this, true)); - configHandler.addConfigurable(new ItemUpgradeToolConfig<>(this, false)); - - configHandler.addConfigurable(new BlockEntityColossalChestConfigForge<>(this)); - configHandler.addConfigurable(new BlockEntityInterfaceConfigForge<>(this)); - configHandler.addConfigurable(new BlockEntityUncolossalChestConfigForge<>(this)); - - configHandler.addConfigurable(new ContainerColossalChestConfig<>(this)); - configHandler.addConfigurable(new ContainerUncolossalChestConfig<>(this)); - - configHandler.addConfigurable(new ConditionMetalVariantsSettingConfigForge()); - - configHandler.addConfigurable(new ChestFormedTriggerConfig<>(this)); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigForge.java deleted file mode 100644 index 5185f367c..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link ChestWall}. - * @author rubensworks - * - */ -public class ChestWallConfigForge extends ChestWallConfig { - - public ChestWallConfigForge(M mod, ChestMaterial material) { - super( - mod, - "chest_wall_" + material.getName(), - eConfig -> new ChestWallForge(((ChestWallConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ChestWallForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/ChestWallForge.java deleted file mode 100644 index 7ff0f6893..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ChestWallForge.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; - -/** - * @author rubensworks - */ -public class ChestWallForge extends ChestWall { - public ChestWallForge(Properties properties, ChestMaterial material) { - super(properties, material); - } - - @Override - public boolean shouldDisplayFluidOverlay(BlockState blockState, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { - return true; - } - - @Override - protected boolean canBlockSnapshotsBeCaptured() { - return true; - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return level.captureBlockSnapshots; - } - - @Override - public void onBlockExploded(BlockState state, Level world, BlockPos pos, Explosion explosion) { - super.onBlockExplodedCommon(state, world, pos, explosion); - } - - @Override - public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { - return super.getExplosionResistance(); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigForge.java deleted file mode 100644 index 649dab441..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public class ColossalChestConfigForge extends ColossalChestConfig { - - public ColossalChestConfigForge(M mod, ChestMaterial material) { - super( - mod, - "colossal_chest_" + material.getName(), - eConfig -> new ColossalChestForge(((ColossalChestConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ColossalChestForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/ColossalChestForge.java deleted file mode 100644 index 47f2fa0ff..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/ColossalChestForge.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChestForge; - -/** - * @author rubensworks - */ -public class ColossalChestForge extends ColossalChest { - public ColossalChestForge(Properties properties, ChestMaterial material) { - super(properties, material, BlockEntityColossalChestForge::new); - } - - @Override - public boolean shouldDisplayFluidOverlay(BlockState blockState, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { - return true; - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return level.captureBlockSnapshots; - } - - @Override - public void onBlockExploded(BlockState state, Level world, BlockPos pos, Explosion explosion) { - super.onBlockExplodedCommon(state, world, pos, explosion); - } - - @Override - public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { - return super.getExplosionResistance(); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigForge.java deleted file mode 100644 index 485fdad6a..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link Interface}. - * @author rubensworks - * - */ -public class InterfaceConfigForge extends InterfaceConfig { - - public InterfaceConfigForge(M mod, ChestMaterial material) { - super( - mod, - "interface_" + material.getName(), - eConfig -> new InterfaceForge(((InterfaceConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/InterfaceForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/InterfaceForge.java deleted file mode 100644 index d9e3b2136..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/InterfaceForge.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; -import org.cyclops.colossalchests.blockentity.BlockEntityInterfaceForge; - -/** - * @author rubensworks - */ -public class InterfaceForge extends Interface { - public InterfaceForge(Properties properties, ChestMaterial material) { - super(properties, material, BlockEntityInterfaceForge::new); - } - - @Override - public boolean shouldDisplayFluidOverlay(BlockState blockState, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { - return true; - } - - @Override - protected boolean canBlockSnapshotsBeCaptured() { - return true; - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return level.captureBlockSnapshots; - } - - @Override - public void onBlockExploded(BlockState state, Level world, BlockPos pos, Explosion explosion) { - super.onBlockExplodedCommon(state, world, pos, explosion); - } - - @Override - public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { - return super.getExplosionResistance(); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigForge.java deleted file mode 100644 index 25ecf9572..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigForge.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.client.extensions.common.IClientItemExtensions; -import org.cyclops.colossalchests.client.render.blockentity.ItemStackTileEntityUncolossalChestRenderForge; -import org.cyclops.cyclopscore.init.ModBaseForge; - -import java.util.function.Consumer; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public class UncolossalChestConfigForge extends UncolossalChestConfig { - - public UncolossalChestConfigForge(M mod) { - super( - mod, - "uncolossal_chest", - eConfig -> new UncolossalChest(((UncolossalChestConfig) eConfig).getProperties()), - (eConfig, block) -> new BlockItem(block, new Item.Properties()) { - @Override - @OnlyIn(Dist.CLIENT) - public void initializeClient(Consumer consumer) { - consumer.accept(new ItemStackTileEntityUncolossalChestRenderForge.ClientItemExtensions()); - } - } - ); - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigForge.java deleted file mode 100644 index b1ebfad4c..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigForge.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.world.level.block.entity.BlockEntityType; -import org.cyclops.cyclopscore.init.ModBaseForge; - -/** - * @author rubensworks - */ -public class BlockEntityColossalChestConfigForge extends BlockEntityColossalChestConfig { - public BlockEntityColossalChestConfigForge(M mod) { - super(mod); - } - - @Override - protected BlockEntityType.BlockEntitySupplier getBlockEntitySupplier() { - return BlockEntityColossalChestForge::new; - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestForge.java deleted file mode 100644 index 20a3e7e8c..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestForge.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.AABB; -import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.InvWrapper; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; - -/** - * @author rubensworks - */ -public class BlockEntityColossalChestForge extends BlockEntityColossalChest { - - private LazyOptional capabilityItemHandler = LazyOptional.empty(); - - public BlockEntityColossalChestForge(BlockPos blockPos, BlockState blockState) { - super(blockPos, blockState); - } - - @Override - public void setInventory(SimpleInventoryCommon inventory) { - this.capabilityItemHandler.invalidate(); - super.setInventory(inventory); - if (this.inventory.getContainerSize() > 0) { - IItemHandler itemHandler = new InvWrapper(this.inventory); - this.capabilityItemHandler = LazyOptional.of(() -> itemHandler); - } else { - this.capabilityItemHandler = LazyOptional.empty(); - } - } - - @Override - public LazyOptional getCapability(Capability capability, Direction facing) { - ensureInventoryInitialized(); - if (this.capabilityItemHandler.isPresent() && capability == ForgeCapabilities.ITEM_HANDLER) { - return this.capabilityItemHandler.cast(); - } - return super.getCapability(capability, facing); - } - - @Override - public AABB getRenderBoundingBox() { - int size = this.getSizeSingular(); - return new AABB( - Vec3.atLowerCornerOf(this.getBlockPos().subtract(new Vec3i(size, size, size))), - Vec3.atLowerCornerOf(this.getBlockPos().offset(size, size * 2, size)) - ); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigForge.java deleted file mode 100644 index 2086d1849..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigForge.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import org.cyclops.cyclopscore.init.ModBaseForge; - -/** - * @author rubensworks - */ -public class BlockEntityInterfaceConfigForge extends BlockEntityInterfaceConfig { - public BlockEntityInterfaceConfigForge(M mod) { - super(mod, BlockEntityInterfaceForge::new); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceForge.java deleted file mode 100644 index 774256213..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceForge.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.LazyOptional; - -import javax.annotation.Nonnull; - -/** - * @author rubensworks - */ -public class BlockEntityInterfaceForge extends BlockEntityInterface { - public BlockEntityInterfaceForge(BlockPos blockPos, BlockState blockState) { - super(blockPos, blockState); - } - - @Override - public LazyOptional getCapability(@Nonnull Capability capability, Direction facing) { - BlockEntityColossalChestForge core = (BlockEntityColossalChestForge) getCore(); - if (core != null) { - LazyOptional t = core.getCapability(capability, facing); - if (t.isPresent()) { - return t; - } - } - return super.getCapability(capability, facing); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigForge.java deleted file mode 100644 index 1333512e1..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigForge.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.Direction; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.event.AttachCapabilitiesEvent; -import net.minecraftforge.items.wrapper.InvWrapper; -import org.cyclops.colossalchests.Reference; -import org.cyclops.cyclopscore.init.ModBaseForge; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * @author rubensworks - */ -public class BlockEntityUncolossalChestConfigForge extends BlockEntityUncolossalChestConfig { - public BlockEntityUncolossalChestConfigForge(M mod) { - super(mod); - MinecraftForge.EVENT_BUS.addGenericListener(BlockEntity.class, this::registerCapabilities); - } - - public void registerCapabilities(AttachCapabilitiesEvent event) { - if (event.getObject().getType() == getInstance()) { - event.addCapability(ResourceLocation.fromNamespaceAndPath(Reference.MOD_ID, getNamedId()), new ICapabilityProvider() { - @Override - public @NotNull LazyOptional getCapability(@NotNull Capability capability, @Nullable Direction direction) { - if (capability == ForgeCapabilities.ITEM_HANDLER) { - return LazyOptional.of(() -> new InvWrapper(((BlockEntityUncolossalChest) event.getObject()).getInventory())).cast(); - } - return LazyOptional.empty(); - } - }); - } - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderForge.java deleted file mode 100644 index 1f7bfa07e..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderForge.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; -import net.minecraft.core.BlockPos; -import net.minecraftforge.client.extensions.common.IClientItemExtensions; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; -import org.cyclops.cyclopscore.client.render.blockentity.ItemStackBlockEntityRendererBase; - -/** - * @author rubensworks - */ -public class ItemStackTileEntityUncolossalChestRenderForge extends ItemStackBlockEntityRendererBase { - - public ItemStackTileEntityUncolossalChestRenderForge() { - super(() -> new BlockEntityUncolossalChest(BlockPos.ZERO, RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value().defaultBlockState())); - } - - public static class ClientItemExtensions implements IClientItemExtensions { - @Override - public BlockEntityWithoutLevelRenderer getCustomRenderer() { - return new ItemStackTileEntityUncolossalChestRenderForge(); - } - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfigForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfigForge.java deleted file mode 100644 index f16666eae..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfigForge.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cyclops.colossalchests.condition; - -import org.cyclops.colossalchests.ColossalChestsForge; -import org.cyclops.cyclopscore.config.extendedconfig.ConditionConfigForge; - -/** - * Config for the metal variants setting recipe condition. - * @author rubensworks - */ -public class ConditionMetalVariantsSettingConfigForge extends ConditionConfigForge { - - public ConditionMetalVariantsSettingConfigForge() { - super( - ColossalChestsForge._instance, - "metal_variants_enabled", - ConditionMetalVariantsSettingForge.CODEC - ); - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingForge.java deleted file mode 100644 index 0b13144ca..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingForge.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.cyclops.colossalchests.condition; - -import com.mojang.serialization.DynamicOps; -import com.mojang.serialization.MapCodec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraftforge.common.crafting.conditions.ICondition; -import org.cyclops.colossalchests.GeneralConfig; - -/** - * A recipe condition for checking if the {@link GeneralConfig#metalVariants} setting is enabled. - * @author rubensworks - */ -public record ConditionMetalVariantsSettingForge() implements ICondition { - - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( - builder -> builder.point(new ConditionMetalVariantsSettingForge()) - ); - - @Override - public boolean test(IContext context, DynamicOps dynamicOps) { - return GeneralConfig.metalVariants; - } - - @Override - public MapCodec codec() { - return CODEC; - } - -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/proxy/CommonProxyForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests/proxy/CommonProxyForge.java deleted file mode 100644 index e7e529ea4..000000000 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/proxy/CommonProxyForge.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cyclops.colossalchests.proxy; - -import org.cyclops.colossalchests.ColossalChestsForge; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetContentPacketWindow; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetSlotPacketLarge; -import org.cyclops.colossalchests.network.packet.ServerboundContainerClickPacketOverride; -import org.cyclops.cyclopscore.init.ModBaseForge; -import org.cyclops.cyclopscore.network.IPacketHandler; -import org.cyclops.cyclopscore.proxy.CommonProxyComponentForge; - -/** - * Proxy for server and client side. - * @author rubensworks - * - */ -public class CommonProxyForge extends CommonProxyComponentForge { - - @Override - public ModBaseForge getMod() { - return ColossalChestsForge._instance; - } - - @Override - public void registerPackets(IPacketHandler packetHandler) { - super.registerPackets(packetHandler); - - // Register packets. - packetHandler.register(ClientboundContainerSetContentPacketWindow.class, ClientboundContainerSetContentPacketWindow.TYPE, ClientboundContainerSetContentPacketWindow.CODEC); - packetHandler.register(ServerboundContainerClickPacketOverride.class, ServerboundContainerClickPacketOverride.TYPE, ServerboundContainerClickPacketOverride.CODEC); - packetHandler.register(ClientboundContainerSetSlotPacketLarge.class, ClientboundContainerSetSlotPacketLarge.TYPE, ClientboundContainerSetSlotPacketLarge.CODEC); - } -} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests2/ColossalChestsForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests2/ColossalChestsForge.java new file mode 100644 index 000000000..ca2b54410 --- /dev/null +++ b/loader-forge/src/main/java/org/cyclops/colossalchests2/ColossalChestsForge.java @@ -0,0 +1,60 @@ +package org.cyclops.colossalchests2; + +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.fml.common.Mod; +import org.cyclops.colossalchests2.proxy.ClientProxyForge; +import org.cyclops.colossalchests2.proxy.CommonProxyForge; +import org.cyclops.cyclopscore.config.ConfigHandlerCommon; +import org.cyclops.cyclopscore.init.ModBaseForge; +import org.cyclops.cyclopscore.proxy.IClientProxyCommon; +import org.cyclops.cyclopscore.proxy.ICommonProxyCommon; + +/** + * The main mod class of ColossalChests. + * @author rubensworks + * + */ +@Mod(Reference.MOD_ID) +public class ColossalChestsForge extends ModBaseForge { + + /** + * The unique instance of this mod. + */ + public static ColossalChestsForge _instance; + + public ColossalChestsForge() { + super(Reference.MOD_ID, (instance) -> { + _instance = instance; + ColossalChestsInstance.MOD = instance; + }); + } + + @Override + protected IClientProxyCommon constructClientProxy() { + return new ClientProxyForge(); + } + + @Override + protected ICommonProxyCommon constructCommonProxy() { + return new CommonProxyForge(); + } + + @Override + protected boolean hasDefaultCreativeModeTab() { + return true; + } + + @Override + protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTab.Builder builder) { + return super.constructDefaultCreativeModeTab(builder) + .icon(() -> new ItemStack(RegistryEntries.ITEM_CHEST)); + } + + @Override + protected void onConfigsRegister(ConfigHandlerCommon configHandler) { + super.onConfigsRegister(configHandler); + + configHandler.addConfigurable(new GeneralConfig<>(this)); + } +} diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/gametest/GameTestsLoaderForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsLoaderForge.java similarity index 87% rename from loader-forge/src/main/java/org/cyclops/colossalchests/gametest/GameTestsLoaderForge.java rename to loader-forge/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsLoaderForge.java index 65dc46d4d..b8a6e4d40 100644 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/gametest/GameTestsLoaderForge.java +++ b/loader-forge/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsLoaderForge.java @@ -1,10 +1,10 @@ -package org.cyclops.colossalchests.gametest; +package org.cyclops.colossalchests2.gametest; import net.minecraft.gametest.framework.GameTestGenerator; import net.minecraft.gametest.framework.TestFunction; import net.minecraftforge.gametest.GameTestHolder; import org.cyclops.cyclopscore.gametest.GameTestLoaderHelpers; -import org.cyclops.colossalchests.Reference; +import org.cyclops.colossalchests2.Reference; import java.util.Collection; diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests/proxy/ClientProxyForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxyForge.java similarity index 81% rename from loader-forge/src/main/java/org/cyclops/colossalchests/proxy/ClientProxyForge.java rename to loader-forge/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxyForge.java index 31c2155b0..a64ff48ed 100644 --- a/loader-forge/src/main/java/org/cyclops/colossalchests/proxy/ClientProxyForge.java +++ b/loader-forge/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxyForge.java @@ -1,6 +1,6 @@ -package org.cyclops.colossalchests.proxy; +package org.cyclops.colossalchests2.proxy; -import org.cyclops.colossalchests.ColossalChestsForge; +import org.cyclops.colossalchests2.ColossalChestsForge; import org.cyclops.cyclopscore.init.ModBaseForge; import org.cyclops.cyclopscore.proxy.ClientProxyComponentForge; diff --git a/loader-forge/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxyForge.java b/loader-forge/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxyForge.java new file mode 100644 index 000000000..5c5cb86a3 --- /dev/null +++ b/loader-forge/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxyForge.java @@ -0,0 +1,19 @@ +package org.cyclops.colossalchests2.proxy; + +import org.cyclops.colossalchests2.ColossalChestsForge; +import org.cyclops.cyclopscore.init.ModBaseForge; +import org.cyclops.cyclopscore.proxy.CommonProxyComponentForge; + +/** + * Proxy for server and client side. + * @author rubensworks + * + */ +public class CommonProxyForge extends CommonProxyComponentForge { + + @Override + public ModBaseForge getMod() { + return ColossalChestsForge._instance; + } + +} diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json deleted file mode 100644 index 21d97f6c6..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "forge:ingots/copper" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json deleted file mode 100644 index c3e19b4eb..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "item": "minecraft:diamond" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json deleted file mode 100644 index 6cbc0f8e7..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "forge:ingots/gold" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json deleted file mode 100644 index 3ed387f39..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "forge:ingots/iron" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json deleted file mode 100644 index 2d1d70d06..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:smithing_transform", - "template": { - "item": "minecraft:gold_ingot" - }, - "base": { - "item": "colossalchests:chest_wall_diamond" - }, - "addition": { - "item": "minecraft:netherite_scrap" - }, - "result": { - "id": "colossalchests:chest_wall_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json deleted file mode 100644 index 8738d3346..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "PPP", - "PLP", - "PPP" - ], - "key": { - "P": { - "item": "minecraft:obsidian" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json deleted file mode 100644 index ee963e131..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "forge:ingots/silver" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json b/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json deleted file mode 100644 index 29d3384a5..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "PPP", - "PLP", - "PPP" - ], - "key": { - "P": { - "tag": "minecraft:planks" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_wood" - } -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json deleted file mode 100644 index 39d9d5811..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_copper" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json deleted file mode 100644 index 40354764a..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_diamond" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json deleted file mode 100644 index b92b98941..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_gold" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json deleted file mode 100644 index 25f8ad08b..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_iron" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json deleted file mode 100644 index e7a037a72..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_netherite" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json deleted file mode 100644 index a31b00bee..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_obsidian" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json deleted file mode 100644 index e1c300537..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_silver" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json b/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json deleted file mode 100644 index fb1e504db..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_wood" - }, - { - "tag": "forge:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_wood" - } -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_copper.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_copper.json deleted file mode 100644 index 14318d919..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_copper.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_copper" - } - }, - "result": { - "id": "colossalchests:interface_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_diamond.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_diamond.json deleted file mode 100644 index 353a11c5d..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_diamond" - } - }, - "result": { - "id": "colossalchests:interface_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_gold.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_gold.json deleted file mode 100644 index 7c1b885b7..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_gold" - } - }, - "result": { - "id": "colossalchests:interface_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_iron.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_iron.json deleted file mode 100644 index 7ddb2a9be..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_iron" - } - }, - "result": { - "id": "colossalchests:interface_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_netherite.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_netherite.json deleted file mode 100644 index ee23c4de3..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_netherite.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_netherite" - } - }, - "result": { - "id": "colossalchests:interface_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_obsidian.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_obsidian.json deleted file mode 100644 index 98acd84b8..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_obsidian" - } - }, - "result": { - "id": "colossalchests:interface_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_silver.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_silver.json deleted file mode 100644 index 7b5f0540a..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_silver.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_silver" - } - }, - "result": { - "id": "colossalchests:interface_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "forge:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_wood.json b/loader-forge/src/main/resources/data/colossalchests/recipe/interface_wood.json deleted file mode 100644 index d3ec32b10..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/interface_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "forge:cobblestone" - }, - "W": { - "item": "colossalchests:chest_wall_wood" - } - }, - "result": { - "id": "colossalchests:interface_wood" - } -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json b/loader-forge/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json deleted file mode 100644 index f8776f24b..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_wood" - }, - { - "tag": "minecraft:planks" - } - ], - "result": { - "id": "colossalchests:uncolossal_chest" - } -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool.json b/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool.json deleted file mode 100644 index 3c9285435..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "minecraft:stick" - }, - { - "item": "colossalchests:chest_wall_wood" - }, - { - "item": "minecraft:stick" - } - ], - "result": { - "id": "colossalchests:upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json b/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json deleted file mode 100644 index 143dfc10d..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:upgrade_tool_reverse" - } - ], - "result": { - "id": "colossalchests:upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json b/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json deleted file mode 100644 index d11f748cc..000000000 --- a/loader-forge/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:upgrade_tool" - } - ], - "result": { - "id": "colossalchests:upgrade_tool_reverse" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/api/java/invtweaks/api/container/ChestContainer.java b/loader-neoforge/src/api/java/invtweaks/api/container/ChestContainer.java deleted file mode 100644 index e505829c1..000000000 --- a/loader-neoforge/src/api/java/invtweaks/api/container/ChestContainer.java +++ /dev/null @@ -1,38 +0,0 @@ -package invtweaks.api.container; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting - * buttons for this container. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface ChestContainer { - // Set to true if the Inventory Tweaks sorting buttons should be shown for this container. - boolean showButtons() default true; - - // Size of a chest row - int rowSize() default 9; - - // Uses 'large chest' mode for sorting buttons - // (Renders buttons vertically down the right side of the GUI) - boolean isLargeChest() default false; - - // Annotation for method to get size of a chest row if it is not a fixed size for this container class - // Signature int func() - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.METHOD) - public @interface RowSizeCallback { - } - - // Annotation for method to get size of a chest row if it is not a fixed size for this container class - // Signature int func() - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.METHOD) - public @interface IsLargeCallback { - } -} diff --git a/loader-neoforge/src/api/java/invtweaks/api/container/ContainerSection.java b/loader-neoforge/src/api/java/invtweaks/api/container/ContainerSection.java deleted file mode 100644 index 83c2e08a4..000000000 --- a/loader-neoforge/src/api/java/invtweaks/api/container/ContainerSection.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2013 Andrew Crocker - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -package invtweaks.api.container; - -/** - * Names for specific parts of containers. For unknown container types (such as mod containers), only INVENTORY and - * CHEST sections are available. - */ -public enum ContainerSection { - /** - * The player's inventory - */ - INVENTORY, - /** - * The player's inventory (only the hotbar) - */ - INVENTORY_HOTBAR, - /** - * The player's inventory (all except the hotbar) - */ - INVENTORY_NOT_HOTBAR, - /** - * The chest or dispenser contents. Also used for unknown container contents. - */ - CHEST, - /** - * The crafting input - */ - CRAFTING_IN, - /** - * The crafting input, for containters that store it internally - */ - CRAFTING_IN_PERSISTENT, - /** - * The crafting output - */ - CRAFTING_OUT, - /** - * The armor slots - */ - ARMOR, - /** - * The furnace input - */ - FURNACE_IN, - /** - * The furnace output - */ - FURNACE_OUT, - /** - * The furnace fuel - */ - FURNACE_FUEL, - /** - * The enchantment table slot - */ - ENCHANTMENT, - /** - * The three bottles slots in brewing tables - * NOTE: Do not use without also using BREWING_INGREDIENT. - */ - BREWING_BOTTLES, - /** - * The top slot in brewing tables - * NOTE: Do not use without also using BREWING_BOTTLES. - */ - BREWING_INGREDIENT -} diff --git a/loader-neoforge/src/api/java/invtweaks/api/container/ContainerSectionCallback.java b/loader-neoforge/src/api/java/invtweaks/api/container/ContainerSectionCallback.java deleted file mode 100644 index 379206b37..000000000 --- a/loader-neoforge/src/api/java/invtweaks/api/container/ContainerSectionCallback.java +++ /dev/null @@ -1,16 +0,0 @@ -package invtweaks.api.container; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * A marker for a method to call which returns the set of ContainerSections for this container. - *

- * Signature of the method should be Map> func() - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface ContainerSectionCallback { -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/ColossalChests.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/ColossalChests.java deleted file mode 100644 index bad333d25..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/ColossalChests.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.cyclops.colossalchests; - -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; -import net.neoforged.bus.api.IEventBus; -import net.neoforged.fml.common.Mod; -import org.apache.logging.log4j.Level; -import org.cyclops.colossalchests.advancement.criterion.ChestFormedTriggerConfig; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.block.ChestWallConfigNeoForge; -import org.cyclops.colossalchests.block.ColossalChestConfigNeoForge; -import org.cyclops.colossalchests.block.InterfaceConfigNeoForge; -import org.cyclops.colossalchests.block.UncolossalChestConfigNeoForge; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChestConfigNeoForge; -import org.cyclops.colossalchests.blockentity.BlockEntityInterfaceConfigNeoForge; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChestConfigNeoForge; -import org.cyclops.colossalchests.condition.ConditionMetalVariantsSettingConfig; -import org.cyclops.colossalchests.inventory.container.ContainerColossalChestConfig; -import org.cyclops.colossalchests.inventory.container.ContainerUncolossalChestConfig; -import org.cyclops.colossalchests.item.ItemUpgradeToolConfig; -import org.cyclops.colossalchests.modcompat.CommonCapabilitiesModCompat; -import org.cyclops.colossalchests.modcompat.IronChestModCompat; -import org.cyclops.colossalchests.proxy.ClientProxy; -import org.cyclops.colossalchests.proxy.CommonProxy; -import org.cyclops.cyclopscore.config.ConfigHandlerCommon; -import org.cyclops.cyclopscore.init.ModBaseVersionable; -import org.cyclops.cyclopscore.modcompat.ModCompatLoader; -import org.cyclops.cyclopscore.proxy.IClientProxy; -import org.cyclops.cyclopscore.proxy.ICommonProxy; - -/** - * The main mod class of this mod. - * @author rubensworks - * - */ -@Mod(Reference.MOD_ID) -public class ColossalChests extends ModBaseVersionable { - - /** - * The unique instance of this mod. - */ - public static ColossalChests _instance; - - public ColossalChests(IEventBus modEventBus) { - super(Reference.MOD_ID, (instance) -> { - ColossalChestsInstance.MOD = instance; - _instance = instance; - }, modEventBus); - } - - @Override - protected void loadModCompats(ModCompatLoader modCompatLoader) { - modCompatLoader.addModCompat(new IronChestModCompat()); - modCompatLoader.addModCompat(new CommonCapabilitiesModCompat()); - } - - @Override - @OnlyIn(Dist.CLIENT) - protected IClientProxy constructClientProxy() { - return new ClientProxy(); - } - - @Override - protected ICommonProxy constructCommonProxy() { - return new CommonProxy(); - } - - @Override - protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTab.Builder builder) { - return super.constructDefaultCreativeModeTab(builder) - .icon(() -> new ItemStack(RegistryEntries.ITEM_CHEST)); - } - - @Override - protected void onConfigsRegister(ConfigHandlerCommon configHandler) { - super.onConfigsRegister(configHandler); - - configHandler.addConfigurable(new GeneralConfig<>(this)); - - for (ChestMaterial material : ChestMaterial.VALUES) { - configHandler.addConfigurable(new ChestWallConfigNeoForge<>(this, material)); - configHandler.addConfigurable(new ColossalChestConfigNeoForge<>(this, material)); - configHandler.addConfigurable(new InterfaceConfigNeoForge<>(this, material)); - } - configHandler.addConfigurable(new UncolossalChestConfigNeoForge<>(this)); - - configHandler.addConfigurable(new ItemUpgradeToolConfig<>(this, true)); - configHandler.addConfigurable(new ItemUpgradeToolConfig<>(this, false)); - - configHandler.addConfigurable(new BlockEntityColossalChestConfigNeoForge<>(this)); - configHandler.addConfigurable(new BlockEntityInterfaceConfigNeoForge<>(this)); - configHandler.addConfigurable(new BlockEntityUncolossalChestConfigNeoForge<>(this)); - - configHandler.addConfigurable(new ContainerColossalChestConfig<>(this)); - configHandler.addConfigurable(new ContainerUncolossalChestConfig<>(this)); - - configHandler.addConfigurable(new ConditionMetalVariantsSettingConfig()); - - configHandler.addConfigurable(new ChestFormedTriggerConfig<>(this)); - } - - /** - * Log a new info message for this mod. - * @param message The message to show. - */ - public static void clog(String message) { - clog(Level.INFO, message); - } - - /** - * Log a new message of the given level for this mod. - * @param level The level in which the message must be shown. - * @param message The message to show. - */ - public static void clog(Level level, String message) { - ColossalChests._instance.getLoggerHelper().log(level, message); - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigNeoForge.java deleted file mode 100644 index 64236aab0..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ChestWallConfigNeoForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link ChestWall}. - * @author rubensworks - * - */ -public class ChestWallConfigNeoForge extends ChestWallConfig { - - public ChestWallConfigNeoForge(M mod, ChestMaterial material) { - super( - mod, - "chest_wall_" + material.getName(), - eConfig -> new ChestWallNeoForge(((ChestWallConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ChestWallNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ChestWallNeoForge.java deleted file mode 100644 index aca838c80..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ChestWallNeoForge.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; - -/** - * @author rubensworks - */ -public class ChestWallNeoForge extends ChestWall { - public ChestWallNeoForge(Properties properties, ChestMaterial material) { - super(properties, material); - } - - @Override - public boolean shouldDisplayFluidOverlay(BlockState blockState, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { - return true; - } - - @Override - protected boolean canBlockSnapshotsBeCaptured() { - return true; - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return level.captureBlockSnapshots; - } - - @Override - public void onBlockExploded(BlockState state, Level world, BlockPos pos, Explosion explosion) { - super.onBlockExplodedCommon(state, world, pos, explosion); - } - - @Override - public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { - return super.getExplosionResistance(); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigNeoForge.java deleted file mode 100644 index 168024dc0..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ColossalChestConfigNeoForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public class ColossalChestConfigNeoForge extends ColossalChestConfig { - - public ColossalChestConfigNeoForge(M mod, ChestMaterial material) { - super( - mod, - "colossal_chest_" + material.getName(), - eConfig -> new ColossalChestNeoForge(((ColossalChestConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ColossalChestNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ColossalChestNeoForge.java deleted file mode 100644 index b2444dd36..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/ColossalChestNeoForge.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChestNeoForge; - -/** - * @author rubensworks - */ -public class ColossalChestNeoForge extends ColossalChest { - public ColossalChestNeoForge(Properties properties, ChestMaterial material) { - super(properties, material, BlockEntityColossalChestNeoForge::new); - } - - @Override - public boolean shouldDisplayFluidOverlay(BlockState blockState, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { - return true; - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return level.captureBlockSnapshots; - } - - @Override - public void onBlockExploded(BlockState state, Level world, BlockPos pos, Explosion explosion) { - super.onBlockExplodedCommon(state, world, pos, explosion); - } - - @Override - public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { - return super.getExplosionResistance(); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigNeoForge.java deleted file mode 100644 index 56bf5f6ad..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/InterfaceConfigNeoForge.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.Item; -import org.cyclops.colossalchests.item.ItemBlockMaterial; -import org.cyclops.cyclopscore.init.IModBase; - -/** - * Config for the {@link Interface}. - * @author rubensworks - * - */ -public class InterfaceConfigNeoForge extends InterfaceConfig { - - public InterfaceConfigNeoForge(M mod, ChestMaterial material) { - super( - mod, - "interface_" + material.getName(), - eConfig -> new InterfaceNeoForge(((InterfaceConfig) eConfig).getProperties(), material), - (eConfig, block) -> new ItemBlockMaterial(block, new Item.Properties(), material) - ); - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/InterfaceNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/InterfaceNeoForge.java deleted file mode 100644 index 75cde298e..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/InterfaceNeoForge.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.Explosion; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.FluidState; -import org.cyclops.colossalchests.blockentity.BlockEntityInterface; - -/** - * @author rubensworks - */ -public class InterfaceNeoForge extends Interface { - public InterfaceNeoForge(Properties properties, ChestMaterial material) { - super(properties, material, BlockEntityInterface::new); - } - - @Override - public boolean shouldDisplayFluidOverlay(BlockState blockState, BlockAndTintGetter world, BlockPos pos, FluidState fluidState) { - return true; - } - - @Override - protected boolean canBlockSnapshotsBeCaptured() { - return true; - } - - @Override - protected boolean isCaptureBlockSnapshots(Level level) { - return level.captureBlockSnapshots; - } - - @Override - public void onBlockExploded(BlockState state, Level world, BlockPos pos, Explosion explosion) { - super.onBlockExplodedCommon(state, world, pos, explosion); - } - - @Override - public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { - return super.getExplosionResistance(); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigNeoForge.java deleted file mode 100644 index 3a1cadc4b..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/block/UncolossalChestConfigNeoForge.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cyclops.colossalchests.block; - -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import net.neoforged.neoforge.client.extensions.common.RegisterClientExtensionsEvent; -import org.cyclops.colossalchests.client.render.blockentity.ItemStackTileEntityUncolossalChestRenderNeoForge; -import org.cyclops.cyclopscore.init.ModBase; - -/** - * Config for the {@link ColossalChest}. - * @author rubensworks - * - */ -public class UncolossalChestConfigNeoForge extends UncolossalChestConfig { - - public UncolossalChestConfigNeoForge(M mod) { - super( - mod, - "uncolossal_chest", - eConfig -> new UncolossalChest(((UncolossalChestConfig) eConfig).getProperties()), - (eConfig, block) -> new BlockItem(block, new Item.Properties()) - ); - if (mod.getModHelpers().getMinecraftHelpers().isClientSide()) { - mod.getModEventBus().addListener((RegisterClientExtensionsEvent event) -> event.registerItem(new ItemStackTileEntityUncolossalChestRenderNeoForge.ClientItemExtensions(), getItemInstance())); - } - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigNeoForge.java deleted file mode 100644 index b8a74c0a1..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestConfigNeoForge.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.neoforged.neoforge.capabilities.Capabilities; -import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; -import net.neoforged.neoforge.items.wrapper.InvWrapper; -import org.cyclops.colossalchests.client.render.blockentity.RenderTileEntityColossalChestNeoForge; -import org.cyclops.cyclopscore.init.ModBase; - -/** - * @author rubensworks - */ -public class BlockEntityColossalChestConfigNeoForge extends BlockEntityColossalChestConfig { - public BlockEntityColossalChestConfigNeoForge(M mod) { - super(mod); - mod.getModEventBus().addListener(this::registerCapabilities); - } - - @Override - protected BlockEntityType.BlockEntitySupplier getBlockEntitySupplier() { - return BlockEntityColossalChestNeoForge::new; - } - - @Override - protected BlockEntityRendererProvider getBlockEntityRendererProvider() { - return RenderTileEntityColossalChestNeoForge::new; - } - - public void registerCapabilities(RegisterCapabilitiesEvent event) { - event.registerBlockEntity( - Capabilities.ItemHandler.BLOCK, - getInstance(), - (blockEntity, context) -> new InvWrapper(blockEntity.getInventory()) - ); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestNeoForge.java deleted file mode 100644 index 7d8f07796..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityColossalChestNeoForge.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.state.BlockState; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; - -/** - * @author rubensworks - */ -public class BlockEntityColossalChestNeoForge extends BlockEntityColossalChest { - public BlockEntityColossalChestNeoForge(BlockPos blockPos, BlockState blockState) { - super(blockPos, blockState); - } - - @Override - public void setInventory(SimpleInventoryCommon inventory) { - invalidateCapabilities(); - super.setInventory(inventory); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigNeoForge.java deleted file mode 100644 index 88a0038dd..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityInterfaceConfigNeoForge.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.neoforged.neoforge.capabilities.Capabilities; -import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; -import net.neoforged.neoforge.items.wrapper.InvWrapper; -import org.cyclops.cyclopscore.init.ModBase; - -/** - * @author rubensworks - */ -public class BlockEntityInterfaceConfigNeoForge extends BlockEntityInterfaceConfig { - public BlockEntityInterfaceConfigNeoForge(M mod) { - super(mod, BlockEntityInterface::new); - mod.getModEventBus().addListener(this::registerCapabilities); - } - - public void registerCapabilities(RegisterCapabilitiesEvent event) { - event.registerBlockEntity( - Capabilities.ItemHandler.BLOCK, - getInstance(), - (blockEntity, context) -> { - BlockEntityColossalChest core = blockEntity.getCore(); - if (core != null) { - return new InvWrapper(core.getInventory()); - } - return null; - } - ); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigNeoForge.java deleted file mode 100644 index 6f5f98cfc..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/blockentity/BlockEntityUncolossalChestConfigNeoForge.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.cyclops.colossalchests.blockentity; - -import net.neoforged.neoforge.capabilities.Capabilities; -import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; -import net.neoforged.neoforge.items.wrapper.InvWrapper; -import org.cyclops.cyclopscore.init.ModBase; - -/** - * @author rubensworks - */ -public class BlockEntityUncolossalChestConfigNeoForge extends BlockEntityUncolossalChestConfig { - public BlockEntityUncolossalChestConfigNeoForge(M mod) { - super(mod); - mod.getModEventBus().addListener(this::registerCapabilities); - } - - public void registerCapabilities(RegisterCapabilitiesEvent event) { - event.registerBlockEntity( - Capabilities.ItemHandler.BLOCK, - getInstance(), - (blockEntity, context) -> new InvWrapper(blockEntity.getInventory()) - ); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderNeoForge.java deleted file mode 100644 index 9d72a5da0..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/ItemStackTileEntityUncolossalChestRenderNeoForge.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; -import net.minecraft.core.BlockPos; -import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.blockentity.BlockEntityUncolossalChest; -import org.cyclops.cyclopscore.client.render.blockentity.ItemStackBlockEntityRendererBase; - -/** - * @author rubensworks - */ -public class ItemStackTileEntityUncolossalChestRenderNeoForge extends ItemStackBlockEntityRendererBase { - - public ItemStackTileEntityUncolossalChestRenderNeoForge() { - super(() -> new BlockEntityUncolossalChest(BlockPos.ZERO, RegistryEntries.BLOCK_UNCOLOSSAL_CHEST.value().defaultBlockState())); - } - - public static class ClientItemExtensions implements IClientItemExtensions { - @Override - public BlockEntityWithoutLevelRenderer getCustomRenderer() { - return new ItemStackTileEntityUncolossalChestRenderNeoForge(); - } - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityColossalChestNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityColossalChestNeoForge.java deleted file mode 100644 index ab9561445..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/client/render/blockentity/RenderTileEntityColossalChestNeoForge.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.cyclops.colossalchests.client.render.blockentity; - -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; -import net.minecraft.core.Vec3i; -import net.minecraft.world.phys.AABB; -import net.minecraft.world.phys.Vec3; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; - -/** - * @author rubensworks - */ -public class RenderTileEntityColossalChestNeoForge extends RenderTileEntityColossalChest { - public RenderTileEntityColossalChestNeoForge(BlockEntityRendererProvider.Context context) { - super(context); - } - - @Override - public AABB getRenderBoundingBox(BlockEntityColossalChest blockEntity) { - int size = blockEntity.getSizeSingular(); - return new AABB( - Vec3.atLowerCornerOf(blockEntity.getBlockPos().subtract(new Vec3i(size, size, size))), - Vec3.atLowerCornerOf(blockEntity.getBlockPos().offset(size, size * 2, size)) - ); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSetting.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSetting.java deleted file mode 100644 index 8517c1962..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSetting.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cyclops.colossalchests.condition; - -import com.mojang.serialization.MapCodec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.neoforged.neoforge.common.conditions.ICondition; -import org.cyclops.colossalchests.GeneralConfig; - -/** - * A recipe condition for checking if the {@link GeneralConfig#metalVariants} setting is enabled. - * @author rubensworks - */ -public record ConditionMetalVariantsSetting() implements ICondition { - - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( - builder -> builder.point(new ConditionMetalVariantsSetting()) - ); - - @Override - public boolean test(IContext context) { - return GeneralConfig.metalVariants; - } - - @Override - public MapCodec codec() { - return CODEC; - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfig.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfig.java deleted file mode 100644 index 7809f4737..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/condition/ConditionMetalVariantsSettingConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cyclops.colossalchests.condition; - -import org.cyclops.colossalchests.ColossalChests; -import org.cyclops.cyclopscore.config.extendedconfig.ConditionConfig; - -/** - * Config for the metal variants setting recipe condition. - * @author rubensworks - */ -public class ConditionMetalVariantsSettingConfig extends ConditionConfig { - - public ConditionMetalVariantsSettingConfig() { - super( - ColossalChests._instance, - "metal_variants_enabled", - ConditionMetalVariantsSetting.CODEC - ); - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/CommonCapabilitiesModCompat.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/CommonCapabilitiesModCompat.java deleted file mode 100644 index b3403b5d8..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/CommonCapabilitiesModCompat.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.cyclops.colossalchests.modcompat; - -import net.minecraft.core.Direction; -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.neoforged.neoforge.capabilities.BaseCapability; -import net.neoforged.neoforge.capabilities.ICapabilityProvider; -import net.neoforged.neoforge.items.wrapper.InvWrapper; -import org.cyclops.colossalchests.ColossalChests; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.RegistryEntries; -import org.cyclops.colossalchests.blockentity.BlockEntityColossalChest; -import org.cyclops.colossalchests.blockentity.BlockEntityInterface; -import org.cyclops.commoncapabilities.api.capability.inventorystate.IInventoryState; -import org.cyclops.commoncapabilities.api.capability.itemhandler.ISlotlessItemHandler; -import org.cyclops.cyclopscore.inventory.IndexedInventoryCommon; -import org.cyclops.cyclopscore.inventory.IndexedSlotlessItemHandlerWrapper; -import org.cyclops.cyclopscore.inventory.SimpleInventoryCommon; -import org.cyclops.cyclopscore.modcompat.ICompatInitializer; -import org.cyclops.cyclopscore.modcompat.IModCompat; -import org.cyclops.cyclopscore.modcompat.capabilities.CapabilityConstructorRegistry; -import org.cyclops.cyclopscore.modcompat.capabilities.ICapabilityConstructor; - -/** - * Mod compat for the Common Capabilities mod. - * @author rubensworks - * - */ -public class CommonCapabilitiesModCompat implements IModCompat { - - @Override - public String getId() { - return Reference.MOD_COMMONCAPABILITIES; - } - - @Override - public boolean isEnabledDefault() { - return true; - } - - @Override - public String getComment() { - return "If slotless item handlers should be registered to colossal chests."; - } - - @Override - public ICompatInitializer createInitializer() { - return () -> { - CapabilityConstructorRegistry registry = ColossalChests._instance.getCapabilityConstructorRegistry(); - - // Slotless item handler - registry.registerBlockEntity(RegistryEntries.BLOCK_ENTITY_COLOSSAL_CHEST::value, - new ICapabilityConstructor>() { - @Override - public BaseCapability getCapability() { - return org.cyclops.commoncapabilities.api.capability.Capabilities.SlotlessItemHandler.BLOCK; - } - - @Override - public ICapabilityProvider createProvider(BlockEntityType capabilityKey) { - return (blockEntity, side) -> { - IndexedInventoryCommon inv = (IndexedInventoryCommon) blockEntity.getInventory(); - return new IndexedSlotlessItemHandlerWrapper(new InvWrapper(inv), - new InventoryIndexReferenceIndexedInventoryCommon(inv)); - }; - } - }); - registry.registerBlockEntity(RegistryEntries.BLOCK_ENTITY_INTERFACE::value, - new ICapabilityConstructor>() { - @Override - public BaseCapability getCapability() { - return org.cyclops.commoncapabilities.api.capability.Capabilities.SlotlessItemHandler.BLOCK; - } - - @Override - public ICapabilityProvider createProvider(BlockEntityType capabilityKey) { - return (blockEntity, side) -> { - BlockEntityColossalChest core = blockEntity.getCore(); - if (core != null) { - return new IndexedSlotlessItemHandlerWrapper(new InvWrapper(core.getInventory()), - new InventoryIndexReferenceIndexedInventoryCommon((IndexedInventoryCommon) core.getInventory())); - } - return null; - }; - } - }); - - // Inventory state - registry.registerBlockEntity(RegistryEntries.BLOCK_ENTITY_COLOSSAL_CHEST::value, - new ICapabilityConstructor>() { - @Override - public BaseCapability getCapability() { - return org.cyclops.commoncapabilities.api.capability.Capabilities.InventoryState.BLOCK; - } - - @Override - public ICapabilityProvider createProvider(BlockEntityType capabilityKey) { - return (blockEntity, side) -> () -> ((SimpleInventoryCommon) blockEntity.getInventory()).getState(); - } - }); - registry.registerBlockEntity(RegistryEntries.BLOCK_ENTITY_INTERFACE::value, - new ICapabilityConstructor>() { - @Override - public BaseCapability getCapability() { - return org.cyclops.commoncapabilities.api.capability.Capabilities.InventoryState.BLOCK; - } - - @Override - public ICapabilityProvider createProvider(BlockEntityType capabilityKey) { - return (blockEntity, side) -> { - BlockEntityColossalChest core = blockEntity.getCore(); - if (core != null) { - return () -> ((SimpleInventoryCommon) core.getInventory()).getState(); - } - return null; - }; - } - }); - }; - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/InventoryIndexReferenceIndexedInventoryCommon.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/InventoryIndexReferenceIndexedInventoryCommon.java deleted file mode 100644 index 891c28d2e..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/InventoryIndexReferenceIndexedInventoryCommon.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.cyclops.colossalchests.modcompat; - -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import org.cyclops.cyclopscore.inventory.IndexedInventoryCommon; -import org.cyclops.cyclopscore.inventory.IndexedSlotlessItemHandlerWrapper; - -import java.util.Map; -import java.util.PrimitiveIterator; - -/** - * @author rubensworks - */ -public class InventoryIndexReferenceIndexedInventoryCommon implements IndexedSlotlessItemHandlerWrapper.IInventoryIndexReference { - - private final IndexedInventoryCommon inventory; - - public InventoryIndexReferenceIndexedInventoryCommon(IndexedInventoryCommon inventory) { - this.inventory = inventory; - } - - @Override - public int getInventoryReferenceStackLimit() { - return this.inventory.getInventoryReferenceStackLimit(); - } - - @Override - public Map> getIndex() { - return this.inventory.getIndex(); - } - - @Override - public PrimitiveIterator.OfInt getEmptySlots() { - return this.inventory.getEmptySlots(); - } - - @Override - public PrimitiveIterator.OfInt getNonEmptySlots() { - return this.inventory.getNonEmptySlots(); - } -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/IronChestModCompat.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/IronChestModCompat.java deleted file mode 100644 index ed056ece2..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/modcompat/IronChestModCompat.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.cyclops.colossalchests.modcompat; - -import net.minecraft.resources.ResourceLocation; -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; -import org.cyclops.colossalchests.Reference; -import org.cyclops.colossalchests.block.ChestMaterial; -import org.cyclops.colossalchests.client.render.blockentity.RenderTileEntityColossalChest; -import org.cyclops.cyclopscore.helper.MinecraftHelpers; -import org.cyclops.cyclopscore.modcompat.ICompatInitializer; -import org.cyclops.cyclopscore.modcompat.IModCompat; - -/** - * Mod compat for the Iron Chest mod. - * @author rubensworks - * - */ -public class IronChestModCompat implements IModCompat { - - @OnlyIn(Dist.CLIENT) - private void overrideTextures() { - String prefix = "model/"; - RenderTileEntityColossalChest.TEXTURES_CHEST.put(ChestMaterial.COPPER, - ResourceLocation.fromNamespaceAndPath(Reference.MOD_IRONCHEST, prefix + "copper_chest")); - RenderTileEntityColossalChest.TEXTURES_CHEST.put(ChestMaterial.IRON, - ResourceLocation.fromNamespaceAndPath(Reference.MOD_IRONCHEST, prefix + "iron_chest")); - RenderTileEntityColossalChest.TEXTURES_CHEST.put(ChestMaterial.SILVER, - ResourceLocation.fromNamespaceAndPath(Reference.MOD_IRONCHEST, prefix + "silver_chest")); - RenderTileEntityColossalChest.TEXTURES_CHEST.put(ChestMaterial.GOLD, - ResourceLocation.fromNamespaceAndPath(Reference.MOD_IRONCHEST, prefix + "gold_chest")); - RenderTileEntityColossalChest.TEXTURES_CHEST.put(ChestMaterial.DIAMOND, - ResourceLocation.fromNamespaceAndPath(Reference.MOD_IRONCHEST, prefix + "diamond_chest")); - RenderTileEntityColossalChest.TEXTURES_CHEST.put(ChestMaterial.OBSIDIAN, - ResourceLocation.fromNamespaceAndPath(Reference.MOD_IRONCHEST, prefix + "obsidian_chest")); - } - - @Override - public String getId() { - return Reference.MOD_IRONCHEST; - } - - @Override - public boolean isEnabledDefault() { - return true; - } - - @Override - public String getComment() { - return "If the non-wood variants should use the textures of the Iron Chest mod."; - } - - @Override - public ICompatInitializer createInitializer() { - return () -> { - if(MinecraftHelpers.isClientSide()) { - overrideTextures(); - } - }; - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/proxy/CommonProxy.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests/proxy/CommonProxy.java deleted file mode 100644 index 43a6ce56f..000000000 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/proxy/CommonProxy.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.cyclops.colossalchests.proxy; - -import org.cyclops.colossalchests.ColossalChests; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetContentPacketWindow; -import org.cyclops.colossalchests.network.packet.ClientboundContainerSetSlotPacketLarge; -import org.cyclops.colossalchests.network.packet.ServerboundContainerClickPacketOverride; -import org.cyclops.cyclopscore.init.ModBase; -import org.cyclops.cyclopscore.network.PacketHandler; -import org.cyclops.cyclopscore.proxy.CommonProxyComponent; - -/** - * Proxy for server and client side. - * @author rubensworks - * - */ -public class CommonProxy extends CommonProxyComponent { - - @Override - public ModBase getMod() { - return ColossalChests._instance; - } - - @Override - public void registerPacketHandlers(PacketHandler packetHandler) { - super.registerPacketHandlers(packetHandler); - - // Register packets. - packetHandler.register(ClientboundContainerSetContentPacketWindow.class, ClientboundContainerSetContentPacketWindow.TYPE, ClientboundContainerSetContentPacketWindow.CODEC); - packetHandler.register(ServerboundContainerClickPacketOverride.class, ServerboundContainerClickPacketOverride.TYPE, ServerboundContainerClickPacketOverride.CODEC); - packetHandler.register(ClientboundContainerSetSlotPacketLarge.class, ClientboundContainerSetSlotPacketLarge.TYPE, ClientboundContainerSetSlotPacketLarge.CODEC); - } - -} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests2/ColossalChests.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/ColossalChests.java new file mode 100644 index 000000000..3ccf6aa8c --- /dev/null +++ b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/ColossalChests.java @@ -0,0 +1,78 @@ +package org.cyclops.colossalchests2; + +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.common.Mod; +import org.apache.logging.log4j.Level; +import org.cyclops.colossalchests2.proxy.ClientProxy; +import org.cyclops.colossalchests2.proxy.CommonProxy; +import org.cyclops.cyclopscore.config.ConfigHandlerCommon; +import org.cyclops.cyclopscore.init.ModBaseVersionable; +import org.cyclops.cyclopscore.proxy.IClientProxy; +import org.cyclops.cyclopscore.proxy.ICommonProxy; + +/** + * The main mod class of this mod. + * @author rubensworks + * + */ +@Mod(Reference.MOD_ID) +public class ColossalChests extends ModBaseVersionable { + + /** + * The unique instance of this mod. + */ + public static ColossalChests _instance; + + public ColossalChests(IEventBus modEventBus) { + super(Reference.MOD_ID, (instance) -> { + ColossalChestsInstance.MOD = instance; + _instance = instance; + }, modEventBus); + } + + @Override + @OnlyIn(Dist.CLIENT) + protected IClientProxy constructClientProxy() { + return new ClientProxy(); + } + + @Override + protected ICommonProxy constructCommonProxy() { + return new CommonProxy(); + } + + @Override + protected CreativeModeTab.Builder constructDefaultCreativeModeTab(CreativeModeTab.Builder builder) { + return super.constructDefaultCreativeModeTab(builder) + .icon(() -> new ItemStack(RegistryEntries.ITEM_CHEST)); + } + + @Override + protected void onConfigsRegister(ConfigHandlerCommon configHandler) { + super.onConfigsRegister(configHandler); + + configHandler.addConfigurable(new GeneralConfig<>(this)); + } + + /** + * Log a new info message for this mod. + * @param message The message to show. + */ + public static void clog(String message) { + clog(Level.INFO, message); + } + + /** + * Log a new message of the given level for this mod. + * @param level The level in which the message must be shown. + * @param message The message to show. + */ + public static void clog(Level level, String message) { + ColossalChests._instance.getLoggerHelper().log(level, message); + } + +} diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/gametest/GameTestsLoaderNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsLoaderNeoForge.java similarity index 87% rename from loader-neoforge/src/main/java/org/cyclops/colossalchests/gametest/GameTestsLoaderNeoForge.java rename to loader-neoforge/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsLoaderNeoForge.java index 901a66f90..cebad51bd 100644 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/gametest/GameTestsLoaderNeoForge.java +++ b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsLoaderNeoForge.java @@ -1,9 +1,9 @@ -package org.cyclops.colossalchests.gametest; +package org.cyclops.colossalchests2.gametest; import net.minecraft.gametest.framework.GameTestGenerator; import net.minecraft.gametest.framework.TestFunction; import net.neoforged.neoforge.gametest.GameTestHolder; -import org.cyclops.colossalchests.Reference; +import org.cyclops.colossalchests2.Reference; import org.cyclops.cyclopscore.gametest.GameTestLoaderHelpers; import java.util.Collection; diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests/proxy/ClientProxy.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxy.java similarity index 80% rename from loader-neoforge/src/main/java/org/cyclops/colossalchests/proxy/ClientProxy.java rename to loader-neoforge/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxy.java index 559c1ea43..5cc9fe9a9 100644 --- a/loader-neoforge/src/main/java/org/cyclops/colossalchests/proxy/ClientProxy.java +++ b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/proxy/ClientProxy.java @@ -1,6 +1,6 @@ -package org.cyclops.colossalchests.proxy; +package org.cyclops.colossalchests2.proxy; -import org.cyclops.colossalchests.ColossalChests; +import org.cyclops.colossalchests2.ColossalChests; import org.cyclops.cyclopscore.init.ModBase; import org.cyclops.cyclopscore.proxy.ClientProxyComponent; diff --git a/loader-neoforge/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxy.java b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxy.java new file mode 100644 index 000000000..d2c5d4954 --- /dev/null +++ b/loader-neoforge/src/main/java/org/cyclops/colossalchests2/proxy/CommonProxy.java @@ -0,0 +1,20 @@ +package org.cyclops.colossalchests2.proxy; + +import org.cyclops.colossalchests2.ColossalChests; +import org.cyclops.cyclopscore.init.ModBase; +import org.cyclops.cyclopscore.proxy.CommonProxyComponent; + +/** + * Proxy for server and client side. + * @author rubensworks + * + */ +public class CommonProxy extends CommonProxyComponent { + + @Override + public ModBase getMod() { + return ColossalChests._instance; + } + + +} diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json deleted file mode 100644 index 92ae6cd1a..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_copper.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/copper" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json deleted file mode 100644 index c3e19b4eb..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "item": "minecraft:diamond" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json deleted file mode 100644 index 0fa2efc83..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/gold" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json deleted file mode 100644 index 8a88c6709..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/iron" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json deleted file mode 100644 index 2d1d70d06..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_netherite.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:smithing_transform", - "template": { - "item": "minecraft:gold_ingot" - }, - "base": { - "item": "colossalchests:chest_wall_diamond" - }, - "addition": { - "item": "minecraft:netherite_scrap" - }, - "result": { - "id": "colossalchests:chest_wall_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json deleted file mode 100644 index 8738d3346..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "PPP", - "PLP", - "PPP" - ], - "key": { - "P": { - "item": "minecraft:obsidian" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json deleted file mode 100644 index 74fcab719..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_silver.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "ILI", - "III" - ], - "key": { - "I": { - "tag": "c:ingots/silver" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json deleted file mode 100644 index 29d3384a5..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/chest_wall_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "PPP", - "PLP", - "PPP" - ], - "key": { - "P": { - "tag": "minecraft:planks" - }, - "L": { - "tag": "minecraft:logs" - } - }, - "result": { - "id": "colossalchests:chest_wall_wood" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json deleted file mode 100644 index ca7ddf7c3..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_copper.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_copper" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json deleted file mode 100644 index 04f22a03b..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_diamond.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_diamond" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json deleted file mode 100644 index 702d6238a..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_gold.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_gold" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json deleted file mode 100644 index 9efe9168c..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_iron.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_iron" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json deleted file mode 100644 index 065d9caac..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_netherite.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_netherite" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json deleted file mode 100644 index 215224b9e..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_obsidian.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_obsidian" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json deleted file mode 100644 index de6cc9cad..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_silver.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_silver" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json deleted file mode 100644 index 31bfb21a9..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/colossal_chest_wood.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_wood" - }, - { - "tag": "c:ingots/iron" - } - ], - "result": { - "id": "colossalchests:colossal_chest_wood" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_copper.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_copper.json deleted file mode 100644 index 8b8d5d4e7..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_copper.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_copper" - } - }, - "result": { - "id": "colossalchests:interface_copper" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/copper" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_diamond.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_diamond.json deleted file mode 100644 index e7751d47e..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_diamond.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_diamond" - } - }, - "result": { - "id": "colossalchests:interface_diamond" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_gold.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_gold.json deleted file mode 100644 index 2605c64dc..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_gold.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_gold" - } - }, - "result": { - "id": "colossalchests:interface_gold" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_iron.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_iron.json deleted file mode 100644 index 09477b4cf..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_iron.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_iron" - } - }, - "result": { - "id": "colossalchests:interface_iron" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_netherite.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_netherite.json deleted file mode 100644 index 773c892d9..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_netherite.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_netherite" - } - }, - "result": { - "id": "colossalchests:interface_netherite" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_obsidian.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_obsidian.json deleted file mode 100644 index d6b7c58ce..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_obsidian.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_obsidian" - } - }, - "result": { - "id": "colossalchests:interface_obsidian" - }, - "conditions": [ - { - "type": "colossalchests:metal_variants_enabled" - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_silver.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_silver.json deleted file mode 100644 index cd236040a..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_silver.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_silver" - } - }, - "result": { - "id": "colossalchests:interface_silver" - }, - "conditions": [ - { - "type": "neoforge:and", - "values": [ - { - "type": "neoforge:not", - "value": { - "type": "neoforge:tag_empty", - "tag": "c:ingots/silver" - } - }, - { - "type": "colossalchests:metal_variants_enabled" - } - ] - } - ] -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_wood.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_wood.json deleted file mode 100644 index 173d7b017..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/interface_wood.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - " C ", - "CWC", - " C " - ], - "key": { - "C": { - "tag": "c:cobblestones" - }, - "W": { - "item": "colossalchests:chest_wall_wood" - } - }, - "result": { - "id": "colossalchests:interface_wood" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json deleted file mode 100644 index f8776f24b..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/uncolossal_chest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:chest_wall_wood" - }, - { - "tag": "minecraft:planks" - } - ], - "result": { - "id": "colossalchests:uncolossal_chest" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool.json deleted file mode 100644 index 3c9285435..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "minecraft:stick" - }, - { - "item": "colossalchests:chest_wall_wood" - }, - { - "item": "minecraft:stick" - } - ], - "result": { - "id": "colossalchests:upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json deleted file mode 100644 index 143dfc10d..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:upgrade_tool_reverse" - } - ], - "result": { - "id": "colossalchests:upgrade_tool" - } -} \ No newline at end of file diff --git a/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json b/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json deleted file mode 100644 index d11f748cc..000000000 --- a/loader-neoforge/src/main/resources/data/colossalchests/recipe/upgrade_tool_reverse.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "colossalchests:upgrade_tool" - } - ], - "result": { - "id": "colossalchests:upgrade_tool_reverse" - } -} \ No newline at end of file