item sprite names
This commit is contained in:
parent
5c0e71f80c
commit
153e53ba9a
3 changed files with 5 additions and 5 deletions
|
@ -93,7 +93,7 @@ public class ItemModelMesher
|
||||||
for(Item item : ItemRegistry.REGISTRY) {
|
for(Item item : ItemRegistry.REGISTRY) {
|
||||||
this.simpleShapesCache.put(this.getIndex(item),
|
this.simpleShapesCache.put(this.getIndex(item),
|
||||||
this.modelManager.getModel("item/" +
|
this.modelManager.getModel("item/" +
|
||||||
ItemRegistry.getNameFromItem(item).toString() + '#' + "inventory"));
|
ItemRegistry.getNameFromItem(item).toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public abstract class ModelBakery
|
||||||
"blocks/destroy_stage_8", "blocks/destroy_stage_9",
|
"blocks/destroy_stage_8", "blocks/destroy_stage_9",
|
||||||
"items/empty_armor_slot_helmet", "items/empty_armor_slot_chestplate",
|
"items/empty_armor_slot_helmet", "items/empty_armor_slot_chestplate",
|
||||||
"items/empty_armor_slot_leggings", "items/empty_armor_slot_boots");
|
"items/empty_armor_slot_leggings", "items/empty_armor_slot_boots");
|
||||||
protected static final String MISSING = "builtin/missing" + '#' + "missing";
|
protected static final String MISSING = "builtin/missing";
|
||||||
public static final ModelBlock MODEL_GENERATED = (ModelBlock)new ModelBlock(null).add().d("");
|
public static final ModelBlock MODEL_GENERATED = (ModelBlock)new ModelBlock(null).add().d("");
|
||||||
public static final ModelBlock MODEL_ENTITY = (ModelBlock)new ModelBlock(null).add().d("");
|
public static final ModelBlock MODEL_ENTITY = (ModelBlock)new ModelBlock(null).add().d("");
|
||||||
|
|
||||||
|
@ -141,13 +141,13 @@ public abstract class ModelBakery
|
||||||
// list = Collections.<Integer>singletonList(0);
|
// list = Collections.<Integer>singletonList(0);
|
||||||
// for(Integer s : list)
|
// for(Integer s : list)
|
||||||
// {
|
// {
|
||||||
String loc = "item/" + ItemRegistry.getNameFromItem(item) + '#' + "inventory";
|
String loc = "item/" + ItemRegistry.getNameFromItem(item);
|
||||||
models.put(loc, (ModelBlock)item.getModel(ModelBlock.PROVIDER, ItemRegistry.getNameFromItem(item)));
|
models.put(loc, (ModelBlock)item.getModel(ModelBlock.PROVIDER, ItemRegistry.getNameFromItem(item)));
|
||||||
itemLocations.add(loc);
|
itemLocations.add(loc);
|
||||||
String[] extra = item.getRenderItems();
|
String[] extra = item.getRenderItems();
|
||||||
if(extra != null) {
|
if(extra != null) {
|
||||||
for(String sprite : extra) {
|
for(String sprite : extra) {
|
||||||
loc = "item/" + sprite + '#' + "inventory";
|
loc = "item/" + sprite;
|
||||||
models.put(loc, (ModelBlock)ModelBlock.PROVIDER.getModel(item.getTransform(), sprite));
|
models.put(loc, (ModelBlock)ModelBlock.PROVIDER.getModel(item.getTransform(), sprite));
|
||||||
itemLocations.add(loc);
|
itemLocations.add(loc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ public class RenderItem
|
||||||
Item item = stack.getItem();
|
Item item = stack.getItem();
|
||||||
String sprite = item == null ? null : item.getSprite(entityplayer, stack);
|
String sprite = item == null ? null : item.getSprite(entityplayer, stack);
|
||||||
if(sprite != null)
|
if(sprite != null)
|
||||||
ibakedmodel = this.itemModelMesher.getModelManager().getModel("item/" + sprite + '#' + "inventory");
|
ibakedmodel = this.itemModelMesher.getModelManager().getModel("item/" + sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.renderItemModelTransform(stack, ibakedmodel, cameraTransformType);
|
this.renderItemModelTransform(stack, ibakedmodel, cameraTransformType);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue