net.minecraftforge.client.model.ItemLayerModel Java Examples
The following examples show how to use
net.minecraftforge.client.model.ItemLayerModel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BuiltinLoader.java From VanillaFix with MIT License | 6 votes |
@Override public IModel loadModel(ResourceLocation modelLocation) throws Exception { String path = modelLocation.getPath(); if ("builtin/generated".equals(path) || "block/builtin/generated".equals(path) || "item/builtin/generated".equals(path)) { // TODO: why is this necessary? return ItemLayerModel.INSTANCE; //new VanillaModelWrapper(modelLocation, MODEL_GENERATED); } if ("builtin/entity".equals(path)) { return new VanillaModelWrapper(modelLocation, MODEL_ENTITY); } if ("builtin/missing".equals(path)) { return WRAPPED_MODEL_MISSING; } throw new FileNotFoundException(modelLocation.toString()); }
Example #2
Source File: ItemQuadBakery.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 5 votes |
public static List<BakedQuad> bakeItem(TransformationMatrix transform, TextureAtlasSprite... sprites) { LambdaUtils.checkArgument(sprites, "Sprites must not be Null or empty!", ArrayUtils::isNullOrContainsNull); List<BakedQuad> quads = new LinkedList<>(); for (int i = 0; i < sprites.length; i++) { TextureAtlasSprite sprite = sprites[i]; quads.addAll(ItemLayerModel.getQuadsForSprite(i, sprite, transform)); } return quads; }