Skip to content

Commit

Permalink
port to 24w38a (Broken FAPI)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakura-ryoko committed Sep 18, 2024
1 parent 8c4eff7 commit 7724826
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ mod_version = 0.24.999-snap

# Required malilib version
malilib_version = 0.20.999-snap
malilib_id = 1dea626577
malilib_id = bf95408969

# Minecraft, Fabric Loader and API and mappings versions
minecraft_version_out = 24w37a
minecraft_version = 24w37a
mappings_version = 24w37a+build.5
minecraft_version_out = 24w38a
minecraft_version = 24w38a
mappings_version = 24w38a+build.4

fabric_loader_version = 0.16.5
mod_menu_version = 12.0.0-alpha.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package fi.dy.masa.itemscroller.mixin;

import net.minecraft.client.MinecraftClient;
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
import net.minecraft.screen.ScreenHandler;
import fi.dy.masa.itemscroller.util.ClickPacketBuffer;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.ClientPlayerInteractionManager;
import net.minecraft.network.packet.Packet;
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.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.ClientPlayerInteractionManager;
import net.minecraft.network.packet.Packet;
import fi.dy.masa.itemscroller.util.ClickPacketBuffer;

@Mixin(ClientPlayerInteractionManager.class)
public class MixinClientPlayerInteractionManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
@Mixin(net.minecraft.screen.CraftingScreenHandler.class)
public abstract class MixinCraftingScreenHandler
{
//@Shadow @Final private RecipeInputInventory craftingInventory;
//@Shadow @Final private net.minecraft.inventory.CraftingResultInventory craftingResultInventory;
@Shadow @Final private net.minecraft.entity.player.PlayerEntity player;

@Inject(method = "onContentChanged", at = @At("RETURN"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@
@Mixin(RecipeBookWidget.class)
public class MixinRecipeBookWidget
{
//@Shadow @Final protected RecipeBookGhostSlots ghostSlots;

/*
@Inject(method = "method_62024", at = @At("HEAD"), cancellable = true)
private void onSlotClicked(RecipeResultCollection par1, RecipeFinder par2, RecipeBook par3, CallbackInfo ci)
{
if (InventoryUtils.dontUpdateRecipeBook > 0)
{
ci.cancel();
}
}
*/

@Inject(method = "update", at = @At("HEAD"), cancellable = true)
private void onUpdate(CallbackInfo ci)
{
Expand All @@ -32,18 +19,4 @@ private void onUpdate(CallbackInfo ci)
ci.cancel();
}
}

// Seems to be (intended) bug from Mojang
/*
@Inject(
method = "showGhostRecipe",
at = @At("HEAD"),
cancellable = true
)
private void onShowGhostRecipe(GhostRecipe ghostRecipe, RecipeEntry<?> entry, CallbackInfo ci) {
if (this.ghostSlots.getRecipe() == recipe) {
ci.cancel();
}
}
*/
}

0 comments on commit 7724826

Please sign in to comment.