diff --git a/Makefile b/Makefile index 1e8c458..fe9c06e 100644 --- a/Makefile +++ b/Makefile @@ -32,30 +32,30 @@ default: mod all: clean clean-all mod | install mod: - @echo "[1.17] Building mod using gradle ..." + @echo "[1.18] Building mod using gradle ..." @$(GRADLE) build $(GRADLE_OPTS) run: - @echo "[1.17] Run client ..." + @echo "[1.18] Run client ..." @$(GRADLE) runClient assets: - @echo "[1.17] Running asset generators ..." + @echo "[1.18] Running asset generators ..." @$(TASK) assets data: - @echo "[1.17] Running data generators ..." + @echo "[1.18] Running data generators ..." @$(TASK) datagen clean: - @echo "[1.17] Cleaning ..." + @echo "[1.18] Cleaning ..." @rm -rf src/generated @rm -rf mcmodsrepo @rm -f build/libs/* @$(GRADLE) clean clean-all: - @echo "[1.17] Cleaning using gradle ..." + @echo "[1.18] Cleaning using gradle ..." @rm -rf mcmodsrepo @rm -f dist/* @rm -rf run/logs/ @@ -70,11 +70,11 @@ mrproper: clean-all @rm -f .classpath init: - @echo "[1.17] Initialising eclipse workspace using gradle ..." + @echo "[1.18] Initialising eclipse workspace using gradle ..." @$(GRADLE) eclipse sanitize: - @echo "[1.17] Running sanitising tasks ..." + @echo "[1.18] Running sanitising tasks ..." @$(TASK) sanitize @$(TASK) sync-languages @$(TASK) version-check @@ -88,11 +88,11 @@ start-server: install @$(TASK) start-server dist-check: - @echo "[1.17] Running dist checks ..." + @echo "[1.18] Running dist checks ..." @$(TASK) dist-check dist-files: clean-all init mod - @echo "[1.17] Distribution files ..." + @echo "[1.18] Distribution files ..." @mkdir -p dist @cp build/libs/$(MOD_JAR_PREFIX)* dist/ @$(TASK) dist diff --git a/build.gradle b/build.gradle index 95615d0..6a1f058 100644 --- a/build.gradle +++ b/build.gradle @@ -12,8 +12,9 @@ buildscript { apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -java.toolchain.languageVersion = JavaLanguageVersion.of(16) -//---------------------------------------------------------------------------------------------------------------------- +java.toolchain.languageVersion = JavaLanguageVersion.of(17) +println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) +//----------------------------------------------------------------------------- version = "${version_engineersdecor}" group = "wile.engineersdecor" archivesBaseName = "engineersdecor-${version_minecraft}" @@ -25,16 +26,13 @@ repositories { } minecraft { - // mappings channel: 'snapshot', version: "${version_fml_mappings}" - mappings channel: "official", version: "1.17.1" - // accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg') + mappings channel: "official", version: "1.18.1" runs { client { workingDirectory project.file('run') property 'forge.logging.markers', '' // SCAN,REGISTRIES,REGISTRYDUMP property 'forge.logging.console.level', 'info' - mods { engineersdecor { source sourceSets.main } } - } + mods { engineersdecor { source sourceSets.main } } } server { workingDirectory project.file('run') property 'forge.logging.markers', '' // SCAN,REGISTRIES,REGISTRYDUMP @@ -51,7 +49,7 @@ dependencies { } processResources { - outputs.upToDateWhen { false } // thx to @tterrag for this hint + outputs.upToDateWhen { false } doLast { file("${sourceSets.main.output.resourcesDir}/.gitversion-engineersdecor").text = 'git log "-1" "--format=%h"'.execute().in.text.trim() } } @@ -70,11 +68,11 @@ jar { } jar.finalizedBy('reobfJar') - -// import net.minecraftforge.gradle.common.task.SignJar // def reobfFile = file("$buildDir/reobfJar/output.jar") // def reobfArtifact = artifacts.add('default', reobfFile) { type 'jar'; builtBy 'reobfJar' } + +//import net.minecraftforge.gradle.common.task.SignJar // task signJar(type: SignJar, dependsOn: jar) { // onlyIf { project.hasProperty("keystore_file") } // if(project.hasProperty("keystore_file")) { diff --git a/gradle.properties b/gradle.properties index d6e5a0e..0b7a3b0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # @file gradle.properties org.gradle.daemon=false org.gradle.jvmargs=-Xmx8G -version_minecraft=1.17.1 -version_forge_minecraft=1.17.1-37.0.104 -version_jei=1.17.1:8.1.0.31 -version_engineersdecor=1.1.18 +version_minecraft=1.18.1 +version_forge_minecraft=1.18.1-39.0.5 +version_jei=1.18.1:9.1.2.50 +version_engineersdecor=1.1.19-b1 diff --git a/meta/update.json b/meta/update.json index 7add64d..fda01fb 100644 --- a/meta/update.json +++ b/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", - "1.17.1": { + "1.18.1": { + "1.1.19-b1": "[R] Initial 1.18.1 port.", "1.1.18": "[F] Block Placer placement context issue fix.\n[F] Fixed compatibility to Forge >=37.0.82.\n[M] Update lang ru_ru (PR#191, Smollet777).", "1.1.17": "[R] Initial 1.17.1 release.", "1.1.17-b5": "[F] Refurbished Mineral Melter code.\n[F] Fixed Block Placer item insertion.", @@ -46,7 +47,7 @@ "1.1.2-b1": "[U] Ported to MC1.16.2." }, "promos": { - "1.17.1-recommended": "1.1.18", - "1.17.1-latest": "1.1.18" + "1.18.1-recommended": "1.1.18", + "1.18.1-latest": "1.1.19-b1" } } \ No newline at end of file diff --git a/readme.md b/readme.md index 8cfb97a..5bf3d99 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ -## Engineer's Decor (MC1.17.x) +## Engineer's Decor (MC1.18.x) -Mod sources for Minecraft version 1.17.x. +Mod sources for Minecraft version 1.18.x. - Description, credits, and features: Please see the readme in the repository root. @@ -11,6 +11,8 @@ Mod sources for Minecraft version 1.17.x. ## Version history + - v1.1.19-b1 [R] Initial 1.18.1 port. + - v1.1.18 [F] Block Placer placement context issue fix. [F] Fixed compatibility to Forge >=37.0.82. [M] Update lang ru_ru (PR#191, Smollet777). diff --git a/src/main/java/wile/engineersdecor/ModContent.java b/src/main/java/wile/engineersdecor/ModContent.java index ad052c8..83f4b39 100644 --- a/src/main/java/wile/engineersdecor/ModContent.java +++ b/src/main/java/wile/engineersdecor/ModContent.java @@ -96,50 +96,50 @@ public class ModContent public static final StandardBlocks.BaseBlock CLINKER_BRICK_BLOCK = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_block")); public static final VariantSlabBlock CLINKER_BRICK_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_slab")); public static final StandardStairsBlock CLINKER_BRICK_STAIRS = (StandardStairsBlock)(new StandardStairsBlock( DecorBlock.CFG_DEFAULT, CLINKER_BRICK_BLOCK.defaultBlockState(), - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_stairs")); public static final EdWallBlock CLINKER_BRICK_WALL = (EdWallBlock)(new EdWallBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_wall")); public static final StandardBlocks.BaseBlock CLINKER_BRICK_STAINED_BLOCK = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_stained_block")); public static final VariantSlabBlock CLINKER_BRICK_STAINED_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_stained_slab")); public static final StandardStairsBlock CLINKER_BRICK_STAINED_STAIRS = (StandardStairsBlock)(new StandardStairsBlock( DecorBlock.CFG_DEFAULT, CLINKER_BRICK_BLOCK.defaultBlockState(), - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_stained_stairs")); public static final EdCornerOrnamentedBlock CLINKER_BRICK_SASTOR_CORNER = (EdCornerOrnamentedBlock)(new EdCornerOrnamentedBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE), new Block[]{CLINKER_BRICK_BLOCK, CLINKER_BRICK_STAINED_BLOCK, CLINKER_BRICK_SLAB, CLINKER_BRICK_STAIRS, CLINKER_BRICK_STAINED_SLAB, CLINKER_BRICK_STAINED_STAIRS} )).setRegistryName(new ResourceLocation(MODID, "clinker_brick_sastor_corner_block")); public static final StandardBlocks.HorizontalWaterLoggable CLINKER_BRICK_RECESSED = (StandardBlocks.HorizontalWaterLoggable)(new StandardBlocks.HorizontalWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE), new AABB[] { Auxiliaries.getPixeledAABB( 3,0, 0, 13,16, 1), Auxiliaries.getPixeledAABB( 0,0, 1, 16,16,11), @@ -149,7 +149,7 @@ public class ModContent public static final StandardBlocks.HorizontalWaterLoggable CLINKER_BRICK_SASTOR_VERTICAL_SLOTTED = (StandardBlocks.HorizontalWaterLoggable)(new StandardBlocks.HorizontalWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE), new AABB[] { Auxiliaries.getPixeledAABB( 3,0, 0, 13,16, 1), Auxiliaries.getPixeledAABB( 3,0,15, 13,16,16), @@ -159,7 +159,7 @@ public class ModContent public static final StandardBlocks.HorizontalWaterLoggable CLINKER_BRICK_VERTICAL_SLAB_STRUCTURED = (StandardBlocks.HorizontalWaterLoggable)(new StandardBlocks.HorizontalWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE), new AABB[] { Auxiliaries.getPixeledAABB( 0,0, 0, 16,16, 8), } @@ -169,110 +169,110 @@ public class ModContent public static final StandardBlocks.BaseBlock SLAG_BRICK_BLOCK = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "slag_brick_block")); public static final VariantSlabBlock SLAG_BRICK_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "slag_brick_slab")); public static final StandardStairsBlock SLAG_BRICK_STAIRS = (StandardStairsBlock)(new StandardStairsBlock( DecorBlock.CFG_DEFAULT, SLAG_BRICK_BLOCK.defaultBlockState(), - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "slag_brick_stairs")); public static final EdWallBlock SLAG_BRICK_WALL = (EdWallBlock)(new EdWallBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(3f, 10f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 7f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "slag_brick_wall")); // ------------------------------------------------------------------------------------------------------------------- public static final StandardBlocks.BaseBlock REBAR_CONCRETE_BLOCK = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete")); public static final VariantSlabBlock REBAR_CONCRETE_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_slab")); public static final StandardStairsBlock REBAR_CONCRETE_STAIRS = (StandardStairsBlock)(new StandardStairsBlock( DecorBlock.CFG_DEFAULT, REBAR_CONCRETE_BLOCK.defaultBlockState(), - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_stairs")); public static final EdWallBlock REBAR_CONCRETE_WALL = (EdWallBlock)(new EdWallBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_wall")); public static final SlabSliceBlock HALFSLAB_REBARCONCRETE = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "halfslab_rebar_concrete")); // ------------------------------------------------------------------------------------------------------------------- public static final StandardBlocks.BaseBlock REBAR_CONCRETE_TILE = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_tile")); public static final VariantSlabBlock REBAR_CONCRETE_TILE_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_tile_slab")); public static final StandardStairsBlock REBAR_CONCRETE_TILE_STAIRS = (StandardStairsBlock)(new StandardStairsBlock( DecorBlock.CFG_DEFAULT, REBAR_CONCRETE_TILE.defaultBlockState(), - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(1.0f, 2000f).sound(SoundType.STONE).isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_tile_stairs")); // ------------------------------------------------------------------------------------------------------------------- public static final EdGlassBlock PANZERGLASS_BLOCK = (EdGlassBlock)(new EdGlassBlock( DecorBlock.CFG_TRANSLUCENT, - BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.NONE).strength(0.7f, 2000f).sound(SoundType.METAL).noOcclusion().isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.NONE).strength(0.5f, 2000f).sound(SoundType.METAL).noOcclusion().isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "panzerglass_block")); public static final VariantSlabBlock PANZERGLASS_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_TRANSLUCENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.7f, 2000f).sound(SoundType.METAL).noOcclusion().isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 2000f).sound(SoundType.METAL).noOcclusion().isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "panzerglass_slab")); // ------------------------------------------------------------------------------------------------------------------- public static final EdRoofBlock DARK_CERAMIC_SHINGLE_ROOF = (EdRoofBlock)(new EdRoofBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof")); public static final EdRoofBlock DARK_CERAMIC_SHINGLE_ROOF_METALIZED = (EdRoofBlock)(new EdRoofBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_metallized")); public static final EdRoofBlock DARK_CERAMIC_SHINGLE_ROOF_SKYLIGHT = (EdRoofBlock)(new EdRoofBlock( DecorBlock.CFG_TRANSLUCENT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_skylight")); public static final EdChimneyTrunkBlock DARK_CERAMIC_SHINGLE_ROOF_CHIMNEYTRUNK = (EdChimneyTrunkBlock)(new EdChimneyTrunkBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn), Shapes.create(Auxiliaries.getPixeledAABB(3, 0, 3, 13, 16, 13)), Shapes.create(Auxiliaries.getPixeledAABB(5, 0, 5, 11, 16, 11)) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_chimneytrunk")); public static final EdChimneyTrunkBlock DARK_CERAMIC_SHINGLE_ROOF_WIRECONDUIT = (EdChimneyTrunkBlock)(new EdChimneyTrunkBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE).noOcclusion().dynamicShape().isValidSpawn(ModContent::disallowSpawn), Shapes.join( Shapes.create(Auxiliaries.getPixeledAABB(3, 0, 3, 13, 13, 13)), Shapes.create(Auxiliaries.getPixeledAABB(5, 13, 5, 11, 16, 11)), @@ -287,18 +287,18 @@ public class ModContent public static final EdChimneyBlock DARK_CERAMIC_SHINGLE_ROOF_CHIMNEY = (EdChimneyBlock)(new EdChimneyBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(5f, 6f).sound(SoundType.STONE).dynamicShape().isValidSpawn(ModContent::disallowSpawn), + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE).dynamicShape().isValidSpawn(ModContent::disallowSpawn), Auxiliaries.getPixeledAABB(3, 0, 3, 13, 6, 13) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_chimney")); public static final StandardBlocks.BaseBlock DARK_CERAMIC_SHINGLE_ROOF_BLOCK = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_block")); public static final VariantSlabBlock DARK_CERAMIC_SHINGLE_ROOF_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 6f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_slab")); // ------------------------------------------------------------------------------------------------------------------- @@ -315,36 +315,36 @@ public class ModContent public static final SlabSliceBlock HALFSLAB_DARK_CERAMIC_SHINGLE_ROOF = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(2f, 15f).sound(SoundType.STONE) + BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE).strength(0.5f, 6f).sound(SoundType.STONE) )).setRegistryName(new ResourceLocation(MODID, "dark_shingle_roof_slabslice")); // ------------------------------------------------------------------------------------------------------------------- public static final EdLadderBlock METAL_RUNG_LADDER = (EdLadderBlock)(new EdLadderBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1.0f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "metal_rung_ladder")); public static final EdLadderBlock METAL_RUNG_STEPS = (EdLadderBlock)(new EdLadderBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1.0f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "metal_rung_steps")); public static final EdLadderBlock TREATED_WOOD_LADDER = (EdLadderBlock)(new EdLadderBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1.0f, 8f).sound(SoundType.WOOD).noOcclusion() + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 8f).sound(SoundType.WOOD).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "treated_wood_ladder")); public static final EdHatchBlock IRON_HATCH = (EdHatchBlock)(new EdHatchBlock( DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 2000f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 2000f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0.5,1,0, 15.5,3,14), Auxiliaries.getPixeledAABB(0.5,1,0, 15.5,14.,2) )).setRegistryName(new ResourceLocation(MODID, "iron_hatch")); public static final StandardDoorBlock METAL_SLIDING_DOOR = (StandardDoorBlock)(new StandardDoorBlock( DecorBlock.CFG_TRANSLUCENT|DecorBlock.CFG_HORIZIONTAL, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1.5f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(15, 0.0,6, 16,16.0,10), Auxiliaries.getPixeledAABB( 0,15.5,6, 16,16.0,10), @@ -366,28 +366,28 @@ public class ModContent public static final StandardBlocks.BaseBlock OLD_INDUSTRIAL_PLANKS = (StandardBlocks.BaseBlock)(new StandardBlocks.BaseBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1.5f, 6f).sound(SoundType.WOOD) + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 6f).sound(SoundType.WOOD) )).setRegistryName(new ResourceLocation(MODID, "old_industrial_wood_planks")); public static final VariantSlabBlock OLD_INDUSTRIAL_SLAB = (VariantSlabBlock)(new VariantSlabBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1.5f, 6f).sound(SoundType.WOOD) + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 6f).sound(SoundType.WOOD) )).setRegistryName(new ResourceLocation(MODID, "old_industrial_wood_slab")); public static final StandardStairsBlock OLD_INDUSTRIAL_STAIRS = (StandardStairsBlock)(new StandardStairsBlock( DecorBlock.CFG_DEFAULT, OLD_INDUSTRIAL_PLANKS.defaultBlockState(), - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1.5f, 6f).sound(SoundType.WOOD) + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 6f).sound(SoundType.WOOD) )).setRegistryName(new ResourceLocation(MODID, "old_industrial_wood_stairs")); public static final SlabSliceBlock OLD_INDUSTRIAL_SLABSLICE = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1.5f, 6f).sound(SoundType.WOOD).noOcclusion() + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 6f).sound(SoundType.WOOD).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "old_industrial_wood_slabslice")); public static final StandardDoorBlock OLD_INDUSTRIAL_WOOD_DOOR = (StandardDoorBlock)(new StandardDoorBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1.5f, 6f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 6f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(15,0, 0, 16,16,16), Auxiliaries.getPixeledAABB( 0,0,13, 16,16,16), SoundEvents.WOODEN_DOOR_OPEN, SoundEvents.WOODEN_DOOR_CLOSE @@ -397,13 +397,13 @@ public class ModContent public static final StandardBlocks.WaterLoggable TREATED_WOOD_TABLE = (StandardBlocks.WaterLoggable)(new StandardBlocks.WaterLoggable( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(1,0,1, 15,15.9,15) )).setRegistryName(new ResourceLocation(MODID, "treated_wood_table")); public static final EdChair.ChairBlock TREATED_WOOD_STOOL = (EdChair.ChairBlock)(new EdChair.ChairBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(4,7,4, 12,8.8,12), Auxiliaries.getPixeledAABB(7,0,7, 9,7,9), @@ -414,13 +414,13 @@ public class ModContent public static final StandardBlocks.DirectedWaterLoggable TREATED_WOOD_WINDOWSILL = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(0.5,15,10.5, 15.5,16,16) )).setRegistryName(new ResourceLocation(MODID, "treated_wood_windowsill")); public static final StandardBlocks.DirectedWaterLoggable TREATED_WOOD_BROAD_WINDOWSILL = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_FACING_PLACEMENT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(0,14.5,4, 16,16,16) )).setRegistryName(new ResourceLocation(MODID, "treated_wood_broad_windowsill")); @@ -428,19 +428,19 @@ public class ModContent public static final StandardBlocks.DirectedWaterLoggable INSET_LIGHT_IRON = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), Auxiliaries.getPixeledAABB(5.2,5.2,0, 10.8,10.8,0.3) )).setRegistryName(new ResourceLocation(MODID, "iron_inset_light")); public static final StandardBlocks.DirectedWaterLoggable FLOOR_EDGE_LIGHT_IRON = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), Auxiliaries.getPixeledAABB(5,0,0, 11,2,0.5) )).setRegistryName(new ResourceLocation(MODID, "iron_floor_edge_light")); public static final StandardBlocks.DirectedWaterLoggable CEILING_EDGE_LIGHT_IRON = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB( 0,15.5,0, 16,16,2.0), Auxiliaries.getPixeledAABB( 0,14.0,0, 16,16,0.5), @@ -451,7 +451,7 @@ public class ModContent public static final StandardBlocks.DirectedWaterLoggable BULB_LIGHT_IRON = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).lightLevel((state)->15).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(6.5,6.5,1, 9.5,9.5,4), Auxiliaries.getPixeledAABB(6.0,6.0,0, 10.0,10.0,1.0) @@ -462,13 +462,13 @@ public class ModContent public static final StandardBlocks.WaterLoggable STEEL_TABLE = (StandardBlocks.WaterLoggable)(new StandardBlocks.WaterLoggable( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,0, 16,16,16) )).setRegistryName(new ResourceLocation(MODID, "steel_table")); public static final EdFloorGratingBlock STEEL_FLOOR_GRATING = (EdFloorGratingBlock)(new EdFloorGratingBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,14,0, 16,15.5,16) )).setRegistryName(new ResourceLocation(MODID, "steel_floor_grating")); @@ -476,13 +476,13 @@ public class ModContent public static final EdWindowBlock TREATED_WOOD_WINDOW = (EdWindowBlock)(new EdWindowBlock( DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 8f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 8f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,7, 16,16,9) )).setRegistryName(new ResourceLocation(MODID, "treated_wood_window")); public static final EdWindowBlock STEEL_FRAMED_WINDOW = (EdWindowBlock)(new EdWindowBlock( DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 8f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,7.5, 16,16,8.5) )).setRegistryName(new ResourceLocation(MODID, "steel_framed_window")); @@ -490,56 +490,56 @@ public class ModContent public static final EdStraightPoleBlock TREATED_WOOD_POLE = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_IF_SAME, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16), null )).setRegistryName(new ResourceLocation(MODID, "treated_wood_pole")); public static final EdStraightPoleBlock TREATED_WOOD_POLE_HEAD = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_IF_SAME, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16), TREATED_WOOD_POLE )).setRegistryName(new ResourceLocation(MODID, "treated_wood_pole_head")); public static final EdStraightPoleBlock TREATED_WOOD_POLE_SUPPORT = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_IF_SAME, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(2f, 5f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 5f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16), TREATED_WOOD_POLE )).setRegistryName(new ResourceLocation(MODID, "treated_wood_pole_support")); public static final EdStraightPoleBlock THIN_STEEL_POLE = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 11f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 11f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(6,6,0, 10,10,16), null )).setRegistryName(new ResourceLocation(MODID, "thin_steel_pole")); public static final EdStraightPoleBlock THIN_STEEL_POLE_HEAD = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_IF_SAME, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 11f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 11f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(6,6,0, 10,10,16), THIN_STEEL_POLE )).setRegistryName(new ResourceLocation(MODID, "thin_steel_pole_head")); public static final EdStraightPoleBlock THICK_STEEL_POLE = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 11f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 11f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(5,5,0, 11,11,16), null )).setRegistryName(new ResourceLocation(MODID, "thick_steel_pole")); public static final EdStraightPoleBlock THICK_STEEL_POLE_HEAD = (EdStraightPoleBlock)(new EdStraightPoleBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_IF_SAME, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 11f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 11f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(5,5,0, 11,11,16), THICK_STEEL_POLE )).setRegistryName(new ResourceLocation(MODID, "thick_steel_pole_head")); public static final EdHorizontalSupportBlock STEEL_DOUBLE_T_SUPPORT = (EdHorizontalSupportBlock)(new EdHorizontalSupportBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 11f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.5f, 11f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB( 5,11,0, 11,16,16), // main beam Auxiliaries.getPixeledAABB(10,11,5, 16,16,11), // east beam (also for west 180deg) Auxiliaries.getPixeledAABB( 6, 0,6, 10,16,10), // down thin @@ -550,85 +550,85 @@ public class ModContent public static final StandardBlocks.DirectedWaterLoggable SIGN_MODLOGO = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1000f).sound(SoundType.WOOD).lightLevel((state)->1).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 1000f).sound(SoundType.WOOD).lightLevel((state)->1).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,15.6, 16,16,16.0) )).setRegistryName(new ResourceLocation(MODID, "sign_decor")); public static final StandardBlocks.DirectedWaterLoggable SIGN_HOTWIRE = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_hotwire")); public static final StandardBlocks.DirectedWaterLoggable SIGN_DANGER = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_danger")); public static final StandardBlocks.DirectedWaterLoggable SIGN_DEFENSE = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_defense")); public static final StandardBlocks.DirectedWaterLoggable SIGN_FACTORY_AREA = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_factoryarea")); public static final StandardBlocks.DirectedWaterLoggable SIGN_EXIT = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(3,7,15.6, 13,13,16) )).setRegistryName(new ResourceLocation(MODID, "sign_exit")); public static final StandardBlocks.DirectedWaterLoggable SIGN_RADIOACTIVE = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_radioactive")); public static final StandardBlocks.DirectedWaterLoggable SIGN_LASER = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_laser")); public static final StandardBlocks.DirectedWaterLoggable SIGN_CAUTION = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_caution")); public static final StandardBlocks.DirectedWaterLoggable SIGN_MAGIC_HAZARD = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_magichazard")); public static final StandardBlocks.DirectedWaterLoggable SIGN_FIRE_HAZARD = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_firehazard")); public static final StandardBlocks.DirectedWaterLoggable SIGN_HOT_SURFACE = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_hotsurface")); public static final StandardBlocks.DirectedWaterLoggable SIGN_MAGNETIC_FIELD = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_magneticfield")); public static final StandardBlocks.DirectedWaterLoggable SIGN_FROST_WARNING = (StandardBlocks.DirectedWaterLoggable)(new StandardBlocks.DirectedWaterLoggable( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_AI_PASSABLE, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 1f).sound(SoundType.WOOD).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.2f, 1f).sound(SoundType.WOOD).noOcclusion(), Auxiliaries.getPixeledAABB(2,2,15.6, 14,14,16) )).setRegistryName(new ResourceLocation(MODID, "sign_frost")); @@ -636,7 +636,7 @@ public class ModContent public static final EdCraftingTable.CraftingTableBlock CRAFTING_TABLE = (EdCraftingTable.CraftingTableBlock)(new EdCraftingTable.CraftingTableBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(0,15,0, 16,16,16), Auxiliaries.getPixeledAABB(1, 0,1, 15,16,15) @@ -645,7 +645,7 @@ public class ModContent public static final EdFurnace.FurnaceBlock SMALL_LAB_FURNACE = (EdFurnace.FurnaceBlock)(new EdFurnace.FurnaceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(1,0,1, 15, 1,15), Auxiliaries.getPixeledAABB(0,1,1, 16,16,16), @@ -654,7 +654,7 @@ public class ModContent public static final EdElectricalFurnace.ElectricalFurnaceBlock SMALL_ELECTRICAL_FURNACE = (EdElectricalFurnace.ElectricalFurnaceBlock)(new EdElectricalFurnace.ElectricalFurnaceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(0, 0,0, 16,11,16), Auxiliaries.getPixeledAABB(1,11,0, 15,12,16), @@ -666,13 +666,13 @@ public class ModContent public static final EdDropper.DropperBlock FACTORY_DROPPER = (EdDropper.DropperBlock)(new EdDropper.DropperBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,1, 16,16,16) )).setRegistryName(new ResourceLocation(MODID, "factory_dropper")); public static final EdPlacer.PlacerBlock FACTORY_PLACER = (EdPlacer.PlacerBlock)(new EdPlacer.PlacerBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_SHIFTCLICK|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(0,0,2, 16,16,16), Auxiliaries.getPixeledAABB( 0,0,0, 1,16, 2), @@ -682,7 +682,7 @@ public class ModContent public static final EdBreaker.BreakerBlock SMALL_BLOCK_BREAKER = (EdBreaker.BreakerBlock)(new EdBreaker.BreakerBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_SHIFTCLICK, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(1,0,0, 15, 4, 7), Auxiliaries.getPixeledAABB(1,0,7, 15,12,16), @@ -695,7 +695,7 @@ public class ModContent public static final EdHopper.HopperBlock FACTORY_HOPPER = (EdHopper.HopperBlock)(new EdHopper.HopperBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(),()->{ + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(),()->{ final AABB[] down_aabbs = new AABB[]{ Auxiliaries.getPixeledAABB( 5, 0, 5, 11, 1,11), Auxiliaries.getPixeledAABB( 4, 1, 4, 12, 7,12), @@ -741,25 +741,25 @@ public class ModContent public static final EdWasteIncinerator.WasteIncineratorBlock SMALL_WASTE_INCINERATOR = (EdWasteIncinerator.WasteIncineratorBlock)(new EdWasteIncinerator.WasteIncineratorBlock( DecorBlock.CFG_DEFAULT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL), Auxiliaries.getPixeledAABB(0,0,0, 16,16,16) )).setRegistryName(new ResourceLocation(MODID, "small_waste_incinerator")); public static final EdMineralSmelter.MineralSmelterBlock SMALL_MINERAL_SMELTER = (EdMineralSmelter.MineralSmelterBlock)(new EdMineralSmelter.MineralSmelterBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(1.1,0,1.1, 14.9,16,14.9) )).setRegistryName(new ResourceLocation(MODID, "small_mineral_smelter")); public static final EdFreezer.FreezerBlock SMALL_FREEZER = (EdFreezer.FreezerBlock)(new EdFreezer.FreezerBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 12f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 12f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(1.1,0,1.1, 14.9,16,14.9) )).setRegistryName(new ResourceLocation(MODID, "small_freezer")); public static final EdSolarPanel.SolarPanelBlock SMALL_SOLAR_PANEL = (EdSolarPanel.SolarPanelBlock)(new EdSolarPanel.SolarPanelBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(0,0,0, 16,2,16), Auxiliaries.getPixeledAABB(6,1.5,3, 10,10.5,13), @@ -768,7 +768,7 @@ public class ModContent public static final EdMilker.MilkerBlock SMALL_MILKING_MACHINE = (EdMilker.MilkerBlock)(new EdMilker.MilkerBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB( 1, 1,0, 15,14,10), Auxiliaries.getPixeledAABB( 0,14,0, 16,16,13), @@ -780,7 +780,7 @@ public class ModContent public static final EdTreeCutter.TreeCutterBlock SMALL_TREE_CUTTER = (EdTreeCutter.TreeCutterBlock)(new EdTreeCutter.TreeCutterBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_SHIFTCLICK, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB( 0,0, 0, 16,3,16), Auxiliaries.getPixeledAABB( 0,3, 0, 3,8,16), @@ -794,7 +794,7 @@ public class ModContent public static final EdPipeValve.PipeValveBlock STRAIGHT_CHECK_VALVE = (EdPipeValve.PipeValveBlock)(new EdPipeValve.PipeValveBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT|DecorBlock.CFG_FLIP_PLACEMENT_SHIFTCLICK, EdPipeValve.CFG_CHECK_VALVE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(2,2, 0, 14,14, 2), Auxiliaries.getPixeledAABB(2,2,14, 14,14,16), @@ -806,7 +806,7 @@ public class ModContent public static final EdPipeValve.PipeValveBlock STRAIGHT_REDSTONE_VALVE = (EdPipeValve.PipeValveBlock)(new EdPipeValve.PipeValveBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, EdPipeValve.CFG_REDSTONE_CONTROLLED_VALVE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(2,2, 0, 14,14, 2), Auxiliaries.getPixeledAABB(2,2,14, 14,14,16), @@ -818,7 +818,7 @@ public class ModContent public static final EdPipeValve.PipeValveBlock STRAIGHT_REDSTONE_ANALOG_VALVE = (EdPipeValve.PipeValveBlock)(new EdPipeValve.PipeValveBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_FACING_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, EdPipeValve.CFG_REDSTONE_CONTROLLED_VALVE|EdPipeValve.CFG_ANALOG_VALVE, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 8f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(2,2, 0, 14,14, 2), Auxiliaries.getPixeledAABB(2,2,14, 14,14,16), @@ -829,7 +829,7 @@ public class ModContent public static final EdFluidBarrel.FluidBarrelBlock FLUID_BARREL = (EdFluidBarrel.FluidBarrelBlock)(new EdFluidBarrel.FluidBarrelBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(2, 0,0, 14, 1,16), Auxiliaries.getPixeledAABB(1, 1,0, 15, 2,16), @@ -841,7 +841,7 @@ public class ModContent public static final EdFluidFunnel.FluidFunnelBlock SMALL_FLUID_FUNNEL = (EdFluidFunnel.FluidFunnelBlock)(new EdFluidFunnel.FluidFunnelBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new AABB[]{ Auxiliaries.getPixeledAABB(0, 0,0, 16,14,16), Auxiliaries.getPixeledAABB(1,14,1, 15,15,15), @@ -851,7 +851,7 @@ public class ModContent public static final EdLabeledCrate.LabeledCrateBlock LABELED_CRATE = (EdLabeledCrate.LabeledCrateBlock)(new EdLabeledCrate.LabeledCrateBlock( DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT|DecorBlock.CFG_OPPOSITE_PLACEMENT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.5f, 32f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 32f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,0, 16,16,16) )).setRegistryName(new ResourceLocation(MODID, "labeled_crate")); @@ -859,58 +859,58 @@ public class ModContent public static final SlabSliceBlock HALFSLAB_TREATEDWOOD = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT, - BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(1f, 4f).sound(SoundType.WOOD).noOcclusion() + BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.WOOD).strength(0.3f, 4f).sound(SoundType.WOOD).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "halfslab_treated_wood")); public static final SlabSliceBlock HALFSLAB_SHEETMETALIRON = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "halfslab_sheetmetal_iron")); public static final SlabSliceBlock HALFSLAB_SHEETMETALSTEEL = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "halfslab_sheetmetal_steel")); public static final SlabSliceBlock HALFSLAB_SHEETMETALCOPPER = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "halfslab_sheetmetal_copper")); public static final SlabSliceBlock HALFSLAB_SHEETMETALGOLD = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "halfslab_sheetmetal_gold")); public static final SlabSliceBlock HALFSLAB_SHEETMETALALUMINIUM = (SlabSliceBlock)(new SlabSliceBlock( DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HARD_IE_DEPENDENT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 8f).sound(SoundType.METAL).noOcclusion() + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 8f).sound(SoundType.METAL).noOcclusion() )).setRegistryName(new ResourceLocation(MODID, "halfslab_sheetmetal_aluminum")); // ------------------------------------------------------------------------------------------------------------------- public static final EdFenceBlock STEEL_MESH_FENCE = (EdFenceBlock)(new EdFenceBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), 1.5, 16, 0.25, 0, 16, 16 )).setRegistryName(new ResourceLocation(MODID, "steel_mesh_fence")); public static final EdDoubleGateBlock STEEL_MESH_FENCE_GATE = (EdDoubleGateBlock)(new EdDoubleGateBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,6.5, 16,16,9.5) )).setRegistryName(new ResourceLocation(MODID, "steel_mesh_fence_gate")); public static final EdRailingBlock STEEL_RAILING = (EdRailingBlock)(new EdRailingBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(1f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,0, 0, 0,0), Auxiliaries.getPixeledAABB(0,0,0, 16,15.9,1) )).setRegistryName(new ResourceLocation(MODID, "steel_railing")); public static final EdCatwalkBlock STEEL_CATWALK = (EdCatwalkBlock)(new EdCatwalkBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), Auxiliaries.getPixeledAABB(0,0,0, 16, 2,16), Auxiliaries.getPixeledAABB(0,0,0, 16,15.9, 1), STEEL_RAILING @@ -918,7 +918,7 @@ public class ModContent public static final EdCatwalkTopAlignedBlock STEEL_CATWALK_TOP_ALIGNED = (EdCatwalkTopAlignedBlock)(new EdCatwalkTopAlignedBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new VoxelShape[]{ Shapes.create(Auxiliaries.getPixeledAABB(0,14,0, 16, 16,16)), // only base Auxiliaries.getUnionShape( // base with thick pole @@ -942,7 +942,7 @@ public class ModContent public static final EdCatwalkStairsBlock STEEL_CATWALK_STAIRS = (EdCatwalkStairsBlock)(new EdCatwalkStairsBlock( DecorBlock.CFG_CUTOUT, - BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(2f, 10f).sound(SoundType.METAL).noOcclusion(), + BlockBehaviour.Properties.of(Material.METAL, MaterialColor.METAL).strength(0.3f, 10f).sound(SoundType.METAL).noOcclusion(), new AABB[] { // base Auxiliaries.getPixeledAABB( 1, 2, 8, 15, 4, 16), Auxiliaries.getPixeledAABB( 1,10, 0, 15, 12, 8), diff --git a/src/main/java/wile/engineersdecor/blocks/EdBreaker.java b/src/main/java/wile/engineersdecor/blocks/EdBreaker.java index 8606981..e31fc62 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdBreaker.java +++ b/src/main/java/wile/engineersdecor/blocks/EdBreaker.java @@ -219,8 +219,8 @@ public class EdBreaker { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdChair.java b/src/main/java/wile/engineersdecor/blocks/EdChair.java index cfbd0ef..15460bd 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdChair.java +++ b/src/main/java/wile/engineersdecor/blocks/EdChair.java @@ -28,8 +28,8 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.fmllegacy.network.FMLPlayMessages; -import net.minecraftforge.fmllegacy.network.NetworkHooks; +import net.minecraftforge.network.PlayMessages; +import net.minecraftforge.network.NetworkHooks; import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModContent; import wile.engineersdecor.libmc.blocks.StandardBlocks; @@ -116,7 +116,7 @@ public class EdChair public EntityChair(Level world) { this(ModContent.ET_CHAIR, world); } - public static EntityChair customClientFactory(FMLPlayMessages.SpawnEntity spkt, Level world) + public static EntityChair customClientFactory(PlayMessages.SpawnEntity spkt, Level world) { return new EntityChair(world); } public Packet getAddEntityPacket() diff --git a/src/main/java/wile/engineersdecor/blocks/EdCraftingTable.java b/src/main/java/wile/engineersdecor/blocks/EdCraftingTable.java index c6182d5..a8006a3 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdCraftingTable.java +++ b/src/main/java/wile/engineersdecor/blocks/EdCraftingTable.java @@ -36,7 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.*; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.TickPriority; +import net.minecraft.world.ticks.TickPriority; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -46,7 +46,7 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fmllegacy.hooks.BasicEventHooks; +import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.registries.ForgeRegistries; import wile.engineersdecor.ModConfig; import wile.engineersdecor.ModContent; @@ -210,8 +210,8 @@ public class EdCraftingTable { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public CompoundTag getUpdateTag() @@ -220,11 +220,11 @@ public class EdCraftingTable @Override @Nullable public ClientboundBlockEntityDataPacket getUpdatePacket() - { return new ClientboundBlockEntityDataPacket(worldPosition, 1, getUpdateTag()); } + { return ClientboundBlockEntityDataPacket.create(this); } @Override public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) // on client - { readnbt(pkt.getTag()); super.onDataPacket(net, pkt); } + { super.onDataPacket(net, pkt); if(pkt.getTag() != null) { readnbt(pkt.getTag()); } } @Override public void handleUpdateTag(CompoundTag tag) // on client @@ -276,7 +276,7 @@ public class EdCraftingTable final Block crafting_table_block = getBlockState().getBlock(); if(!(crafting_table_block instanceof CraftingTableBlock)) return; if(level.getBlockTicks().hasScheduledTick(getBlockPos(), crafting_table_block)) return; - level.getBlockTicks().scheduleTick(getBlockPos(), crafting_table_block, 10, TickPriority.LOW); + level.scheduleTick(getBlockPos(), crafting_table_block, 10, TickPriority.LOW); } } @@ -1534,7 +1534,7 @@ public class EdCraftingTable // Normal crafting result slot behaviour if(amountCrafted > 0) { stack.onCraftedBy(this.player.level, this.player, this.amountCrafted); - BasicEventHooks.firePlayerCraftingEvent(this.player, stack, this.craftMatrix); + ForgeEventFactory.firePlayerCraftingEvent(this.player, stack, this.craftMatrix); } if(uicontainer instanceof RecipeHolder) { ((RecipeHolder)uicontainer).awardUsedRecipes(player); diff --git a/src/main/java/wile/engineersdecor/blocks/EdDropper.java b/src/main/java/wile/engineersdecor/blocks/EdDropper.java index 5abd80a..2170bd4 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdDropper.java +++ b/src/main/java/wile/engineersdecor/blocks/EdDropper.java @@ -293,8 +293,8 @@ public class EdDropper { super.load(nbt); readnbt(nbt, false); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt, false); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt, false); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdElectricalFurnace.java b/src/main/java/wile/engineersdecor/blocks/EdElectricalFurnace.java index 3d9e4bc..267a48d 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdElectricalFurnace.java +++ b/src/main/java/wile/engineersdecor/blocks/EdElectricalFurnace.java @@ -52,7 +52,7 @@ import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fmllegacy.hooks.BasicEventHooks; +import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemHandlerHelper; @@ -337,8 +337,8 @@ public class EdElectricalFurnace { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() @@ -666,7 +666,7 @@ public class EdElectricalFurnace public float getCurrentSmeltingXp(final ItemStack stack) { - float xp = (currentRecipe() instanceof AbstractCookingRecipe) ? (((AbstractCookingRecipe)currentRecipe()).getExperience()) : (stack.getItem().getSmeltingExperience(stack)); + float xp = (currentRecipe() instanceof AbstractCookingRecipe) ? (((AbstractCookingRecipe)currentRecipe()).getExperience()) : 0; return (xp <= 0) ? 0.7f : xp; // default value for recipes without defined xp } @@ -733,7 +733,7 @@ public class EdElectricalFurnace } } removeCount = 0; - BasicEventHooks.firePlayerSmeltedEvent(player_, stack); + ForgeEventFactory.firePlayerSmeltedEvent(player_, stack); } } diff --git a/src/main/java/wile/engineersdecor/blocks/EdFloorGratingBlock.java b/src/main/java/wile/engineersdecor/blocks/EdFloorGratingBlock.java index 62f1df6..9252bf8 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdFloorGratingBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdFloorGratingBlock.java @@ -38,7 +38,7 @@ public class EdFloorGratingBlock extends StandardBlocks.WaterLoggable { return true; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/blocks/EdFluidBarrel.java b/src/main/java/wile/engineersdecor/blocks/EdFluidBarrel.java index abd4825..e76fead 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdFluidBarrel.java +++ b/src/main/java/wile/engineersdecor/blocks/EdFluidBarrel.java @@ -47,7 +47,7 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.common.util.Constants; +import net.minecraft.nbt.Tag; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; @@ -175,7 +175,7 @@ public class EdFluidBarrel if(!(te instanceof FluidBarrelTileEntity)) return; ((FluidBarrelTileEntity)te).readnbt(te_nbt); te.setChanged(); - world.getBlockTicks().scheduleTick(pos, this, 4); + world.scheduleTick(pos, this, 4); } @Override @@ -186,7 +186,7 @@ public class EdFluidBarrel if(world.isClientSide()) return InteractionResult.SUCCESS; if(!(world.getBlockEntity(pos) instanceof final FluidBarrelTileEntity te)) return InteractionResult.FAIL; if(!te.handlePlayerInteraction(state, world, pos, player, hand)) return InteractionResult.PASS; - world.getBlockTicks().scheduleTick(pos, this, 4); + world.scheduleTick(pos, this, 4); return InteractionResult.CONSUME; } @@ -271,8 +271,8 @@ public class EdFluidBarrel { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); return writenbt(nbt); } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() @@ -336,14 +336,14 @@ public class EdFluidBarrel { if((!stack.hasTag()) || (!stack.getTag().contains("tedata"))) return new CompoundTag(); final CompoundTag nbt = stack.getTag().getCompound("tedata"); - if(!nbt.contains("tank", Constants.NBT.TAG_COMPOUND)) return new CompoundTag(); + if(!nbt.contains("tank", Tag.TAG_COMPOUND)) return new CompoundTag(); return nbt.getCompound("tank"); } private static void write_fluid_nbt(ItemStack stack, CompoundTag fluid_nbt) { if((fluid_nbt==null) || (fluid_nbt.isEmpty())) { - if((!stack.hasTag()) || (!stack.getTag().contains("tedata", Constants.NBT.TAG_COMPOUND))) return; + if((!stack.hasTag()) || (!stack.getTag().contains("tedata", Tag.TAG_COMPOUND))) return; final CompoundTag tag = stack.getTag(); final CompoundTag tedata = tag.getCompound("tedata"); if(tedata.contains("tank")) tedata.remove("tank"); @@ -374,15 +374,15 @@ public class EdFluidBarrel { return (!getFluid(stack).isEmpty()) ? 1 : super.getItemStackLimit(stack); } @Override - public boolean showDurabilityBar(ItemStack stack) + public boolean isBarVisible(ItemStack stack) { return (!getFluid(stack).isEmpty()); } @Override - public double getDurabilityForDisplay(ItemStack stack) - { return 1.0 - Mth.clamp(((double)(getFluid(stack).getAmount()))/((double)capacity_), 0.0, 1.0); } + public int getBarWidth(ItemStack stack) + { return Math.round(13f * ((stack.getMaxDamage()<=0) ? (1f) : Mth.clamp((float)stack.getDamageValue()/(float)stack.getMaxDamage(), 0f, 1f))); } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) + public int getBarColor(ItemStack stack) { return 0x336633; } @Override diff --git a/src/main/java/wile/engineersdecor/blocks/EdFluidFunnel.java b/src/main/java/wile/engineersdecor/blocks/EdFluidFunnel.java index 6fe35f5..9042cd6 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdFluidFunnel.java +++ b/src/main/java/wile/engineersdecor/blocks/EdFluidFunnel.java @@ -214,8 +214,8 @@ public class EdFluidFunnel { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdFreezer.java b/src/main/java/wile/engineersdecor/blocks/EdFreezer.java index 9ad57ca..814f572 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdFreezer.java +++ b/src/main/java/wile/engineersdecor/blocks/EdFreezer.java @@ -263,8 +263,8 @@ public class EdFreezer { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdFurnace.java b/src/main/java/wile/engineersdecor/blocks/EdFurnace.java index 796028f..35564a0 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdFurnace.java +++ b/src/main/java/wile/engineersdecor/blocks/EdFurnace.java @@ -52,7 +52,7 @@ import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fmllegacy.hooks.BasicEventHooks; +import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.registries.ForgeRegistries; @@ -385,8 +385,8 @@ public class EdFurnace { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() @@ -651,7 +651,7 @@ public class EdFurnace public float getCurrentSmeltingXp(final ItemStack stack) { - float xp = (currentRecipe() instanceof AbstractCookingRecipe) ? (((AbstractCookingRecipe)currentRecipe()).getExperience()) : (stack.getItem().getSmeltingExperience(stack)); + float xp = (currentRecipe() instanceof AbstractCookingRecipe) ? (((AbstractCookingRecipe)currentRecipe()).getExperience()) : (0); return (xp <= 0) ? 0.7f : xp; // default value for recipes without defined xp } @@ -717,7 +717,7 @@ public class EdFurnace } } removeCount = 0; - BasicEventHooks.firePlayerSmeltedEvent(player_, stack); + ForgeEventFactory.firePlayerSmeltedEvent(player_, stack); } } diff --git a/src/main/java/wile/engineersdecor/blocks/EdHatchBlock.java b/src/main/java/wile/engineersdecor/blocks/EdHatchBlock.java index 86c91b5..dbc8407 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdHatchBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdHatchBlock.java @@ -90,7 +90,7 @@ public class EdHatchBlock extends StandardBlocks.HorizontalWaterLoggable } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/blocks/EdHopper.java b/src/main/java/wile/engineersdecor/blocks/EdHopper.java index ac294eb..8926afd 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdHopper.java +++ b/src/main/java/wile/engineersdecor/blocks/EdHopper.java @@ -273,8 +273,8 @@ public class EdHopper { super.load(nbt); readnbt(nbt, false); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt, false); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt, false); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdHorizontalSupportBlock.java b/src/main/java/wile/engineersdecor/blocks/EdHorizontalSupportBlock.java index 479f6ac..b8f78da 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdHorizontalSupportBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdHorizontalSupportBlock.java @@ -89,7 +89,7 @@ public class EdHorizontalSupportBlock extends StandardBlocks.WaterLoggable { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/blocks/EdLabeledCrate.java b/src/main/java/wile/engineersdecor/blocks/EdLabeledCrate.java index c6f3b3e..b369491 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdLabeledCrate.java +++ b/src/main/java/wile/engineersdecor/blocks/EdLabeledCrate.java @@ -41,7 +41,7 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.common.util.Constants; +import net.minecraft.nbt.Tag; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; @@ -188,13 +188,12 @@ public class EdLabeledCrate } } int num_free_slots = LabeledCrateTileEntity.ITEMFRAME_SLOTNO - num_used_slots; - String[] lines = Auxiliaries.localize(getDescriptionId()+".tip", new Object[] { + String[] lines = Auxiliaries.localize(getDescriptionId()+".tip", (frameStack.isEmpty() ? (new TextComponent("-/-")) : (new TranslatableComponent(frameStack.getDescriptionId()))), num_used_slots, num_free_slots, total_items, - stats - }).split("\n"); + stats).split("\n"); for(String line:lines) { tooltip.add(new TextComponent(line.trim())); } @@ -238,7 +237,7 @@ public class EdLabeledCrate public CompoundTag readnbt(CompoundTag nbt) { - if(nbt.contains("name", Constants.NBT.TAG_STRING)) custom_name_ = Auxiliaries.unserializeTextComponent(nbt.getString("name")); + if(nbt.contains("name", Tag.TAG_STRING)) custom_name_ = Auxiliaries.unserializeTextComponent(nbt.getString("name")); main_inventory_.load(nbt); return nbt; } @@ -278,8 +277,8 @@ public class EdLabeledCrate { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() @@ -295,11 +294,11 @@ public class EdLabeledCrate @Override @Nullable public ClientboundBlockEntityDataPacket getUpdatePacket() - { return new ClientboundBlockEntityDataPacket(worldPosition, 1, getUpdateTag()); } + { return ClientboundBlockEntityDataPacket.create(this); } @Override public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) // on client - { readnbt(pkt.getTag()); super.onDataPacket(net, pkt); } + { super.onDataPacket(net, pkt); if(pkt.getTag() != null) { readnbt(pkt.getTag()); } } @Override public void handleUpdateTag(CompoundTag tag) // on client diff --git a/src/main/java/wile/engineersdecor/blocks/EdLadderBlock.java b/src/main/java/wile/engineersdecor/blocks/EdLadderBlock.java index 558ff78..b39b14d 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdLadderBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdLadderBlock.java @@ -83,7 +83,7 @@ public class EdLadderBlock extends LadderBlock implements StandardBlocks.IStanda { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/blocks/EdMilker.java b/src/main/java/wile/engineersdecor/blocks/EdMilker.java index 11c2836..0bce06c 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdMilker.java +++ b/src/main/java/wile/engineersdecor/blocks/EdMilker.java @@ -282,8 +282,8 @@ public class EdMilker { super.load(nbt); readnbt(nbt, false); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt, false); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt, false); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java b/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java index 4346d55..fc9c47a 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java +++ b/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java @@ -367,8 +367,8 @@ public class EdMineralSmelter { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdPipeValve.java b/src/main/java/wile/engineersdecor/blocks/EdPipeValve.java index 0686bd5..96c37e0 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdPipeValve.java +++ b/src/main/java/wile/engineersdecor/blocks/EdPipeValve.java @@ -142,7 +142,7 @@ public class EdPipeValve BlockPos nbp = pos.relative(f); if((fromPos != null) && (!nbp.equals(fromPos))) continue; // do not change connectors except form the frompos. BlockState nbs = world.getBlockState(nbp); - if((nbs.getBlock() instanceof PipeValveBlock) || (!nbs.isSignalSource()) && (RsSignals.hasSignalConnector(nbs, world, nbp, f.getOpposite()))) cn = false; + if((nbs.getBlock() instanceof PipeValveBlock) || (!nbs.isSignalSource()) || (!RsSignals.hasSignalConnector(nbs, world, nbp, f.getOpposite()))) cn = false; } switch (f) { case NORTH -> state = state.setValue(RS_CN_N, cn); diff --git a/src/main/java/wile/engineersdecor/blocks/EdPlacer.java b/src/main/java/wile/engineersdecor/blocks/EdPlacer.java index f95aa0a..b27cacb 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdPlacer.java +++ b/src/main/java/wile/engineersdecor/blocks/EdPlacer.java @@ -260,8 +260,8 @@ public class EdPlacer { super.load(nbt); readnbt(nbt, false); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt, false); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt, false); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java b/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java index 8ef6335..50596de 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java @@ -99,7 +99,7 @@ public class EdRoofBlock extends StandardBlocks.HorizontalWaterLoggable @Override public BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor world, BlockPos pos, BlockPos facingPos) { - if(state.getValue(WATERLOGGED)) world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); + if(state.getValue(WATERLOGGED)) world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); return (facing.getAxis().isHorizontal()) ? (state.setValue(SHAPE, getStairsShapeProperty(state, world, pos))) : (super.updateShape(state, facing, facingState, world, pos, facingPos)); } diff --git a/src/main/java/wile/engineersdecor/blocks/EdSolarPanel.java b/src/main/java/wile/engineersdecor/blocks/EdSolarPanel.java index dc5ab96..0081349 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdSolarPanel.java +++ b/src/main/java/wile/engineersdecor/blocks/EdSolarPanel.java @@ -152,8 +152,8 @@ public class EdSolarPanel { super.load(nbt); readnbt(nbt, false); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt, false); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt, false); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdTestBlock.java b/src/main/java/wile/engineersdecor/blocks/EdTestBlock.java index 148da1f..8cc3450 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdTestBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdTestBlock.java @@ -166,7 +166,7 @@ public class EdTestBlock } @Override - public CompoundTag save(CompoundTag nbt) + protected void saveAdditional(CompoundTag nbt) { super.save(nbt); tank_.save(nbt); @@ -186,7 +186,6 @@ public class EdTestBlock nbt.putInt("items_inserted_total", items_inserted_total); if(!liq_fill_stack.isEmpty()) nbt.put("liq_fill_stack", liq_fill_stack.writeToNBT(new CompoundTag())); if(!insertion_item.isEmpty()) nbt.put("insertion_item", insertion_item.save(new CompoundTag())); - return nbt; } private FluidStack getFillFluid(ItemStack stack) diff --git a/src/main/java/wile/engineersdecor/blocks/EdTreeCutter.java b/src/main/java/wile/engineersdecor/blocks/EdTreeCutter.java index 9b6f0d9..10f2f45 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdTreeCutter.java +++ b/src/main/java/wile/engineersdecor/blocks/EdTreeCutter.java @@ -173,8 +173,8 @@ public class EdTreeCutter { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); writenbt(nbt); return nbt; } + protected void saveAdditional(CompoundTag nbt) + { super.save(nbt); writenbt(nbt); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/blocks/EdWasteIncinerator.java b/src/main/java/wile/engineersdecor/blocks/EdWasteIncinerator.java index a7a42df..7e92b6b 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdWasteIncinerator.java +++ b/src/main/java/wile/engineersdecor/blocks/EdWasteIncinerator.java @@ -223,8 +223,8 @@ public class EdWasteIncinerator { super.load(nbt); readnbt(nbt); } @Override - public CompoundTag save(CompoundTag nbt) - { super.save(nbt); return writenbt(nbt); } + protected void saveAdditional(CompoundTag nbt) + { writenbt(nbt); } @Override public void setRemoved() diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/SlabSliceBlock.java b/src/main/java/wile/engineersdecor/libmc/blocks/SlabSliceBlock.java index ddea22b..9fbaf2a 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/SlabSliceBlock.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/SlabSliceBlock.java @@ -99,7 +99,7 @@ public class SlabSliceBlock extends StandardBlocks.WaterLoggable implements Stan { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/StandardBlocks.java b/src/main/java/wile/engineersdecor/libmc/blocks/StandardBlocks.java index 1fba03d..87836ce 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/StandardBlocks.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/StandardBlocks.java @@ -244,7 +244,7 @@ public class StandardBlocks public BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor world, BlockPos pos, BlockPos facingPos) { if((config & CFG_WATERLOGGABLE)!=0) { - if(state.getValue(WATERLOGGED)) world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); + if(state.getValue(WATERLOGGED)) world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); } return state; } @@ -311,7 +311,7 @@ public class StandardBlocks { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/StandardDoorBlock.java b/src/main/java/wile/engineersdecor/libmc/blocks/StandardDoorBlock.java index 9c3e114..3a13603 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/StandardDoorBlock.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/StandardDoorBlock.java @@ -134,7 +134,7 @@ public class StandardDoorBlock extends DoorBlock implements StandardBlocks.IStan { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/StandardFenceBlock.java b/src/main/java/wile/engineersdecor/libmc/blocks/StandardFenceBlock.java index f15d1e8..baa910a 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/StandardFenceBlock.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/StandardFenceBlock.java @@ -171,7 +171,7 @@ public class StandardFenceBlock extends WallBlock implements StandardBlocks.ISta @Override public BlockState updateShape(BlockState state, Direction side, BlockState facingState, LevelAccessor world, BlockPos pos, BlockPos facingPos) { - if(state.getValue(BlockStateProperties.WATERLOGGED)) world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); + if(state.getValue(BlockStateProperties.WATERLOGGED)) world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); if(side == Direction.DOWN) return super.updateShape(state, side, facingState, world, pos, facingPos); boolean n = (side==Direction.NORTH) ? attachesTo(facingState, world, facingPos, side) : (state.getValue(WALL_NORTH)!=WallSide.NONE); boolean e = (side==Direction.EAST) ? attachesTo(facingState, world, facingPos, side) : (state.getValue(WALL_EAST) !=WallSide.NONE); @@ -186,7 +186,7 @@ public class StandardFenceBlock extends WallBlock implements StandardBlocks.ISta } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/StandardStairsBlock.java b/src/main/java/wile/engineersdecor/libmc/blocks/StandardStairsBlock.java index 5113e9f..d771060 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/StandardStairsBlock.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/StandardStairsBlock.java @@ -47,7 +47,7 @@ public class StandardStairsBlock extends StairBlock implements StandardBlocks.IS { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/VariantSlabBlock.java b/src/main/java/wile/engineersdecor/libmc/blocks/VariantSlabBlock.java index fcfb94c..d9217fc 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/VariantSlabBlock.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/VariantSlabBlock.java @@ -97,7 +97,7 @@ public class VariantSlabBlock extends StandardBlocks.WaterLoggable implements St { return false; } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/blocks/VariantWallBlock.java b/src/main/java/wile/engineersdecor/libmc/blocks/VariantWallBlock.java index 1846a8f..84c5f74 100644 --- a/src/main/java/wile/engineersdecor/libmc/blocks/VariantWallBlock.java +++ b/src/main/java/wile/engineersdecor/libmc/blocks/VariantWallBlock.java @@ -168,7 +168,7 @@ public class VariantWallBlock extends WallBlock implements StandardBlocks.IStand @Override public BlockState updateShape(BlockState state, Direction side, BlockState facingState, LevelAccessor world, BlockPos pos, BlockPos facingPos) { - if(state.getValue(WATERLOGGED)) world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); + if(state.getValue(WATERLOGGED)) world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); if(side == Direction.DOWN) return super.updateShape(state, side, facingState, world, pos, facingPos); boolean n = (side==Direction.NORTH) ? this.attachesTo(facingState, world, facingPos, side) : state.getValue(WALL_NORTH)!=WallSide.NONE; boolean e = (side==Direction.EAST) ? this.attachesTo(facingState, world, facingPos, side) : state.getValue(WALL_EAST)!=WallSide.NONE; @@ -184,7 +184,7 @@ public class VariantWallBlock extends WallBlock implements StandardBlocks.IStand } @Override - public boolean canCreatureSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) + public boolean isValidSpawn(BlockState state, BlockGetter world, BlockPos pos, SpawnPlacements.Type type, @Nullable EntityType entityType) { return false; } @Override diff --git a/src/main/java/wile/engineersdecor/libmc/detail/Fluidics.java b/src/main/java/wile/engineersdecor/libmc/detail/Fluidics.java index 65b4437..6cc2d15 100644 --- a/src/main/java/wile/engineersdecor/libmc/detail/Fluidics.java +++ b/src/main/java/wile/engineersdecor/libmc/detail/Fluidics.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.common.util.Constants; +import net.minecraft.nbt.Tag; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidActionResult; import net.minecraftforge.fluids.FluidStack; @@ -93,7 +93,7 @@ public class Fluidics public Tank load(CompoundTag nbt) { - if(nbt.contains("tank", Constants.NBT.TAG_COMPOUND)) { + if(nbt.contains("tank", Tag.TAG_COMPOUND)) { setFluid(FluidStack.loadFluidStackFromNBT(nbt.getCompound("tank"))); } else { clear(); diff --git a/src/main/java/wile/engineersdecor/libmc/detail/Inventories.java b/src/main/java/wile/engineersdecor/libmc/detail/Inventories.java index 53091d6..34015cb 100644 --- a/src/main/java/wile/engineersdecor/libmc/detail/Inventories.java +++ b/src/main/java/wile/engineersdecor/libmc/detail/Inventories.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.util.Constants; +import net.minecraft.nbt.Tag; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; @@ -798,7 +798,6 @@ public class Inventories stacks_ = NonNullList.withSize(size_, ItemStack.EMPTY); num_rows_ = Mth.clamp(num_rows, 1, size_); } - public CompoundTag save(CompoundTag nbt, String key) { nbt.put(key, save(new CompoundTag(), false)); return nbt; } @@ -813,7 +812,7 @@ public class Inventories public StorageInventory load(CompoundTag nbt, String key) { - if(!nbt.contains("key", Constants.NBT.TAG_COMPOUND)) { + if(!nbt.contains("key", Tag.TAG_COMPOUND)) { stacks_.clear(); return this; } else { diff --git a/src/main/java/wile/engineersdecor/libmc/detail/Networking.java b/src/main/java/wile/engineersdecor/libmc/detail/Networking.java index 121f986..bcde6ee 100644 --- a/src/main/java/wile/engineersdecor/libmc/detail/Networking.java +++ b/src/main/java/wile/engineersdecor/libmc/detail/Networking.java @@ -20,10 +20,10 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fmllegacy.network.NetworkEvent; -import net.minecraftforge.fmllegacy.network.NetworkDirection; -import net.minecraftforge.fmllegacy.network.NetworkRegistry; -import net.minecraftforge.fmllegacy.network.simple.SimpleChannel; +import net.minecraftforge.network.NetworkEvent; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkRegistry; +import net.minecraftforge.network.simple.SimpleChannel; import java.util.function.BiConsumer; import java.util.function.Supplier; @@ -138,6 +138,7 @@ public class Networking public static void handle(final PacketTileNotifyServerToClient pkt, final Supplier ctx) { ctx.get().enqueueWork(() -> { + if((pkt.nbt==null) || (pkt.pos==null)) return; Level world = SidedProxy.getWorldClientSide(); if(world == null) return; final BlockEntity te = world.getBlockEntity(pkt.pos); diff --git a/src/main/java/wile/engineersdecor/libmc/ui/Guis.java b/src/main/java/wile/engineersdecor/libmc/ui/Guis.java index 274bf8c..d8a9ee7 100644 --- a/src/main/java/wile/engineersdecor/libmc/ui/Guis.java +++ b/src/main/java/wile/engineersdecor/libmc/ui/Guis.java @@ -173,7 +173,7 @@ public class Guis public void renderButton(PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) { super.renderButton(matrixStack, mouseX, mouseY, partialTicks); - if(isHovered()) renderToolTip(matrixStack, mouseX, mouseY); + if(isHovered) renderToolTip(matrixStack, mouseX, mouseY); } @Override diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index bccce89..51d2670 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,7 +1,7 @@ # @file mods.toml # @spec TOML v0.5.0 (https://github.com/toml-lang/toml) modLoader="javafml" -loaderVersion="[37,)" +loaderVersion="[39,)" issueTrackerURL="https://github.com/stfwi/engineers-decor/issues/" license="MIT" @@ -19,13 +19,13 @@ logoFile="logo.png" [[dependencies.engineersdecor]] modId="forge" mandatory=true - versionRange="[37.0.82,)" + versionRange="[39,)" ordering="NONE" side="BOTH" [[dependencies.engineersdecor]] modId="minecraft" mandatory=true - versionRange="[1.17.1,1.18)" + versionRange="[1.18.1,1.19)" ordering="NONE" side="BOTH" diff --git a/src/main/resources/data/engineersdecor/recipes/independent/dark_shingle_roof_recipe.json b/src/main/resources/data/engineersdecor/recipes/independent/dark_shingle_roof_recipe.json index 42d7098..8604f06 100644 --- a/src/main/resources/data/engineersdecor/recipes/independent/dark_shingle_roof_recipe.json +++ b/src/main/resources/data/engineersdecor/recipes/independent/dark_shingle_roof_recipe.json @@ -11,16 +11,16 @@ "recipe": { "type": "minecraft:crafting_shaped", "pattern": [ - "B ", - "BB ", - "DBB" + "D ", + "BD ", + "BBD" ], "key": { "B": { "item": "minecraft:brick" }, "D": { - "item": "minecraft:black_dye" + "item": "minecraft:deepslate_tile_stairs" } }, "result": {