Class SpriteSourceProvider
java.lang.Object
net.neoforged.neoforge.common.data.JsonCodecProvider<List<net.minecraft.client.renderer.texture.atlas.SpriteSource>>
net.neoforged.neoforge.client.data.SpriteSourceProvider
- All Implemented Interfaces:
net.minecraft.data.DataProvider
- Direct Known Subclasses:
NeoForgeSpriteSourceProvider
public abstract class SpriteSourceProvider
extends JsonCodecProvider<List<net.minecraft.client.renderer.texture.atlas.SpriteSource>>
Data provider for atlas configuration files.
An atlas configuration is bound to a specific texture atlas such as the minecraft:blocks
atlas and
allows adding additional textures to the atlas by adding SpriteSource
s to the configuration.
See SpriteSources
for the available sources and the constants in this class for the
atlases used in vanilla Minecraft
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.data.DataProvider
net.minecraft.data.DataProvider.Factory<T extends net.minecraft.data.DataProvider>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<net.minecraft.resources.ResourceLocation, SpriteSourceProvider.SourceList> protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
protected static final net.minecraft.resources.ResourceLocation
Fields inherited from class net.neoforged.neoforge.common.data.JsonCodecProvider
codec, conditions, directory, lookupProvider, modid, pathProvider
Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR
-
Constructor Summary
ConstructorsConstructorDescriptionSpriteSourceProvider
(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, String modId) -
Method Summary
Modifier and TypeMethodDescriptionprotected final SpriteSourceProvider.SourceList
atlas
(net.minecraft.resources.ResourceLocation id) Get or create aSpriteSourceProvider.SourceList
for the given atlasMethods inherited from class net.neoforged.neoforge.common.data.JsonCodecProvider
conditionally, gather, getName, run, unconditional
-
Field Details
-
BLOCKS_ATLAS
protected static final net.minecraft.resources.ResourceLocation BLOCKS_ATLAS -
BANNER_PATTERNS_ATLAS
protected static final net.minecraft.resources.ResourceLocation BANNER_PATTERNS_ATLAS -
BEDS_ATLAS
protected static final net.minecraft.resources.ResourceLocation BEDS_ATLAS -
CHESTS_ATLAS
protected static final net.minecraft.resources.ResourceLocation CHESTS_ATLAS -
SHIELD_PATTERNS_ATLAS
protected static final net.minecraft.resources.ResourceLocation SHIELD_PATTERNS_ATLAS -
SHULKER_BOXES_ATLAS
protected static final net.minecraft.resources.ResourceLocation SHULKER_BOXES_ATLAS -
SIGNS_ATLAS
protected static final net.minecraft.resources.ResourceLocation SIGNS_ATLAS -
MOB_EFFECTS_ATLAS
protected static final net.minecraft.resources.ResourceLocation MOB_EFFECTS_ATLAS -
PAINTINGS_ATLAS
protected static final net.minecraft.resources.ResourceLocation PAINTINGS_ATLAS -
PARTICLES_ATLAS
protected static final net.minecraft.resources.ResourceLocation PARTICLES_ATLAS -
atlases
-
-
Constructor Details
-
SpriteSourceProvider
public SpriteSourceProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> lookupProvider, String modId)
-
-
Method Details
-
atlas
Get or create aSpriteSourceProvider.SourceList
for the given atlas- Parameters:
id
- The texture atlas the sources should be added to, see constants at the top for the format and the vanilla atlases- Returns:
- an existing
SourceList
for the given atlas or a new one if not present yet
-