Class BlockModel
- java.lang.Object
-
- net.minecraft.client.renderer.model.BlockModel
-
- All Implemented Interfaces:
IUnbakedModel
,IForgeUnbakedModel
public class BlockModel extends java.lang.Object implements IUnbakedModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockModel.Deserializer
static class
BlockModel.GuiLight
-
Field Summary
Fields Modifier and Type Field Description BlockModelConfiguration
customData
private java.util.List<BlockPart>
elements
private static FaceBakery
FACE_BAKERY
(package private) static com.google.gson.Gson
GSON
private BlockModel.GuiLight
guiLight
boolean
hasAmbientOcclusion
private static org.apache.logging.log4j.Logger
LOGGER
java.lang.String
name
private java.util.List<ItemOverride>
overrides
BlockModel
parent
protected ResourceLocation
parentLocation
java.util.Map<java.lang.String,com.mojang.datafixers.util.Either<RenderMaterial,java.lang.String>>
textureMap
private ItemCameraTransforms
transforms
-
Constructor Summary
Constructors Constructor Description BlockModel(ResourceLocation p_i230056_1_, java.util.List<BlockPart> p_i230056_2_, java.util.Map<java.lang.String,com.mojang.datafixers.util.Either<RenderMaterial,java.lang.String>> p_i230056_3_, boolean p_i230056_4_, BlockModel.GuiLight p_i230056_5_, ItemCameraTransforms p_i230056_6_, java.util.List<ItemOverride> p_i230056_7_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IBakedModel
bake(ModelBakery p_225613_1_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> p_225613_2_, IModelTransform p_225613_3_, ResourceLocation p_225613_4_)
Deprecated.IBakedModel
bake(ModelBakery p_228813_1_, BlockModel p_228813_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_, boolean p_228813_6_)
private static BakedQuad
bakeFace(BlockPart p_228812_0_, BlockPartFace p_228812_1_, TextureAtlasSprite p_228812_2_, Direction p_228812_3_, IModelTransform p_228812_4_, ResourceLocation p_228812_5_)
IBakedModel
bakeVanilla(ModelBakery p_228813_1_, BlockModel p_228813_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_, boolean p_228813_6_)
Deprecated.private com.mojang.datafixers.util.Either<RenderMaterial,java.lang.String>
findTextureEntry(java.lang.String p_228818_1_)
static BlockModel
fromStream(java.io.Reader p_178307_0_)
static BlockModel
fromString(java.lang.String p_178294_0_)
java.util.Collection<ResourceLocation>
getDependencies()
java.util.List<BlockPart>
getElements()
Deprecated.BlockModel.GuiLight
getGuiLight()
private ItemOverrideList
getItemOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_)
RenderMaterial
getMaterial(java.lang.String p_228816_1_)
java.util.Collection<RenderMaterial>
getMaterials(java.util.function.Function<ResourceLocation,IUnbakedModel> p_225614_1_, java.util.Set<com.mojang.datafixers.util.Pair<java.lang.String,java.lang.String>> p_225614_2_)
java.util.List<ItemOverride>
getOverrides()
ItemOverrideList
getOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> textureGetter)
ResourceLocation
getParentLocation()
BlockModel
getRootModel()
private ItemTransformVec3f
getTransform(ItemCameraTransforms.TransformType p_181681_1_)
ItemCameraTransforms
getTransforms()
boolean
hasAmbientOcclusion()
boolean
hasTexture(java.lang.String p_178300_1_)
private static boolean
isTextureReference(java.lang.String p_178304_0_)
static BakedQuad
makeBakedQuad(BlockPart p_228812_0_, BlockPartFace p_228812_1_, TextureAtlasSprite p_228812_2_, Direction p_228812_3_, IModelTransform p_228812_4_, ResourceLocation p_228812_5_)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.client.extensions.IForgeUnbakedModel
getClip
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
FACE_BAKERY
private static final FaceBakery FACE_BAKERY
-
GSON
static final com.google.gson.Gson GSON
-
elements
private final java.util.List<BlockPart> elements
-
guiLight
@Nullable private final BlockModel.GuiLight guiLight
-
hasAmbientOcclusion
public final boolean hasAmbientOcclusion
-
transforms
private final ItemCameraTransforms transforms
-
overrides
private final java.util.List<ItemOverride> overrides
-
name
public java.lang.String name
-
textureMap
public final java.util.Map<java.lang.String,com.mojang.datafixers.util.Either<RenderMaterial,java.lang.String>> textureMap
-
parent
@Nullable public BlockModel parent
-
parentLocation
@Nullable protected ResourceLocation parentLocation
-
customData
public final BlockModelConfiguration customData
-
-
Constructor Detail
-
BlockModel
public BlockModel(@Nullable ResourceLocation p_i230056_1_, java.util.List<BlockPart> p_i230056_2_, java.util.Map<java.lang.String,com.mojang.datafixers.util.Either<RenderMaterial,java.lang.String>> p_i230056_3_, boolean p_i230056_4_, @Nullable BlockModel.GuiLight p_i230056_5_, ItemCameraTransforms p_i230056_6_, java.util.List<ItemOverride> p_i230056_7_)
-
-
Method Detail
-
fromStream
public static BlockModel fromStream(java.io.Reader p_178307_0_)
-
fromString
public static BlockModel fromString(java.lang.String p_178294_0_)
-
getElements
@Deprecated public java.util.List<BlockPart> getElements()
Deprecated.
-
getParentLocation
@Nullable public ResourceLocation getParentLocation()
-
hasAmbientOcclusion
public boolean hasAmbientOcclusion()
-
getGuiLight
public BlockModel.GuiLight getGuiLight()
-
getOverrides
public java.util.List<ItemOverride> getOverrides()
-
getItemOverrides
private ItemOverrideList getItemOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_)
-
getOverrides
public ItemOverrideList getOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> textureGetter)
-
getDependencies
public java.util.Collection<ResourceLocation> getDependencies()
- Specified by:
getDependencies
in interfaceIUnbakedModel
-
getMaterials
public java.util.Collection<RenderMaterial> getMaterials(java.util.function.Function<ResourceLocation,IUnbakedModel> p_225614_1_, java.util.Set<com.mojang.datafixers.util.Pair<java.lang.String,java.lang.String>> p_225614_2_)
- Specified by:
getMaterials
in interfaceIUnbakedModel
-
bake
@Deprecated public IBakedModel bake(ModelBakery p_225613_1_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> p_225613_2_, IModelTransform p_225613_3_, ResourceLocation p_225613_4_)
Deprecated.- Specified by:
bake
in interfaceIUnbakedModel
-
bake
public IBakedModel bake(ModelBakery p_228813_1_, BlockModel p_228813_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_, boolean p_228813_6_)
-
bakeVanilla
@Deprecated public IBakedModel bakeVanilla(ModelBakery p_228813_1_, BlockModel p_228813_2_, java.util.function.Function<RenderMaterial,TextureAtlasSprite> p_228813_3_, IModelTransform p_228813_4_, ResourceLocation p_228813_5_, boolean p_228813_6_)
Deprecated.
-
bakeFace
private static BakedQuad bakeFace(BlockPart p_228812_0_, BlockPartFace p_228812_1_, TextureAtlasSprite p_228812_2_, Direction p_228812_3_, IModelTransform p_228812_4_, ResourceLocation p_228812_5_)
-
makeBakedQuad
public static BakedQuad makeBakedQuad(BlockPart p_228812_0_, BlockPartFace p_228812_1_, TextureAtlasSprite p_228812_2_, Direction p_228812_3_, IModelTransform p_228812_4_, ResourceLocation p_228812_5_)
-
hasTexture
public boolean hasTexture(java.lang.String p_178300_1_)
-
getMaterial
public RenderMaterial getMaterial(java.lang.String p_228816_1_)
-
findTextureEntry
private com.mojang.datafixers.util.Either<RenderMaterial,java.lang.String> findTextureEntry(java.lang.String p_228818_1_)
-
isTextureReference
private static boolean isTextureReference(java.lang.String p_178304_0_)
-
getRootModel
public BlockModel getRootModel()
-
getTransforms
public ItemCameraTransforms getTransforms()
-
getTransform
private ItemTransformVec3f getTransform(ItemCameraTransforms.TransformType p_181681_1_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-