Package wecui.render

Source Code of wecui.render.RenderHooks

package wecui.render;

import deobf.Entity;
import deobf.Render;
import wecui.event.WorldRenderEvent;
import wecui.WorldEditCUI;
import wecui.obfuscation.RenderObfuscation;

/**
* Custom entity renderer, attached in the ModLoader class
*
* @author lahwran
* @author yetanotherx
*
* @obfuscated 1.4.5
*/
public class RenderHooks extends Render {

    protected WorldEditCUI controller;
    protected WorldRenderEvent event;

    public RenderHooks(WorldEditCUI controller) {
        this.controller = controller;
        this.event = new WorldRenderEvent(controller);
    }

    /**
     * Actually renders the entity.
     * @param entity
     * @param x
     * @param y
     * @param z
     * @param yaw
     * @param renderTick
     */
    public void renderCUI(Entity entity, double x, double y, double z, float yaw, float renderTick) {
        RenderObfuscation.disableLighting();
        event.setPartialTick(renderTick);
        controller.getEventManager().callEvent(event);
        RenderObfuscation.enableLighting();
    }

    /**
     * Render.doRender
     * @param entity
     * @param x
     * @param y
     * @param z
     * @param yaw
     * @param renderTick
     */
    @Override
    public void a(Entity entity, double x, double y, double z, float yaw, float renderTick) {
        renderCUI(entity, x, y, z, yaw, renderTick);
    }
}
TOP

Related Classes of wecui.render.RenderHooks

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.