-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Multiple modules are allowed per item. - Added the module `enchantment` for tools and armours. - `custom_data` may now search nested pathes. - `custom_name` will now convert all names into valid identifiers.
- Loading branch information
Showing
14 changed files
with
326 additions
and
74 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
26 changes: 26 additions & 0 deletions
26
src/main/java/fr/estecka/variantscit/IItemModelProvider.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,26 @@ | ||
package fr.estecka.variantscit; | ||
|
||
import java.util.List; | ||
import net.minecraft.client.util.ModelIdentifier; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public interface IItemModelProvider | ||
{ | ||
ModelIdentifier GetModelForItem(ItemStack stack); | ||
|
||
static public IItemModelProvider OfList(List<? extends IItemModelProvider> providers){ | ||
if (providers.isEmpty()) | ||
return __->null; | ||
else if (providers.size() == 1) | ||
return providers.get(0); | ||
|
||
return (ItemStack stack)->{ | ||
ModelIdentifier id; | ||
for (var p : providers) | ||
if (null != (id=p.GetModelForItem(stack))) | ||
return id; | ||
|
||
return null; | ||
}; | ||
} | ||
} |
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
Oops, something went wrong.