Skip to content

Commit

Permalink
Update to 24w19b
Browse files Browse the repository at this point in the history
  • Loading branch information
DrexHD committed May 11, 2024
1 parent 8443ab7 commit f3428d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[versions]
minecraft = "24w18a"
yarn-mappings = "24w18a+build.1"
minecraft = "24w19b"
yarn-mappings = "24w19b+build.3"
fabric-loader = "0.15.11"

fabric-api = "0.97.8+1.20.6"
fabric-api = "0.98.1+1.21"

# Kotlin
kotlin = "1.9.23"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.github.quiltservertools.ledger.callbacks.BlockPlaceCallback;
import com.github.quiltservertools.ledger.utility.Sources;
import net.minecraft.block.BlockState;
import net.minecraft.class_9699;
import net.minecraft.class_9730;
import net.minecraft.enchantment.EnchantmentEffectContext;
import net.minecraft.enchantment.effect.entity.ReplaceDiscEnchantmentEffectType;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.server.world.ServerWorld;
Expand All @@ -15,10 +15,10 @@
import org.spongepowered.asm.mixin.injection.ModifyArgs;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;

@Mixin(class_9730.class)
@Mixin(ReplaceDiscEnchantmentEffectType.class)
public abstract class FrostWalkerEnchantmentMixin {
@ModifyArgs(method = "method_60220", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z"))
private void logFrostWalkerPlacement(Args args, ServerWorld world, int level, class_9699 arg, Entity entity, Vec3d vec3d) {
@ModifyArgs(method = "apply", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z"))
private void logFrostWalkerPlacement(Args args, ServerWorld world, int level, EnchantmentEffectContext context, Entity entity, Vec3d vec3d) {
// Frosted ice block is hardcoded in target class
BlockPos pos = args.get(0);
BlockState state = args.get(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.minecraft.block.BlockState;
import net.minecraft.block.LecternBlock;
import net.minecraft.block.entity.LecternBlockEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
Expand All @@ -21,7 +21,7 @@
@Mixin(LecternBlock.class)
public class LecternBlockMixin {
@Inject(method = "putBook", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;playSound(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/sound/SoundEvent;Lnet/minecraft/sound/SoundCategory;FF)V"))
private static void logPutBook(Entity user, World world, BlockPos pos, BlockState state, ItemStack stack, CallbackInfo ci) {
private static void logPutBook(LivingEntity user, World world, BlockPos pos, BlockState state, ItemStack stack, CallbackInfo ci) {
LecternBlockEntity blockEntity = (LecternBlockEntity) world.getBlockEntity(pos);
if (blockEntity == null) return;
ItemInsertCallback.EVENT.invoker().insert(blockEntity.getBook(), pos, (ServerWorld) world, Sources.PLAYER, (ServerPlayerEntity) user);
Expand Down

0 comments on commit f3428d4

Please sign in to comment.