From 690f2c7b3a6bc8959b50783cef6359d10f7057a7 Mon Sep 17 00:00:00 2001 From: sashiro Date: Fri, 13 Oct 2023 20:29:16 +0200 Subject: [PATCH] v1.3.8 [ 1.20.2 ] changelog: see changelog.md --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 4 +- changelog.md | 9 +- common/build.gradle | 6 +- .../sashiro/compressedblocks/CommonClass.java | 2 +- .../sashiro/compressedblocks/Constants.java | 2 +- .../compressedblocks/block/BlockList.java | 182 ++++++++++++++++- .../block/CompressedBlock.java | 91 +++++---- .../compressedblocks/block/CrateList.java | 2 +- .../compressedblocks/item/CrateItem.java | 8 +- .../compressedblocks/platform/Services.java | 6 +- .../platform/services/IPlatformHelper.java | 10 +- .../compressedblocks/util/Compression.java | 8 +- .../compressedblocks/util/StringUtils.java | 2 +- common/src/main/resources/mixins.json | 28 +-- common/src/main/resources/pack.mcmeta | 18 +- .../CompressedBlocksFabric.java | 4 +- .../client/CompressedBlocksClient.java | 18 +- .../platform/FabricPlatformHelper.java | 10 +- .../registry/CBBlocksRegister.java | 183 +++++++++++++++++- .../registry/CBCratesRegister.java | 4 +- .../CompressedBlocksForge.java | 4 +- .../sashiro/compressedblocks/data/CBTags.java | 6 +- .../compressedblocks/data/DataGen.java | 2 +- .../data/providers/CBBlockStateProvider.java | 29 +-- .../data/providers/CBBlockTagsProvider.java | 6 +- .../data/providers/CBItemModelProvider.java | 6 +- .../data/providers/CBItemTagsProvider.java | 2 +- .../data/providers/CBLanguageProvider.java | 12 +- .../data/providers/CBLootTableProvider.java | 10 +- .../data/providers/CBRecipeProvider.java | 14 +- .../event/CBRegistryEvent.java | 4 +- .../compressedblocks/item/ItemGroups.java | 4 +- .../platform/ForgePlatformHelper.java | 12 +- .../registry/CBBlockRegister.java | 183 +++++++++++++++++- .../registry/CBCratesRegister.java | 4 +- gradle.properties | 2 +- update.json | 10 +- 38 files changed, 732 insertions(+), 177 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 675c12a8c..445c692c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ # certain platforms or Java versions, and provides a first line of defence # against bad commits. -run-name: "v1.3.7 - 1.20.2" +run-name: "v1.3.8 - 1.20.2" name: build on: [ push, pull_request, workflow_dispatch ] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 17264df81..0f03641c6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,13 +4,13 @@ # certain platforms or Java versions, and provides a first line of defence # against bad commits. -run-name: "release: v1.3.7 - 1.20.2" +run-name: "release: v1.3.8 - 1.20.2" name: publish on: workflow_dispatch env: - VERSION: 1.3.7 + VERSION: 1.3.8 MC_VERSION: "1.20.2" MC_VERSION_RANGE: | 1.20 diff --git a/changelog.md b/changelog.md index f9be34570..d736dd303 100644 --- a/changelog.md +++ b/changelog.md @@ -1,21 +1,16 @@ -# v1.3.7 [ 1.20.2 ] +# v1.3.8 [ 1.20.2 ] ## General -- Update to Minecraft `1.20.2` +- Added the forgotten Copper Blocks - Compatible with: `[ 1.20, 1.20.1, 1.20.2 ]` --- ## Fabric -- upgrade fabric `0.83.0+1.20` to `0.90.0+1.20.2` -- upgrade fabric loader `0.14.21` to `0.14.23` - --- ## Forge -- upgrade forge `46.0.14` to `48.0.26` - --- \ No newline at end of file diff --git a/common/build.gradle b/common/build.gradle index 9ea3978aa..1f2c2a9b8 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -9,14 +9,14 @@ base { } minecraft { version(minecraft_version) - if(file("src/main/resources/${mod_id}.accesswidener").exists()){ + if (file("src/main/resources/${mod_id}.accesswidener").exists()) { accessWideners(file("src/main/resources/${mod_id}.accesswidener")) } } dependencies { - compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5' - implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' + compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5' + implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1' } publishing { diff --git a/common/src/main/java/net/sashiro/compressedblocks/CommonClass.java b/common/src/main/java/net/sashiro/compressedblocks/CommonClass.java index 83dc57ed4..a36760d80 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/CommonClass.java +++ b/common/src/main/java/net/sashiro/compressedblocks/CommonClass.java @@ -5,7 +5,7 @@ // common compatible binaries. This means common code can not directly use loader specific concepts such as Forge events // however it will be compatible with all supported mod loaders. public class CommonClass { - + // The loader specific projects are able to import and use any code from the common project. This allows you to // write the majority of your code here and load it from your loader specific projects. This example has some // code that gets invoked by the entry point of the loader specific projects. diff --git a/common/src/main/java/net/sashiro/compressedblocks/Constants.java b/common/src/main/java/net/sashiro/compressedblocks/Constants.java index a9c19186f..24d2c60ba 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/Constants.java +++ b/common/src/main/java/net/sashiro/compressedblocks/Constants.java @@ -8,7 +8,7 @@ import java.util.Collection; public class Constants { - + public static final String MOD_ID = "compressedblocks"; public static final String MOD_NAME = "Compressed Blocks"; public static final Logger LOG = LoggerFactory.getLogger(MOD_NAME); diff --git a/common/src/main/java/net/sashiro/compressedblocks/block/BlockList.java b/common/src/main/java/net/sashiro/compressedblocks/block/BlockList.java index a8c459733..6fc27d631 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/block/BlockList.java +++ b/common/src/main/java/net/sashiro/compressedblocks/block/BlockList.java @@ -1,6 +1,7 @@ package net.sashiro.compressedblocks.block; import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.WeatheringCopper; import net.minecraft.world.level.block.state.BlockBehaviour; import net.sashiro.compressedblocks.block.CompressedBlock.*; @@ -9,7 +10,7 @@ @SuppressWarnings("unused") public class BlockList { - + // DIRT public static final CustomDefaultBlock DIRT_0 = new CustomDefaultBlock(BlockBehaviour.Properties.copy(Blocks.DIRT).strength(HARDNESS[2], RESISTANCE[0]), 0); public static final CustomDefaultBlock DIRT_1 = new CustomDefaultBlock(BlockBehaviour.Properties.copy(Blocks.DIRT).strength(HARDNESS[2], RESISTANCE[0]), 1); @@ -824,4 +825,183 @@ public class BlockList { public static final CustomRotatedPillarBlock BAMBOO_MOSAIC_7 = new CustomRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.BAMBOO_MOSAIC).strength(HARDNESS[5], RESISTANCE[3]), 7); public static final CustomRotatedPillarBlock BAMBOO_MOSAIC_8 = new CustomRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.BAMBOO_MOSAIC).strength(HARDNESS[6], RESISTANCE[4]), 8); public static final CustomRotatedPillarBlock BAMBOO_MOSAIC_9 = new CustomRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.BAMBOO_MOSAIC).strength(HARDNESS[6], RESISTANCE[4]), 9); + // ================================================== + // Version: 1.3.8 + // ================================================== + // COPPER_BLOCK + public static final CustomWeatheringCopperBlock COPPER_BLOCK_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock COPPER_BLOCK_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.COPPER_BLOCK).strength(HARDNESS[6], RESISTANCE[4]), 9); + // CUT_COPPER + public static final CustomWeatheringCopperBlock CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // EXPOSED_COPPER + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock EXPOSED_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // EXPOSED_CUT_COPPER + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock EXPOSED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.EXPOSED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WEATHERED_COPPER + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WEATHERED_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WEATHERED_CUT_COPPER + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WEATHERED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WEATHERED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // OXIDIZED_COPPER + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock OXIDIZED_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // OXIDIZED_CUT_COPPER + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock OXIDIZED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.OXIDIZED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_COPPER_BLOCK + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_COPPER_BLOCK_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_COPPER_BLOCK).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_CUT_COPPER + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.copy(Blocks.WAXED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_EXPOSED_COPPER + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_EXPOSED_CUT_COPPER + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_EXPOSED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.copy(Blocks.WAXED_EXPOSED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_WEATHERED_COPPER + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_WEATHERED_CUT_COPPER + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_WEATHERED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.copy(Blocks.WAXED_WEATHERED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_OXIDIZED_COPPER + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); + // WAXED_OXIDIZED_CUT_COPPER + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_0 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 0); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_1 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[2], RESISTANCE[0]), 1); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_2 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 2); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_3 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[3], RESISTANCE[1]), 3); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_4 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 4); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_5 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[4], RESISTANCE[2]), 5); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_6 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 6); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_7 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[5], RESISTANCE[3]), 7); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_8 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 8); + public static final CustomWeatheringCopperBlock WAXED_OXIDIZED_CUT_COPPER_9 = new CustomWeatheringCopperBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.copy(Blocks.WAXED_OXIDIZED_CUT_COPPER).strength(HARDNESS[6], RESISTANCE[4]), 9); } diff --git a/common/src/main/java/net/sashiro/compressedblocks/block/CompressedBlock.java b/common/src/main/java/net/sashiro/compressedblocks/block/CompressedBlock.java index 9d526e452..3720f182f 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/block/CompressedBlock.java +++ b/common/src/main/java/net/sashiro/compressedblocks/block/CompressedBlock.java @@ -18,186 +18,201 @@ @SuppressWarnings("unused") public class CompressedBlock { - - + + public static class CustomDefaultBlock extends Block { private final Compression compressor = new Compression(); - + public CustomDefaultBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomMudBlock extends MudBlock { private final Compression compressor = new Compression(); - + public CustomMudBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomNyliumBlock extends NyliumBlock { private final Compression compressor = new Compression(); - + public CustomNyliumBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomSandBlock extends SandBlock { private final Compression compressor = new Compression(); - + public CustomSandBlock(int dustColor, Properties properties, int compressionLevel) { super(dustColor, properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomGravelBlock extends GravelBlock { private final Compression compressor = new Compression(); - + public CustomGravelBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomDropExperienceBlock extends DropExperienceBlock { private final Compression compressor = new Compression(); - + public CustomDropExperienceBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomRedstoneOreBlock extends RedStoneOreBlock { private final Compression compressor = new Compression(); - + public CustomRedstoneOreBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomRedstoneTorchBlock extends RedstoneTorchBlock { private final Compression compressor = new Compression(); - + public CustomRedstoneTorchBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomSlimeBlock extends SlimeBlock { private final Compression compressor = new Compression(); - + public CustomSlimeBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomSoulSandBlock extends SoulSandBlock { private final Compression compressor = new Compression(); - + public CustomSoulSandBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); } } - + public static class CustomRotatedPillarBlock extends RotatedPillarBlock { private final Compression compressor = new Compression(); - + public CustomRotatedPillarBlock(Properties properties, int compressionLevel) { super(properties); compressor.setCompressionLevel(compressionLevel); } - + public CustomRotatedPillarBlock(MapColor innerColor, MapColor outerColor, float hardness, float resistance, int compressionLevel) { super(Properties.of().mapColor((color) -> color.getValue(RotatedPillarBlock.AXIS) == Direction.Axis.Y ? innerColor : outerColor).sound(SoundType.WOOD).strength(hardness, resistance)); compressor.setCompressionLevel(compressionLevel); } - + @Override public @NotNull BlockState rotate(@NotNull BlockState blockState, @NotNull Rotation rotation) { return super.rotate(blockState, rotation); } - + @Override protected void createBlockStateDefinition(StateDefinition.@NotNull Builder blockBlockStateBuilder) { super.createBlockStateDefinition(blockBlockStateBuilder); } - + @Override public BlockState getStateForPlacement(@NotNull BlockPlaceContext blockPlaceContext) { return super.getStateForPlacement(blockPlaceContext); } - + + @Override + public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { + super.appendHoverText(is, bg, lC, ttf); + lC.add(Component.literal(compressor.getBlockCount() + " Blocks").withStyle(compressor.getStyle())); + } + } + + public static class CustomWeatheringCopperBlock extends WeatheringCopperFullBlock { + private final Compression compressor = new Compression(); + + public CustomWeatheringCopperBlock(WeatherState weatherState, Properties properties, int compressionLevel) { + super(weatherState, properties); + compressor.setCompressionLevel(compressionLevel); + } + @Override public void appendHoverText(@NotNull ItemStack is, @Nullable BlockGetter bg, @NotNull List lC, @NotNull TooltipFlag ttf) { super.appendHoverText(is, bg, lC, ttf); diff --git a/common/src/main/java/net/sashiro/compressedblocks/block/CrateList.java b/common/src/main/java/net/sashiro/compressedblocks/block/CrateList.java index 57460d0ec..f5b9c4e70 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/block/CrateList.java +++ b/common/src/main/java/net/sashiro/compressedblocks/block/CrateList.java @@ -19,7 +19,7 @@ public class CrateList { private static final BlockBehaviour.Properties p7 = BlockBehaviour.Properties.of().strength(HARDNESS[7], RESISTANCE[7]).mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD); private static final BlockBehaviour.Properties p8 = BlockBehaviour.Properties.of().strength(HARDNESS[8], RESISTANCE[8]).mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD); private static final BlockBehaviour.Properties p9 = BlockBehaviour.Properties.of().strength(HARDNESS[9], RESISTANCE[9]).mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD); - + public static final RotatedPillarBlock APPLE_0 = new RotatedPillarBlock(p0); public static final RotatedPillarBlock APPLE_1 = new RotatedPillarBlock(p1); public static final RotatedPillarBlock APPLE_2 = new RotatedPillarBlock(p2); diff --git a/common/src/main/java/net/sashiro/compressedblocks/item/CrateItem.java b/common/src/main/java/net/sashiro/compressedblocks/item/CrateItem.java index c9bf12614..4657d407f 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/item/CrateItem.java +++ b/common/src/main/java/net/sashiro/compressedblocks/item/CrateItem.java @@ -14,11 +14,11 @@ import java.util.List; public class CrateItem extends BlockItem { - + private final Block block; private final String itemCount; private final Compression comp = new Compression(); - + public CrateItem(Block block) { super(block, new Properties() .stacksTo(64) @@ -27,7 +27,7 @@ public CrateItem(Block block) { comp.setCompressionLevel(getLevel()); this.itemCount = comp.getBlockCount(); } - + private int getLevel() { String name = block.getDescriptionId().replace("block.compressedblocks.", "").replace("item.compressedblocks.", ""); if (name.startsWith("crated_")) return 0; @@ -42,7 +42,7 @@ private int getLevel() { if (name.startsWith("giga_")) return 9; else return 0; } - + @Override @ParametersAreNonnullByDefault public void appendHoverText(ItemStack s, @Nullable Level l, List c, TooltipFlag t) { diff --git a/common/src/main/java/net/sashiro/compressedblocks/platform/Services.java b/common/src/main/java/net/sashiro/compressedblocks/platform/Services.java index 78cb073dd..cc732a4c9 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/platform/Services.java +++ b/common/src/main/java/net/sashiro/compressedblocks/platform/Services.java @@ -9,18 +9,18 @@ // environment to another. In the context of MultiLoader we use this feature to access a mock API in the common code that // is swapped out for the platform specific implementation at runtime. public class Services { - + // In this example we provide a platform helper which provides information about what platform the mod is running on. // For example this can be used to check if the code is running on Forge vs Fabric, or to ask the modloader if another // mod is loaded. public static final IPlatformHelper PLATFORM = load(IPlatformHelper.class); - + // This code is used to load a service for the current environment. Your implementation of the service must be defined // manually by including a text file in META-INF/services named with the fully qualified class name of the service. // Inside the file you should write the fully qualified class name of the implementation to load for the platform. For // example our file on Forge points to ForgePlatformHelper while Fabric points to FabricPlatformHelper. public static T load(Class clazz) { - + final T loadedService = ServiceLoader.load(clazz) .findFirst() .orElseThrow(() -> new NullPointerException("Failed to load service for " + clazz.getName())); diff --git a/common/src/main/java/net/sashiro/compressedblocks/platform/services/IPlatformHelper.java b/common/src/main/java/net/sashiro/compressedblocks/platform/services/IPlatformHelper.java index 8882aabf7..a18264d72 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/platform/services/IPlatformHelper.java +++ b/common/src/main/java/net/sashiro/compressedblocks/platform/services/IPlatformHelper.java @@ -1,14 +1,14 @@ package net.sashiro.compressedblocks.platform.services; public interface IPlatformHelper { - + /** * Gets the name of the current platform * * @return The name of the current platform. */ String getPlatformName(); - + /** * Checks if a mod with the given id is loaded. * @@ -16,21 +16,21 @@ public interface IPlatformHelper { * @return True if the mod is loaded, false otherwise. */ boolean isModLoaded(String modId); - + /** * Check if the game is currently in a development environment. * * @return True if in a development environment, false otherwise. */ boolean isDevelopmentEnvironment(); - + /** * Gets the name of the environment type as a string. * * @return The name of the environment type. */ default String getEnvironmentName() { - + return isDevelopmentEnvironment() ? "development" : "production"; } } \ No newline at end of file diff --git a/common/src/main/java/net/sashiro/compressedblocks/util/Compression.java b/common/src/main/java/net/sashiro/compressedblocks/util/Compression.java index 467bd2bdf..3817c4189 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/util/Compression.java +++ b/common/src/main/java/net/sashiro/compressedblocks/util/Compression.java @@ -6,11 +6,11 @@ public class Compression { protected String blockCount; protected Style style; - + public Compression() { style = Style.EMPTY; } - + /** * @param compressionLevel Level of compression.
Min: 0
Max: 9 */ @@ -60,7 +60,7 @@ public void setCompressionLevel(int compressionLevel) { } } } - + /** * Function to get the current Block Count * @@ -69,7 +69,7 @@ public void setCompressionLevel(int compressionLevel) { public String getBlockCount() { return this.blockCount; } - + /** * Function to get the current Style * diff --git a/common/src/main/java/net/sashiro/compressedblocks/util/StringUtils.java b/common/src/main/java/net/sashiro/compressedblocks/util/StringUtils.java index 81b32a899..ec3f6625a 100644 --- a/common/src/main/java/net/sashiro/compressedblocks/util/StringUtils.java +++ b/common/src/main/java/net/sashiro/compressedblocks/util/StringUtils.java @@ -1,7 +1,7 @@ package net.sashiro.compressedblocks.util; public class StringUtils { - + /** * Utility function to replace underscores
* with spaces and format the {@link String} in uppercase. diff --git a/common/src/main/resources/mixins.json b/common/src/main/resources/mixins.json index 6f1db6cfb..76edd0b2d 100644 --- a/common/src/main/resources/mixins.json +++ b/common/src/main/resources/mixins.json @@ -1,17 +1,17 @@ { - "required": true, - "minVersion": "0.8", - "package": "${group}.mixin", - "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_17", - "mixins": [ - ], - "client": [ - ], - "server": [ - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "minVersion": "0.8", + "package": "${group}.mixin", + "refmap": "${mod_id}.refmap.json", + "compatibilityLevel": "JAVA_17", + "mixins": [ + ], + "client": [ + ], + "server": [ + ], + "injectors": { + "defaultRequire": 1 + } } diff --git a/common/src/main/resources/pack.mcmeta b/common/src/main/resources/pack.mcmeta index fdeaf46fb..58cda0b88 100644 --- a/common/src/main/resources/pack.mcmeta +++ b/common/src/main/resources/pack.mcmeta @@ -1,12 +1,12 @@ { - "pack": { - "description": { - "text": "${mod_name} resources" - }, - "pack_format": 15, - "supported_formats": { - "min_inclusive": 10, - "max_inclusive": 40 - } + "pack": { + "description": { + "text": "${mod_name} resources" + }, + "pack_format": 15, + "supported_formats": { + "min_inclusive": 10, + "max_inclusive": 40 } + } } \ No newline at end of file diff --git a/fabric/src/main/java/net/sashiro/compressedblocks/CompressedBlocksFabric.java b/fabric/src/main/java/net/sashiro/compressedblocks/CompressedBlocksFabric.java index cfe19df18..f035067c7 100644 --- a/fabric/src/main/java/net/sashiro/compressedblocks/CompressedBlocksFabric.java +++ b/fabric/src/main/java/net/sashiro/compressedblocks/CompressedBlocksFabric.java @@ -5,11 +5,11 @@ import net.sashiro.compressedblocks.registry.CBCratesRegister; public class CompressedBlocksFabric implements ModInitializer { - + @Override public void onInitialize() { CommonClass.init(); - + CBBlocksRegister.register(); CBCratesRegister.register(); } diff --git a/fabric/src/main/java/net/sashiro/compressedblocks/client/CompressedBlocksClient.java b/fabric/src/main/java/net/sashiro/compressedblocks/client/CompressedBlocksClient.java index 35fcafcbc..ede551230 100644 --- a/fabric/src/main/java/net/sashiro/compressedblocks/client/CompressedBlocksClient.java +++ b/fabric/src/main/java/net/sashiro/compressedblocks/client/CompressedBlocksClient.java @@ -25,41 +25,41 @@ import static net.sashiro.compressedblocks.Constants.MOD_ID; public class CompressedBlocksClient implements ClientModInitializer { - + public static final ResourceKey COMPRESSED_BLOCKS_KEY = ResourceKey.create(Registries.CREATIVE_MODE_TAB, new ResourceLocation(MOD_ID, "compressed_blocks")); public static final ResourceKey CRATE_ITEMS_KEY = ResourceKey.create(Registries.CREATIVE_MODE_TAB, new ResourceLocation(MOD_ID, "compressed_items")); - + private static final CreativeModeTab COMPRESSED_BLOCKS = FabricItemGroup.builder() .icon(() -> new ItemStack(BlockList.STONE_6.asItem())) .title(Component.translatable("itemGroup.compressed_blocks")) .build(); - + private static final CreativeModeTab CRATE_ITEMS = FabricItemGroup.builder() .icon(() -> new ItemStack(CrateList.APPLE_0.asItem())) .title(Component.translatable("itemGroup.compressed_items")) .build(); - + @Override public void onInitializeClient() { Collection itemStackBlocks = new ArrayList<>(); Collection itemStackCrates = new ArrayList<>(); - + for (Block block : Constants.BLOCKS) { BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.translucent()); itemStackBlocks.add(new ItemStack(block)); } - + for (Block block : Constants.CRATES) { BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.cutout()); itemStackCrates.add(new ItemStack(block)); } - + Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, new ResourceLocation(MOD_ID, COMPRESSED_BLOCKS_KEY.location().getPath()), COMPRESSED_BLOCKS); Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, new ResourceLocation(MOD_ID, CRATE_ITEMS_KEY.location().getPath()), CRATE_ITEMS); - + ItemGroupEvents.modifyEntriesEvent(COMPRESSED_BLOCKS_KEY).register(content -> content.acceptAll(itemStackBlocks)); ItemGroupEvents.modifyEntriesEvent(CRATE_ITEMS_KEY).register(content -> content.acceptAll(itemStackCrates)); - + LOG.info(String.format("Successfully registered: %d Blocks and %d Crates!", itemStackBlocks.size(), itemStackCrates.size())); } } diff --git a/fabric/src/main/java/net/sashiro/compressedblocks/platform/FabricPlatformHelper.java b/fabric/src/main/java/net/sashiro/compressedblocks/platform/FabricPlatformHelper.java index 47a0672cd..425f26bf8 100644 --- a/fabric/src/main/java/net/sashiro/compressedblocks/platform/FabricPlatformHelper.java +++ b/fabric/src/main/java/net/sashiro/compressedblocks/platform/FabricPlatformHelper.java @@ -4,21 +4,21 @@ import net.sashiro.compressedblocks.platform.services.IPlatformHelper; public class FabricPlatformHelper implements IPlatformHelper { - + @Override public String getPlatformName() { return "Fabric"; } - + @Override public boolean isModLoaded(String modId) { - + return FabricLoader.getInstance().isModLoaded(modId); } - + @Override public boolean isDevelopmentEnvironment() { - + return FabricLoader.getInstance().isDevelopmentEnvironment(); } } diff --git a/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBBlocksRegister.java b/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBBlocksRegister.java index 4c074b27d..9fbd27821 100644 --- a/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBBlocksRegister.java +++ b/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBBlocksRegister.java @@ -12,14 +12,14 @@ import static net.sashiro.compressedblocks.block.BlockList.*; public class CBBlocksRegister { - + private static void registerBlock(String name, Block block) { FabricItemSettings fis = new FabricItemSettings(); Registry.register(BuiltInRegistries.BLOCK, new ResourceLocation(MOD_ID, name.toLowerCase()), block); Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(MOD_ID, name.toLowerCase()), new BlockItem(block, fis)); BLOCKS.add(block); } - + public static void register() { // Dirt registerBlock("c0_" + "DIRT", DIRT_0); @@ -835,5 +835,184 @@ public static void register() { registerBlock("c7_" + "BAMBOO_MOSAIC", BAMBOO_MOSAIC_7); registerBlock("c8_" + "BAMBOO_MOSAIC", BAMBOO_MOSAIC_8); registerBlock("c9_" + "BAMBOO_MOSAIC", BAMBOO_MOSAIC_9); + // ================================================== + // Version: 1.3.8 + // ================================================== + // COPPER_BLOCK + registerBlock("c0_" + "COPPER_BLOCK", COPPER_BLOCK_0); + registerBlock("c1_" + "COPPER_BLOCK", COPPER_BLOCK_1); + registerBlock("c2_" + "COPPER_BLOCK", COPPER_BLOCK_2); + registerBlock("c3_" + "COPPER_BLOCK", COPPER_BLOCK_3); + registerBlock("c4_" + "COPPER_BLOCK", COPPER_BLOCK_4); + registerBlock("c5_" + "COPPER_BLOCK", COPPER_BLOCK_5); + registerBlock("c6_" + "COPPER_BLOCK", COPPER_BLOCK_6); + registerBlock("c7_" + "COPPER_BLOCK", COPPER_BLOCK_7); + registerBlock("c8_" + "COPPER_BLOCK", COPPER_BLOCK_8); + registerBlock("c9_" + "COPPER_BLOCK", COPPER_BLOCK_9); + // CUT_COPPER + registerBlock("c0_" + "CUT_COPPER", CUT_COPPER_0); + registerBlock("c1_" + "CUT_COPPER", CUT_COPPER_1); + registerBlock("c2_" + "CUT_COPPER", CUT_COPPER_2); + registerBlock("c3_" + "CUT_COPPER", CUT_COPPER_3); + registerBlock("c4_" + "CUT_COPPER", CUT_COPPER_4); + registerBlock("c5_" + "CUT_COPPER", CUT_COPPER_5); + registerBlock("c6_" + "CUT_COPPER", CUT_COPPER_6); + registerBlock("c7_" + "CUT_COPPER", CUT_COPPER_7); + registerBlock("c8_" + "CUT_COPPER", CUT_COPPER_8); + registerBlock("c9_" + "CUT_COPPER", CUT_COPPER_9); + // EXPOSED_COPPER + registerBlock("c0_" + "EXPOSED_COPPER", EXPOSED_COPPER_0); + registerBlock("c1_" + "EXPOSED_COPPER", EXPOSED_COPPER_1); + registerBlock("c2_" + "EXPOSED_COPPER", EXPOSED_COPPER_2); + registerBlock("c3_" + "EXPOSED_COPPER", EXPOSED_COPPER_3); + registerBlock("c4_" + "EXPOSED_COPPER", EXPOSED_COPPER_4); + registerBlock("c5_" + "EXPOSED_COPPER", EXPOSED_COPPER_5); + registerBlock("c6_" + "EXPOSED_COPPER", EXPOSED_COPPER_6); + registerBlock("c7_" + "EXPOSED_COPPER", EXPOSED_COPPER_7); + registerBlock("c8_" + "EXPOSED_COPPER", EXPOSED_COPPER_8); + registerBlock("c9_" + "EXPOSED_COPPER", EXPOSED_COPPER_9); + // EXPOSED_CUT_COPPER + registerBlock("c0_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_0); + registerBlock("c1_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_1); + registerBlock("c2_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_2); + registerBlock("c3_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_3); + registerBlock("c4_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_4); + registerBlock("c5_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_5); + registerBlock("c6_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_6); + registerBlock("c7_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_7); + registerBlock("c8_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_8); + registerBlock("c9_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_9); + // WEATHERED_COPPER + registerBlock("c0_" + "WEATHERED_COPPER", WEATHERED_COPPER_0); + registerBlock("c1_" + "WEATHERED_COPPER", WEATHERED_COPPER_1); + registerBlock("c2_" + "WEATHERED_COPPER", WEATHERED_COPPER_2); + registerBlock("c3_" + "WEATHERED_COPPER", WEATHERED_COPPER_3); + registerBlock("c4_" + "WEATHERED_COPPER", WEATHERED_COPPER_4); + registerBlock("c5_" + "WEATHERED_COPPER", WEATHERED_COPPER_5); + registerBlock("c6_" + "WEATHERED_COPPER", WEATHERED_COPPER_6); + registerBlock("c7_" + "WEATHERED_COPPER", WEATHERED_COPPER_7); + registerBlock("c8_" + "WEATHERED_COPPER", WEATHERED_COPPER_8); + registerBlock("c9_" + "WEATHERED_COPPER", WEATHERED_COPPER_9); + // WEATHERED_CUT_COPPER + registerBlock("c0_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_0); + registerBlock("c1_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_1); + registerBlock("c2_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_2); + registerBlock("c3_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_3); + registerBlock("c4_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_4); + registerBlock("c5_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_5); + registerBlock("c6_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_6); + registerBlock("c7_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_7); + registerBlock("c8_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_8); + registerBlock("c9_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_9); + // OXIDIZED_COPPER + registerBlock("c0_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_0); + registerBlock("c1_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_1); + registerBlock("c2_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_2); + registerBlock("c3_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_3); + registerBlock("c4_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_4); + registerBlock("c5_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_5); + registerBlock("c6_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_6); + registerBlock("c7_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_7); + registerBlock("c8_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_8); + registerBlock("c9_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_9); + // OXIDIZED_CUT_COPPER + registerBlock("c0_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_0); + registerBlock("c1_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_1); + registerBlock("c2_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_2); + registerBlock("c3_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_3); + registerBlock("c4_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_4); + registerBlock("c5_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_5); + registerBlock("c6_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_6); + registerBlock("c7_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_7); + registerBlock("c8_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_8); + registerBlock("c9_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_9); + // WAXED_COPPER_BLOCK + registerBlock("c0_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_0); + registerBlock("c1_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_1); + registerBlock("c2_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_2); + registerBlock("c3_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_3); + registerBlock("c4_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_4); + registerBlock("c5_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_5); + registerBlock("c6_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_6); + registerBlock("c7_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_7); + registerBlock("c8_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_8); + registerBlock("c9_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_9); + // WAXED_CUT_COPPER + registerBlock("c0_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_9); + // WAXED_EXPOSED_COPPER + registerBlock("c0_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_0); + registerBlock("c1_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_1); + registerBlock("c2_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_2); + registerBlock("c3_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_3); + registerBlock("c4_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_4); + registerBlock("c5_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_5); + registerBlock("c6_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_6); + registerBlock("c7_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_7); + registerBlock("c8_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_8); + registerBlock("c9_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_9); + // WAXED_EXPOSED_CUT_COPPER + registerBlock("c0_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_9); + // WAXED_WEATHERED_COPPER + registerBlock("c0_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_0); + registerBlock("c1_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_1); + registerBlock("c2_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_2); + registerBlock("c3_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_3); + registerBlock("c4_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_4); + registerBlock("c5_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_5); + registerBlock("c6_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_6); + registerBlock("c7_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_7); + registerBlock("c8_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_8); + registerBlock("c9_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_9); + // WAXED_WEATHERED_CUT_COPPER + registerBlock("c0_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_9); + // WAXED_OXIDIZED_COPPER + registerBlock("c0_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_0); + registerBlock("c1_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_1); + registerBlock("c2_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_2); + registerBlock("c3_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_3); + registerBlock("c4_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_4); + registerBlock("c5_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_5); + registerBlock("c6_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_6); + registerBlock("c7_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_7); + registerBlock("c8_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_8); + registerBlock("c9_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_9); + // WAXED_OXIDIZED_CUT_COPPER + registerBlock("c0_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_9); } } diff --git a/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java b/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java index f79a269c7..b3438614c 100644 --- a/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java +++ b/fabric/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java @@ -10,13 +10,13 @@ import static net.sashiro.compressedblocks.block.CrateList.*; public class CBCratesRegister { - + private static void registerCrate(String name, Block crateBlock) { Registry.register(BuiltInRegistries.BLOCK, new ResourceLocation(MOD_ID, name.toLowerCase()), crateBlock); Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(MOD_ID, name.toLowerCase()), new CrateItem(crateBlock)); CRATES.add(crateBlock); } - + public static void register() { registerCrate(c0 + "APPLE".toLowerCase(), APPLE_0); registerCrate(c1 + "APPLE".toLowerCase(), APPLE_1); diff --git a/forge/src/main/java/net/sashiro/compressedblocks/CompressedBlocksForge.java b/forge/src/main/java/net/sashiro/compressedblocks/CompressedBlocksForge.java index 2a6102af8..fe102139c 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/CompressedBlocksForge.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/CompressedBlocksForge.java @@ -5,10 +5,10 @@ @Mod(Constants.MOD_ID) public class CompressedBlocksForge { - + public CompressedBlocksForge() { CommonClass.init(); - + CBRegistryEvent.register(); } } \ No newline at end of file diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/CBTags.java b/forge/src/main/java/net/sashiro/compressedblocks/data/CBTags.java index 3168ab6c8..3c5f4f702 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/CBTags.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/CBTags.java @@ -32,8 +32,8 @@ public class CBTags { public static final TagKey OCTUPLE_ITEM = ItemTags.create(new ResourceLocation(MOD_ID, "octuple")); public static final TagKey MEGA_ITEM = ItemTags.create(new ResourceLocation(MOD_ID, "mega")); public static final TagKey GIGA_ITEM = ItemTags.create(new ResourceLocation(MOD_ID, "giga")); - - + + public static final TagKey SINGLE_CRATE = ItemTags.create(new ResourceLocation(MOD_ID, "single_crate")); public static final TagKey DOUBLE_CRATE = ItemTags.create(new ResourceLocation(MOD_ID, "double_crate")); public static final TagKey TRIPLE_CRATE = ItemTags.create(new ResourceLocation(MOD_ID, "triple_crate")); @@ -44,7 +44,7 @@ public class CBTags { public static final TagKey OCTUPLE_CRATE = ItemTags.create(new ResourceLocation(MOD_ID, "octuple_crate")); public static final TagKey MEGA_CRATE = ItemTags.create(new ResourceLocation(MOD_ID, "mega_crate")); public static final TagKey GIGA_CRATE = ItemTags.create(new ResourceLocation(MOD_ID, "giga_crate")); - + public static final TagKey C0 = BlockTags.create(new ResourceLocation(MOD_ID, "c0")); public static final TagKey C1 = BlockTags.create(new ResourceLocation(MOD_ID, "c1")); public static final TagKey C2 = BlockTags.create(new ResourceLocation(MOD_ID, "c2")); diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/DataGen.java b/forge/src/main/java/net/sashiro/compressedblocks/data/DataGen.java index c3249a555..eb6b5a377 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/DataGen.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/DataGen.java @@ -23,7 +23,7 @@ public static void gatherData(GatherDataEvent e) { PackOutput packOutput = gen.getPackOutput(); ExistingFileHelper existingFileHelper = e.getExistingFileHelper(); CompletableFuture lookupProvider = e.getLookupProvider(); - + gen.addProvider(true, new CBBlockStateProvider(packOutput, existingFileHelper)); gen.addProvider(true, new CBItemModelProvider(packOutput, existingFileHelper)); gen.addProvider(true, new CBLanguageProvider(packOutput, "en_us")); diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockStateProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockStateProvider.java index 98bad3f2e..705e96535 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockStateProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockStateProvider.java @@ -18,19 +18,19 @@ public class CBBlockStateProvider extends BlockStateProvider { public CBBlockStateProvider(PackOutput packOutput, ExistingFileHelper exFileHelper) { super(packOutput, MOD_ID, exFileHelper); } - + @Override protected void registerStatesAndModels() { ModelFile.UncheckedModelFile blockBlock = new ModelFile.UncheckedModelFile("block/block"); ModelFile.UncheckedModelFile cubeColumn = new ModelFile.UncheckedModelFile("block/cube_column"); ModelFile.UncheckedModelFile cubeColumnHorizontal = new ModelFile.UncheckedModelFile("block/cube_column_horizontal"); - + for (RegistryObject block : CBRegistryEvent.BLOCKS.getEntries()) { if (block.get().getDescriptionId().contains("honey_block") || block.get().getDescriptionId().contains("basalt")) continue; if (block.get().getDescriptionId().contains("_log")) { RotatedPillarBlock block1 = (RotatedPillarBlock) block.get(); - + axisBlock( block1, models().cubeColumn( block.get().getDescriptionId().replace("block.compressedblocks.", ""), @@ -122,12 +122,12 @@ block1, models().cubeColumn( ); } } - + for (RegistryObject block : CBRegistryEvent.CRATE_BLOCKS.getEntries()) { String crate_name = block.get().getDescriptionId().replace("block.compressedblocks.", ""); String mc_name = getMCName(crate_name); ResourceLocation location = new ResourceLocation("item/" + mc_name); - + if (mc_name.contains("rail") || mc_name.contains("torch") || mc_name.contains("lightning_rod") @@ -156,7 +156,7 @@ block1, models().cubeColumn( if (mc_name.contains("peony")) location = new ResourceLocation("block/peony_top"); if (mc_name.contains("carpet")) location = new ResourceLocation("block/" + mc_name.replace("carpet", "wool")); - + simpleBlock( block.get(), models().cubeAll( crate_name, @@ -186,7 +186,7 @@ block1, models().cubeColumn( ); } } - + private String getMCName(String crateName) { crateName = crateName.replace("item.compressedblocks.", ""); if (crateName.startsWith("crated_")) crateName = crateName.replace("crated_", ""); @@ -199,19 +199,24 @@ private String getMCName(String crateName) { else if (crateName.startsWith("octuple_crated_")) crateName = crateName.replace("octuple_crated_", ""); else if (crateName.startsWith("mega_crated_")) crateName = crateName.replace("mega_crated_", ""); else if (crateName.startsWith("giga_crated_")) crateName = crateName.replace("giga_crated_", ""); - + return crateName; } - + private ResourceLocation getActualResourceLocation(String resourceLocation) { String blockName = resourceLocation.replace("block.compressedblocks.", ""); for (int i = 0; i < 10; i++) { if (blockName.contains("c" + i)) blockName = blockName.replace("c" + i + "_", ""); } + if (resourceLocation.contains("exposed")) blockName = "exposed_copper"; + if (resourceLocation.contains("copper_block")) blockName = "copper_block"; + if (resourceLocation.contains("cut_copper")) blockName = "cut_copper"; + if (resourceLocation.contains("oxidized_copper")) blockName = "oxidized_copper"; + if (resourceLocation.contains("weathered_copper")) blockName = "weathered_copper"; return new ResourceLocation("minecraft", "block/" + blockName); } - + private String getCleanName(String resourceLocation) { String blockName = resourceLocation.replace("block.compressedblocks.", ""); for (int i = 0; i < 10; i++) { @@ -220,7 +225,7 @@ private String getCleanName(String resourceLocation) { } return "block/" + blockName; } - + private ResourceLocation getCompressionOverlay(String blockName) { String overlay; if (blockName.contains("c0")) overlay = "compression_level_0"; @@ -236,7 +241,7 @@ private ResourceLocation getCompressionOverlay(String blockName) { else overlay = "compression_level_0"; return new ResourceLocation("compressedblocks", "block/" + overlay); } - + private ResourceLocation getCrateLevel(String blockName) { String overlay; blockName = blockName.replace("block.compressedblocks.", ""); diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockTagsProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockTagsProvider.java index ba8af8568..5de414cde 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockTagsProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBBlockTagsProvider.java @@ -16,11 +16,11 @@ public class CBBlockTagsProvider extends BlockTagsProvider { - + public CBBlockTagsProvider(PackOutput packOutput, CompletableFuture lookupProvider, String modId, @Nullable ExistingFileHelper existingFileHelper) { super(packOutput, lookupProvider, modId, existingFileHelper); } - + @Override protected void addTags(HolderLookup.@NotNull Provider holder) { for (RegistryObject registryObject : CBRegistryEvent.BLOCKS.getEntries()) { @@ -66,7 +66,7 @@ protected void addTags(HolderLookup.@NotNull Provider holder) { tag(CBTags.GIGA).add(block); tag(CBTags.C9).add(block); } - + //noinspection StatementWithEmptyBody if (name.contains("slime") || name.equals("honey")) /* do nothing */ ; diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemModelProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemModelProvider.java index 86947982d..0e0a7dea5 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemModelProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemModelProvider.java @@ -13,17 +13,17 @@ public class CBItemModelProvider extends ItemModelProvider { public CBItemModelProvider(PackOutput packOutput, ExistingFileHelper existingFileHelper) { super(packOutput, MOD_ID, existingFileHelper); } - + @Override protected void registerModels() { - + for (RegistryObject block : CBRegistryEvent.BLOCKS.getEntries()) { if (block.get().getDescriptionId().contains("honey_block") || block.get().getDescriptionId().contains("basalt")) continue; String name = block.get().getDescriptionId().replace("block.compressedblocks.", ""); withExistingParent(name, modLoc("block/" + name)); } - + for (RegistryObject block : CBRegistryEvent.CRATE_BLOCKS.getEntries()) { String name = block.get().getDescriptionId().replace("block.compressedblocks.", ""); withExistingParent(name, modLoc("block/" + name)); diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemTagsProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemTagsProvider.java index baba4cda2..5b4c1a160 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemTagsProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBItemTagsProvider.java @@ -18,7 +18,7 @@ public class CBItemTagsProvider extends ItemTagsProvider { public CBItemTagsProvider(PackOutput packOutput, CompletableFuture provider, CompletableFuture> tagLookup, String modId, @Nullable ExistingFileHelper existingFileHelper) { super(packOutput, provider, tagLookup, modId, existingFileHelper); } - + @Override protected void addTags(HolderLookup.@NotNull Provider p_256380_) { for (RegistryObject registryObject : CBRegistryEvent.CRATE_ITEMS.getEntries()) { diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLanguageProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLanguageProvider.java index 673061703..389b5749b 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLanguageProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLanguageProvider.java @@ -14,7 +14,7 @@ public class CBLanguageProvider extends LanguageProvider { public CBLanguageProvider(PackOutput packOutput, String locale) { super(packOutput, MOD_ID, locale); } - + private String compressionLevel(String registryName) { String str = registryName.substring(0, 2); return switch (str) { @@ -31,12 +31,12 @@ private String compressionLevel(String registryName) { default -> ""; }; } - + @Override protected void addTranslations() { add("itemGroup.compressed_blocks", "Compressed Blocks"); add("itemGroup.compressed_items", "Item Crates"); - + for (RegistryObject block : CBRegistryEvent.BLOCKS.getEntries()) { assert false; String name = block.get().getDescriptionId().replace("block.compressedblocks.", ""); @@ -47,12 +47,12 @@ protected void addTranslations() { } add("block.compressedblocks." + name, compressionLevel(name) + StringUtils.stringFormat(name2.replace("_", " "))); } - + for (RegistryObject item : CBRegistryEvent.CRATE_ITEMS.getEntries()) { assert false; String name = item.get().getDescriptionId().replace("block.compressedblocks.", ""); String translation = StringUtils.stringFormat(name.replace("_", " ")); - + if ((translation.endsWith("a") || translation.endsWith("b") || translation.endsWith("c") @@ -106,7 +106,7 @@ protected void addTranslations() { } else if (translation.contains("leaf")) { translation = translation.replace("leaf", "leaves"); } - + if (name.contains("totem") || name.contains("dragon")) add("item.compressedblocks." + name, "ยง6" + translation.replace("Crated", "Crate of")); else if (name.startsWith("item.")) return; diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLootTableProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLootTableProvider.java index d74417c24..e42d67ecf 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLootTableProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBLootTableProvider.java @@ -15,17 +15,17 @@ import java.util.Set; public class CBLootTableProvider { - + public static LootTableProvider create(PackOutput output) { return new LootTableProvider(output, Set.of(), List.of(new LootTableProvider.SubProviderEntry(CompressedBlocksLootTable::new, LootContextParamSets.BLOCK))); } - + public static class CompressedBlocksLootTable extends BlockLootSubProvider { protected CompressedBlocksLootTable() { super(Set.of(), FeatureFlags.REGISTRY.allFlags()); } - + @Override protected void generate() { for (RegistryObject block : CBRegistryEvent.BLOCKS.getEntries()) { @@ -35,13 +35,13 @@ protected void generate() { dropSelf(block.get()); } } - + @Override protected @NotNull Iterable getKnownBlocks() { List block = new ArrayList<>(); block.addAll(CBRegistryEvent.BLOCKS.getEntries().stream().map(RegistryObject::get).toList()); block.addAll(CBRegistryEvent.CRATE_BLOCKS.getEntries().stream().map(RegistryObject::get).toList()); - + return block; } } diff --git a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBRecipeProvider.java b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBRecipeProvider.java index 7bb34b5cb..39409181f 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBRecipeProvider.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/data/providers/CBRecipeProvider.java @@ -21,9 +21,9 @@ public CBRecipeProvider(PackOutput packOutput) { @Override @ParametersAreNonnullByDefault protected void buildRecipes(RecipeOutput consumer) { - + ArrayList blocks = (ArrayList) Constants.BLOCKS; - + for (int i = 0; i < blocks.size(); i++) { String blockName = blocks.get(i).getDescriptionId().replace("block.compressedblocks.", ""); if (blockName.contains("c0_")) { @@ -56,15 +56,15 @@ protected void buildRecipes(RecipeOutput consumer) { .requires(blocks.get(i)) .unlockedBy("has_item", has(blocks.get(i).asItem())) .save(consumer, new ResourceLocation("compressedblocks", "shapeless_" + blockName)); - + } } - + ArrayList crate_items = (ArrayList) Constants.CRATES; - + for (int i = 0; i < crate_items.size(); i++) { String crate_itemName = crate_items.get(i).getDescriptionId().replace("block.compressedblocks.", ""); - + if (crate_itemName.startsWith("crated")) { String crate_itemName_clean = crate_itemName.replace("crated_", ""); for (Item vanillaItem : ForgeRegistries.ITEMS) { @@ -96,7 +96,7 @@ protected void buildRecipes(RecipeOutput consumer) { .requires(crate_items.get(i)) .unlockedBy("has_item", has(crate_items.get(i).asItem())) .save(consumer, new ResourceLocation("compressedblocks", "shapeless_" + crate_itemName)); - + } } } diff --git a/forge/src/main/java/net/sashiro/compressedblocks/event/CBRegistryEvent.java b/forge/src/main/java/net/sashiro/compressedblocks/event/CBRegistryEvent.java index be7e702ef..9e97c57aa 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/event/CBRegistryEvent.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/event/CBRegistryEvent.java @@ -22,7 +22,7 @@ public class CBRegistryEvent { public static final DeferredRegister CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MOD_ID); public static final Item.Properties PROPERTIES = new Item.Properties(); public static final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); - + public static void register() { eventBus.addListener(CBCratesRegister::register); eventBus.addListener(CBBlockRegister::register); @@ -31,7 +31,7 @@ public static void register() { CRATE_BLOCKS.register(eventBus); CRATE_ITEMS.register(eventBus); CREATIVE_MODE_TABS.register(eventBus); - + LOG.info("Successfully registered all Blocks and Crates!"); } } diff --git a/forge/src/main/java/net/sashiro/compressedblocks/item/ItemGroups.java b/forge/src/main/java/net/sashiro/compressedblocks/item/ItemGroups.java index 41eb27014..1671cc5f6 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/item/ItemGroups.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/item/ItemGroups.java @@ -15,7 +15,7 @@ @SuppressWarnings("unused") @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ItemGroups { - + public static final RegistryObject COMPRESSED_BLOCKS_TAB = CREATIVE_MODE_TABS.register("compressed_blocks", () -> CreativeModeTab.builder() .withTabsBefore(CreativeModeTabs.SPAWN_EGGS) .title(Component.literal("Compressed Blocks")) @@ -25,7 +25,7 @@ public class ItemGroups { output.accept(item.get()); } }).build()); - + public static final RegistryObject CRATES_TAB = CREATIVE_MODE_TABS.register("compressed_items", () -> CreativeModeTab.builder() .withTabsBefore(COMPRESSED_BLOCKS_TAB.getKey()) .title(Component.literal("Crates")) diff --git a/forge/src/main/java/net/sashiro/compressedblocks/platform/ForgePlatformHelper.java b/forge/src/main/java/net/sashiro/compressedblocks/platform/ForgePlatformHelper.java index 542557cb4..d61aca329 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/platform/ForgePlatformHelper.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/platform/ForgePlatformHelper.java @@ -5,22 +5,22 @@ import net.sashiro.compressedblocks.platform.services.IPlatformHelper; public class ForgePlatformHelper implements IPlatformHelper { - + @Override public String getPlatformName() { - + return "Forge"; } - + @Override public boolean isModLoaded(String modId) { - + return ModList.get().isLoaded(modId); } - + @Override public boolean isDevelopmentEnvironment() { - + return !FMLLoader.isProduction(); } } \ No newline at end of file diff --git a/forge/src/main/java/net/sashiro/compressedblocks/registry/CBBlockRegister.java b/forge/src/main/java/net/sashiro/compressedblocks/registry/CBBlockRegister.java index 9c4a431aa..e8eebad69 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/registry/CBBlockRegister.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/registry/CBBlockRegister.java @@ -14,13 +14,13 @@ * Forge doesn't let us use Vanilla Registries which results in duplicate code. */ public class CBBlockRegister { - + private static void registerBlock(String name, Block block) { BLOCKS.register(name.toLowerCase(), () -> block); ITEMS.register(name.toLowerCase(), () -> new BlockItem(block, PROPERTIES)); Constants.BLOCKS.add(block); } - + @SubscribeEvent(priority = EventPriority.HIGH) public static void register(RegisterEvent event) { if (event.getRegistryKey() == BLOCKS.getRegistryKey()) { @@ -838,6 +838,185 @@ public static void register(RegisterEvent event) { registerBlock("c7_" + "BAMBOO_MOSAIC", BAMBOO_MOSAIC_7); registerBlock("c8_" + "BAMBOO_MOSAIC", BAMBOO_MOSAIC_8); registerBlock("c9_" + "BAMBOO_MOSAIC", BAMBOO_MOSAIC_9); + // ================================================== + // Version: 1.3.8 + // ================================================== + // COPPER_BLOCK + registerBlock("c0_" + "COPPER_BLOCK", COPPER_BLOCK_0); + registerBlock("c1_" + "COPPER_BLOCK", COPPER_BLOCK_1); + registerBlock("c2_" + "COPPER_BLOCK", COPPER_BLOCK_2); + registerBlock("c3_" + "COPPER_BLOCK", COPPER_BLOCK_3); + registerBlock("c4_" + "COPPER_BLOCK", COPPER_BLOCK_4); + registerBlock("c5_" + "COPPER_BLOCK", COPPER_BLOCK_5); + registerBlock("c6_" + "COPPER_BLOCK", COPPER_BLOCK_6); + registerBlock("c7_" + "COPPER_BLOCK", COPPER_BLOCK_7); + registerBlock("c8_" + "COPPER_BLOCK", COPPER_BLOCK_8); + registerBlock("c9_" + "COPPER_BLOCK", COPPER_BLOCK_9); + // CUT_COPPER + registerBlock("c0_" + "CUT_COPPER", CUT_COPPER_0); + registerBlock("c1_" + "CUT_COPPER", CUT_COPPER_1); + registerBlock("c2_" + "CUT_COPPER", CUT_COPPER_2); + registerBlock("c3_" + "CUT_COPPER", CUT_COPPER_3); + registerBlock("c4_" + "CUT_COPPER", CUT_COPPER_4); + registerBlock("c5_" + "CUT_COPPER", CUT_COPPER_5); + registerBlock("c6_" + "CUT_COPPER", CUT_COPPER_6); + registerBlock("c7_" + "CUT_COPPER", CUT_COPPER_7); + registerBlock("c8_" + "CUT_COPPER", CUT_COPPER_8); + registerBlock("c9_" + "CUT_COPPER", CUT_COPPER_9); + // EXPOSED_COPPER + registerBlock("c0_" + "EXPOSED_COPPER", EXPOSED_COPPER_0); + registerBlock("c1_" + "EXPOSED_COPPER", EXPOSED_COPPER_1); + registerBlock("c2_" + "EXPOSED_COPPER", EXPOSED_COPPER_2); + registerBlock("c3_" + "EXPOSED_COPPER", EXPOSED_COPPER_3); + registerBlock("c4_" + "EXPOSED_COPPER", EXPOSED_COPPER_4); + registerBlock("c5_" + "EXPOSED_COPPER", EXPOSED_COPPER_5); + registerBlock("c6_" + "EXPOSED_COPPER", EXPOSED_COPPER_6); + registerBlock("c7_" + "EXPOSED_COPPER", EXPOSED_COPPER_7); + registerBlock("c8_" + "EXPOSED_COPPER", EXPOSED_COPPER_8); + registerBlock("c9_" + "EXPOSED_COPPER", EXPOSED_COPPER_9); + // EXPOSED_CUT_COPPER + registerBlock("c0_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_0); + registerBlock("c1_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_1); + registerBlock("c2_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_2); + registerBlock("c3_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_3); + registerBlock("c4_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_4); + registerBlock("c5_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_5); + registerBlock("c6_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_6); + registerBlock("c7_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_7); + registerBlock("c8_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_8); + registerBlock("c9_" + "EXPOSED_CUT_COPPER", EXPOSED_CUT_COPPER_9); + // WEATHERED_COPPER + registerBlock("c0_" + "WEATHERED_COPPER", WEATHERED_COPPER_0); + registerBlock("c1_" + "WEATHERED_COPPER", WEATHERED_COPPER_1); + registerBlock("c2_" + "WEATHERED_COPPER", WEATHERED_COPPER_2); + registerBlock("c3_" + "WEATHERED_COPPER", WEATHERED_COPPER_3); + registerBlock("c4_" + "WEATHERED_COPPER", WEATHERED_COPPER_4); + registerBlock("c5_" + "WEATHERED_COPPER", WEATHERED_COPPER_5); + registerBlock("c6_" + "WEATHERED_COPPER", WEATHERED_COPPER_6); + registerBlock("c7_" + "WEATHERED_COPPER", WEATHERED_COPPER_7); + registerBlock("c8_" + "WEATHERED_COPPER", WEATHERED_COPPER_8); + registerBlock("c9_" + "WEATHERED_COPPER", WEATHERED_COPPER_9); + // WEATHERED_CUT_COPPER + registerBlock("c0_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_0); + registerBlock("c1_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_1); + registerBlock("c2_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_2); + registerBlock("c3_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_3); + registerBlock("c4_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_4); + registerBlock("c5_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_5); + registerBlock("c6_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_6); + registerBlock("c7_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_7); + registerBlock("c8_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_8); + registerBlock("c9_" + "WEATHERED_CUT_COPPER", WEATHERED_CUT_COPPER_9); + // OXIDIZED_COPPER + registerBlock("c0_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_0); + registerBlock("c1_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_1); + registerBlock("c2_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_2); + registerBlock("c3_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_3); + registerBlock("c4_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_4); + registerBlock("c5_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_5); + registerBlock("c6_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_6); + registerBlock("c7_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_7); + registerBlock("c8_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_8); + registerBlock("c9_" + "OXIDIZED_COPPER", OXIDIZED_COPPER_9); + // OXIDIZED_CUT_COPPER + registerBlock("c0_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_0); + registerBlock("c1_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_1); + registerBlock("c2_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_2); + registerBlock("c3_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_3); + registerBlock("c4_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_4); + registerBlock("c5_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_5); + registerBlock("c6_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_6); + registerBlock("c7_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_7); + registerBlock("c8_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_8); + registerBlock("c9_" + "OXIDIZED_CUT_COPPER", OXIDIZED_CUT_COPPER_9); + // WAXED_COPPER_BLOCK + registerBlock("c0_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_0); + registerBlock("c1_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_1); + registerBlock("c2_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_2); + registerBlock("c3_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_3); + registerBlock("c4_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_4); + registerBlock("c5_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_5); + registerBlock("c6_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_6); + registerBlock("c7_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_7); + registerBlock("c8_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_8); + registerBlock("c9_" + "WAXED_COPPER_BLOCK", WAXED_COPPER_BLOCK_9); + // WAXED_CUT_COPPER + registerBlock("c0_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_CUT_COPPER", WAXED_CUT_COPPER_9); + // WAXED_EXPOSED_COPPER + registerBlock("c0_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_0); + registerBlock("c1_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_1); + registerBlock("c2_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_2); + registerBlock("c3_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_3); + registerBlock("c4_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_4); + registerBlock("c5_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_5); + registerBlock("c6_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_6); + registerBlock("c7_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_7); + registerBlock("c8_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_8); + registerBlock("c9_" + "WAXED_EXPOSED_COPPER", WAXED_EXPOSED_COPPER_9); + // WAXED_EXPOSED_CUT_COPPER + registerBlock("c0_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_EXPOSED_CUT_COPPER", WAXED_EXPOSED_CUT_COPPER_9); + // WAXED_WEATHERED_COPPER + registerBlock("c0_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_0); + registerBlock("c1_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_1); + registerBlock("c2_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_2); + registerBlock("c3_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_3); + registerBlock("c4_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_4); + registerBlock("c5_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_5); + registerBlock("c6_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_6); + registerBlock("c7_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_7); + registerBlock("c8_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_8); + registerBlock("c9_" + "WAXED_WEATHERED_COPPER", WAXED_WEATHERED_COPPER_9); + // WAXED_WEATHERED_CUT_COPPER + registerBlock("c0_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_WEATHERED_CUT_COPPER", WAXED_WEATHERED_CUT_COPPER_9); + // WAXED_OXIDIZED_COPPER + registerBlock("c0_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_0); + registerBlock("c1_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_1); + registerBlock("c2_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_2); + registerBlock("c3_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_3); + registerBlock("c4_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_4); + registerBlock("c5_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_5); + registerBlock("c6_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_6); + registerBlock("c7_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_7); + registerBlock("c8_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_8); + registerBlock("c9_" + "WAXED_OXIDIZED_COPPER", WAXED_OXIDIZED_COPPER_9); + // WAXED_OXIDIZED_CUT_COPPER + registerBlock("c0_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_0); + registerBlock("c1_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_1); + registerBlock("c2_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_2); + registerBlock("c3_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_3); + registerBlock("c4_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_4); + registerBlock("c5_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_5); + registerBlock("c6_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_6); + registerBlock("c7_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_7); + registerBlock("c8_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_8); + registerBlock("c9_" + "WAXED_OXIDIZED_CUT_COPPER", WAXED_OXIDIZED_CUT_COPPER_9); } } } diff --git a/forge/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java b/forge/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java index 23a430d4e..1d1fe64d6 100644 --- a/forge/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java +++ b/forge/src/main/java/net/sashiro/compressedblocks/registry/CBCratesRegister.java @@ -16,13 +16,13 @@ * Forge doesn't let us use Vanilla Registries which results in duplicate code. */ public class CBCratesRegister { - + private static void registerCrate(String name, Block block) { CRATE_BLOCKS.register(name.toLowerCase(), () -> block); CRATE_ITEMS.register(name.toLowerCase(), () -> new CrateItem(block)); Constants.CRATES.add(block); } - + @SubscribeEvent(priority = EventPriority.HIGH) public static void register(RegisterEvent event) { if (event.getRegistryKey() == CRATE_BLOCKS.getRegistryKey()) { diff --git a/gradle.properties b/gradle.properties index d0d70b150..ba3551483 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Project -version=1.3.7 +version=1.3.8 group=net.sashiro.compressedblocks # Common diff --git a/update.json b/update.json index 49f444636..323172ee9 100644 --- a/update.json +++ b/update.json @@ -17,9 +17,11 @@ "1.19.3-recommended": "1.3.5", "1.19.4-latest": "1.3.5", "1.19.4-recommended": "1.3.5", - "1.20.1-latest": "1.3.7", - "1.20.1-recommended": "1.3.6", - "1.20.2-latest": "1.3.7", - "1.20.2-recommended": "1.3.7" + "1.20-latest": "1.3.8", + "1.20-recommended": "1.3.8", + "1.20.1-latest": "1.3.8", + "1.20.1-recommended": "1.3.8", + "1.20.2-latest": "1.3.8", + "1.20.2-recommended": "1.3.8" } }