aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/mixins
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-05 22:14:37 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-05 22:14:37 +0800
commit0ad3f7821fd819b43b58720de6713ed8bb8c9a8d (patch)
tree7d95f69850beb2935856253db1d8515493717d1a /src/main/java/me/shedaniel/mixins
parent927488f904dce7e8667c33d8ca85a52413d8649b (diff)
downloadRoughlyEnoughItems-0ad3f7821fd819b43b58720de6713ed8bb8c9a8d.tar.gz
RoughlyEnoughItems-0ad3f7821fd819b43b58720de6713ed8bb8c9a8d.tar.bz2
RoughlyEnoughItems-0ad3f7821fd819b43b58720de6713ed8bb8c9a8d.zip
Buggy Autocrafting
Diffstat (limited to 'src/main/java/me/shedaniel/mixins')
-rw-r--r--src/main/java/me/shedaniel/mixins/MixinBrewingRecipeRegistry.java2
-rw-r--r--src/main/java/me/shedaniel/mixins/MixinRecipeBookGui.java20
2 files changed, 21 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/mixins/MixinBrewingRecipeRegistry.java b/src/main/java/me/shedaniel/mixins/MixinBrewingRecipeRegistry.java
index bc36c8315..e34a2682e 100644
--- a/src/main/java/me/shedaniel/mixins/MixinBrewingRecipeRegistry.java
+++ b/src/main/java/me/shedaniel/mixins/MixinBrewingRecipeRegistry.java
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(BrewingRecipeRegistry.class)
public class MixinBrewingRecipeRegistry {
- @Inject(method = "registerPotionRecipe", at = @At("RETURN"))
+ @Inject(method = "registerPotionRecipe", at = @At("HEAD"))
private static void registerPotionRecipe(Potion potion_1, Item item_1, Potion potion_2, CallbackInfo info) {
Core.getListeners(PotionCraftingAdder.class).forEach(potionCraftingAdder -> potionCraftingAdder.addPotionRecipe(potion_1, item_1, potion_2));
}
diff --git a/src/main/java/me/shedaniel/mixins/MixinRecipeBookGui.java b/src/main/java/me/shedaniel/mixins/MixinRecipeBookGui.java
new file mode 100644
index 000000000..d685ba1e6
--- /dev/null
+++ b/src/main/java/me/shedaniel/mixins/MixinRecipeBookGui.java
@@ -0,0 +1,20 @@
+package me.shedaniel.mixins;
+
+import me.shedaniel.listenerdefinitions.IMixinRecipeBookGui;
+import net.minecraft.client.gui.recipebook.RecipeBookGui;
+import net.minecraft.client.gui.widget.RecipeBookGhostSlots;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+
+@Mixin(RecipeBookGui.class)
+public class MixinRecipeBookGui implements IMixinRecipeBookGui {
+
+ @Shadow @Final protected RecipeBookGhostSlots ghostSlots;
+
+ @Override
+ public RecipeBookGhostSlots getGhostSlots() {
+ return ghostSlots;
+ }
+
+}