Package net.createmod.catnip.render
Class CachedBuffers
java.lang.Object
net.createmod.catnip.render.CachedBuffers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SuperByteBufferCache.Compartment<org.apache.commons.lang3.tuple.Pair<net.minecraft.core.Direction,dev.engine_room.flywheel.lib.model.baked.PartialModel>> static final SuperByteBufferCache.Compartment<net.minecraft.world.level.block.state.BlockState>static final SuperByteBufferCache.Compartment<dev.engine_room.flywheel.lib.model.baked.PartialModel> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SuperByteBufferblock(SuperByteBufferCache.Compartment<net.minecraft.world.level.block.state.BlockState> compartment, net.minecraft.world.level.block.state.BlockState toRender) Creates a SuperByteBuffer that has the model of a BlockState baked into it
and caches it in the given Compartmentstatic SuperByteBufferblock(net.minecraft.world.level.block.state.BlockState toRender) Creates and caches a SuperByteBuffer that has the model of a BlockState baked into itstatic SuperByteBufferpartial(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState) static SuperByteBufferpartial(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, Supplier<com.mojang.blaze3d.vertex.PoseStack> modelTransform) static SuperByteBufferpartialDirectional(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction dir, Supplier<com.mojang.blaze3d.vertex.PoseStack> modelTransform) static SuperByteBufferpartialFacing(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState) static SuperByteBufferpartialFacing(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction facing) static SuperByteBufferpartialFacingVertical(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction facing) static Supplier<com.mojang.blaze3d.vertex.PoseStack>rotateToFace(net.minecraft.core.Direction facing) static Supplier<com.mojang.blaze3d.vertex.PoseStack>rotateToFaceVertical(net.minecraft.core.Direction facing)
-
Field Details
-
GENERIC_BLOCK
public static final SuperByteBufferCache.Compartment<net.minecraft.world.level.block.state.BlockState> GENERIC_BLOCK -
PARTIAL
public static final SuperByteBufferCache.Compartment<dev.engine_room.flywheel.lib.model.baked.PartialModel> PARTIAL -
DIRECTIONAL_PARTIAL
public static final SuperByteBufferCache.Compartment<org.apache.commons.lang3.tuple.Pair<net.minecraft.core.Direction,dev.engine_room.flywheel.lib.model.baked.PartialModel>> DIRECTIONAL_PARTIAL
-
-
Constructor Details
-
CachedBuffers
public CachedBuffers()
-
-
Method Details
-
block
Creates and caches a SuperByteBuffer that has the model of a BlockState baked into it- Parameters:
toRender- the BlockState to be rendered- Returns:
- the cached SuperByteBuffer
-
block
public static SuperByteBuffer block(SuperByteBufferCache.Compartment<net.minecraft.world.level.block.state.BlockState> compartment, net.minecraft.world.level.block.state.BlockState toRender) Creates a SuperByteBuffer that has the model of a BlockState baked into it
and caches it in the given Compartment- Parameters:
compartment- the Compartment the Buffer should be cached intoRender- the BlockState to be rendered- Returns:
- the cached SuperByteBuffer
-
partial
public static SuperByteBuffer partial(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState) -
partial
public static SuperByteBuffer partial(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, Supplier<com.mojang.blaze3d.vertex.PoseStack> modelTransform) -
partialFacing
public static SuperByteBuffer partialFacing(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState) -
partialFacing
public static SuperByteBuffer partialFacing(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction facing) -
partialFacingVertical
public static SuperByteBuffer partialFacingVertical(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction facing) -
partialDirectional
public static SuperByteBuffer partialDirectional(dev.engine_room.flywheel.lib.model.baked.PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction dir, Supplier<com.mojang.blaze3d.vertex.PoseStack> modelTransform) -
rotateToFace
public static Supplier<com.mojang.blaze3d.vertex.PoseStack> rotateToFace(net.minecraft.core.Direction facing) -
rotateToFaceVertical
public static Supplier<com.mojang.blaze3d.vertex.PoseStack> rotateToFaceVertical(net.minecraft.core.Direction facing)
-