Class DynamicBaseModel
java.lang.Object
org.cyclops.cyclopscore.client.model.DynamicBaseModel
- All Implemented Interfaces:
net.minecraft.client.renderer.block.model.BlockStateModel,net.neoforged.neoforge.client.extensions.BlockStateModelExtension
- Direct Known Subclasses:
DynamicItemAndBlockModel
public abstract class DynamicBaseModel
extends Object
implements net.minecraft.client.renderer.block.model.BlockStateModel
A model that can be used as a basis for flexible baked models.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.renderer.block.model.BlockStateModel
net.minecraft.client.renderer.block.model.BlockStateModel.SimpleCachedUnbakedRoot, net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked, net.minecraft.client.renderer.block.model.BlockStateModel.UnbakedRoot -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int[]protected static final float[][]protected static final float[][] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, int shadeColor, net.minecraft.core.Direction side) Add a given quad to a list of quads.protected static voidaddBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, net.minecraft.core.Direction side) Add a given quad to a list of quads.protected static voidaddBakedQuadRotated(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, net.minecraft.core.Direction side, int rotation) Add a given rotated quad to a list of quads.protected static voidaddBakedQuadRotated(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, net.minecraft.core.Direction side, int rotation, boolean isColored, int shadeColor, float[][] uvs) Add a given rotated quad to a list of quads.protected static voidaddColoredBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, int shadeColor, net.minecraft.core.Direction side) Add a given colored quad to a list of quads.protected static voidaddColoredBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, Color shadeColor, net.minecraft.core.Direction side) Add a given colored quad to a list of quads.voidcollectParts(net.minecraft.util.RandomSource random, List<net.minecraft.client.renderer.block.model.BlockModelPart> output) voidcollectParts(net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.util.RandomSource random, List<net.minecraft.client.renderer.block.model.BlockModelPart> parts) abstract net.neoforged.neoforge.model.data.ModelDatagetModelData(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.neoforged.neoforge.model.data.ModelData tileData) abstract List<net.minecraft.client.renderer.chunk.ChunkSectionLayer> getRenderTypes(net.minecraft.world.level.block.state.BlockState state, net.minecraft.util.RandomSource rand, net.neoforged.neoforge.model.data.ModelData data) abstract List<net.minecraft.client.renderer.block.model.BakedQuad> handleBlockState(net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side, net.minecraft.util.RandomSource rand, net.neoforged.neoforge.model.data.ModelData extraData, net.minecraft.client.renderer.chunk.ChunkSectionLayer renderType) protected static net.minecraft.world.phys.Vec3revRotate(net.minecraft.world.phys.Vec3 vec, net.minecraft.core.Direction side) Rotate a given vector inversely to the given side.protected static org.joml.Vector3frotate(org.joml.Vector3f vec, net.minecraft.core.Direction side) Rotate a given vector to the given side.abstract booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.renderer.block.model.BlockStateModel
collectParts, particleIconMethods inherited from interface net.neoforged.neoforge.client.extensions.BlockStateModelExtension
collectParts, createGeometryKey, particleIcon
-
Field Details
-
ROTATION_UV
protected static final float[][] ROTATION_UV -
ROTATION_FIX
protected static final int[] ROTATION_FIX -
UVS
protected static final float[][] UVS
-
-
Constructor Details
-
DynamicBaseModel
public DynamicBaseModel()
-
-
Method Details
-
rotate
protected static org.joml.Vector3f rotate(org.joml.Vector3f vec, net.minecraft.core.Direction side) Rotate a given vector to the given side.- Parameters:
vec- The vector to rotate.side- The side to rotate by.- Returns:
- The rotated vector.
-
revRotate
protected static net.minecraft.world.phys.Vec3 revRotate(net.minecraft.world.phys.Vec3 vec, net.minecraft.core.Direction side) Rotate a given vector inversely to the given side.- Parameters:
vec- The vector to rotate.side- The side to rotate by.- Returns:
- The inversely rotated vector.
-
addBakedQuad
protected static void addBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, net.minecraft.core.Direction side) Add a given quad to a list of quads.- Parameters:
quads- The quads to append to.x1- Start Xx2- End Xz1- Start Zz2- End Zy- Ytexture- The base textureside- The side to add render quad at.
-
addBakedQuad
protected static void addBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, int shadeColor, net.minecraft.core.Direction side) Add a given quad to a list of quads.- Parameters:
quads- The quads to append to.x1- Start Xx2- End Xz1- Start Zz2- End Zy- Ytexture- The base textureshadeColor- shade color for the texture in BGR formatside- The side to add render quad at.
-
addColoredBakedQuad
protected static void addColoredBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, Color shadeColor, net.minecraft.core.Direction side) Add a given colored quad to a list of quads.- Parameters:
quads- The quads to append to.x1- Start Xx2- End Xz1- Start Zz2- End Zy- Ytexture- The base textureshadeColor- shade color for the textureside- The side to add render quad at.
-
addColoredBakedQuad
protected static void addColoredBakedQuad(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, int shadeColor, net.minecraft.core.Direction side) Add a given colored quad to a list of quads.- Parameters:
quads- The quads to append to.x1- Start Xx2- End Xz1- Start Zz2- End Zy- Ytexture- The base textureshadeColor- shade color for the texture in BGR formatside- The side to add render quad at.
-
addBakedQuadRotated
protected static void addBakedQuadRotated(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, net.minecraft.core.Direction side, int rotation) Add a given rotated quad to a list of quads.- Parameters:
quads- The quads to append to.x1- Start Xx2- End Xz1- Start Zz2- End Zy- Ytexture- The base textureside- The side to add render quad at.rotation- The rotation index to rotate by.
-
addBakedQuadRotated
protected static void addBakedQuadRotated(List<net.minecraft.client.renderer.block.model.BakedQuad> quads, float x1, float x2, float z1, float z2, float y, net.minecraft.client.renderer.texture.TextureAtlasSprite texture, net.minecraft.core.Direction side, int rotation, boolean isColored, int shadeColor, float[][] uvs) Add a given rotated quad to a list of quads.- Parameters:
quads- The quads to append to.x1- Start Xx2- End Xz1- Start Zz2- End Zy- Ytexture- The base textureside- The side to add render quad at.rotation- The rotation index to rotate by.isColored- When set to true a colored baked quad will be made, otherwise a regular baked quad is used.shadeColor- The shade coloruvs- A double array of 4 uv pairs
-
handleBlockState
public abstract List<net.minecraft.client.renderer.block.model.BakedQuad> handleBlockState(net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side, net.minecraft.util.RandomSource rand, net.neoforged.neoforge.model.data.ModelData extraData, net.minecraft.client.renderer.chunk.ChunkSectionLayer renderType) -
collectParts
public void collectParts(net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.util.RandomSource random, List<net.minecraft.client.renderer.block.model.BlockModelPart> parts) - Specified by:
collectPartsin interfacenet.neoforged.neoforge.client.extensions.BlockStateModelExtension
-
collectParts
public void collectParts(net.minecraft.util.RandomSource random, List<net.minecraft.client.renderer.block.model.BlockModelPart> output) - Specified by:
collectPartsin interfacenet.minecraft.client.renderer.block.model.BlockStateModel
-
getModelData
public abstract net.neoforged.neoforge.model.data.ModelData getModelData(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.neoforged.neoforge.model.data.ModelData tileData) -
getRenderTypes
public abstract List<net.minecraft.client.renderer.chunk.ChunkSectionLayer> getRenderTypes(net.minecraft.world.level.block.state.BlockState state, net.minecraft.util.RandomSource rand, net.neoforged.neoforge.model.data.ModelData data) -
usesBlockLight
public abstract boolean usesBlockLight()
-