Future-MC
Future-MC copied to clipboard
[1.12] Automatically make Banner Patterns for patterns in enum
What Create Banner Patterns for patterns added by other mods
Why
If other mods like Quark use Minecraft's EnumHelper
to add patterns that use items into the net.minecraft.tileentity.BannerPattern
enum, it becomes inconsistent with the Banner Patterns already added by FutureMC.
How
Automatically create BannerPatternItem
s for each pattern in the enum.
- Could loop through
BannerPattern.values
and filter patterns that don't have apatternItem
ofItemStack.EMPTY
- Dynamically create the meta length and copy indices over to the new pattern list
And/or, add API methods to make banner patterns or add Loom recipes
Supplement:at present, the patterns from other mods can be obtained by modifying the data value of the banner pattern, but the output of the loom is still the flower pattern.