Skip to content

Commit

Permalink
Merge branch 'master' into 1.20.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
  • Loading branch information
Treetrain1 committed Dec 15, 2023
2 parents 28131bf + 72df0f8 commit 5902a69
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Put changelog here:
- Adds `SaveToggle` annotation
- Moved all field annotations for config syncing to `EntrySyncData` for easier use
- Fixed a small bug with `Locked When Synced` fields syncing instead of remaining stagnant
- Added an additional tooltip to notify Server Operators and LAN Hosts when a config value will sync
- Moved most packets from channels to `FabricPacket`s
- Added a tooltip to notify Server Operators and LAN Hosts when a config value will sync
- Converted most packets from channels to `FabricPacket`s
- Improved compatibility of Overworld Biome API
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
minecraft_version=1.20.1
quilt_mappings=1.20.1+build.23
parchment_mappings=1.20.1:2023.09.03
loader_version=0.15.1
loader_version=0.15.2

# Mod Properties
mod_version = 1.5.2
Expand All @@ -27,7 +27,7 @@
fabric_api_version=0.91.0+1.20.1
fabric_kotlin_version=1.10.16+kotlin.1.9.21
# https://github.com/LlamaLad7/MixinExtras/releases
mixin_extras_version=0.3.1
mixin_extras_version=0.3.2
toml4j_version=0.7.2
jankson_version=1.2.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public void useBonemeal(UseOnContext context, CallbackInfoReturnable<Interaction
if (BonemealBehaviors.BONEMEAL_BEHAVIORS.get(state.getBlock()).bonemeal(context, level, blockPos, state, direction, horizontal) && !level.isClientSide) {
context.getItemInHand().shrink(1);
info.setReturnValue(InteractionResult.SUCCESS);
info.cancel();
} else {
info.setReturnValue(InteractionResult.sidedSuccess(level.isClientSide));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@
package net.frozenblock.lib.worldgen.biome.mixin;

import java.util.function.Function;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import net.frozenblock.lib.worldgen.biome.impl.OverworldBiomeData;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.Climate;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;


@Mixin(targets = "net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterList$Preset$2", priority = 991)
public class OverworldBiomePresetMixin {

@Inject(method = "apply", at = @At("RETURN"), cancellable = true)
public <T> void apply(Function<ResourceKey<Biome>, T> function, CallbackInfoReturnable<Climate.ParameterList<T>> cir) {
cir.setReturnValue(OverworldBiomeData.withModdedBiomeEntries(cir.getReturnValue(), function));
@ModifyReturnValue(method = "apply", at = @At("RETURN"))
private <T> Climate.ParameterList<T> apply(Climate.ParameterList<T> original, Function<ResourceKey<Biome>, T> function) {
return OverworldBiomeData.withModdedBiomeEntries(original, function);
}
}

0 comments on commit 5902a69

Please sign in to comment.