Search in sources :

Example 1 with BeltData

use of com.simibubi.create.content.contraptions.base.flwdata.BeltData in project Create by Creators-of-Create.

the class BeltInstance method update.

@Override
public void update() {
    DyeColor color = blockEntity.color.orElse(null);
    boolean bottom = true;
    for (BeltData key : keys) {
        SpriteShiftEntry spriteShiftEntry = BeltRenderer.getSpriteShiftEntry(color, diagonal, bottom);
        key.setScrollTexture(spriteShiftEntry).setColor(blockEntity).setRotationalSpeed(getScrollSpeed());
        bottom = false;
    }
    if (pulleyKey != null) {
        updateRotation(pulleyKey);
    }
}
Also used : BeltData(com.simibubi.create.content.contraptions.base.flwdata.BeltData) DyeColor(net.minecraft.world.item.DyeColor) SpriteShiftEntry(com.simibubi.create.foundation.block.render.SpriteShiftEntry)

Aggregations

BeltData (com.simibubi.create.content.contraptions.base.flwdata.BeltData)1 SpriteShiftEntry (com.simibubi.create.foundation.block.render.SpriteShiftEntry)1 DyeColor (net.minecraft.world.item.DyeColor)1