2018-10-13 20:35:18 +02:00
|
|
|
package de.ellpeck.naturesaura.reg;
|
|
|
|
|
2018-10-19 18:32:20 +02:00
|
|
|
import de.ellpeck.naturesaura.NaturesAura;
|
|
|
|
import net.minecraft.block.Block;
|
2018-10-26 12:03:42 +02:00
|
|
|
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
2018-10-19 18:32:20 +02:00
|
|
|
import net.minecraft.item.Item;
|
2018-10-13 20:35:18 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
2018-10-19 18:32:20 +02:00
|
|
|
import java.util.Collections;
|
2018-10-13 20:35:18 +02:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
public interface IModelProvider {
|
|
|
|
|
2018-10-26 12:03:42 +02:00
|
|
|
default Map<ItemStack, ModelResourceLocation> getModelLocations() {
|
2018-10-19 18:32:20 +02:00
|
|
|
ItemStack stack = this instanceof Item ? new ItemStack((Item) this) : new ItemStack((Block) this);
|
|
|
|
String name = ((IModItem) this).getBaseName();
|
2018-10-26 12:03:42 +02:00
|
|
|
return Collections.singletonMap(stack, new ModelResourceLocation(new ResourceLocation(NaturesAura.MOD_ID, name), "inventory"));
|
2018-10-13 20:35:18 +02:00
|
|
|
}
|
|
|
|
}
|