Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package io.github.hsyyid.gta.entities.render;
- import io.github.hsyyid.gta.Main;
- import io.github.hsyyid.gta.entities.EntityZentorno;
- import net.minecraft.client.renderer.GlStateManager;
- import net.minecraft.client.renderer.entity.Render;
- import net.minecraft.client.renderer.entity.RenderManager;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.util.ResourceLocation;
- import net.minecraftforge.fml.relauncher.Side;
- import net.minecraftforge.fml.relauncher.SideOnly;
- import com.arisux.xlib.api.wavefrontapi.Part;
- import com.arisux.xlib.api.wavefrontapi.WavefrontAPI;
- import com.arisux.xlib.api.wavefrontapi.WavefrontModel;
- import com.arisux.xlib.client.render.XLibRenderer;
- @SideOnly(Side.CLIENT)
- public class RenderZentornoEntity extends Render
- {
- public WavefrontModel model = WavefrontAPI.instance().loadModel(Main.class, "gta", "m577apc", "/assets/gta/models/entity/m577apc");
- public RenderZentornoEntity(RenderManager renderManager)
- {
- super(renderManager);
- }
- protected ResourceLocation getEntityTexture(EntityZentorno entityZentrono)
- {
- return null;
- }
- protected ResourceLocation getEntityTexture(Entity entity)
- {
- return null;
- }
- public void doRender(Entity zentornoIn, double posX, double posY, double posZ, float yaw, float partialTicks)
- {
- XLibRenderer.pushMatrix();
- {
- XLibRenderer.translate(posX, posY, posZ);
- double curVelocity = Math.sqrt(zentornoIn.motionX * zentornoIn.motionX + zentornoIn.motionZ * zentornoIn.motionZ);
- float tireRotation = curVelocity > 0.1 ? -(zentornoIn.worldObj.getWorldTime() % 360 * 8) - partialTicks : 0;
- for(Part p : model.nameToPartHash.values())
- {
- if(p != null)
- {
- XLibRenderer.pushMatrix();
- {
- p.draw();
- }
- XLibRenderer.popMatrix();
- }
- }
- }
- XLibRenderer.popMatrix();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement