generated from FabricMC/fabric-example-mod
-
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.
- changes made adhear to fabric version 0.100.3+1.21 - updated mod to support Minecraft 1.21
- Loading branch information
Showing
173 changed files
with
123 additions
and
342 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
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
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
49 changes: 49 additions & 0 deletions
49
src/main/java/net/stal/alloys/recipe/AlloySmelterRecipeInput.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,49 @@ | ||
package net.stal.alloys.recipe; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.recipe.input.RecipeInput; | ||
|
||
|
||
public record AlloySmelterRecipeInput(ItemStack slotA, ItemStack slotB) implements RecipeInput { | ||
|
||
|
||
public AlloySmelterRecipeInput(ItemStack slotA, ItemStack slotB) { | ||
this.slotA = slotA; | ||
this.slotB = slotB; | ||
} | ||
|
||
@Override | ||
public int getSize() { | ||
return 2; | ||
} | ||
|
||
@Override | ||
public ItemStack getStackInSlot(int slot) { | ||
ItemStack result; | ||
switch (slot) { | ||
case 0: | ||
result = this.slotA; | ||
break; | ||
case 1: | ||
result = this.slotB; | ||
break; | ||
default: | ||
throw new IllegalArgumentException("Recipe does not contain slot " + slot); | ||
} | ||
|
||
return result; | ||
} | ||
|
||
public boolean isEmpty() { | ||
return this.slotA.isEmpty() && this.slotB.isEmpty(); | ||
} | ||
|
||
public ItemStack slotA() { | ||
return this.slotA.copy(); | ||
} | ||
|
||
public ItemStack slotB() { | ||
return this.slotB.copy(); | ||
} | ||
|
||
} |
Oops, something went wrong.