@Environment(value=CLIENT) public class ModelLoader extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ModelLoader.ModelDefinition |
(package private) static class |
ModelLoader.ModelLoaderException |
Constructor and Description |
---|
ModelLoader(ResourceManager resourceManager,
BlockColors blockColors,
Profiler profiler,
int int2) |
Modifier and Type | Method and Description |
---|---|
private void |
addModel(ModelIdentifier modelId) |
private void |
addStates(Iterable<BlockState> states) |
BakedModel |
bake(Identifier identifier,
ModelBakeSettings settings) |
Map<Identifier,BakedModel> |
getBakedModelMap() |
UnbakedModel |
getOrLoadModel(Identifier id) |
(package private) static <T extends Comparable<T>> |
getPropertyValue(Property<T> property,
String string) |
it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> |
getStateLookup() |
private void |
loadModel(Identifier id) |
private JsonUnbakedModel |
loadModelFromJson(Identifier id) |
private void |
putModel(Identifier id,
UnbakedModel unbakedModel) |
private static Predicate<BlockState> |
stateKeyToPredicate(StateManager<Block,BlockState> stateFactory,
String key) |
SpriteAtlasManager |
upload(TextureManager textureManager,
Profiler profiler) |
public static final SpriteIdentifier FIRE_0
public static final SpriteIdentifier FIRE_1
public static final SpriteIdentifier LAVA_FLOW
public static final SpriteIdentifier WATER_FLOW
public static final SpriteIdentifier WATER_OVERLAY
public static final SpriteIdentifier BANNER_BASE
public static final SpriteIdentifier SHIELD_BASE
public static final SpriteIdentifier SHIELD_BASE_NO_PATTERN
public static final List<Identifier> BLOCK_DESTRUCTION_STAGES
public static final List<Identifier> BLOCK_DESTRUCTION_STAGE_TEXTURES
public static final List<RenderLayer> BLOCK_DESTRUCTION_RENDER_LAYERS
private static final Set<SpriteIdentifier> DEFAULT_TEXTURES
private static final Logger LOGGER
public static final ModelIdentifier MISSING
private static final String field_21773
public static final String MISSING_DEFINITION
private static final Splitter COMMA_SPLITTER
private static final Splitter KEY_VALUE_SPLITTER
public static final JsonUnbakedModel GENERATION_MARKER
public static final JsonUnbakedModel BLOCK_ENTITY_MARKER
private static final StateManager<Block,BlockState> ITEM_FRAME_STATE_FACTORY
private static final ItemModelGenerator ITEM_MODEL_GENERATOR
private static final Map<Identifier,StateManager<Block,BlockState>> STATIC_DEFINITIONS
private final ResourceManager resourceManager
@Nullable private SpriteAtlasManager spriteAtlasManager
private final BlockColors blockColors
private final Set<Identifier> modelsToLoad
private final ModelVariantMap.DeserializationContext variantMapDeserializationContext
private final Map<Identifier,UnbakedModel> unbakedModels
private final Map<Triple<Identifier,AffineTransformation,Boolean>,BakedModel> bakedModelCache
private final Map<Identifier,UnbakedModel> modelsToBake
private final Map<Identifier,BakedModel> bakedModels
private final Map<Identifier,com.mojang.datafixers.util.Pair<SpriteAtlasTexture,SpriteAtlasTexture.Data>> spriteAtlasData
private int nextStateId
private final it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> stateLookup
public ModelLoader(ResourceManager resourceManager, BlockColors blockColors, Profiler profiler, int int2)
public SpriteAtlasManager upload(TextureManager textureManager, Profiler profiler)
private static Predicate<BlockState> stateKeyToPredicate(StateManager<Block,BlockState> stateFactory, String key)
@Nullable static <T extends Comparable<T>> T getPropertyValue(Property<T> property, String string)
public UnbakedModel getOrLoadModel(Identifier id)
private void loadModel(Identifier id) throws Exception
Exception
private void putModel(Identifier id, UnbakedModel unbakedModel)
private void addModel(ModelIdentifier modelId)
private void addStates(Iterable<BlockState> states)
@Nullable public BakedModel bake(Identifier identifier, ModelBakeSettings settings)
private JsonUnbakedModel loadModelFromJson(Identifier id) throws IOException
IOException
public Map<Identifier,BakedModel> getBakedModelMap()
public it.unimi.dsi.fastutil.objects.Object2IntMap<BlockState> getStateLookup()