From e5f211965c2cfe4610883cf917e336ea59bfcc40 Mon Sep 17 00:00:00 2001 From: gniftygnome Date: Wed, 8 Nov 2023 18:41:19 -0800 Subject: [PATCH] Update to 23w45a. --- build.gradle | 8 +------ .../traverse/block/TraverseBlocks.java | 23 ++++++++++--------- .../sapling/TraverseSaplingGenerator.java | 20 ---------------- gradle.properties | 20 ++++++++-------- 4 files changed, 23 insertions(+), 48 deletions(-) delete mode 100644 common/src/main/java/com/terraformersmc/traverse/block/sapling/TraverseSaplingGenerator.java diff --git a/build.gradle b/build.gradle index 2f96b1a..cdf0e28 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,7 @@ plugins { id 'maven-publish' id 'idea' id 'eclipse' - id 'fabric-loom' version '1.3.+' - id 'io.github.juuxel.loom-vineflower' version '1.11.0' + id 'fabric-loom' version '1.4.+' } apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.6/ferry.gradle' @@ -41,7 +40,6 @@ allprojects { apply plugin: 'eclipse' apply plugin: 'maven-publish' apply plugin: 'fabric-loom' - apply plugin: 'io.github.juuxel.loom-vineflower' sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 @@ -55,10 +53,6 @@ allprojects { } } - vineflower { - addToRuntimeClasspath.set(true) - } - configurations { dev { canBeResolved = false diff --git a/common/src/main/java/com/terraformersmc/traverse/block/TraverseBlocks.java b/common/src/main/java/com/terraformersmc/traverse/block/TraverseBlocks.java index 7aea5ba..dc26606 100644 --- a/common/src/main/java/com/terraformersmc/traverse/block/TraverseBlocks.java +++ b/common/src/main/java/com/terraformersmc/traverse/block/TraverseBlocks.java @@ -6,7 +6,6 @@ import com.terraformersmc.terraform.sign.block.TerraformWallSignBlock; import com.terraformersmc.terraform.wood.block.PillarLogHelper; import com.terraformersmc.traverse.Traverse; -import com.terraformersmc.traverse.block.sapling.TraverseSaplingGenerator; import com.terraformersmc.traverse.feature.TraverseConfiguredFeatures; import com.terraformersmc.traverse.init.helpers.TraverseRegistry; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; @@ -18,6 +17,8 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; +import java.util.Optional; + public class TraverseBlocks { public static Block RED_AUTUMNAL_LEAVES; public static Block RED_AUTUMNAL_SAPLING; @@ -58,16 +59,16 @@ public class TraverseBlocks { public static void register() { RED_AUTUMNAL_LEAVES = TraverseRegistry.register("red_autumnal_leaves", new LeavesBlock(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES).mapColor(MapColor.TERRACOTTA_RED).allowsSpawning(TraverseBlocks::canSpawnOnLeaves).suffocates(TraverseBlocks::never).blockVision(TraverseBlocks::never))); - RED_AUTUMNAL_SAPLING = TraverseRegistry.register("red_autumnal_sapling", new SaplingBlock(new TraverseSaplingGenerator(() -> TraverseConfiguredFeatures.RED_AUTUMNAL_TREE), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_RED))); + RED_AUTUMNAL_SAPLING = TraverseRegistry.register("red_autumnal_sapling", new SaplingBlock(new SaplingGenerator("red_autumnal", Optional.empty(), Optional.of(TraverseConfiguredFeatures.RED_AUTUMNAL_TREE), Optional.empty()), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_RED))); BROWN_AUTUMNAL_LEAVES = TraverseRegistry.register("brown_autumnal_leaves", new LeavesBlock(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES).mapColor(MapColor.TERRACOTTA_BROWN).allowsSpawning(TraverseBlocks::canSpawnOnLeaves).suffocates(TraverseBlocks::never).blockVision(TraverseBlocks::never))); - BROWN_AUTUMNAL_SAPLING = TraverseRegistry.register("brown_autumnal_sapling", new SaplingBlock(new TraverseSaplingGenerator(() -> TraverseConfiguredFeatures.BROWN_AUTUMNAL_TREE), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_BROWN))); + BROWN_AUTUMNAL_SAPLING = TraverseRegistry.register("brown_autumnal_sapling", new SaplingBlock(new SaplingGenerator("brown_autumnal", Optional.empty(), Optional.of(TraverseConfiguredFeatures.BROWN_AUTUMNAL_TREE), Optional.empty()), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_BROWN))); ORANGE_AUTUMNAL_LEAVES = TraverseRegistry.register("orange_autumnal_leaves", new LeavesBlock(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES).mapColor(MapColor.TERRACOTTA_ORANGE).allowsSpawning(TraverseBlocks::canSpawnOnLeaves).suffocates(TraverseBlocks::never).blockVision(TraverseBlocks::never))); - ORANGE_AUTUMNAL_SAPLING = TraverseRegistry.register("orange_autumnal_sapling", new SaplingBlock(new TraverseSaplingGenerator(() -> TraverseConfiguredFeatures.ORANGE_AUTUMNAL_TREE), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_ORANGE))); + ORANGE_AUTUMNAL_SAPLING = TraverseRegistry.register("orange_autumnal_sapling", new SaplingBlock(new SaplingGenerator("orange_autumnal", Optional.empty(), Optional.of(TraverseConfiguredFeatures.ORANGE_AUTUMNAL_TREE), Optional.empty()), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_ORANGE))); YELLOW_AUTUMNAL_LEAVES = TraverseRegistry.register("yellow_autumnal_leaves", new LeavesBlock(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES).mapColor(MapColor.TERRACOTTA_YELLOW).allowsSpawning(TraverseBlocks::canSpawnOnLeaves).suffocates(TraverseBlocks::never).blockVision(TraverseBlocks::never))); - YELLOW_AUTUMNAL_SAPLING = TraverseRegistry.register("yellow_autumnal_sapling", new SaplingBlock(new TraverseSaplingGenerator(() -> TraverseConfiguredFeatures.YELLOW_AUTUMNAL_TREE), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_YELLOW))); + YELLOW_AUTUMNAL_SAPLING = TraverseRegistry.register("yellow_autumnal_sapling", new SaplingBlock(new SaplingGenerator("yellow_autumnal", Optional.empty(), Optional.of(TraverseConfiguredFeatures.YELLOW_AUTUMNAL_TREE), Optional.empty()), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING).mapColor(MapColor.TERRACOTTA_YELLOW))); FIR_LEAVES = TraverseRegistry.register("fir_leaves", new LeavesBlock(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES).allowsSpawning(TraverseBlocks::canSpawnOnLeaves).suffocates(TraverseBlocks::never).blockVision(TraverseBlocks::never))); - FIR_SAPLING = TraverseRegistry.register("fir_sapling", new SaplingBlock(new TraverseSaplingGenerator(() -> TraverseConfiguredFeatures.FIR_TREE), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING))); + FIR_SAPLING = TraverseRegistry.register("fir_sapling", new SaplingBlock(new SaplingGenerator("fir", Optional.empty(), Optional.of(TraverseConfiguredFeatures.FIR_TREE), Optional.empty()), SaplingBlock.Settings.copy(Blocks.OAK_SAPLING))); FIR_LOG = TraverseRegistry.register("fir_log", PillarLogHelper.of(MapColor.OAK_TAN, MapColor.BROWN)); FIR_WOOD = TraverseRegistry.register("fir_wood", PillarLogHelper.of(MapColor.BROWN)); @@ -75,13 +76,13 @@ public static void register() { STRIPPED_FIR_WOOD = TraverseRegistry.register("stripped_fir_wood", PillarLogHelper.of(MapColor.OAK_TAN)); FIR_PLANKS = TraverseRegistry.register("fir_planks", new Block(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS))); FIR_SLAB = TraverseRegistry.register("fir_slab", new SlabBlock(FabricBlockSettings.copyOf(Blocks.OAK_SLAB))); - FIR_PRESSURE_PLATE = TraverseRegistry.register("fir_pressure_plate", new PressurePlateBlock(PressurePlateBlock.ActivationRule.EVERYTHING, FabricBlockSettings.copyOf(Blocks.OAK_PRESSURE_PLATE), BlockSetType.OAK)); + FIR_PRESSURE_PLATE = TraverseRegistry.register("fir_pressure_plate", new PressurePlateBlock(BlockSetType.OAK, FabricBlockSettings.copyOf(Blocks.OAK_PRESSURE_PLATE))); FIR_FENCE = TraverseRegistry.register("fir_fence", new FenceBlock(FabricBlockSettings.copyOf(Blocks.OAK_FENCE))); - FIR_TRAPDOOR = TraverseRegistry.register("fir_trapdoor", new TrapdoorBlock(FabricBlockSettings.copyOf(Blocks.OAK_TRAPDOOR), BlockSetType.OAK)); - FIR_FENCE_GATE = TraverseRegistry.register("fir_fence_gate", new FenceGateBlock(FabricBlockSettings.copyOf(Blocks.OAK_FENCE_GATE), WoodType.OAK)); + FIR_TRAPDOOR = TraverseRegistry.register("fir_trapdoor", new TrapdoorBlock(BlockSetType.OAK, FabricBlockSettings.copyOf(Blocks.OAK_TRAPDOOR))); + FIR_FENCE_GATE = TraverseRegistry.register("fir_fence_gate", new FenceGateBlock(WoodType.OAK, FabricBlockSettings.copyOf(Blocks.OAK_FENCE_GATE))); FIR_STAIRS = TraverseRegistry.register("fir_stairs", new StairsBlock(FIR_PLANKS.getDefaultState(), FabricBlockSettings.copyOf(Blocks.OAK_STAIRS))); - FIR_BUTTON = TraverseRegistry.register("fir_button", new ButtonBlock(AbstractBlock.Settings.copy(Blocks.OAK_BUTTON), BlockSetType.OAK,30, true)); - FIR_DOOR = TraverseRegistry.register("fir_door", new DoorBlock(FabricBlockSettings.copyOf(Blocks.OAK_DOOR), BlockSetType.OAK)); + FIR_BUTTON = TraverseRegistry.register("fir_button", new ButtonBlock(BlockSetType.OAK, 30, AbstractBlock.Settings.copy(Blocks.OAK_BUTTON))); + FIR_DOOR = TraverseRegistry.register("fir_door", new DoorBlock(BlockSetType.OAK, FabricBlockSettings.copyOf(Blocks.OAK_DOOR))); final Identifier FIR_SIGN_TEXTURE = Identifier.of(Traverse.MOD_ID, "entity/signs/fir"); FIR_SIGN = TraverseRegistry.register("fir_sign", new TerraformSignBlock(FIR_SIGN_TEXTURE, FabricBlockSettings.copyOf(Blocks.OAK_SIGN))); diff --git a/common/src/main/java/com/terraformersmc/traverse/block/sapling/TraverseSaplingGenerator.java b/common/src/main/java/com/terraformersmc/traverse/block/sapling/TraverseSaplingGenerator.java deleted file mode 100644 index 3391cef..0000000 --- a/common/src/main/java/com/terraformersmc/traverse/block/sapling/TraverseSaplingGenerator.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.terraformersmc.traverse.block.sapling; - -import java.util.function.Supplier; - -import net.minecraft.block.sapling.SaplingGenerator; -import net.minecraft.registry.RegistryKey; -import net.minecraft.util.math.random.Random; -import net.minecraft.world.gen.feature.ConfiguredFeature; - -public class TraverseSaplingGenerator extends SaplingGenerator { - public final Supplier>> tree; - - public TraverseSaplingGenerator(Supplier>> tree) { - this.tree = tree; - } - - protected RegistryKey> getTreeFeature(Random random, boolean bees) { - return this.tree.get(); - } -} diff --git a/gradle.properties b/gradle.properties index 1f50902..2e0478b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,21 +4,21 @@ fabric.loom.multiProjectOptimisation=true maven_group=com.terraformersmc archive_name=traverse -minecraft_version=1.20.2 -yarn_mappings=1.20.2+build.1 -loader_version=0.14.22 -terraform_biome_remapper_api_version=8.0.1 -terraform_config_api_version=8.0.1 -terraform_surfaces_api_version=8.0.1 -terraform_tree_api_version=8.0.1 -terraform_wood_api_version=8.0.1 -fabric_version=0.89.1+1.20.2 +minecraft_version=23w45a +yarn_mappings=23w45a+build.1 +loader_version=0.14.24 +terraform_biome_remapper_api_version=9.0.0-alpha.1 +terraform_config_api_version=9.0.0-alpha.1 +terraform_surfaces_api_version=9.0.0-alpha.1 +terraform_tree_api_version=9.0.0-alpha.1 +terraform_wood_api_version=9.0.0-alpha.1 +fabric_version=0.90.8+1.20.3 # Biolith for worldgen module and testing biolith_version=1.1.0-alpha.5 # TerraBlender for worldgen module and testing -terrablender_version=1.20.1-3.0.0.169 +terrablender_version=1.20.2-3.0.0.170 # Project Metadata project_name=Traverse