mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 04:49:10 +01:00
20 lines
760 B
Java
20 lines
760 B
Java
package de.ellpeck.naturesaura.reg;
|
|
|
|
import de.ellpeck.naturesaura.NaturesAura;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.client.renderer.model.ModelResourceLocation;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
|
|
public interface IModelProvider {
|
|
|
|
default Map<ItemStack, ModelResourceLocation> getModelLocations() {
|
|
ItemStack stack = this instanceof Item ? new ItemStack((Item) this) : new ItemStack((Block) this);
|
|
String name = ((IModItem) this).getBaseName();
|
|
return Collections.singletonMap(stack, new ModelResourceLocation(new ResourceLocation(NaturesAura.MOD_ID, name), "inventory"));
|
|
}
|
|
}
|