1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package darkknight.jewelrycraft.item.render;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.Loader;
import darkknight.jewelrycraft.model.ModelBracelet;
import darkknight.jewelrycraft.util.Variables;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
public class BraceletRender extends TileEntitySpecialRenderer {
public ModelBracelet bracelet = new ModelBracelet();
ResourceLocation texture = new ResourceLocation(
Variables.MODID, "textures/entities/Bracelet.png");
@Override
public void renderTileEntityAt(TileEntity te, double x, double y,
double z, float scale) {
}
public void doRender(Entity entity, double x, double y, double z,
float f, float g) {
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
if ((float) z != -1)
bracelet.render(entity, 0F, 0F, 0F, (float) z, f,
1.0F);
if (Loader.isModLoaded(
"alpaca") /*
* && fiskfille.alpaca.
* AlpacaAPI.
* isAlpacaClient((
* EntityPlayer)entity)
*/) {
GL11.glTranslatef(1F, 0F, -9F);
GL11.glRotatef(25F, 1F, 0F, 0F);
GL11.glRotatef(-25F, 0F, 1F, 0F);
} else
GL11.glTranslatef(0F, 3F, 0F);
if ((float) x != -1)
bracelet.render(entity, 0F, 0F, 0F, (float) x,
(float) y, 1.0F);
GL11.glPopMatrix();
}
}
|