Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Decompiled with CFR 0_118.
- *
- * Could not load the following classes:
- * api.player.model.ModelPlayer
- * api.player.model.ModelPlayerAPI
- * api.player.model.ModelPlayerBase
- * net.minecraft.entity.Entity
- * net.minecraft.entity.player.EntityPlayer
- * net.minecraft.profiler.Profiler
- * net.minecraft.util.StringUtils
- * net.minecraft.world.World
- * org.lwjgl.opengl.GL11
- */
- package net.xtrafrancyz.mods.MiniDot.items;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.xtrafrancyz.mods.MiniDot.MiniDotMod;
- import net.xtrafrancyz.mods.MiniDot.MiniDotPlayer;
- import org.lwjgl.opengl.GL11;
- import api.player.model.ModelPlayerAPI;
- import api.player.model.ModelPlayerBase;
- public class PlayerModelManager extends ModelPlayerBase{
- public PlayerModelManager(ModelPlayerAPI api){
- super(api);
- }
- public void render(Entity entity, float var2, float var3, float time, float var5, float var6, float scale){
- super.render(entity, var2, var3, time, var5, var6, scale);
- if(entity.isInvisible()){
- return;
- }
- entity.worldObj.theProfiler.startSection("MiniDot");
- EntityPlayer player = (EntityPlayer)entity;
- MiniDotPlayer pi = MiniDotPlayer.forPlayer(player);
- if(pi != null){
- boolean blendEnabled = GL11.glIsEnabled(3042);
- int depthFunc = GL11.glGetInteger(2932);
- GL11.glMatrixMode(5890);
- GL11.glLoadIdentity();
- GL11.glMatrixMode(5888);
- GL11.glColor3f(1.0f, 1.0f, 1.0f);
- GL11.glEnable(2896);
- GL11.glEnable(3553);
- GL11.glBlendFunc(770, 771);
- if(!blendEnabled){
- GL11.glEnable(3042);
- }
- GL11.glDepthFunc(513);
- for(int id : pi.items){
- if(id < 0){
- continue;
- }
- BaseItem item = MiniDotMod.items.get(id);
- try{
- if(item == null || item.getType().ordinal() >= 4)
- continue;
- entity.worldObj.theProfiler.startSection("render");
- item.render(modelPlayer, player, scale, time, pi);
- entity.worldObj.theProfiler.endSection();
- }catch(Exception e){
- MiniDotMod.logger.error(e);
- }
- }
- if(blendEnabled){
- GL11.glEnable(3042);
- }
- GL11.glDepthFunc(depthFunc);
- }
- entity.worldObj.theProfiler.endSection();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement