Skip to content

Commit 4a00049

Browse files
authored
Merge pull request #2 from WitixinForks/1.19
Add modid prefix to mixin methods
2 parents 14d77de + ac88207 commit 4a00049

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/faux/ingredientextension/mixin/MixinIngredient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class MixinIngredient {
3333
* vanilla game.
3434
*/
3535
@Inject(method = "toNetwork", at = @At("HEAD"), cancellable = true)
36-
private void toNetwork(FriendlyByteBuf buf, CallbackInfo ci) {
36+
private void ingredientextensionapi_toNetwork(FriendlyByteBuf buf, CallbackInfo ci) {
3737

3838
final Ingredient self = (Ingredient) (Object) this;
3939

@@ -84,7 +84,7 @@ private void toNetwork(FriendlyByteBuf buf, CallbackInfo ci) {
8484
* vanilla game.
8585
*/
8686
@Inject(method = "fromNetwork", at = @At("HEAD"), cancellable = true)
87-
private static void fromNetwork(FriendlyByteBuf friendlyByteBuf, CallbackInfoReturnable<Ingredient> cir) {
87+
private static void ingredientextensionapi_fromNetwork(FriendlyByteBuf friendlyByteBuf, CallbackInfoReturnable<Ingredient> cir) {
8888

8989
final int marker = friendlyByteBuf.readInt();
9090

@@ -138,7 +138,7 @@ else if (marker != Constants.NETWORK_MARKER_VANILLA) {
138138
* true}.
139139
*/
140140
@Inject(method = "fromJson(Lcom/google/gson/JsonElement;)Lnet/minecraft/world/item/crafting/Ingredient;", at = @At("HEAD"), cancellable = true)
141-
private static void fromJson(JsonElement jsonElement, CallbackInfoReturnable<Ingredient> callback) {
141+
private static void ingredientextensionapi_fromJson(JsonElement jsonElement, CallbackInfoReturnable<Ingredient> callback) {
142142

143143
// Only process JSON objects with a type property.
144144
if (jsonElement instanceof JsonObject jsonObj && jsonObj.has("type")) {

src/main/java/com/faux/ingredientextension/mixin/MixinShapelessRecipe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public abstract class MixinShapelessRecipe {
4040
* characteristics are also comparable to the vanilla implementation.
4141
*/
4242
@Inject(method = "matches(Lnet/minecraft/world/inventory/CraftingContainer;Lnet/minecraft/world/level/Level;)Z", at = @At("HEAD"), cancellable = true)
43-
public void matches(CraftingContainer craftingContainer, Level level, CallbackInfoReturnable<Boolean> cir) {
43+
public void ingredientextensionapi_matches(CraftingContainer craftingContainer, Level level, CallbackInfoReturnable<Boolean> cir) {
4444

4545
// Only use our custom logic if it is required.
4646
if (!IngredientHelper.requiresTesting(this.ingredients)) {

0 commit comments

Comments
 (0)