From 10a51dcd5eb25d4836b3c9a9c9c9c0ca6c43200e Mon Sep 17 00:00:00 2001 From: Jonas_Jones <91549607+J-onasJones@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:40:19 +0200 Subject: [PATCH] port to 1.20.x --- gradle.properties | 14 +++++++------- .../me/jonasjones/nec/block/ModBlocks.java | 18 +++++++++--------- src/main/resources/fabric.mod.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gradle.properties b/gradle.properties index ca27954..2567c5f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,14 +4,14 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.19.4 - yarn_mappings=1.19.4+build.1 - loader_version=0.14.17 +minecraft_version=1.20 +yarn_mappings=1.20+build.1 +loader_version=0.14.22 # Mod Properties - mod_version = 0.2.0-1.19.4 - maven_group = me.jonasjones - archives_base_name = not-enough-cursedness +mod_version = 0.2.0-1.20.x +maven_group = me.jonasjones +archives_base_name = not-enough-cursedness # Dependencies - fabric_version=0.76.0+1.19.4 +fabric_version=0.83.0+1.20 diff --git a/src/main/java/me/jonasjones/nec/block/ModBlocks.java b/src/main/java/me/jonasjones/nec/block/ModBlocks.java index 78e5e27..71582d6 100644 --- a/src/main/java/me/jonasjones/nec/block/ModBlocks.java +++ b/src/main/java/me/jonasjones/nec/block/ModBlocks.java @@ -7,20 +7,20 @@ import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.BlockItem; import net.minecraft.world.level.block.*; -import net.minecraft.world.level.material.Material; +import net.minecraft.client.resources.model.Material; import static me.jonasjones.nec.NotEnoughCursedness.MOD_ID; import static net.minecraft.core.registries.BuiltInRegistries.BLOCK; import static net.minecraft.core.registries.BuiltInRegistries.ITEM; public class ModBlocks { - public static final Block GREEN_BIRCH_LOG = new RotatedPillarBlock(FabricBlockSettings.of(Material.WOOD).strength(4.0f)); - public static final Block BLAZE_BLOCK = new Block(FabricBlockSettings.of(Material.STONE).strength(4.0F)); - public static final Block GUN_BLOCK = new Block(FabricBlockSettings.of(Material.STONE).strength(4.0F)); - public static final Block DIAMOND_ORE_ORE = new Block(FabricBlockSettings.of(Material.STONE).strength(4.0F)); - public static final Block DEEPSLATE_DIAMOND_ORE_ORE = new Block(FabricBlockSettings.of(Material.STONE).strength(4.0F)); - public static final Block JAVA_BLOCK = new Block(FabricBlockSettings.of(Material.STONE).strength(5.0F)); - public static final Block POCKET_BLOCK = new Block(FabricBlockSettings.of(Material.STONE).strength(5.0F)); + public static final Block GREEN_BIRCH_LOG = new RotatedPillarBlock(FabricBlockSettings.copyOf(Blocks.BIRCH_LOG).strength(4.0f)); + public static final Block BLAZE_BLOCK = new Block(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).strength(4.0F)); + public static final Block GUN_BLOCK = new Block(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).strength(4.0F)); + public static final Block DIAMOND_ORE_ORE = new Block(FabricBlockSettings.copyOf(Blocks.DIAMOND_ORE).strength(4.0F)); + public static final Block DEEPSLATE_DIAMOND_ORE_ORE = new Block(FabricBlockSettings.copyOf(Blocks.DEEPSLATE_DIAMOND_ORE).strength(4.0F)); + public static final Block JAVA_BLOCK = new Block(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).strength(5.0F)); + public static final Block POCKET_BLOCK = new Block(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).strength(5.0F)); public static Block FLETCHING_STAIRS_BLOCK = null; private static BlockItem GUN_BLOCK_ITEM; private static Block GUN_BLOCK_BLOCK; @@ -71,7 +71,7 @@ public class ModBlocks { POCKET_BLOCK_ITEM = Registry.register(ITEM, new ResourceLocation(MOD_ID, "pocket_block"), new BlockItem(POCKET_BLOCK, new FabricItemSettings())); ModRegistries.register_item(POCKET_BLOCK_ITEM); - FLETCHING_STAIRS_BLOCK = new StairBlock(GREEEN_BIRCH_LOG_BLOCK.defaultBlockState(), FabricBlockSettings.of(Material.WOOD).strength(1.0F)); + FLETCHING_STAIRS_BLOCK = new StairBlock(GREEEN_BIRCH_LOG_BLOCK.defaultBlockState(), FabricBlockSettings.copyOf(Blocks.OAK_STAIRS).strength(1.0F)); FLETCHING_STAIRS_BLOCK_BLOCK = Registry.register(BLOCK, new ResourceLocation(MOD_ID, "fletching_stairs"), FLETCHING_STAIRS_BLOCK); FLETCHING_STAIRS_TIEM = Registry.register(ITEM, new ResourceLocation(MOD_ID, "fletching_stairs"), new BlockItem(FLETCHING_STAIRS_BLOCK, new FabricItemSettings())); ModRegistries.register_item(FLETCHING_STAIRS_TIEM); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 193c972..23c914c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -30,7 +30,7 @@ "depends": { "fabricloader": ">=0.14.17", "fabric-api": "*", - "minecraft": "~1.19.4", + "minecraft": ">=1.20", "java": ">=17" }, "suggests": {