Cleanup model registration
This commit is contained in:
parent
c4527d157f
commit
554993ea79
60 changed files with 338 additions and 678 deletions
|
@ -6,7 +6,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Provides a custom {@link ItemMeshDefinition} for automatic registration of
|
||||
|
@ -22,11 +22,9 @@ public interface IMeshProvider {
|
|||
ItemMeshDefinition getMeshDefinition();
|
||||
|
||||
/**
|
||||
* Gets all possible variants for this item
|
||||
*
|
||||
* @return - All possible variants for this item
|
||||
* Gathers all possible variants for this item
|
||||
*/
|
||||
List<String> getVariants();
|
||||
void gatherVariants(Consumer<String> variants);
|
||||
|
||||
/**
|
||||
* If a custom ResourceLocation is required, return it here.
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
package WayofTime.bloodmagic.client;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public interface IVariantProvider {
|
||||
List<Pair<Integer, String>> getVariants();
|
||||
|
||||
default void gatherVariants(@Nonnull Int2ObjectMap<String> variants) {
|
||||
variants.put(0, this instanceof Block ? "normal" : "inventory");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue