Interface IAssemblyRenderOverriding
public interface IAssemblyRenderOverriding
Provides methods to customize how items are rendered when held by Assembly machines. You can create an instance
of this class and register it via
IClientRegistry.registerRenderOverride(IForgeRegistryEntry, IAssemblyRenderOverriding)-
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyRenderChangeIOUnit(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.world.item.ItemStack renderedStack) This method is called just before the IO Unit's held stack is rendered.booleanapplyRenderChangePlatform(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.world.item.ItemStack renderedStack) SeeapplyRenderChangeIOUnit(MatrixStack, ItemStack), but for the Assembly Platform.floatgetIOUnitClawShift(net.minecraft.world.item.ItemStack renderedStack) Should return the distance the IO Units' claw travels before it grips the stack.floatgetPlatformClawShift(net.minecraft.world.item.ItemStack renderedStack) Should return the distance the Assembly Platform's claw travels before it grips the stack.
-
Method Details
-
applyRenderChangeIOUnit
boolean applyRenderChangeIOUnit(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.world.item.ItemStack renderedStack) This method is called just before the IO Unit's held stack is rendered. You can modify the passed matrix stack here to rotate the model, for example. You don't need to call .push() or .pop() on the matrix; that is done automatically before and after this method is called.You can also choose to do the whole rendering yourself; in this case, return false to indicate that PneumaticCraft shouldn't render the item at all.
- Parameters:
matrixStack- the matrix; only apply transformations to this, never directly via OpenGLrenderedStack- itemStack that is being rendered- Returns:
- true if PneumaticCraft should render the item (after your changes), or false to cancel rendering.
-
applyRenderChangePlatform
boolean applyRenderChangePlatform(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.world.item.ItemStack renderedStack) SeeapplyRenderChangeIOUnit(MatrixStack, ItemStack), but for the Assembly Platform.- Parameters:
matrixStack- the matrix; only apply transformations to this, never directly via OpenGLrenderedStack- itemStack that is being rendered- Returns:
- true if PneumaticCraft should render the item (after your changes), or false to cancel rendering.
-
getIOUnitClawShift
float getIOUnitClawShift(net.minecraft.world.item.ItemStack renderedStack) Should return the distance the IO Units' claw travels before it grips the stack. By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed.- Parameters:
renderedStack- the ItemStack being rendered- Returns:
- the claw distance
-
getPlatformClawShift
float getPlatformClawShift(net.minecraft.world.item.ItemStack renderedStack) Should return the distance the Assembly Platform's claw travels before it grips the stack. By default it's 0.0875F for items and 0.00625F for blocks, 0.09375 when the claw is completely closed.- Parameters:
renderedStack- the ItemStack being rendered- Returns:
- the claw shift
-