Search in sources :

Example 1 with AirshipWorld

use of com.eriksonn.createaeronautics.dimension.AirshipWorld in project Create_Aeronautics by Eriksonnaren.

the class AirshipContraptionRenderer method render.

public void render(AirshipContraptionEntity entity, float yaw, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int overlay) {
    super.render(entity, yaw, partialTicks, ms, buffers, overlay);
    // ContraptionMatrices matrices = new ContraptionMatrices(ms, entity);
    Contraption contraption = entity.getContraption();
    if (contraption != null) {
    // ContraptionRenderDispatcher.render(entity, contraption, matrices, buffers);
    }
    ClientWorld w = ClientWorldLoader.getWorld(AirshipDimensionManager.INSTANCE.getWorld().dimension());
    AirshipContraption aircon = (AirshipContraption) contraption;
    Vector3i vec1 = new Vector3i((float) entity.position().x - 5, (float) entity.position().y - 5, (float) entity.position().z - 5);
    Vector3i vec2 = new Vector3i((float) entity.position().x + 5, (float) entity.position().y + 5, (float) entity.position().z + 5);
    vec1 = new Vector3i(-4, -4, -4);
    vec2 = new Vector3i(4, 4, 4);
    // timer=1;
    // if (timer==1)
    // renderer.setActive(true);
    // renderer.tick();
    // if (timer==1)
    // renderer.update();
    AirshipWorld aw = new AirshipWorld(AirshipDimensionManager.INSTANCE.getWorld());
    // if (timer==1)
    // renderer.display(aw,aircon.anchor,new MutableBoundingBox(vec1.getX(),vec1.getY(),vec1.getZ(),vec2.getX(),vec2.getY(),vec2.getZ()));
    timer++;
    timer = timer % 15;
    // SuperRenderTypeBuffer buffer = SuperRenderTypeBuffer.getInstance();
    ms.pushPose();
    // Quaternion Q2 = .copy();
    // Q2.mul(Q);
    // ms.mulPose(entity.Quat);
    // ms.mulPose();
    // renderer.render(ms,buffer);
    // buffer.draw();
    ms.popPose();
    // if(aircon!=null) {
    // if(aircon.storageWorld !=null) {
    // PortalRendering.onBeginPortalWorldRendering();
    // try {
    int renderDistance = 3;
// WorldRenderInfo worldRenderInfo = new WorldRenderInfo(w, CGlobal.originalCamera.getPosition(), new Matrix4f(new Quaternion(0, 0, 0, 1)), false, entity.getUUID(), renderDistance);
// WorldRenderInfo.pushRenderInfo(worldRenderInfo);
// Test(w,Runnable::run);
// MyGameRenderer.renderWorldNew(worldRenderInfo, Runnable::run);
// switchAndRenderTheWorld(w, CGlobal.originalCamera.getPosition(), CGlobal.originalCamera.getPosition(), Runnable::run, 3);
// WorldRenderInfo.popRenderInfo();
// PortalRendering.onEndPortalWorldRendering();
// GlStateManager._enableDepthTest();
// GlStateManager._disableBlend();
// MyRenderHelper.restoreViewPort();
// }
// catch(Exception e)
// {
// 
// }
// }
// }
}
Also used : Vector3i(net.minecraft.util.math.vector.Vector3i) ClientWorld(net.minecraft.client.world.ClientWorld) Contraption(com.simibubi.create.content.contraptions.components.structureMovement.Contraption) AirshipWorld(com.eriksonn.createaeronautics.dimension.AirshipWorld)

Aggregations

AirshipWorld (com.eriksonn.createaeronautics.dimension.AirshipWorld)1 Contraption (com.simibubi.create.content.contraptions.components.structureMovement.Contraption)1 ClientWorld (net.minecraft.client.world.ClientWorld)1 Vector3i (net.minecraft.util.math.vector.Vector3i)1