From 19db968c7f9c4928bb59fd558d6d0b3886351cb3 Mon Sep 17 00:00:00 2001 From: gnembon Date: Wed, 6 Apr 2022 22:51:20 +0200 Subject: [PATCH] 22w14a and 1.4.70 --- gradle.properties | 12 ++++++------ src/main/java/carpetextra/CarpetExtraServer.java | 3 ++- .../mixins/CactusBlock_fertilizerMixin.java | 5 +++-- .../java/carpetextra/mixins/FallingBlockMixin.java | 3 ++- .../mixins/FarmerVillagerTask_wartFarmMixin.java | 2 +- .../mixins/LilyPadBlock_fertilizerMixin.java | 5 +++-- .../mixins/SugarCaneBlock_fertilizerMixin.java | 5 +++-- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/gradle.properties b/gradle.properties index cd5c4afe..489dd35f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use or https://modmuss50.me/fabric.html - minecraft_version=22w13a - yarn_mappings=22w13a+build.2 + minecraft_version=22w14a + yarn_mappings=22w14a+build.2 loader_version=0.13.3 # check available versions on maven for the given minecraft version you are using - carpet_core_version=1.4.69+v220331 + carpet_core_version=1.4.70+v220406 # Mod Properties - mod_version = 1.4.69 + mod_version = 1.4.70 maven_group = carpet-extra archives_base_name = carpet-extra @@ -22,7 +22,7 @@ org.gradle.jvmargs=-Xmx1G # The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5) # This is needed because CF uses too vague names for prereleases and release candidates # Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN] - release-curse-versions = 1.19-Snapshot + release-curse-versions = Minecraft 1.19:1.19-Snapshot # Whether or not to build another branch on release release-extra-branch = false # The name of the second branch to release @@ -30,4 +30,4 @@ org.gradle.jvmargs=-Xmx1G # The "name" or id of the Curseforge version for the secondary branch # This is needed because CF uses too vague names for snapshots # Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN] - release-extra-curse-version = 1.19-Snapshot + release-extra-curse-version = Minecraft 1.19:1.19-Snapshot diff --git a/src/main/java/carpetextra/CarpetExtraServer.java b/src/main/java/carpetextra/CarpetExtraServer.java index 1ebd5f69..6605fa27 100644 --- a/src/main/java/carpetextra/CarpetExtraServer.java +++ b/src/main/java/carpetextra/CarpetExtraServer.java @@ -7,6 +7,7 @@ import carpetextra.utils.CarpetExtraTranslations; import com.mojang.brigadier.CommandDispatcher; import net.fabricmc.api.ModInitializer; +import net.minecraft.command.CommandRegistryAccess; import net.minecraft.server.command.ServerCommandSource; import java.util.Map; @@ -39,7 +40,7 @@ public void onGameStarted() } @Override - public void registerCommands(CommandDispatcher dispatcher) + public void registerCommands(CommandDispatcher dispatcher, CommandRegistryAccess commandRegistryAccess) { // here goes extra stuff PingCommand.register(dispatcher); diff --git a/src/main/java/carpetextra/mixins/CactusBlock_fertilizerMixin.java b/src/main/java/carpetextra/mixins/CactusBlock_fertilizerMixin.java index d30f6125..29449b31 100644 --- a/src/main/java/carpetextra/mixins/CactusBlock_fertilizerMixin.java +++ b/src/main/java/carpetextra/mixins/CactusBlock_fertilizerMixin.java @@ -9,6 +9,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; +import net.minecraft.world.gen.random.AbstractRandom; import org.spongepowered.asm.mixin.Mixin; import java.util.Random; @@ -25,13 +26,13 @@ public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, b } @Override - public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) + public boolean canGrow(World world, AbstractRandom random, BlockPos pos, BlockState state) { return true; } @Override - public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) + public void grow(ServerWorld world, AbstractRandom random, BlockPos pos, BlockState state) { int i = this.countCactusAbove(world, pos); BlockPos growPos = pos.up(i + 1); diff --git a/src/main/java/carpetextra/mixins/FallingBlockMixin.java b/src/main/java/carpetextra/mixins/FallingBlockMixin.java index 5af03beb..56c9f28d 100644 --- a/src/main/java/carpetextra/mixins/FallingBlockMixin.java +++ b/src/main/java/carpetextra/mixins/FallingBlockMixin.java @@ -10,6 +10,7 @@ import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.gen.random.AbstractRandom; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -36,7 +37,7 @@ public FallingBlockMixin(Settings block$Settings_1) @SuppressWarnings("ConstantConditions") @Inject(method = "scheduledTick", at = @At("HEAD"), cancellable = true) - private void onTryStartFalling(BlockState blockState_1, ServerWorld serverWorld_1, BlockPos blockPos_1, Random random_1, CallbackInfo ci) + private void onTryStartFalling(BlockState blockState_1, ServerWorld serverWorld_1, BlockPos blockPos_1, AbstractRandom random_1, CallbackInfo ci) { if (CarpetExtraSettings.dragonEggBedrockBreaking && (FallingBlock)(Object)this instanceof DragonEggBlock) { diff --git a/src/main/java/carpetextra/mixins/FarmerVillagerTask_wartFarmMixin.java b/src/main/java/carpetextra/mixins/FarmerVillagerTask_wartFarmMixin.java index d2affb5c..ca44535b 100644 --- a/src/main/java/carpetextra/mixins/FarmerVillagerTask_wartFarmMixin.java +++ b/src/main/java/carpetextra/mixins/FarmerVillagerTask_wartFarmMixin.java @@ -128,7 +128,7 @@ private int plantWart(SimpleInventory basicInventory, ServerWorld serverWorld, V { serverWorld.playSound(null, currentTarget.getX(), currentTarget.getY(), this.currentTarget.getZ(), - SoundEvents.ITEM_NETHER_WART_PLANT, SoundCategory.BLOCKS, 1.0F, 1.0F); + SoundEvents.ITEM_NETHER_WART_PLANT, SoundCategory.BLOCKS, 1.0F, 1.0F, serverWorld.getRandom().nextLong()); itemStack.decrement(1); if (itemStack.isEmpty()) { diff --git a/src/main/java/carpetextra/mixins/LilyPadBlock_fertilizerMixin.java b/src/main/java/carpetextra/mixins/LilyPadBlock_fertilizerMixin.java index 5b0e764e..20a202d5 100644 --- a/src/main/java/carpetextra/mixins/LilyPadBlock_fertilizerMixin.java +++ b/src/main/java/carpetextra/mixins/LilyPadBlock_fertilizerMixin.java @@ -9,6 +9,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; +import net.minecraft.world.gen.random.AbstractRandom; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -24,13 +25,13 @@ public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, b } @Override - public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) + public boolean canGrow(World world, AbstractRandom random, BlockPos pos, BlockState state) { return true; } @Override - public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) + public void grow(ServerWorld world, AbstractRandom random, BlockPos pos, BlockState state) { if(!CarpetExtraSettings.betterBonemeal) return; BlockState blockState = Blocks.LILY_PAD.getDefaultState(); diff --git a/src/main/java/carpetextra/mixins/SugarCaneBlock_fertilizerMixin.java b/src/main/java/carpetextra/mixins/SugarCaneBlock_fertilizerMixin.java index 4f381605..3231e3cb 100644 --- a/src/main/java/carpetextra/mixins/SugarCaneBlock_fertilizerMixin.java +++ b/src/main/java/carpetextra/mixins/SugarCaneBlock_fertilizerMixin.java @@ -6,6 +6,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; +import net.minecraft.world.gen.random.AbstractRandom; import org.spongepowered.asm.mixin.Mixin; import java.util.Random; @@ -22,13 +23,13 @@ public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, b } @Override - public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) + public boolean canGrow(World world, AbstractRandom random, BlockPos pos, BlockState state) { return true; } @Override - public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) + public void grow(ServerWorld world, AbstractRandom random, BlockPos pos, BlockState state) { int i = this.countSugarCaneAbove(world, pos); world.setBlockState(pos.up(i + 1), Blocks.SUGAR_CANE.getDefaultState());