forked from Tfarcenim/FabricFastBench
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/tfar/fastbench/interfaces/RecipeCoercer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package tfar.fastbench.interfaces; | ||
|
||
import net.minecraft.core.RegistryAccess; | ||
import net.minecraft.world.Container; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
/** | ||
* Why support 1.19.4 out of band when you can curse your code? | ||
* | ||
* @author Ampflower | ||
* @since 4.0.1 | ||
**/ | ||
public interface RecipeCoercer<C extends Container> { | ||
default ItemStack method_8116(C container) { | ||
return this.assemble(container); | ||
} | ||
|
||
ItemStack assemble(C container); | ||
|
||
default ItemStack method_8116(C container, RegistryAccess registryAccess) { | ||
return this.method_8116(container); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/tfar/fastbench/mixin/RecipeCoercerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package tfar.fastbench.mixin; | ||
|
||
import net.minecraft.world.Container; | ||
import net.minecraft.world.item.crafting.Recipe; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import tfar.fastbench.interfaces.RecipeCoercer; | ||
|
||
/** | ||
* For 1.19.4 compatibility, the cursed way. | ||
* | ||
* @author Ampflower | ||
* @since 4.0.1 | ||
**/ | ||
@Mixin(Recipe.class) | ||
public interface RecipeCoercerMixin<C extends Container> extends RecipeCoercer<C> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters