use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateTransceiver method renderStatic.
@Override
@SideOnly(Side.CLIENT)
public boolean renderStatic(Vec3i translation, RenderHelper renderer, RenderBlocks renderBlocks, int pass) {
super.renderStatic(translation, renderer, renderBlocks, pass);
if (getParent() != null)
renderer.addTransformation(new Rotation(0, 180, 0));
IIcon obsidian = Blocks.obsidian.getIcon(0, 0);
IIcon quartz = Blocks.quartz_block.getIcon(0, 0);
IIcon iron = Blocks.iron_block.getIcon(0, 0);
IIcon gold = Blocks.gold_block.getIcon(0, 0);
// Base
renderer.renderBox(new Vec3dCube(7 / 16D, 2 / 16D, 7 / 16D, 9 / 16D, 8 / 16D, 9 / 16D), obsidian);
if (getParent() == null || getWorld() == null)
renderer.addTransformation(new Rotation(0, -(System.currentTimeMillis() / 100D) % 360, 0));
renderer.addTransformation(new Rotation(45, 0, 0));
// Post
renderer.renderBox(new Vec3dCube(15 / 32D, 9 / 16D, 15 / 32D, 17 / 32D, 10 / 16D, 17 / 32D), iron);
// Ball thingy
renderer.renderBox(new Vec3dCube(7 / 16D, 10 / 16D, 7 / 16D, 9 / 16D, 12 / 16D, 9 / 16D), gold);
renderer.renderBox(new Vec3dCube(6 / 16D, 8 / 16D, 5 / 16D, 10 / 16D, 9 / 16D, 11 / 16D), quartz);
renderer.renderBox(new Vec3dCube(5 / 16D, 8 / 16D, 6 / 16D, 11 / 16D, 9 / 16D, 10 / 16D), quartz);
for (int i = 0; i < 4; i++) {
renderer.renderBox(new Vec3dCube(5 / 16D, 9 / 16D, 10 / 16D, 6 / 16D, 10 / 16D, 11 / 16D).rotate(0, i * 90, 0, Vec3d.center), quartz);
renderer.renderBox(new Vec3dCube(4 / 16D, 9 / 16D, 6 / 16D, 5 / 16D, 10 / 16D, 10 / 16D).rotate(0, i * 90, 0, Vec3d.center), quartz);
renderer.renderBox(new Vec3dCube(4 / 16D, 10 / 16D, 5 / 16D, 5 / 16D, 11 / 16D, 11 / 16D).rotate(0, i * 90, 0, Vec3d.center), quartz);
renderer.renderBox(new Vec3dCube(4 / 16D, 11 / 16D, 11 / 16D, 5 / 16D, 12 / 16D, 12 / 16D).rotate(0, i * 90, 0, Vec3d.center), quartz);
renderer.renderBox(new Vec3dCube(3 / 16D, 11 / 16D, 4 / 16D, 4 / 16D, 12 / 16D, 12 / 16D).rotate(0, i * 90, 0, Vec3d.center), quartz);
}
renderer.resetTransformations();
return true;
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateComponentButton method renderStatic.
@Override
public void renderStatic(Vec3i translation, RenderHelper renderer, int pass) {
renderer.renderBox(new Vec3dCube(x, 2 / 16D, z, x + 4 / 16D, 3.5 / 16D, z + 4 / 16D), IconSupplier.gateButton);
renderer.renderBox(new Vec3dCube(x + 1 / 32D, 3.5 / 16D, z + 1 / 32D, x + 4 / 16D - 1 / 32D, 4 / 16D, z + 4 / 16D - 1 / 32D), getIcon());
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateComponentCubes method renderStatic.
@Override
public void renderStatic(Vec3i translation, RenderHelper renderer, int pass) {
renderer.setColor(getColor());
renderer.setRenderSides(false, true, true, true, true, true);
for (Vec3dCube c : getCubes()) renderer.renderBox(c, getIcon());
renderer.resetRenderedSides();
renderer.setColor(0xFFFFFF);
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateComponentLever method renderStatic.
@Override
public void renderStatic(Vec3i translation, RenderHelper renderer, int pass) {
renderer.addTransformation(new Translation(x, 0, z));
renderer.renderBox(new Vec3dCube(0, 2 / 16D, 0, 4 / 16D, 4 / 16D, 7 / 16D), Blocks.cobblestone.getIcon(0, 0));
renderer.removeTransformation();
}
use of uk.co.qmunity.lib.vec.Vec3dCube in project BluePower by Qmunity.
the class GateIntegratedCircuit method addSelectionBoxes.
@Override
public void addSelectionBoxes(List<Vec3dCube> boxes) {
boxes.add(new Vec3dCube(0, 0, 0, 1, 1 / 16D, 1));
boxes.add(new Vec3dCube(0, 1 / 16D, 0, 1, 2 / 16D, 1 / 16D));
boxes.add(new Vec3dCube(0, 1 / 16D, 1 - 1 / 16D, 1, 2 / 16D, 1));
boxes.add(new Vec3dCube(0, 1 / 16D, 0, 1 / 16D, 2 / 16D, 1));
boxes.add(new Vec3dCube(1 - 1 / 16D, 1 / 16D, 0, 1, 2 / 16D, 1));
}
Aggregations