-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IdAwareObject and use for a new recipe helper utility
IdAwareObject just represents an object that can return its own ID, similarly to RegistryObject. Simplifies some utilities as they can automatically work with ItemObject and FluidObject at no extra cost
- Loading branch information
1 parent
b2f8009
commit c44fa63
Showing
4 changed files
with
54 additions
and
16 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
9 changes: 9 additions & 0 deletions
9
src/main/java/slimeknights/mantle/registration/object/IdAwareObject.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,9 @@ | ||
package slimeknights.mantle.registration.object; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
|
||
/** Interface for an object that holds its own name, used to simplify some utilities */ | ||
public interface IdAwareObject { | ||
/** Gets the ID for this object */ | ||
ResourceLocation getId(); | ||
} |
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