Merge branch 'packet' into animation-events-2

This commit is contained in:
Kam committed 2025-02-12 22:37:52 -05:00
commit 16f2901fbc
119 files changed
+2688 -931

No files matched your search

@@ -113,6 +113,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileBanner.class, new BlockBannerRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileWallBanner.class, new BlockWallBannerRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileTallLamp.class, new BlockTallLampRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileShortLamp.class, new BlockShortLampRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileChair.class, new BlockChairRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileWeaponRack.class, new BlockWeaponRackRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileCrate.class, new BlockCrateRenderer());
@@ -120,7 +121,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileCouchWood.class, new BlockCouchWoodRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileTable.class, new BlockTableRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileCandle.class, new BlockCandleRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileLamp.class, new BlockLampRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileLamp.class, new BlockLanternRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileStool.class, new BlockStoolRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileBigSign.class, new BlockBigSignRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileBarrel.class, new BlockBarrelRenderer());
@@ -32,7 +32,7 @@ public class GuiMagicMap extends GuiDiagram {
for (Magic magic : MagicController.getInstance().magics.values()) {
magics.add(magic);
}
setLayout(DiagramLayout.CHART);
setLayout(DiagramLayout.CIRCULAR_MANUAL);
this.setCurvedArrows(true);
this.setCurveAngle(-20);
}
@@ -39,7 +39,7 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
super.initGui();
GuiMenuTopButton close = new GuiMenuTopButton(-5, guiLeft + xSize - 22, guiTop - 10, "X");
GuiMenuTopButton general = new GuiMenuTopButton(-1, guiLeft + 4, guiTop - 10, "display.general");
GuiMenuTopButton general = new GuiMenuTopButton(-1, guiLeft + 4, guiTop - 10, "menu.general");
GuiMenuTopButton scripts = new GuiMenuTopButton(-2, general.xPosition + general.getWidth(), guiTop - 10, "script.scripts");
close.active = false;
@@ -131,7 +131,7 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
// TODO: FIX TEXTURE
// textureManager.bindTexture(new ResourceLocation(CustomNpcPlusDBC.ID + ":textures/gui/icons.png"));
func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
// func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
};
@@ -50,7 +50,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
addButton(new GuiNpcButton(1, guiLeft + 368, guiTop + 32, 45, 20, "gui.remove"));
getButton(1).enabled = effect != null && effect.id != -1;
addButton(new GuiNpcButton(2, guiLeft + 368, guiTop + 56, 45, 20, "gui.clone"));
addButton(new GuiNpcButton(2, guiLeft + 368, guiTop + 56, 45, 20, "gui.copy"));
getButton(2).enabled = effect != null && effect.id != -1;
addButton(new GuiNpcButton(3, guiLeft + 368, guiTop + 80, 45, 20, "gui.edit"));
@@ -112,7 +112,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
effect.readFromNBT(compound);
setSelected(effect.name);
if (effect.id != -1) {
CustomEffectController.getInstance().customEffects.replace(effect.id, effect);
CustomEffectController.getInstance().getCustomEffects().replace(effect.id, effect);
}
initGui();
}
@@ -173,7 +173,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
// TODO: Fix ICONS
// textureManager.bindTexture(new ResourceLocation(CustomNpcPlusDBC.ID + ":textures/gui/icons.png"));
func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
// func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
GL11.glEnable(GL11.GL_DEPTH_TEST);
x += iconRenderSize + 3;
@@ -142,8 +142,7 @@ public abstract class GuiNPCInterface extends GuiScreen {
tf.mouseClicked(i, j, k);
for (GuiScrollWindow guiScrollableComponent : scrollWindows.values()) {
if (guiScrollableComponent.isMouseOver(i, j))
guiScrollableComponent.mouseClicked(i, j, k);
guiScrollableComponent.mouseClicked(i, j, k);
}
if (k == 0) {
@@ -94,7 +94,6 @@ public class GuiScrollWindow extends GuiScreen implements ITextfieldListener, IC
}
public void mouseClicked(int i, int j, int k) {
i = i - xPos;
j = (int) (j - yPos + scrollY);
@@ -1,90 +1,136 @@
// Date: 11-10-2012 19:29:20
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package noppes.npcs.client.model.blocks;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelAnvil extends ModelBase {
ModelRenderer Tail;
ModelRenderer Nose1;
ModelRenderer Nose2;
ModelRenderer Nose3;
ModelRenderer Nose4;
ModelRenderer Head1;
ModelRenderer Head2;
ModelRenderer Neck2;
ModelRenderer Bottom2;
ModelRenderer Bottom3;
ModelRenderer Foot4;
public final ModelRenderer Anvil;
public final ModelRenderer Desk;
public final ModelRenderer Bucket;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public final ModelRenderer Lava;
public final ModelRenderer Hammer;
private final ModelRenderer Hammer_r1;
public final ModelRenderer Mold;
private final ModelRenderer cube_r3;
private final ModelRenderer cube_r4;
private final ModelRenderer cube_r5;
private final ModelRenderer cube_r6;
private final ModelRenderer cube_r7;
private final ModelRenderer cube_r8;
public ModelAnvil() {
textureWidth = 64;
textureHeight = 32;
public ModelAnvil() {
textureWidth = 64;
textureHeight = 64;
Tail = new ModelRenderer(this, 0, 0);
Tail.addBox(0F, 0F, 0F, 1, 2, 4);
Tail.setRotationPoint(-7F, 12F, -2F);
Anvil = new ModelRenderer(this);
Anvil.setRotationPoint(0.0F, 24.0F, 0.0F);
Anvil.cubeList.add(new ModelBox(Anvil, 0, 16, -6.0F, -4.0F, -8.0F, 12, 4, 12, 0.0F));
Anvil.cubeList.add(new ModelBox(Anvil, 0, 32, -5.0F, -5.0F, -6.0F, 10, 1, 8, 0.0F));
Anvil.cubeList.add(new ModelBox(Anvil, 0, 41, -4.0F, -10.0F, -4.0F, 8, 5, 4, 0.0F));
Anvil.cubeList.add(new ModelBox(Anvil, 0, 0, -8.0F, -16.0F, -7.0F, 16, 6, 10, 0.0F));
Nose1 = new ModelRenderer(this, 0, 0);
Nose1.addBox(0F, 0F, 0F, 1, 5, 6);
Nose1.setRotationPoint(6F, 10F, -3F);
Desk = new ModelRenderer(this);
Desk.setRotationPoint(0.0F, 24.0F, 0.0F);
Desk.cubeList.add(new ModelBox(Desk, 52, 0, 5.0F, -14.0F, 5.0F, 3, 14, 3, 0.0F));
Desk.cubeList.add(new ModelBox(Desk, 52, 0, -8.0F, -14.0F, 5.0F, 3, 14, 3, 0.0F));
Desk.cubeList.add(new ModelBox(Desk, 0, 50, -8.0F, -16.0F, 3.0F, 16, 2, 5, 0.0F));
Nose2 = new ModelRenderer(this, 0, 0);
Nose2.addBox(0F, 0F, 0F, 1, 4, 5);
Nose2.setRotationPoint(7F, 10F, -2.5F);
Bucket = new ModelRenderer(this);
Bucket.setRotationPoint(3.0F, 5.5F, 4.0F);
setRotationAngle(Bucket, 0.0F, 0.3927F, 0.0F);
Bucket.cubeList.add(new ModelBox(Bucket, 48, 17, -2.0F, 1.5F, -2.0F, 4, 1, 4, 0.0F));
Bucket.cubeList.add(new ModelBox(Bucket, 54, 22, 1.5F, -2.5F, -2.0F, 1, 4, 4, 0.0F));
Bucket.cubeList.add(new ModelBox(Bucket, 54, 22, -2.5F, -2.5F, -2.0F, 1, 4, 4, 0.0F));
Nose3 = new ModelRenderer(this, 0, 0);
Nose3.addBox(0F, 0F, 0F, 1, 3, 4);
Nose3.setRotationPoint(8F, 10F, -2F);
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, -0.5F, -2.0F);
Bucket.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 54, 22, -0.5F, -2.0F, -2.0F, 1, 4, 4, 0.0F));
Nose4 = new ModelRenderer(this, 0, 0);
Nose4.addBox(0F, 0F, 0F, 1, 2, 2);
Nose4.setRotationPoint(9F, 10F, -1F);
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -0.5F, 2.0F);
Bucket.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, -1.5708F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 54, 22, -0.5F, -2.0F, -2.0F, 1, 4, 4, 0.0F));
Head1 = new ModelRenderer(this, 0, 0);
Head1.addBox(0F, 0F, 0F, 12, 4, 7);
Head1.setRotationPoint(-6F, 12F, -3.5F);
Lava = new ModelRenderer(this);
Lava.setRotationPoint(3.0F, 5.5F, 4.0F);
setRotationAngle(Lava, 0.0F, 0.3927F, 0.0F);
Lava.cubeList.add(new ModelBox(Lava, 48, 30, -2.0F, -1.5F, -2.0F, 4, 3, 4, 0.0F));
Head2 = new ModelRenderer(this, 0, 0);
Head2.addBox(0F, 0F, 0F, 14, 2, 9);
Head2.setRotationPoint(-8F, 10F, -4.5F);
Hammer = new ModelRenderer(this);
Hammer.setRotationPoint(4.9909F, 6.5642F, -4.0337F);
setRotationAngle(Hammer, 0.1327F, 0.0189F, 0.1303F);
Neck2 = new ModelRenderer(this, 0, 0);
Neck2.addBox(0F, 0F, 0F, 10, 1, 6);
Neck2.setRotationPoint(-5F, 16F, -3F);
Bottom2 = new ModelRenderer(this, 0, 0);
Bottom2.addBox(0F, 0F, 0F, 10, 2, 7);
Bottom2.setRotationPoint(-5F, 20F, -3.5F);
Hammer_r1 = new ModelRenderer(this);
Hammer_r1.setRotationPoint(-0.2409F, 0.5358F, -0.4663F);
Hammer.addChild(Hammer_r1);
setRotationAngle(Hammer_r1, 2.9697F, -0.7703F, -2.8972F);
Hammer_r1.cubeList.add(new ModelBox(Hammer_r1, 56, 45, -2.8377F, -0.7659F, -1.0002F, 3, 1, 1, 0.0F));
Hammer_r1.cubeList.add(new ModelBox(Hammer_r1, 48, 37, 0.1623F, -1.7659F, -3.0002F, 3, 3, 5, 0.0F));
Bottom3 = new ModelRenderer(this, 0, 0);
Bottom3.addBox(0F, 0F, 0F, 8, 3, 4);
Bottom3.setRotationPoint(-4F, 17F, -2F);
Mold = new ModelRenderer(this);
Mold.setRotationPoint(-3.2778F, 7.5556F, 1.5F);
setRotationAngle(Mold, 0.0F, 0.7854F, 0.0F);
Mold.cubeList.add(new ModelBox(Mold, -5, 59, -3.7222F, 0.3444F, -2.5F, 7, 0, 5, 0.0F));
Mold.cubeList.add(new ModelBox(Mold, 14, 62, -3.7222F, -0.5556F, -2.5F, 7, 1, 1, 0.0F));
Mold.cubeList.add(new ModelBox(Mold, 14, 62, -3.7222F, -0.5556F, 1.5F, 7, 1, 1, 0.0F));
Foot4 = new ModelRenderer(this, 0, 0);
Foot4.addBox(0F, 0F, 0F, 14, 2, 10);
Foot4.setRotationPoint(-7F, 22F, -5F);
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(0.7778F, -0.0556F, -1.0F);
Mold.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, 0.0F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 31, 62, 0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(-1.2222F, -0.0556F, -1.0F);
Mold.addChild(cube_r4);
setRotationAngle(cube_r4, 0.0F, 0.0F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 25, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
cube_r5 = new ModelRenderer(this);
cube_r5.setRotationPoint(0.7778F, -0.0556F, 1.0F);
Mold.addChild(cube_r5);
setRotationAngle(cube_r5, 0.0F, 0.0F, 0.0F);
cube_r5.cubeList.add(new ModelBox(cube_r5, 31, 62, 0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F));
cube_r6 = new ModelRenderer(this);
cube_r6.setRotationPoint(-1.2222F, -0.0556F, 1.0F);
Mold.addChild(cube_r6);
setRotationAngle(cube_r6, 0.0F, 0.0F, 0.0F);
cube_r6.cubeList.add(new ModelBox(cube_r6, 25, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
cube_r7 = new ModelRenderer(this);
cube_r7.setRotationPoint(2.7778F, -0.0556F, 0.0F);
Mold.addChild(cube_r7);
setRotationAngle(cube_r7, 0.0F, -1.5708F, 0.0F);
cube_r7.cubeList.add(new ModelBox(cube_r7, 15, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
cube_r8 = new ModelRenderer(this);
cube_r8.setRotationPoint(-3.2222F, -0.0556F, 0.0F);
Mold.addChild(cube_r8);
setRotationAngle(cube_r8, 0.0F, -1.5708F, 0.0F);
cube_r8.cubeList.add(new ModelBox(cube_r8, 15, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Anvil.render(f5);
Desk.render(f5);
Bucket.render(f5);
Hammer.render(f5);
Mold.render(f5);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5,entity);
Tail.render(f5);
Nose1.render(f5);
Nose2.render(f5);
Nose3.render(f5);
Nose4.render(f5);
Head1.render(f5);
Head2.render(f5);
Neck2.render(f5);
Bottom2.render(f5);
Bottom3.render(f5);
Foot4.render(f5);
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -1,40 +1,31 @@
package noppes.npcs.client.model.blocks;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
public class ModelPedestal extends ModelBase {
ModelRenderer Main_Block;
ModelRenderer Front;
private final ModelRenderer bb_main;
public ModelPedestal() {
Main_Block = new ModelRenderer(this, 1, 0);
Main_Block.addBox(-7F, 0F, -8F, 14, 3, 16);
Main_Block.setRotationPoint(0, 16F, 0F);
Front = new ModelRenderer(this, 16, 8);
Front.addBox(-8F, 0F, -8F, 16, 5, 16);
Front.setRotationPoint(0F, 19F, 0F);
textureWidth = 64;
textureHeight = 64;
bb_main = new ModelRenderer(this);
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
bb_main.cubeList.add(new ModelBox(bb_main, 0, 0, -6.0F, -4.0F, -6.0F, 12, 4, 12, 0.0F));
bb_main.cubeList.add(new ModelBox(bb_main, 0, 16, -5.0F, -5.0F, -4.0F, 10, 1, 8, 0.0F));
}
public void render(Entity entity, float f, float f1, float f2, float f3,
float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
GL11.glPushMatrix();
GL11.glScalef(1, 1, 0.5f);
Main_Block.render(f5);
GL11.glScalef(1, 1, 1.25f);
Front.render(f5);
GL11.glPopMatrix();
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
bb_main.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -6,77 +6,77 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTable extends ModelBase {
public final ModelRenderer Shape1;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public final ModelRenderer Shape3;
public final ModelRenderer Shape4;
private final ModelRenderer cube_r3;
public final ModelRenderer Shape2;
private final ModelRenderer cube_r4;
private final ModelRenderer cube_r1;
public final ModelRenderer Shape1;
private final ModelRenderer cube_r2;
private final ModelRenderer cube_r3;
public final ModelRenderer Shape5;
private final ModelRenderer cube_r4;
public final ModelRenderer Table;
public ModelTable() {
textureWidth = 64;
textureHeight = 64;
public ModelTable() {
textureWidth = 64;
textureHeight = 32;
Shape1 = new ModelRenderer(this);
Shape1.setRotationPoint(-4.8333F, 14.8333F, 4.8333F);
Shape1.cubeList.add(new ModelBox(Shape1, 0, 19, -2.1667F, -3.8333F, 0.1667F, 2, 13, 2, 0.0F));
Shape3 = new ModelRenderer(this);
Shape3.setRotationPoint(-6.0F, 24.0F, 6.0F);
Shape3.cubeList.add(new ModelBox(Shape3, 8, 19, 6.0F, -13.0F, -12.0F, 5, 5, 0, 0.0F));
Shape3.cubeList.add(new ModelBox(Shape3, 0, 0, 11.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
Shape3.cubeList.add(new ModelBox(Shape3, 8, 14, 12.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(-1.1667F, -1.3333F, -2.3333F);
Shape1.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 3.1416F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
Shape4 = new ModelRenderer(this);
Shape4.setRotationPoint(-6.0F, 24.0F, 6.0F);
Shape4.cubeList.add(new ModelBox(Shape4, 8, 19, 6.0F, -13.0F, 0.0F, 5, 5, 0, 0.0F));
Shape4.cubeList.add(new ModelBox(Shape4, 0, 0, 11.0F, -13.0F, -1.0F, 2, 13, 2, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(2.3333F, -1.3333F, 1.1667F);
Shape1.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 3.1416F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(12.0F, -10.5F, -3.5F);
Shape4.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 3.1416F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
Shape3 = new ModelRenderer(this);
Shape3.setRotationPoint(-6.0F, 24.0F, 6.0F);
Shape3.cubeList.add(new ModelBox(Shape3, 8, 19, 6.0F, -13.0F, -12.0F, 5, 5, 0, 0.0F));
Shape3.cubeList.add(new ModelBox(Shape3, 0, 19, 11.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
Shape3.cubeList.add(new ModelBox(Shape3, 8, 14, 12.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
Shape1 = new ModelRenderer(this);
Shape1.setRotationPoint(-6.0F, 24.0F, 6.0F);
Shape1.cubeList.add(new ModelBox(Shape1, 0, 0, -1.0F, -13.0F, -1.0F, 2, 13, 2, 0.0F));
Shape4 = new ModelRenderer(this);
Shape4.setRotationPoint(-6.0F, 24.0F, 6.0F);
Shape4.cubeList.add(new ModelBox(Shape4, 8, 19, 6.0F, -13.0F, 0.0F, 5, 5, 0, 0.0F));
Shape4.cubeList.add(new ModelBox(Shape4, 0, 19, 11.0F, -13.0F, -1.0F, 2, 13, 2, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -10.5F, -3.5F);
Shape1.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 3.1416F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(12.0F, -10.5F, -3.5F);
Shape4.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, 3.1416F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(3.5F, -10.5F, 0.0F);
Shape1.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, 3.1416F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
Shape2 = new ModelRenderer(this);
Shape2.setRotationPoint(0.0F, 24.0F, 6.0F);
Shape2.cubeList.add(new ModelBox(Shape2, 0, 19, -7.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
Shape2.cubeList.add(new ModelBox(Shape2, 8, 14, -6.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
Shape5 = new ModelRenderer(this);
Shape5.setRotationPoint(-6.0F, 24.0F, 6.0F);
Shape5.cubeList.add(new ModelBox(Shape5, 0, 0, -1.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
Shape5.cubeList.add(new ModelBox(Shape5, 8, 14, 0.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(-2.5F, -10.5F, -12.0F);
Shape2.addChild(cube_r4);
setRotationAngle(cube_r4, 0.0F, 3.1416F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(3.5F, -10.5F, -12.0F);
Shape5.addChild(cube_r4);
setRotationAngle(cube_r4, 0.0F, 3.1416F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
Table = new ModelRenderer(this);
Table.setRotationPoint(0.0F, 24.0F, 6.0F);
Table.cubeList.add(new ModelBox(Table, 0, 0, -8.0F, -16.0F, -14.0F, 16, 3, 16, 0.0F));
}
Table = new ModelRenderer(this);
Table.setRotationPoint(-6.0F, 24.0F, 6.0F);
Table.cubeList.add(new ModelBox(Table, 0, 0, -2.0F, -16.0F, -14.0F, 16, 3, 16, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
Shape3.render(f5);
Shape4.render(f5);
Shape1.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape2.render(f5);
}
Shape5.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
@@ -7,6 +7,7 @@ import net.minecraft.entity.Entity;
public class ModelBannerWallFlag extends ModelBase {
public final ModelRenderer BannerFlag;
public final float rotationX = 0;
public ModelBannerWallFlag() {
textureWidth = 32;
@@ -0,0 +1,55 @@
package noppes.npcs.client.model.blocks.candle;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCandle extends ModelBase {
public final ModelRenderer Candle;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public final ModelRenderer Holder;
public ModelCandle() {
textureWidth = 64;
textureHeight = 32;
Candle = new ModelRenderer(this);
Candle.setRotationPoint(0.0F, 23.0F, 0.0F);
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -5.0F, -1.0F, 2, 5, 2, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, -5.5F, 0.0F);
Candle.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 2.3562F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -5.5F, 0.0F);
Candle.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
Holder = new ModelRenderer(this);
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -1.0F, -2.0F, 4, 1, 4, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 36, 0, 2.0F, -2.0F, -3.0F, 1, 1, 6, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 36, 0, -3.0F, -2.0F, -3.0F, 1, 1, 6, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 36, 7, -2.0F, -2.0F, -3.0F, 4, 1, 1, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 36, 7, -2.0F, -2.0F, 2.0F, 4, 1, 1, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 12, 11, 2.0F, -4.0F, 0.0F, 3, 3, 0, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Candle.render(f5);
Holder.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,145 @@
package noppes.npcs.client.model.blocks.candle;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCandleCeiling extends ModelBase {
public final ModelRenderer Candle;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
private final ModelRenderer cube_r3;
private final ModelRenderer cube_r4;
private final ModelRenderer cube_r5;
private final ModelRenderer cube_r6;
private final ModelRenderer cube_r7;
private final ModelRenderer cube_r8;
public final ModelRenderer Holder;
public final ModelRenderer Base;
private final ModelRenderer cube_r9;
private final ModelRenderer cube_r10;
private final ModelRenderer cube_r11;
public final ModelRenderer Chain;
private final ModelRenderer cube_r12;
private final ModelRenderer cube_r13;
public ModelCandleCeiling() {
textureWidth = 64;
textureHeight = 32;
Candle = new ModelRenderer(this);
Candle.setRotationPoint(0.0F, 23.0F, 0.0F);
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -9.0F, 5.0F, 2, 5, 2, 0.0F));
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -7.0F, -9.0F, -1.0F, 2, 5, 2, 0.0F));
Candle.cubeList.add(new ModelBox(Candle, 28, 1, 5.0F, -9.0F, -1.0F, 2, 5, 2, 0.0F));
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -9.0F, -7.0F, 2, 5, 2, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, -9.5F, -6.0F);
Candle.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 2.3562F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -9.5F, -6.0F);
Candle.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(6.0F, -9.5F, 0.0F);
Candle.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, 2.3562F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(6.0F, -9.5F, 0.0F);
Candle.addChild(cube_r4);
setRotationAngle(cube_r4, 0.0F, 0.7854F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r5 = new ModelRenderer(this);
cube_r5.setRotationPoint(-6.0F, -9.5F, 0.0F);
Candle.addChild(cube_r5);
setRotationAngle(cube_r5, 0.0F, 2.3562F, 0.0F);
cube_r5.cubeList.add(new ModelBox(cube_r5, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r6 = new ModelRenderer(this);
cube_r6.setRotationPoint(-6.0F, -9.5F, 0.0F);
Candle.addChild(cube_r6);
setRotationAngle(cube_r6, 0.0F, 0.7854F, 0.0F);
cube_r6.cubeList.add(new ModelBox(cube_r6, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r7 = new ModelRenderer(this);
cube_r7.setRotationPoint(0.0F, -9.5F, 6.0F);
Candle.addChild(cube_r7);
setRotationAngle(cube_r7, 0.0F, 2.3562F, 0.0F);
cube_r7.cubeList.add(new ModelBox(cube_r7, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r8 = new ModelRenderer(this);
cube_r8.setRotationPoint(0.0F, -9.5F, 6.0F);
Candle.addChild(cube_r8);
setRotationAngle(cube_r8, 0.0F, 0.7854F, 0.0F);
cube_r8.cubeList.add(new ModelBox(cube_r8, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
Holder = new ModelRenderer(this);
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -5.0F, 4.0F, 4, 1, 4, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -8.0F, -5.0F, -2.0F, 4, 1, 4, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 12, 0, 4.0F, -5.0F, -2.0F, 4, 1, 4, 0.0F));
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -5.0F, -8.0F, 4, 1, 4, 0.0F));
Base = new ModelRenderer(this);
Base.setRotationPoint(0.0F, 24.0F, 0.0F);
Base.cubeList.add(new ModelBox(Base, 12, 0, -2.0F, -2.0F, -2.0F, 4, 1, 4, 0.0F));
Base.cubeList.add(new ModelBox(Base, 12, 0, 0.0F, -4.0F, 2.0F, 0, 3, 5, 0.0F));
cube_r9 = new ModelRenderer(this);
cube_r9.setRotationPoint(4.5F, -2.5F, 0.0F);
Base.addChild(cube_r9);
setRotationAngle(cube_r9, 0.0F, 1.5708F, 0.0F);
cube_r9.cubeList.add(new ModelBox(cube_r9, 12, 0, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
cube_r10 = new ModelRenderer(this);
cube_r10.setRotationPoint(-7.0F, -2.5F, 0.0F);
Base.addChild(cube_r10);
setRotationAngle(cube_r10, 0.0F, -1.5708F, 0.0F);
cube_r10.cubeList.add(new ModelBox(cube_r10, 12, 0, 0.0F, -1.5F, -5.0F, 0, 3, 5, 0.0F));
cube_r11 = new ModelRenderer(this);
cube_r11.setRotationPoint(0.0F, -2.5F, -4.5F);
Base.addChild(cube_r11);
setRotationAngle(cube_r11, 0.0F, 3.1416F, 0.0F);
cube_r11.cubeList.add(new ModelBox(cube_r11, 12, 0, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
Chain = new ModelRenderer(this);
Chain.setRotationPoint(0.0F, 18.0F, 0.0F);
cube_r12 = new ModelRenderer(this);
cube_r12.setRotationPoint(0.0F, -3.0F, 0.0F);
Chain.addChild(cube_r12);
setRotationAngle(cube_r12, 0.0F, 0.7854F, 0.0F);
cube_r12.cubeList.add(new ModelBox(cube_r12, 6, -1, 0.0F, -7.0F, -1.5F, 0, 14, 3, 0.0F));
cube_r13 = new ModelRenderer(this);
cube_r13.setRotationPoint(0.0F, -3.0F, 0.0F);
Chain.addChild(cube_r13);
setRotationAngle(cube_r13, 0.0F, -0.7854F, 0.0F);
cube_r13.cubeList.add(new ModelBox(cube_r13, 0, -1, 0.0F, -7.0F, -1.5F, 0, 14, 3, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Candle.render(f5);
Holder.render(f5);
Base.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,70 @@
package noppes.npcs.client.model.blocks.candle;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCandleWall extends ModelBase {
private final ModelRenderer Candle;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
private final ModelRenderer Holder;
private final ModelRenderer bb_main;
private final ModelRenderer cube_r3;
private final ModelRenderer cube_r4;
public ModelCandleWall() {
textureWidth = 64;
textureHeight = 32;
Candle = new ModelRenderer(this);
Candle.setRotationPoint(0.0F, 23.0F, 0.0F);
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -12.0F, 2.0F, 2, 5, 2, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, -12.5F, 3.0F);
Candle.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 2.3562F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -12.5F, 3.0F);
Candle.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
Holder = new ModelRenderer(this);
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -8.0F, 1.0F, 4, 1, 4, 0.0F));
bb_main = new ModelRenderer(this);
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(0.0F, -5.5F, 4.5F);
bb_main.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, 3.1416F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 12, 3, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(0.0F, -4.5F, 9.0F);
bb_main.addChild(cube_r4);
setRotationAngle(cube_r4, 1.5708F, 0.0F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 12, 0, -2.0F, -2.0F, -1.5F, 4, 1, 4, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Candle.render(f5);
Holder.render(f5);
bb_main.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -1,43 +0,0 @@
package noppes.npcs.client.model.blocks.couch;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCouch extends ModelBase {
public final ModelRenderer CouchBack;
public final ModelRenderer Cussion;
public ModelCouch() {
textureWidth = 64;
textureHeight = 64;
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 18, -8.0F, -2.0F, -8.0F, 16, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 46, -8.0F, -10.0F, 7.0F, 16, 9, 1, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 0, 0, -8.0F, -5.0F, -8.0F, 16, 3, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 0, 34, -8.0F, -14.0F, 4.0F, 16, 9, 3, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 0, 56, -8.0F, -14.0F, 7.0F, 16, 4, 1, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -6,59 +6,56 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCouchCorner extends ModelBase {
private final ModelRenderer CouchBack;
private final ModelRenderer cube_r1;
private final ModelRenderer Cussion;
private final ModelRenderer cube_r2;
private final ModelRenderer cube_r3;
public final ModelRenderer CouchBack;
private final ModelRenderer cube_r1;
public final ModelRenderer Cussion;
private final ModelRenderer cube_r2;
private final ModelRenderer cube_r3;
public ModelCouchCorner() {
textureWidth = 16;
textureHeight = 16;
public ModelCouchCorner() {
textureWidth = 64;
textureHeight = 64;
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, -20, -13, -8.0F, -2.0F, -8.0F, 16, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, -6, 1, -8.0F, -10.0F, 7.0F, 16, 9, 1, 0.0F));
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 1, 35, -8.0F, -3.0F, -8.0F, 15, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -12.0F, 7.0F, 16, 10, 1, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(-7.5F, -6.5F, -1.0F);
CouchBack.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, -1.5708F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, -6, 1, -7.0F, -3.5F, -0.5F, 15, 8, 1, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(7.5F, -7.5F, -1.0F);
CouchBack.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 1, 51, -8.0F, -4.5F, -0.5F, 15, 10, 1, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, -20, -13, -7.0F, -5.0F, -8.0F, 15, 3, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, -8, -1, -7.0F, -14.0F, 4.0F, 15, 9, 3, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, -6, 1, -8.0F, -14.0F, 7.0F, 16, 4, 1, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 1, 37, -8.0F, -7.0F, -8.0F, 15, 4, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 0, 19, -8.0F, -16.0F, 3.0F, 15, 9, 4, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 0, 32, -8.0F, -16.0F, 7.0F, 16, 4, 1, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(-7.5F, -12.0F, -1.0F);
Cussion.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, -1.5708F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, -6, 1, -7.0F, -2.0F, -0.5F, 15, 4, 1, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(7.5F, -14.0F, -1.0F);
Cussion.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 1, 32, -8.0F, -2.0F, -0.5F, 15, 4, 1, 0.0F));
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(-5.5F, -9.5F, -3.5F);
Cussion.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, -8, -1, -4.5F, -4.5F, -1.5F, 12, 9, 3, 0.0F));
}
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(5.5F, -11.5F, -3.5F);
Cussion.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, 1.5708F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 5, 19, -6.5F, -4.5F, -2.5F, 11, 9, 4, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -6,43 +6,43 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCouchLeft extends ModelBase {
private final ModelRenderer CouchBack;
private final ModelRenderer Cussion;
public final ModelRenderer CouchBack;
public final ModelRenderer Cussion;
public ModelCouchLeft() {
textureWidth = 64;
textureHeight = 64;
public ModelCouchLeft() {
textureWidth = 64;
textureHeight = 64;
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 18, -6.0F, -2.0F, -8.0F, 14, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 4, 46, -6.0F, -10.0F, 7.0F, 14, 9, 1, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 13, 14, -8.0F, -5.0F, -8.0F, 2, 4, 16, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 1, 47, -8.0F, -10.0F, 4.0F, 2, 5, 4, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 15, 19, -8.0F, -10.0F, -8.0F, 2, 2, 12, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 44, 51, -7.0F, -8.0F, -6.0F, 0, 3, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 15, 18, -8.0F, -8.0F, -8.0F, 2, 3, 2, 0.0F));
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -6.0F, -3.0F, -8.0F, 14, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -6.0F, -12.0F, 7.0F, 14, 10, 1, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 21, -8.0F, -6.0F, -6.0F, 2, 4, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 22, 48, -8.0F, -12.0F, 4.0F, 2, 10, 4, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 24, 21, -8.0F, -12.0F, -8.0F, 2, 2, 12, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 14, 17, -7.0F, -10.0F, -6.0F, 0, 4, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 40, 23, -8.0F, -10.0F, -8.0F, 2, 8, 2, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 1, 0, -6.0F, -5.0F, -8.0F, 14, 3, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 1, 34, -6.0F, -14.0F, 4.0F, 14, 9, 3, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 3, 56, -6.0F, -14.0F, 7.0F, 14, 4, 1, 0.0F));
}
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 2, 0, -6.0F, -7.0F, -8.0F, 14, 4, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 2, 19, -6.0F, -16.0F, 3.0F, 14, 9, 4, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 2, 32, -6.0F, -16.0F, 7.0F, 14, 4, 1, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,40 @@
package noppes.npcs.client.model.blocks.couch;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCouchMiddle extends ModelBase {
public final ModelRenderer CouchBack;
public final ModelRenderer Cussion;
public ModelCouchMiddle() {
textureWidth = 64;
textureHeight = 64;
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -3.0F, -8.0F, 16, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -12.0F, 7.0F, 16, 10, 1, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 0, 0, -8.0F, -7.0F, -8.0F, 16, 4, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 0, 19, -8.0F, -16.0F, 3.0F, 16, 9, 4, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 0, 32, -8.0F, -16.0F, 7.0F, 16, 4, 1, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -6,43 +6,45 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCouchRight extends ModelBase {
private final ModelRenderer CouchBack;
private final ModelRenderer Cussion;
public final ModelRenderer CouchBack;
public final ModelRenderer Cussion;
public ModelCouchRight() {
textureWidth = 64;
textureHeight = 64;
public ModelCouchRight() {
textureWidth = 64;
textureHeight = 64;
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 14, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -10.0F, 7.0F, 14, 9, 1, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 36, 50, 6.0F, -5.0F, -6.0F, 2, 4, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 52, 35, 6.0F, -10.0F, 4.0F, 2, 9, 4, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 36, 50, 6.0F, -10.0F, -8.0F, 2, 2, 12, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 44, 51, 7.0F, -8.0F, -6.0F, 0, 3, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 15, 18, 6.0F, -8.0F, -8.0F, 2, 7, 2, 0.0F));
CouchBack = new ModelRenderer(this);
CouchBack.mirror = true;
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -3.0F, -8.0F, 14, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -12.0F, 7.0F, 14, 10, 1, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 21, 6.0F, -6.0F, -6.0F, 2, 4, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 22, 48, 6.0F, -12.0F, 4.0F, 2, 10, 4, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 24, 21, 6.0F, -12.0F, -8.0F, 2, 2, 12, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 14, 17, 7.0F, -10.0F, -6.0F, 0, 4, 10, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 40, 23, 6.0F, -10.0F, -8.0F, 2, 8, 2, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 1, 0, -8.0F, -5.0F, -8.0F, 14, 3, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 1, 18, -8.0F, -14.0F, 4.0F, 14, 9, 3, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 4, 30, -8.0F, -14.0F, 7.0F, 14, 4, 1, 0.0F));
}
Cussion = new ModelRenderer(this);
Cussion.mirror = true;
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 2, 0, -8.0F, -7.0F, -8.0F, 14, 4, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 2, 19, -8.0F, -16.0F, 3.0F, 14, 9, 4, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 2, 32, -8.0F, -16.0F, 7.0F, 14, 4, 1, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -6,40 +6,57 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCouchSingle extends ModelBase {
private final ModelRenderer CouchBack;
private final ModelRenderer Cussion;
public final ModelRenderer CouchBack;
private final ModelRenderer ArmL;
private final ModelRenderer ArmR;
public final ModelRenderer Cussion;
public ModelCouchSingle() {
textureWidth = 16;
textureHeight = 16;
public ModelCouchSingle() {
textureWidth = 64;
textureHeight = 64;
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, -18, -13, -6.0F, -2.0F, -8.0F, 12, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, -4, 1, -6.0F, -10.0F, 7.0F, 12, 9, 1, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, -14, -14, 6.0F, -10.0F, -8.0F, 2, 9, 16, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, -14, -14, -8.0F, -10.0F, -8.0F, 2, 9, 16, 0.0F));
CouchBack = new ModelRenderer(this);
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 2, 35, -6.0F, -3.0F, -8.0F, 12, 1, 15, 0.0F));
CouchBack.cubeList.add(new ModelBox(CouchBack, 2, 51, -6.0F, -12.0F, 7.0F, 12, 10, 1, 0.0F));
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, -18, -13, -6.0F, -5.0F, -8.0F, 12, 3, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, -6, -1, -6.0F, -14.0F, 4.0F, 12, 9, 3, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, -4, 1, -6.0F, -14.0F, 7.0F, 12, 4, 1, 0.0F));
}
ArmL = new ModelRenderer(this);
ArmL.setRotationPoint(9.0F, -7.0F, 0.0F);
CouchBack.addChild(ArmL);
ArmL.mirror = true;
ArmL.cubeList.add(new ModelBox(ArmL, 24, 21, -3.0F, -5.0F, -8.0F, 2, 2, 12, 0.0F));
ArmL.cubeList.add(new ModelBox(ArmL, 14, 17, -2.0F, -3.0F, -6.0F, 0, 4, 10, 0.0F));
ArmL.cubeList.add(new ModelBox(ArmL, 40, 23, -3.0F, -3.0F, -8.0F, 2, 8, 2, 0.0F));
ArmL.cubeList.add(new ModelBox(ArmL, 0, 21, -3.0F, 1.0F, -6.0F, 2, 4, 10, 0.0F));
ArmL.cubeList.add(new ModelBox(ArmL, 22, 48, -3.0F, -5.0F, 4.0F, 2, 10, 4, 0.0F));
ArmL.mirror = false;
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
CouchBack.render(f5);
Cussion.render(f5);
}
ArmR = new ModelRenderer(this);
ArmR.setRotationPoint(-9.0F, -7.0F, 0.0F);
CouchBack.addChild(ArmR);
ArmR.cubeList.add(new ModelBox(ArmR, 24, 21, 1.0F, -5.0F, -8.0F, 2, 2, 12, 0.0F));
ArmR.cubeList.add(new ModelBox(ArmR, 14, 17, 2.0F, -3.0F, -6.0F, 0, 4, 10, 0.0F));
ArmR.cubeList.add(new ModelBox(ArmR, 0, 21, 1.0F, 1.0F, -6.0F, 2, 4, 10, 0.0F));
ArmR.cubeList.add(new ModelBox(ArmR, 40, 23, 1.0F, -3.0F, -8.0F, 2, 8, 2, 0.0F));
ArmR.cubeList.add(new ModelBox(ArmR, 22, 48, 1.0F, -5.0F, 4.0F, 2, 10, 4, 0.0F));
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
Cussion = new ModelRenderer(this);
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
Cussion.cubeList.add(new ModelBox(Cussion, 2, 0, -6.0F, -7.0F, -8.0F, 12, 4, 15, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 2, 19, -6.0F, -16.0F, 3.0F, 12, 9, 4, 0.0F));
Cussion.cubeList.add(new ModelBox(Cussion, 2, 32, -6.0F, -16.0F, 7.0F, 12, 4, 1, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,78 @@
package noppes.npcs.client.model.blocks.lamp;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelShortLamp extends ModelBase {
public final ModelRenderer Shade;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public final ModelRenderer Lamp;
private final ModelRenderer cube_r3;
private final ModelRenderer cube_r4;
private final ModelRenderer cube_r5;
public final ModelRenderer Light;
public ModelShortLamp() {
textureWidth = 64;
textureHeight = 64;
Shade = new ModelRenderer(this);
Shade.setRotationPoint(-4.0F, 12.0F, 0.0F);
Shade.cubeList.add(new ModelBox(Shade, 0, 8, 0.0F, -4.0F, -4.0F, 8, 8, 0, 0.0F));
Shade.cubeList.add(new ModelBox(Shade, -8, 0, 0.0F, -4.0F, -4.0F, 8, 0, 8, 0.0F));
Shade.cubeList.add(new ModelBox(Shade, 0, 8, 0.0F, -4.0F, 4.0F, 8, 8, 0, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, 0.0F, 0.0F);
Shade.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 8, -4.0F, -4.0F, 0.0F, 8, 8, 0, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(8.0F, 0.0F, 0.0F);
Shade.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 8, -4.0F, -4.0F, 0.0F, 8, 8, 0, 0.0F));
Lamp = new ModelRenderer(this);
Lamp.setRotationPoint(0.0F, 24.0F, 0.0F);
Lamp.cubeList.add(new ModelBox(Lamp, 28, 8, -3.0F, -6.0F, -3.0F, 6, 6, 6, 0.0F));
Lamp.cubeList.add(new ModelBox(Lamp, 20, 5, -1.0F, -9.0F, -1.0F, 2, 3, 2, 0.0F));
Lamp.cubeList.add(new ModelBox(Lamp, 20, 0, -1.0F, -16.0F, -1.0F, 2, 3, 2, 0.0F));
Lamp.cubeList.add(new ModelBox(Lamp, 14, 0, -3.0F, -16.0F, -1.0F, 2, 0, 2, 0.0F));
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(0.0F, -16.0F, -2.5F);
Lamp.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 14, 0, -0.5F, 0.0F, -1.0F, 2, 0, 2, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(0.0F, -16.0F, 2.5F);
Lamp.addChild(cube_r4);
setRotationAngle(cube_r4, 0.0F, 1.5708F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 14, 0, -0.5F, 0.0F, -1.0F, 2, 0, 2, 0.0F));
cube_r5 = new ModelRenderer(this);
cube_r5.setRotationPoint(2.5F, -16.0F, 0.0F);
Lamp.addChild(cube_r5);
setRotationAngle(cube_r5, -3.1416F, 0.0F, 0.0F);
cube_r5.cubeList.add(new ModelBox(cube_r5, 14, 0, -1.5F, 0.0F, -1.0F, 2, 0, 2, 0.0F));
Light = new ModelRenderer(this);
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
Light.cubeList.add(new ModelBox(Light, 28, 0, -2.0F, -13.0F, -2.0F, 4, 4, 4, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,78 @@
package noppes.npcs.client.model.blocks.lamp;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTallLamp extends ModelBase {
public final ModelRenderer Shade;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public final ModelRenderer Lamp;
private final ModelRenderer cube_r3;
private final ModelRenderer cube_r4;
private final ModelRenderer cube_r5;
public final ModelRenderer Light;
public ModelTallLamp() {
textureWidth = 64;
textureHeight = 64;
Shade = new ModelRenderer(this);
Shade.setRotationPoint(0.0F, -6.0F, 7.0F);
Shade.cubeList.add(new ModelBox(Shade, 0, 12, -6.0F, -2.0F, -13.0F, 12, 12, 0, 0.0F));
Shade.cubeList.add(new ModelBox(Shade, -12, 0, -6.0F, -2.0F, -13.0F, 12, 0, 12, 0.0F));
Shade.cubeList.add(new ModelBox(Shade, 0, 12, -6.0F, -2.0F, -1.0F, 12, 12, 0, 0.0F));
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(6.0F, 4.0F, -7.0F);
Shade.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 12, -6.0F, -6.0F, 0.0F, 12, 12, 0, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(-6.0F, 4.0F, -7.0F);
Shade.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 12, -6.0F, -6.0F, 0.0F, 12, 12, 0, 0.0F));
Lamp = new ModelRenderer(this);
Lamp.setRotationPoint(0.0F, 24.0F, 0.0F);
Lamp.cubeList.add(new ModelBox(Lamp, 40, 22, -3.0F, -2.0F, -3.0F, 6, 2, 6, 0.0F));
Lamp.cubeList.add(new ModelBox(Lamp, 32, 5, -1.0F, -25.0F, -1.0F, 2, 23, 2, 0.0F));
Lamp.cubeList.add(new ModelBox(Lamp, 32, 0, -1.0F, -32.0F, -1.0F, 2, 3, 2, 0.0F));
Lamp.cubeList.add(new ModelBox(Lamp, 22, 0, -4.0F, -32.0F, -1.0F, 3, 0, 2, 0.0F));
cube_r3 = new ModelRenderer(this);
cube_r3.setRotationPoint(0.0F, -32.0F, -2.5F);
Lamp.addChild(cube_r3);
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
cube_r3.cubeList.add(new ModelBox(cube_r3, 22, 0, -1.5F, 0.0F, -1.0F, 3, 0, 2, 0.0F));
cube_r4 = new ModelRenderer(this);
cube_r4.setRotationPoint(0.0F, -32.0F, 2.5F);
Lamp.addChild(cube_r4);
setRotationAngle(cube_r4, 0.0F, 1.5708F, 0.0F);
cube_r4.cubeList.add(new ModelBox(cube_r4, 22, 0, -1.5F, 0.0F, -1.0F, 3, 0, 2, 0.0F));
cube_r5 = new ModelRenderer(this);
cube_r5.setRotationPoint(2.5F, -32.0F, 0.0F);
Lamp.addChild(cube_r5);
setRotationAngle(cube_r5, -3.1416F, 0.0F, 0.0F);
cube_r5.cubeList.add(new ModelBox(cube_r5, 22, 0, -1.5F, 0.0F, -1.0F, 3, 0, 2, 0.0F));
Light = new ModelRenderer(this);
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
Light.cubeList.add(new ModelBox(Light, 40, 14, -2.0F, -29.0F, -2.0F, 4, 4, 4, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,60 @@
package noppes.npcs.client.model.blocks.lantern;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class LanternCeiling extends ModelBase {
public final ModelRenderer Light;
public final ModelRenderer Lantern;
public final ModelRenderer Chain;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public LanternCeiling() {
textureWidth = 64;
textureHeight = 32;
Light = new ModelRenderer(this);
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
Light.cubeList.add(new ModelBox(Light, 28, 8, -3.0F, -9.0F, -3.0F, 6, 7, 6, 0.0F));
Lantern = new ModelRenderer(this);
Lantern.setRotationPoint(0.0F, 24.0F, 0.0F);
Lantern.cubeList.add(new ModelBox(Lantern, 28, 0, -3.0F, -2.0F, -3.0F, 6, 2, 6, 0.0F));
Lantern.cubeList.add(new ModelBox(Lantern, 28, 21, -2.0F, -11.0F, -2.0F, 4, 2, 4, 0.0F));
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, -5.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
Lantern.mirror = true;
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, 2.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
Lantern.mirror = false;
Chain = new ModelRenderer(this);
Chain.setRotationPoint(0.0F, 24.0F, 0.0F);
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, -18.0F, 0.0F);
Chain.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, -0.7854F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, -1, 0.0F, 2.0F, -1.5F, 0, 5, 3, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -18.0F, 0.0F);
Chain.addChild(cube_r2);
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 6, -1, 0.0F, 2.0F, -1.5F, 0, 5, 3, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Light.render(f5);
Lantern.render(f5);
Chain.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,42 @@
package noppes.npcs.client.model.blocks.lantern;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class LanternFloor extends ModelBase {
public final ModelRenderer Light;
public final ModelRenderer Lantern;
public LanternFloor() {
textureWidth = 64;
textureHeight = 32;
Light = new ModelRenderer(this);
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
Light.cubeList.add(new ModelBox(Light, 28, 8, -3.0F, -9.0F, -3.0F, 6, 7, 6, 0.0F));
Lantern = new ModelRenderer(this);
Lantern.setRotationPoint(0.0F, 24.0F, 0.0F);
Lantern.cubeList.add(new ModelBox(Lantern, 28, 0, -3.0F, -2.0F, -3.0F, 6, 2, 6, 0.0F));
Lantern.cubeList.add(new ModelBox(Lantern, 28, 21, -2.0F, -11.0F, -2.0F, 4, 2, 4, 0.0F));
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, -5.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
Lantern.mirror = true;
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, 2.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
Lantern.mirror = false;
Lantern.cubeList.add(new ModelBox(Lantern, 28, 27, -3.0F, -13.0F, 0.0F, 6, 2, 0, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Light.render(f5);
Lantern.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,62 @@
package noppes.npcs.client.model.blocks.lantern;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class LanternWall extends ModelBase {
public final ModelRenderer Light;
public final ModelRenderer Lantern;
public final ModelRenderer Holder;
private final ModelRenderer cube_r1;
private final ModelRenderer cube_r2;
public LanternWall() {
textureWidth = 64;
textureHeight = 32;
Light = new ModelRenderer(this);
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
Light.cubeList.add(new ModelBox(Light, 28, 8, -3.0F, -12.0F, -1.0F, 6, 7, 6, 0.0F));
Lantern = new ModelRenderer(this);
Lantern.setRotationPoint(0.0F, 24.0F, 0.0F);
Lantern.cubeList.add(new ModelBox(Lantern, 28, 0, -3.0F, -5.0F, -1.0F, 6, 2, 6, 0.0F));
Lantern.cubeList.add(new ModelBox(Lantern, 28, 21, -2.0F, -14.0F, 0.0F, 4, 2, 4, 0.0F));
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, -5.0F, -14.0F, 2.0F, 3, 11, 0, 0.0F));
Lantern.mirror = true;
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, 2.0F, -14.0F, 2.0F, 3, 11, 0, 0.0F));
Lantern.mirror = false;
Lantern.cubeList.add(new ModelBox(Lantern, 28, 27, -3.0F, -16.0F, 2.0F, 6, 2, 0, 0.0F));
Holder = new ModelRenderer(this);
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
cube_r1 = new ModelRenderer(this);
cube_r1.setRotationPoint(0.0F, -14.5F, 4.5F);
Holder.addChild(cube_r1);
setRotationAngle(cube_r1, 0.0F, 3.1416F, 0.0F);
cube_r1.cubeList.add(new ModelBox(cube_r1, 12, 0, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
cube_r2 = new ModelRenderer(this);
cube_r2.setRotationPoint(0.0F, -14.0F, 6.5F);
Holder.addChild(cube_r2);
setRotationAngle(cube_r2, -1.5708F, 0.0F, 0.0F);
cube_r2.cubeList.add(new ModelBox(cube_r2, 12, 0, -2.0F, -1.5F, -2.0F, 4, 1, 4, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Light.render(f5);
Lantern.render(f5);
Holder.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -0,0 +1,90 @@
// Date: 11-10-2012 19:29:20
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelLegacyAnvil extends ModelBase {
ModelRenderer Tail;
ModelRenderer Nose1;
ModelRenderer Nose2;
ModelRenderer Nose3;
ModelRenderer Nose4;
ModelRenderer Head1;
ModelRenderer Head2;
ModelRenderer Neck2;
ModelRenderer Bottom2;
ModelRenderer Bottom3;
ModelRenderer Foot4;
public ModelLegacyAnvil() {
textureWidth = 64;
textureHeight = 32;
Tail = new ModelRenderer(this, 0, 0);
Tail.addBox(0F, 0F, 0F, 1, 2, 4);
Tail.setRotationPoint(-7F, 12F, -2F);
Nose1 = new ModelRenderer(this, 0, 0);
Nose1.addBox(0F, 0F, 0F, 1, 5, 6);
Nose1.setRotationPoint(6F, 10F, -3F);
Nose2 = new ModelRenderer(this, 0, 0);
Nose2.addBox(0F, 0F, 0F, 1, 4, 5);
Nose2.setRotationPoint(7F, 10F, -2.5F);
Nose3 = new ModelRenderer(this, 0, 0);
Nose3.addBox(0F, 0F, 0F, 1, 3, 4);
Nose3.setRotationPoint(8F, 10F, -2F);
Nose4 = new ModelRenderer(this, 0, 0);
Nose4.addBox(0F, 0F, 0F, 1, 2, 2);
Nose4.setRotationPoint(9F, 10F, -1F);
Head1 = new ModelRenderer(this, 0, 0);
Head1.addBox(0F, 0F, 0F, 12, 4, 7);
Head1.setRotationPoint(-6F, 12F, -3.5F);
Head2 = new ModelRenderer(this, 0, 0);
Head2.addBox(0F, 0F, 0F, 14, 2, 9);
Head2.setRotationPoint(-8F, 10F, -4.5F);
Neck2 = new ModelRenderer(this, 0, 0);
Neck2.addBox(0F, 0F, 0F, 10, 1, 6);
Neck2.setRotationPoint(-5F, 16F, -3F);
Bottom2 = new ModelRenderer(this, 0, 0);
Bottom2.addBox(0F, 0F, 0F, 10, 2, 7);
Bottom2.setRotationPoint(-5F, 20F, -3.5F);
Bottom3 = new ModelRenderer(this, 0, 0);
Bottom3.addBox(0F, 0F, 0F, 8, 3, 4);
Bottom3.setRotationPoint(-4F, 17F, -2F);
Foot4 = new ModelRenderer(this, 0, 0);
Foot4.addBox(0F, 0F, 0F, 14, 2, 10);
Foot4.setRotationPoint(-7F, 22F, -5F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5,entity);
Tail.render(f5);
Nose1.render(f5);
Nose2.render(f5);
Nose3.render(f5);
Nose4.render(f5);
Head1.render(f5);
Head2.render(f5);
Neck2.render(f5);
Bottom2.render(f5);
Bottom3.render(f5);
Foot4.render(f5);
}
}
@@ -1,10 +1,10 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCandle extends ModelBase {
public class ModelLegacyCandle extends ModelBase {
// fields
ModelRenderer Base;
ModelRenderer Bar1;
@@ -13,27 +13,27 @@ public class ModelCandle extends ModelBase {
ModelRenderer Bar4;
ModelRenderer Wax;
public ModelCandle() {
public ModelLegacyCandle() {
Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 4, 1, 4);
Base.setRotationPoint(-2F, 23F, -2F);
Bar1 = new ModelRenderer(this, 0, 0);
Bar1.addBox(0F, 0F, 0F, 1, 1, 6);
Bar1.setRotationPoint(-3F, 22F, -3F);
Bar2 = new ModelRenderer(this, 0, 0);
Bar2.addBox(0F, 0F, 0F, 1, 1, 6);
Bar2.setRotationPoint(2F, 22F, -3F);
Bar3 = new ModelRenderer(this, 0, 0);
Bar3.addBox(0F, 0F, 0F, 4, 1, 1);
Bar3.setRotationPoint(-2F, 22F, -3F);
Bar4 = new ModelRenderer(this, 0, 0);
Bar4.addBox(0F, 0F, 0F, 4, 1, 1);
Bar4.setRotationPoint(-2F, 22F, 2F);
Wax = new ModelRenderer(this, 16, 0);
Wax.addBox(0F, 0F, 0F, 2, 4, 2);
Wax.setRotationPoint(-1F, 19F, -1F);
@@ -1,10 +1,10 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCandleCeiling extends ModelBase {
public class ModelLegacyCandleCeiling extends ModelBase {
ModelRenderer Wax1;
ModelRenderer Wax2;
ModelRenderer Wax3;
@@ -25,85 +25,85 @@ public class ModelCandleCeiling extends ModelBase {
ModelRenderer BottomBar2;
ModelRenderer BottomBar4;
public ModelCandleCeiling() {
public ModelLegacyCandleCeiling() {
Wax1 = new ModelRenderer(this, 16, 0);
Wax1.addBox(0F, 0F, 0F, 2, 4, 2);
Wax1.setRotationPoint(-1F, 15.5F, 5F);
Wax2 = new ModelRenderer(this, 16, 0);
Wax2.addBox(0F, 0F, 0F, 2, 4, 2);
Wax2.setRotationPoint(7F, 15.5F, 1F);
setRotation(Wax2, 0F, 3.141593F, 0F);
Wax3 = new ModelRenderer(this, 16, 0);
Wax3.addBox(0F, 0F, 0F, 2, 4, 2);
Wax3.setRotationPoint(-7F, 15.5F, -1F);
Wax4 = new ModelRenderer(this, 16, 0);
Wax4.addBox(0F, 0F, 0F, 2, 4, 2);
Wax4.setRotationPoint(1F, 15.5F, -5F);
setRotation(Wax4, 0F, 3.141593F, 0F);
TippyTop1 = new ModelRenderer(this, 0, 0);
TippyTop1.addBox(0F, 0F, 0F, 4, 1, 4);
TippyTop1.setRotationPoint(-2.8F, 7.5F, 0F);
setRotation(TippyTop1, 0F, 0.7853982F, 0F);
TippyTop2 = new ModelRenderer(this, 0, 0);
TippyTop2.addBox(0F, 0F, 0F, 3, 1, 3);
TippyTop2.setRotationPoint(-2.1F, 8F, 0F);
setRotation(TippyTop2, 0F, 0.7853982F, 0F);
Middle = new ModelRenderer(this, 0, 0);
Middle.addBox(0F, 0F, 0F, 1, 13, 1);
Middle.setRotationPoint(-0.5F, 9F, -0.5F);
BottomBar1 = new ModelRenderer(this, 0, 4);
BottomBar1.addBox(0F, 0F, 0F, 1, 1, 5);
BottomBar1.setRotationPoint(-0.5F, 21F, 0.5F);
Rod1 = new ModelRenderer(this, 0, 0);
Rod1.addBox(0F, 0F, 0F, 1, 2, 1);
Rod1.setRotationPoint(-0.5F, 20F, 5.5F);
Rod2 = new ModelRenderer(this, 0, 0);
Rod2.addBox(0F, 0F, 0F, 1, 2, 1);
Rod2.setRotationPoint(5.5F, 20F, -0.5F);
Rod3 = new ModelRenderer(this, 0, 0);
Rod3.addBox(0F, 0F, 0F, 1, 2, 1);
Rod3.setRotationPoint(-6.5F, 20F, -0.5F);
Rod4 = new ModelRenderer(this, 0, 0);
Rod4.addBox(0F, 0F, 0F, 1, 2, 1);
Rod4.setRotationPoint(-0.5F, 20F, -6.5F);
Base1 = new ModelRenderer(this, 0, 0);
Base1.addBox(0F, 0F, 0F, 4, 1, 4);
Base1.setRotationPoint(-2F, 19F, 4F);
Base2 = new ModelRenderer(this, 0, 0);
Base2.addBox(0F, 0F, 0F, 4, 1, 4);
Base2.setRotationPoint(4F, 19F, -2F);
Base3 = new ModelRenderer(this, 0, 0);
Base3.addBox(0F, 0F, 0F, 4, 1, 4);
Base3.setRotationPoint(-8F, 19F, -2F);
Base4 = new ModelRenderer(this, 0, 0);
Base4.addBox(0F, 0F, 0F, 4, 1, 4);
Base4.setRotationPoint(-2F, 19F, -8F);
BottomBar3 = new ModelRenderer(this, 0, 4);
BottomBar3.addBox(0F, 0F, 0F, 1, 1, 5);
BottomBar3.setRotationPoint(-0.5F, 21F, -0.5F);
setRotation(BottomBar3, 0F, -1.570796F, 0F);
BottomBar2 = new ModelRenderer(this, 0, 4);
BottomBar2.addBox(0F, 0F, 0F, 1, 1, 5);
BottomBar2.setRotationPoint(0.5F, 21F, 0.5F);
setRotation(BottomBar2, 0F, 1.570796F, 0F);
BottomBar4 = new ModelRenderer(this, 0, 4);
BottomBar4.addBox(0F, 0F, 0F, 1, 1, 5);
BottomBar4.setRotationPoint(0.4F, 21F, -0.5F);
@@ -1,10 +1,10 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCandleWall extends ModelBase {
public class ModelLegacyCandleWall extends ModelBase {
ModelRenderer Base;
ModelRenderer Bar1;
ModelRenderer Bar2;
@@ -16,45 +16,45 @@ public class ModelCandleWall extends ModelBase {
ModelRenderer Bar5;
ModelRenderer Bar6;
public ModelCandleWall() {
public ModelLegacyCandleWall() {
Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 4, 1, 4);
Base.setRotationPoint(-2F, 13F, -4F);
Bar1 = new ModelRenderer(this, 0, 0);
Bar1.addBox(0F, 0F, 0F, 1, 1, 6);
Bar1.setRotationPoint(-3F, 12F, -5F);
Bar2 = new ModelRenderer(this, 0, 0);
Bar2.addBox(0F, 0F, 0F, 1, 1, 6);
Bar2.setRotationPoint(2F, 12F, -5F);
Bar3 = new ModelRenderer(this, 0, 0);
Bar3.addBox(0F, 0F, 0F, 4, 1, 1);
Bar3.setRotationPoint(-2F, 12F, -5F);
Bar4 = new ModelRenderer(this, 0, 0);
Bar4.addBox(0F, 0F, 0F, 4, 1, 1);
Bar4.setRotationPoint(-2F, 12F, 0F);
Wax = new ModelRenderer(this, 16, 0);
Wax.addBox(0F, 0F, 0F, 2, 4, 2);
Wax.setRotationPoint(-1F, 9F, -3F);
Wall2 = new ModelRenderer(this, 0, 0);
Wall2.addBox(0F, 0F, 0F, 3, 3, 1);
Wall2.setRotationPoint(0F, 13.7F, -7.5F);
setRotation(Wall2, 0F, 0F, 0.7853982F);
Wall1 = new ModelRenderer(this, 0, 0);
Wall1.addBox(0F, 0F, 0F, 4, 4, 1);
Wall1.setRotationPoint(0F, 13F, -8F);
setRotation(Wall1, 0F, 0F, 0.7853982F);
Bar5 = new ModelRenderer(this, 0, 0);
Bar5.addBox(0F, 0F, 0F, 1, 2, 1);
Bar5.setRotationPoint(-0.5F, 13.5F, -2.5F);
Bar6 = new ModelRenderer(this, 0, 0);
Bar6.addBox(0F, 0F, 0F, 1, 1, 5);
Bar6.setRotationPoint(-0.5F, 15.5F, -6.5F);
@@ -1,10 +1,10 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelLampCeiling extends ModelBase {
public class ModelLegacyCeiling extends ModelBase {
ModelRenderer Base;
ModelRenderer Top1;
ModelRenderer Top2;
@@ -23,73 +23,73 @@ public class ModelLampCeiling extends ModelBase {
ModelRenderer Shape1;
ModelRenderer Shape2;
public ModelLampCeiling() {
public ModelLegacyCeiling() {
Base = new ModelRenderer(this, 0, 6);
Base.addBox(0F, 0F, 0F, 4, 7, 4);
Base.setRotationPoint(-2F, 17F, -2F);
Top1 = new ModelRenderer(this, 0, 0);
Top1.addBox(0F, 0F, 0F, 5, 1, 5);
Top1.setRotationPoint(-2.5F, 17F, -2.5F);
Top2 = new ModelRenderer(this, 0, 0);
Top2.addBox(0F, 0F, 0F, 4, 1, 4);
Top2.setRotationPoint(-2F, 16.5F, -2F);
Top3 = new ModelRenderer(this, 0, 0);
Top3.addBox(0F, 0F, 0F, 3, 1, 3);
Top3.setRotationPoint(-1.5F, 16F, -1.5F);
Chain8 = new ModelRenderer(this, 0, 0);
Chain8.addBox(0F, 0F, 0F, 1, 2, 1);
Chain8.setRotationPoint(-0.5F, 14F, -1.5F);
Chain1 = new ModelRenderer(this, 0, 0);
Chain1.addBox(0F, 0F, 0F, 1, 3, 1);
Chain1.setRotationPoint(0.5F, 8F, -0.5F);
Chain2 = new ModelRenderer(this, 0, 0);
Chain2.addBox(0F, 0F, 0F, 1, 3, 1);
Chain2.setRotationPoint(-1.5F, 8F, -0.5F);
Chain3 = new ModelRenderer(this, 0, 0);
Chain3.addBox(0F, 0F, 0F, 1, 3, 1);
Chain3.setRotationPoint(-0.5F, 10F, 0.5F);
Chain4 = new ModelRenderer(this, 0, 0);
Chain4.addBox(0F, 0F, 0F, 1, 3, 1);
Chain4.setRotationPoint(-0.5F, 10F, -1.5F);
Chain5 = new ModelRenderer(this, 0, 0);
Chain5.addBox(0F, 0F, 0F, 1, 3, 1);
Chain5.setRotationPoint(-1.5F, 12F, -0.5F);
Chain6 = new ModelRenderer(this, 0, 0);
Chain6.addBox(0F, 0F, 0F, 1, 3, 1);
Chain6.setRotationPoint(0.5F, 12F, -0.5F);
Chain7 = new ModelRenderer(this, 0, 0);
Chain7.addBox(0F, 0F, 0F, 1, 2, 1);
Chain7.setRotationPoint(-0.5F, 14F, 0.5F);
TippyTop1 = new ModelRenderer(this, 0, 0);
TippyTop1.addBox(0F, 0F, 0F, 4, 1, 4);
TippyTop1.setRotationPoint(-2.8F, 8F, 0F);
setRotation(TippyTop1, 0F, 0.7853982F, 0F);
TippyTop2 = new ModelRenderer(this, 0, 0);
TippyTop2.addBox(0F, 0F, 0F, 3, 1, 3);
TippyTop2.setRotationPoint(-2.1F, 8.5F, 0F);
setRotation(TippyTop2, 0F, 0.7853982F, 0F);
Shape3 = new ModelRenderer(this, 0, 0);
Shape3.addBox(0F, 0F, 0F, 1, 1, 1);
Shape3.setRotationPoint(-0.5F, 14F, -0.5F);
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 1, 1, 1);
Shape1.setRotationPoint(-0.5F, 10F, -0.5F);
Shape2 = new ModelRenderer(this, 0, 0);
Shape2.addBox(0F, 0F, 0F, 1, 1, 1);
Shape2.setRotationPoint(-0.5F, 12F, -0.5F);
@@ -4,13 +4,13 @@
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelLamp extends ModelBase {
public class ModelLegacyLantern extends ModelBase {
ModelRenderer Base;
ModelRenderer Top1;
ModelRenderer Top2;
@@ -18,28 +18,28 @@ public class ModelLamp extends ModelBase {
ModelRenderer Handle;
ModelRenderer Shape1;
public ModelLamp() {
public ModelLegacyLantern() {
Base = new ModelRenderer(this, 0, 6);
Base.addBox(0F, 0F, 0F, 4, 7, 4);
Base.setRotationPoint(-2F, 16F, -2F);
Top1 = new ModelRenderer(this, 0, 0);
Top1.addBox(0F, 0F, 0F, 5, 1, 5);
Top1.setRotationPoint(-2.5F, 16F, -2.5F);
Top2 = new ModelRenderer(this, 0, 0);
Top2.addBox(0F, 0F, 0F, 4, 1, 4);
Top2.setRotationPoint(-2F, 15.5F, -2F);
Top3 = new ModelRenderer(this, 0, 0);
Top3.addBox(0F, 0F, 0F, 3, 1, 3);
Top3.setRotationPoint(-1.5F, 15F, -1.5F);
Handle = new ModelRenderer(this, 24, 0);
Handle.addBox(0F, 0F, 0F, 3, 0, 3);
Handle.setRotationPoint(0F, 15F, 0F);
setRotation(Handle, 0.296706F, 0.1745329F, 0F);
Shape1 = new ModelRenderer(this, 0, 17);
Shape1.addBox(-2F, 0F, -2F, 4, 1, 4);
Shape1.setRotationPoint(0F, 23F, 0F);
@@ -0,0 +1,40 @@
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
public class ModelLegacyPedestal extends ModelBase {
ModelRenderer Main_Block;
ModelRenderer Front;
public ModelLegacyPedestal() {
Main_Block = new ModelRenderer(this, 1, 0);
Main_Block.addBox(-7F, 0F, -8F, 14, 3, 16);
Main_Block.setRotationPoint(0, 16F, 0F);
Front = new ModelRenderer(this, 16, 8);
Front.addBox(-8F, 0F, -8F, 16, 5, 16);
Front.setRotationPoint(0F, 19F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3,
float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
GL11.glPushMatrix();
GL11.glScalef(1, 1, 0.5f);
Main_Block.render(f5);
GL11.glScalef(1, 1, 1.25f);
Front.render(f5);
GL11.glPopMatrix();
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
@@ -1,10 +1,10 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTallLamp extends ModelBase
public class ModelLegacyTallLamp extends ModelBase
{
//fields
ModelRenderer Base;
@@ -13,37 +13,37 @@ public class ModelTallLamp extends ModelBase
ModelRenderer LampShadeStick2;
ModelRenderer LampShadeStick3;
ModelRenderer LampShadeStick4;
public ModelTallLamp()
public ModelLegacyTallLamp()
{
Base = new ModelRenderer(this, 6, 2);
Base.addBox(-6F, 0F, -6F, 12, 1, 12);
Base.setRotationPoint(0F, 23F, 0F);
MiddleStick = new ModelRenderer(this, 12, 2);
MiddleStick.addBox(-1F, 0F, -1F, 2, 28, 2);
MiddleStick.setRotationPoint(0F, -5F, 0F);
LampShadeStick1 = new ModelRenderer(this, 0, 30);
LampShadeStick1.addBox(0F, 0F, 0F, 5, 1, 1);
LampShadeStick1.setRotationPoint(1F, -1F, -0.5F);
LampShadeStick2 = new ModelRenderer(this, 0, 30);
LampShadeStick2.addBox(0F, 0F, 0F, 5, 1, 1);
LampShadeStick2.setRotationPoint(-0.5F, -1F, -1F);
setRotation(LampShadeStick2, 0F, 1.570796F, 0F);
LampShadeStick3 = new ModelRenderer(this, 0, 30);
LampShadeStick3.addBox(0F, 0F, 0F, 5, 1, 1);
LampShadeStick3.setRotationPoint(-1F, -1F, 0.5F);
setRotation(LampShadeStick3, 0F, 3.141593F, 0F);
LampShadeStick4 = new ModelRenderer(this, 0, 30);
LampShadeStick4.addBox(0F, 0F, 0F, 5, 1, 1);
LampShadeStick4.setRotationPoint(0.5F, -1F, 1F);
setRotation(LampShadeStick4, 0F, -1.570796F, 0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
@@ -55,7 +55,7 @@ public class ModelTallLamp extends ModelBase
LampShadeStick3.render(f5);
LampShadeStick4.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
@@ -1,35 +1,35 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTallLampTop extends ModelBase
public class ModelLegacyTallLampTop extends ModelBase
{
ModelRenderer LampShade1;
ModelRenderer LampShade3;
ModelRenderer LampShade2;
ModelRenderer LampShade4;
public ModelTallLampTop()
public ModelLegacyTallLampTop()
{
LampShade1 = new ModelRenderer(this, 0, 0);
LampShade1.addBox(-.5F, -6F, -6F, 1, 12, 12);
LampShade1.setRotationPoint(6F, -1F, 0F);
LampShade3 = new ModelRenderer(this, 0, 0);
LampShade3.addBox(-6F, -6F, -.5F, 12, 12, 1);
LampShade3.setRotationPoint(0F, -1F, -6F);
LampShade2 = new ModelRenderer(this, 0, 0);
LampShade2.addBox(-.5F, -6F, -6F, 1, 12, 12);
LampShade2.setRotationPoint(-6F, -1F, 0F);
LampShade4 = new ModelRenderer(this, 0, 0);
LampShade4.addBox(-6F, -6F, -.5F, 12, 12, 1);
LampShade4.setRotationPoint(0F, -1F, 6F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
@@ -39,7 +39,7 @@ public class ModelTallLampTop extends ModelBase
LampShade2.render(f5);
LampShade4.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
@@ -1,10 +1,10 @@
package noppes.npcs.client.model.blocks;
package noppes.npcs.client.model.blocks.legacy;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelLampWall extends ModelBase {
public class ModelLegacyWall extends ModelBase {
ModelRenderer Base;
ModelRenderer Top1;
ModelRenderer Top2;
@@ -14,36 +14,36 @@ public class ModelLampWall extends ModelBase {
ModelRenderer Shape4;
ModelRenderer Shape5;
public ModelLampWall() {
public ModelLegacyWall() {
Base = new ModelRenderer(this, 0, 6);
Base.addBox(0F, 0F, 0F, 4, 7, 4);
Base.setRotationPoint(-2F, 14F, 1F);
Top1 = new ModelRenderer(this, 0, 0);
Top1.addBox(0F, 0F, 0F, 5, 1, 5);
Top1.setRotationPoint(-2.5F, 14F, 0.5F);
Top2 = new ModelRenderer(this, 0, 0);
Top2.addBox(0F, 0F, 0F, 4, 1, 4);
Top2.setRotationPoint(-2F, 13.5F, 1F);
Top3 = new ModelRenderer(this, 0, 0);
Top3.addBox(0F, 0F, 0F, 3, 1, 3);
Top3.setRotationPoint(-1.5F, 13F, 1.5F);
Shape2 = new ModelRenderer(this, 0, 0);
Shape2.addBox(0F, 0F, 0F, 1, 1, 3);
Shape2.setRotationPoint(-0.5F, 11F, 3.5F);
Shape3 = new ModelRenderer(this, 0, 0);
Shape3.addBox(0F, 0F, 0F, 3, 3, 1);
Shape3.setRotationPoint(0F, 9.5F, 6.5F);
setRotation(Shape3, 0F, 0F, 0.7853982F);
Shape4 = new ModelRenderer(this, 0, 0);
Shape4.addBox(0F, 0F, 0F, 1, 3, 1);
Shape4.setRotationPoint(-0.5F, 10.5F, 2.5F);
Shape5 = new ModelRenderer(this, 0, 0);
Shape5.addBox(0F, 0F, 0F, 4, 4, 1);
Shape5.setRotationPoint(0F, 8.7F, 7F);
@@ -55,6 +55,7 @@ public class BlockBannerRenderer extends BlockRendererInterface{
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileBanner tile = (TileBanner) var1;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glPushMatrix();
@@ -103,6 +104,7 @@ public class BlockBannerRenderer extends BlockRendererInterface{
doRender(var2, var4, var6, tile.rotation, tile.icon, angle_x);
}
}
GL11.glPopAttrib();
}
public void doRender(double par2, double par4, double par6, int meta, ItemStack iicon, float rotate)
{
@@ -30,11 +30,11 @@ public class BlockBarrelRenderer extends BlockRendererInterface{
private static final ResourceLocation trimTexture = new ResourceLocation("customnpcs","textures/models/barrel/trim.png");
private static final ResourceLocation oak_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
private static final ResourceLocation spruce_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
private static final ResourceLocation birch_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
private static final ResourceLocation jungle_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
private static final ResourceLocation acacia_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
private static final ResourceLocation dark_oak_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
private static final ResourceLocation spruce_lid = new ResourceLocation("customnpcs","textures/models/barrel/spruce_lid.png");
private static final ResourceLocation birch_lid = new ResourceLocation("customnpcs","textures/models/barrel/birch_lid.png");
private static final ResourceLocation jungle_lid = new ResourceLocation("customnpcs","textures/models/barrel/jungle_lid.png");
private static final ResourceLocation acacia_lid = new ResourceLocation("customnpcs","textures/models/barrel/acacia_lid.png");
private static final ResourceLocation dark_oak_lid = new ResourceLocation("customnpcs","textures/models/barrel/dark_oak_lid.png");
public BlockBarrelRenderer(){
((BlockBarrel)CustomItems.barrel).renderId = RenderingRegistry.getNextAvailableRenderId();
@@ -122,15 +122,15 @@ public class BlockBarrelRenderer extends BlockRendererInterface{
public void setLidTexture(int meta){
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
if(meta == 1)
manager.bindTexture(oak_lid);
manager.bindTexture(spruce_lid);
else if(meta == 2)
manager.bindTexture(oak_lid);
manager.bindTexture(birch_lid);
else if(meta == 3)
manager.bindTexture(oak_lid);
manager.bindTexture(jungle_lid);
else if(meta == 4)
manager.bindTexture(oak_lid);
manager.bindTexture(acacia_lid);
else if(meta == 5)
manager.bindTexture(oak_lid);
manager.bindTexture(dark_oak_lid);
else
manager.bindTexture(oak_lid);
}
@@ -64,12 +64,14 @@ public class BlockCampfireRenderer extends BlockRendererInterface {
Minecraft.getMinecraft().getTextureManager().bindTexture(Cobble);
stonesModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(block == CustomItems.campfire){
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST);
Minecraft.getMinecraft().getTextureManager().bindTexture(Flame);
flameModel.render(null, tile.getWorldObj().getWorldTime(), 0, 0, 0, 0.0F, 0.0625F);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib();
}
Minecraft.getMinecraft().getTextureManager().bindTexture(coalsTexture);
coalsModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
@@ -12,19 +12,30 @@ import net.minecraft.world.IBlockAccess;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockCandle;
import noppes.npcs.blocks.tiles.TileCandle;
import noppes.npcs.client.model.blocks.ModelCandle;
import noppes.npcs.client.model.blocks.ModelCandleCeiling;
import noppes.npcs.client.model.blocks.ModelCandleWall;
import noppes.npcs.client.model.blocks.candle.ModelCandle;
import noppes.npcs.client.model.blocks.candle.ModelCandleCeiling;
import noppes.npcs.client.model.blocks.candle.ModelCandleWall;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCandle;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCandleCeiling;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCandleWall;
import noppes.npcs.config.ConfigClient;
import noppes.npcs.config.legacy.LegacyConfig;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class BlockCandleRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
private final ModelCandle model = new ModelCandle();
private final ModelCandleWall modelWall = new ModelCandleWall();
private final ModelCandleCeiling modelCeiling = new ModelCandleCeiling();
private static final ResourceLocation resource1 = new ResourceLocation("customnpcs","textures/models/Candle.png");
private final ModelLegacyCandle legacyCandle = new ModelLegacyCandle();
private final ModelLegacyCandleWall legacyCandleWall = new ModelLegacyCandleWall();
private final ModelLegacyCandleCeiling legacyCandleCeiling = new ModelLegacyCandleCeiling();
private final ModelCandle candle = new ModelCandle();
private final ModelCandleWall candleWall = new ModelCandleWall();
private final ModelCandleCeiling candleCeiling = new ModelCandleCeiling();
private static final ResourceLocation legacy = new ResourceLocation("customnpcs","textures/models/legacy/Candle.png");
private static final ResourceLocation texture = new ResourceLocation("customnpcs","textures/models/candle.png");
public BlockCandleRenderer(){
((BlockCandle)CustomItems.candle).renderId = RenderingRegistry.getNextAvailableRenderId();
((BlockCandle)CustomItems.candle_unlit).renderId = ((BlockCandle)CustomItems.candle).renderId;
@@ -40,19 +51,44 @@ public class BlockCandleRenderer extends TileEntitySpecialRenderer implements IS
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
//GL11.glScalef(0.95f, 0.95f, 0.95f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
if(tile.color == 0)
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else if(tile.color == 1)
modelCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else{
GL11.glRotatef(180, 0, 1, 0);
modelWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glEnable(GL11.GL_ALPHA_TEST);
if(ConfigClient.LegacyCandle){
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
Minecraft.getMinecraft().getTextureManager().bindTexture(legacy);
if(tile.color == 0)
legacyCandle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else if(tile.color == 1)
legacyCandleCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else{
GL11.glRotatef(180, 0, 1, 0);
legacyCandleWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
} else {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
if(tile.color == 0){
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
candle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
else if(tile.color == 1){
GL11.glPushMatrix();
GL11.glColor3f(1, 1, 1);
GL11.glRotatef( 90, 0, 1, 0);
candleCeiling.Chain.render(0.0625F);
GL11.glPopMatrix();
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
candleCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
else{
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
candleWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -65,9 +101,15 @@ public class BlockCandleRenderer extends TileEntitySpecialRenderer implements IS
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
GL11.glColor3f(1, 1, 1);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(ConfigClient.LegacyCandle){
Minecraft.getMinecraft().getTextureManager().bindTexture(legacy);
GL11.glColor3f(1, 1, 1);
legacyCandle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
GL11.glColor3f(1, 1, 1);
candle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
GL11.glPopMatrix();
}
@@ -82,7 +124,7 @@ public class BlockCandleRenderer extends TileEntitySpecialRenderer implements IS
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
return ConfigClient.LegacyCandle;
}
@@ -3,6 +3,7 @@ package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@@ -10,7 +11,9 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockCarpentryBench;
import noppes.npcs.blocks.tiles.TileBlockAnvil;
import noppes.npcs.client.model.blocks.ModelAnvil;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyAnvil;
import noppes.npcs.client.model.blocks.ModelCarpentryBench;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCarpentryBench;
import noppes.npcs.config.ConfigClient;
@@ -21,12 +24,14 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
private final ModelCarpentryBench modelCarpentryBench = new ModelCarpentryBench();
private static final ResourceLocation carpentryBenchTexture = new ResourceLocation("customnpcs","textures/models/CarpentryBench.png");
private final ModelAnvil anvil = new ModelAnvil();
private static final ResourceLocation legacyAnvilTexture = new ResourceLocation("customnpcs","textures/models/legacy/Steel.png");
private static final ResourceLocation anvilTexture = new ResourceLocation("customnpcs","textures/models/anvil.png");
private static final ResourceLocation anvilTexture = new ResourceLocation("customnpcs","textures/models/Steel.png");
private final ModelLegacyCarpentryBench legacyBench = new ModelLegacyCarpentryBench();
private static final ResourceLocation legacyCarpentryBench = new ResourceLocation("customnpcs","textures/models/legacy/bench.png");
private final ModelLegacyAnvil legacyAnvil = new ModelLegacyAnvil();
private final ModelAnvil anvil = new ModelAnvil();
public BlockCarpentryBenchRenderer(){
((BlockCarpentryBench)CustomItems.carpentyBench).renderId = RenderingRegistry.getNextAvailableRenderId();
@@ -42,9 +47,34 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
GL11.glScalef(0.95f, 0.95f, 0.95f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90 * (meta % 4), 0, 1, 0);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
if(meta >= 4){
this.bindTexture(anvilTexture);
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(ConfigClient.LegacyAnvil){
this.bindTexture(legacyAnvilTexture);
legacyAnvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
GL11.glEnable(GL11.GL_ALPHA_TEST);
this.bindTexture(anvilTexture);
// Get current brightness at the tile entity's location
int light = var1.getWorldObj().getLightBrightnessForSkyBlocks(var1.xCoord, var1.yCoord, var1.zCoord, 0);
int brightX = light % 65536;
int brightY = light / 65536;
// Set full brightness for the lava
int fullBright = 0xF000F0;
int fullBrightX = fullBright % 65536;
int fullBrightY = fullBright / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)fullBrightX, (float)fullBrightY);
// Render the lava part glowing
anvil.Lava.render(0.0625F);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)brightX, (float)brightY);
// Now render the rest (the anvil) normally
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glDisable(GL11.GL_ALPHA_TEST);
}
}
else {
@@ -58,6 +88,7 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
}
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -81,8 +112,14 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
}
}
else{
this.bindTexture(anvilTexture);
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(ConfigClient.LegacyAnvil){
this.bindTexture(legacyAnvilTexture);
legacyAnvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
this.bindTexture(anvilTexture);
anvil.Lava.render(0.0625F);
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
}
GL11.glPopMatrix();
@@ -39,6 +39,7 @@ public class BlockChairRenderer extends BlockRendererInterface{
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileColorable tile = (TileColorable) var1;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.65f, (float)var6 + 0.5f);
@@ -60,7 +61,7 @@ public class BlockChairRenderer extends BlockRendererInterface{
}
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -69,15 +70,19 @@ public class BlockChairRenderer extends BlockRendererInterface{
RenderBlocks renderer) {
GL11.glPushMatrix();
GL11.glTranslatef(0, 1f, 0);
GL11.glScalef(1.2f, 1.1f, 1.2f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
setWoodTexture(metadata);
GL11.glColor3f(1, 1, 1);
if(ConfigClient.LegacyChair)
if(ConfigClient.LegacyChair){
setWoodTexture(metadata);
GL11.glScalef(1.2f, 1.1f, 1.2f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
else {
GL11.glTranslatef(0, -0.15f, 0);
GL11.glScalef(1f, 0.9f, 1f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
if(ConfigClient.WoodTextures)
chairSpoof.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else {
@@ -2,9 +2,12 @@ package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockCouchWool;
import noppes.npcs.blocks.tiles.TileCouchWool;
@@ -16,11 +19,11 @@ import org.lwjgl.opengl.GL12;
public class BlockCouchWoolRenderer extends BlockRendererInterface{
private final ModelBase modelCouchLeft = new ModelCouchLeft();
private final ModelBase modelCouchRight = new ModelCouchRight();
private final ModelBase modelCouchCorner = new ModelCouchCorner();
private final ModelBase modelCouch = new ModelCouch();
private final ModelBase modelCouchSingle = new ModelCouchSingle();
private final ModelCouchLeft modelCouchLeft = new ModelCouchLeft();
private final ModelCouchRight modelCouchRight = new ModelCouchRight();
private final ModelCouchCorner modelCouchCorner = new ModelCouchCorner();
private final ModelCouchMiddle modelCouch = new ModelCouchMiddle();
private final ModelCouchSingle modelCouchSingle = new ModelCouchSingle();
private final ModelBase modelLegacyCouchMiddle = new ModelLegacyCouchMiddle();
private final ModelBase modelLegacyCouchMiddleWool = new ModelLegacyCouchMiddleWool();
@@ -34,6 +37,16 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
private final ModelBase modelLegacyCouchCorner = new ModelLegacyCouchCorner();
private final ModelBase modelLegacyCouchCornerWool = new ModelLegacyCouchCornerWool();
private static final ResourceLocation oak = new ResourceLocation("customnpcs","textures/models/couch/oak.png");
private static final ResourceLocation spruce = new ResourceLocation("customnpcs","textures/models/couch/spruce.png");
private static final ResourceLocation birch = new ResourceLocation("customnpcs","textures/models/couch/birch.png");
private static final ResourceLocation jungle = new ResourceLocation("customnpcs","textures/models/couch/jungle.png");
private static final ResourceLocation acacia = new ResourceLocation("customnpcs","textures/models/couch/acacia.png");
private static final ResourceLocation dark_oak = new ResourceLocation("customnpcs","textures/models/couch/dark_oak.png");
private static final ResourceLocation wool = new ResourceLocation("customnpcs","textures/models/couch/wool.png");
public BlockCouchWoolRenderer(){
((BlockCouchWool)CustomItems.couchWool).renderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(this);
@@ -42,6 +55,7 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileCouchWool tile = (TileCouchWool) var1;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
@@ -49,8 +63,8 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
if(false){
GL11.glEnable(GL11.GL_ALPHA_TEST);
if(ConfigClient.LegacyCouch){
setWoodTexture(var1.getBlockMetadata());
if(tile.hasCornerLeft)
modelLegacyCouchCorner.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
@@ -82,23 +96,45 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
else
modelLegacyCouchMiddleWool.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
setWoodTexture(var1.getBlockMetadata());
if(tile.hasCornerLeft)
modelCouchCorner.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else if(tile.hasCornerRight){
setCouchWood(var1.getBlockMetadata());
if(tile.hasCornerLeft){
GL11.glPushMatrix();
GL11.glRotatef(90, 0, 1, 0);
modelCouchCorner.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
modelCouchCorner.CouchBack.render(0.0625F);
GL11.glPopMatrix();
}
else if(tile.hasCornerRight)
modelCouchCorner.CouchBack.render(0.0625F);
else if(tile.hasLeft && tile.hasRight)
modelCouch.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
modelCouch.CouchBack.render(0.0625F);
else if(tile.hasLeft)
modelCouchLeft.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
modelCouchLeft.CouchBack.render(0.0625F);
else if(tile.hasRight)
modelCouchRight.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else
modelCouchSingle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
modelCouchRight.CouchBack.render(0.0625F);
else {
modelCouchSingle.CouchBack.render(0.0625F);
}
Minecraft.getMinecraft().getTextureManager().bindTexture(wool);
float[] color = BlockBannerRenderer.colorTable[tile.color];
GL11.glColor3f(color[0], color[1], color[2]);
if(tile.hasCornerLeft)
modelCouchCorner.Cussion.render(0.0625F);
else if(tile.hasCornerRight)
modelCouchCorner.Cussion.render(0.0625F);
else if(tile.hasLeft && tile.hasRight)
modelCouch.Cussion.render(0.0625F);
else if(tile.hasLeft)
modelCouchLeft.Cussion.render(0.0625F);
else if(tile.hasRight)
modelCouchRight.Cussion.render(0.0625F);
else {
modelCouchSingle.Cussion.render(0.0625F);
}
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -122,6 +158,22 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
GL11.glPopMatrix();
}
public void setCouchWood(int meta){
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
if(meta == 1)
manager.bindTexture(spruce);
else if(meta == 2)
manager.bindTexture(birch);
else if(meta == 3)
manager.bindTexture(jungle);
else if(meta == 4)
manager.bindTexture(acacia);
else if(meta == 5)
manager.bindTexture(dark_oak);
else
manager.bindTexture(oak);
}
@Override
public int getRenderId() {
return CustomItems.couchWool.getRenderType();
@@ -1,91 +0,0 @@
package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockLamp;
import noppes.npcs.blocks.tiles.TileLamp;
import noppes.npcs.client.model.blocks.ModelLamp;
import noppes.npcs.client.model.blocks.ModelLampCeiling;
import noppes.npcs.client.model.blocks.ModelLampWall;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class BlockLampRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
private final ModelLamp model = new ModelLamp();
private final ModelLampCeiling model2 = new ModelLampCeiling();
private final ModelLampWall model3 = new ModelLampWall();
private static final ResourceLocation resource1 = new ResourceLocation("customnpcs","textures/models/Lamp.png");
public BlockLampRenderer(){
((BlockLamp)CustomItems.lamp).renderId = RenderingRegistry.getNextAvailableRenderId();
((BlockLamp)CustomItems.lamp_unlit).renderId = ((BlockLamp)CustomItems.lamp).renderId;
RenderingRegistry.registerBlockHandler(this);
}
@Override
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileLamp tile = (TileLamp) var1;
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
//GL11.glScalef(0.95f, 0.95f, 0.95f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
if(tile.color == 0)
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else if(tile.color == 1)
model2.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else
model3.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId,
RenderBlocks renderer) {
GL11.glPushMatrix();
GL11.glTranslatef(0, 2.2f, 0);
GL11.glScalef(2f, 2f, 2f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
GL11.glColor3f(1, 1, 1);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
Block block, int modelId, RenderBlocks renderer) {
return false;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
}
@Override
public int getRenderId() {
return CustomItems.lamp.getRenderType();
}
}
@@ -0,0 +1,132 @@
package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockLantern;
import noppes.npcs.blocks.tiles.TileLamp;
import noppes.npcs.client.model.blocks.lantern.LanternCeiling;
import noppes.npcs.client.model.blocks.lantern.LanternFloor;
import noppes.npcs.client.model.blocks.lantern.LanternWall;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyLantern;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCeiling;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyWall;
import noppes.npcs.config.ConfigClient;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class BlockLanternRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
private final ModelLegacyLantern modelLegacyLantern = new ModelLegacyLantern();
private final ModelLegacyCeiling modelLegacyCeiling = new ModelLegacyCeiling();
private final ModelLegacyWall modelLegacyWall = new ModelLegacyWall();
private static final ResourceLocation legacyTexture = new ResourceLocation("customnpcs","textures/models/legacy/Lamp.png");
private final LanternFloor modelLantern = new LanternFloor();
private final LanternWall modelLanternWall = new LanternWall();
private final LanternCeiling modelLanternCeiling = new LanternCeiling();
private static final ResourceLocation texture = new ResourceLocation("customnpcs","textures/models/lantern.png");
public BlockLanternRenderer(){
((BlockLantern)CustomItems.lantern).renderId = RenderingRegistry.getNextAvailableRenderId();
((BlockLantern)CustomItems.lantern_unlit).renderId = ((BlockLantern)CustomItems.lantern).renderId;
RenderingRegistry.registerBlockHandler(this);
}
@Override
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileLamp tile = (TileLamp) var1;
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glColor3f(1, 1, 1);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glEnable(GL11.GL_ALPHA_TEST);
if(ConfigClient.LegacyLantern){
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(legacyTexture);
if(tile.color == 0)
modelLegacyLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else if(tile.color == 1)
modelLegacyCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
else
modelLegacyWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
if(tile.color == 0){
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
modelLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
else if(tile.color == 1){
GL11.glRotatef(90, 0, 1, 0);
modelLanternCeiling.Chain.render(0.0625F);
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
modelLanternCeiling.Lantern.render(0.0625F);
modelLanternCeiling.Light.render(0.0625F);
}
else {
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
GL11.glTranslatef(0, 0.3f, 0);
modelLanternWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId,
RenderBlocks renderer) {
GL11.glPushMatrix();
GL11.glTranslatef(0, 2.2f, 0);
GL11.glScalef(2f, 2f, 2f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
if(ConfigClient.LegacyLantern){
Minecraft.getMinecraft().getTextureManager().bindTexture(legacyTexture);
GL11.glColor3f(1, 1, 1);
modelLegacyLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
else {
GL11.glScalef(0.7f, 0.7f, 0.7f);
GL11.glTranslatef(0, 0.4f, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
GL11.glColor3f(1, 1, 1);
modelLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
Block block, int modelId, RenderBlocks renderer) {
return false;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return ConfigClient.LegacyLantern;
}
@Override
public int getRenderId() {
return CustomItems.lantern.getRenderType();
}
}
@@ -14,14 +14,23 @@ import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockRotated;
import noppes.npcs.blocks.tiles.TilePedestal;
import noppes.npcs.client.model.blocks.ModelPedestal;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyPedestal;
import noppes.npcs.config.ConfigClient;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class BlockPedestalRenderer extends BlockRendererInterface{
private final ModelPedestal model = new ModelPedestal();
private final static ResourceLocation resource = new ResourceLocation("customnpcs:textures/models/npcPedestal.png");
private final ModelLegacyPedestal legacyModel = new ModelLegacyPedestal();
private final static ResourceLocation resource = new ResourceLocation("customnpcs:textures/models/legacy/npcPedestal.png");
private final ModelPedestal model = new ModelPedestal();
private final static ResourceLocation wood = new ResourceLocation("customnpcs:textures/models/pedestal/wood.png");
private final static ResourceLocation stone = new ResourceLocation("customnpcs:textures/models/pedestal/stone.png");
private final static ResourceLocation iron = new ResourceLocation("customnpcs:textures/models/pedestal/iron.png");
private final static ResourceLocation gold = new ResourceLocation("customnpcs:textures/models/pedestal/gold.png");
private final static ResourceLocation diamond = new ResourceLocation("customnpcs:textures/models/pedestal/diamond.png");
public BlockPedestalRenderer(){
((BlockRotated)CustomItems.pedestal).renderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(this);
@@ -35,17 +44,26 @@ public class BlockPedestalRenderer extends BlockRendererInterface{
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
//GL11.glScalef(0.95f, 0.95f, 0.95f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
setMaterialTexture(var1.getBlockMetadata());
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glScalef(1f, 0.99f, 1f);
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
manager.bindTexture(resource);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(ConfigClient.LegacyPedestal){
setMaterialTexture(var1.getBlockMetadata());
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glScalef(1f, 0.99f, 1f);
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
manager.bindTexture(resource);
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
setPedestalTexture(var1.getBlockMetadata());
GL11.glPushMatrix();
GL11.glScalef(1f, 1.3f, 1f);
GL11.glTranslatef(0f, -0.34f, 0f);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glPopMatrix();
GL11.glScalef(1f, 0.99f, 1f);
}
if(!this.playerTooFar(tile))
doRender(tile.getStackInSlot(0));
GL11.glPopMatrix();
@@ -55,7 +73,10 @@ public class BlockPedestalRenderer extends BlockRendererInterface{
if(item == null || item.getItem() == null || item.getItem() instanceof ItemBlock)
return;
GL11.glPushMatrix();
GL11.glTranslatef(0.06f, 0.30f, 0.02f);
if(ConfigClient.LegacyPedestal)
GL11.glTranslatef(0.06f, 0.30f, 0.02f);
else
GL11.glTranslatef(0.06f, 0.490f, 0.02f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90, 0, 1, 0);
GL11.glScalef(0.6f, 0.6f, 0.6f);
@@ -90,30 +111,53 @@ public class BlockPedestalRenderer extends BlockRendererInterface{
RenderManager.instance.itemRenderer.renderItem(Minecraft.getMinecraft().thePlayer, item, 0);
}
GL11.glPopMatrix();
}
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId,
RenderBlocks renderer) {
GL11.glPushMatrix();
GL11.glTranslatef(0, 0.44f, 0);
GL11.glScalef(0.76f, 0.66f, 0.76f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
setMaterialTexture(metadata);
GL11.glColor3f(1, 1, 1);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(ConfigClient.LegacyPedestal){
GL11.glTranslatef(0, 0.44f, 0);
GL11.glScalef(0.76f, 0.66f, 0.76f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
setMaterialTexture(metadata);
GL11.glColor3f(1, 1, 1);
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
GL11.glTranslatef(0, 1.9f, 0);
GL11.glScalef(1f, 1.4f, 1f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
setPedestalTexture(metadata);
GL11.glColor3f(1, 1, 1);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
GL11.glPopMatrix();
}
public void setPedestalTexture(int meta){
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
if(meta == 1)
manager.bindTexture(stone);
else if(meta == 2)
manager.bindTexture(iron);
else if(meta == 3)
manager.bindTexture(gold);
else if(meta == 4)
manager.bindTexture(diamond);
else
manager.bindTexture(wood);
}
@Override
public int getRenderId() {
return CustomItems.pedestal.getRenderType();
}
public int specialRenderDistance(){
return 40;
}
@@ -67,7 +67,35 @@ public abstract class BlockRendererInterface extends TileEntitySpecialRenderer i
0.1F, 0.1F, 0.1F
}
};
@Override
public static int colorTableInts[][] = {
{ 0xFFFFFF }, // White
{ 0xF2B233 }, // Light Orange
{ 0xE680D9 }, // Pinkish Purple
{ 0x99B2F2 }, // Light Blue
{ 0xE6E633 }, // Yellow
{ 0x80CC1A }, // Green
{ 0xF2B2CC }, // Light Pink
{ 0x4D4D4D }, // Dark Gray
{ 0x999999 }, // Gray
{ 0x4D99B2 }, // Teal
{ 0xB266E6 }, // Purple
{ 0x3366CC }, // Deep Blue
{ 0x805D4D }, // Brown
{ 0x668033 }, // Olive Green
{ 0xCC4D4D }, // Red
{ 0x1A1A1A } // Black
};
public static float[] hexToRGB(int hex) {
float r = ((hex >> 16) & 0xFF) / 255.0F;
float g = ((hex >> 8) & 0xFF) / 255.0F;
float b = (hex & 0xFF) / 255.0F;
return new float[]{r, g, b};
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
Block block, int modelId, RenderBlocks renderer) {
return false;
@@ -0,0 +1,104 @@
package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockShortLamp;
import noppes.npcs.blocks.tiles.TileShortLamp;
import noppes.npcs.client.model.blocks.lamp.ModelShortLamp;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class BlockShortLampRenderer extends BlockRendererInterface {
private final ModelShortLamp model = new ModelShortLamp();
public static final ResourceLocation wood = new ResourceLocation("customnpcs","textures/models/lamp/short/wood.png");
public static final ResourceLocation stone = new ResourceLocation("customnpcs","textures/models/lamp/short/stone.png");
public static final ResourceLocation iron = new ResourceLocation("customnpcs","textures/models/lamp/short/iron.png");
public static final ResourceLocation gold = new ResourceLocation("customnpcs","textures/models/lamp/short/gold.png");
public static final ResourceLocation diamond = new ResourceLocation("customnpcs","textures/models/lamp/short/diamond.png");
public BlockShortLampRenderer(){
((BlockShortLamp)CustomItems.shortLamp).renderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(this);
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) {
TileShortLamp tile = (TileShortLamp) tileEntity;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5f, (float)y + 1.5f, (float)z + 0.5f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
setLampTexture(tileEntity.getBlockMetadata());
model.Lamp.render(0.0625F);
int light = tileEntity.getWorldObj().getLightBrightnessForSkyBlocks(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, 0);
int brightX = light % 65536;
int brightY = light / 65536;
// Set full brightness for the light
int fullBright = 0xF000F0;
int fullBrightX = fullBright % 65536;
int fullBrightY = fullBright / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)fullBrightX, (float)fullBrightY);
model.Light.render(0.0625F);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)brightX, (float)brightY);
float[] color = BlockBannerRenderer.colorTable[tile.color];
GL11.glColor3f(color[0], color[1], color[2]);
model.Shade.render(0.0625F);
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glPushMatrix();
// Adjust transformation for inventory rendering.
GL11.glTranslatef(0, 0.42f, 0);
GL11.glScalef(0.76f, 0.76f, 0.76f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
setLampTexture(metadata);
model.Lamp.render(0.0625F);
model.Light.render(0.0625F);
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
GL11.glColor3f(color[0], color[1], color[2]);
model.Shade.render(0.0625F);
GL11.glPopMatrix();
}
public void setLampTexture(int meta){
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
if(meta == 1)
manager.bindTexture(stone);
else if(meta == 2)
manager.bindTexture(iron);
else if(meta == 3)
manager.bindTexture(gold);
else if(meta == 4)
manager.bindTexture(diamond);
else
manager.bindTexture(wood);
}
@Override
public int getRenderId() {
return CustomItems.shortLamp.getRenderType();
}
}
@@ -43,7 +43,7 @@ public class BlockStoolRenderer extends BlockRendererInterface{
GL11.glRotatef(180, 0, 0, 1);
GL11.glColor3f(1, 1, 1);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glEnable(GL11.GL_ALPHA_TEST);
if(ConfigClient.LegacyStool){
setWoodTexture(var1.getBlockMetadata());
@@ -59,6 +59,7 @@ public class BlockStoolRenderer extends BlockRendererInterface{
stool.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -45,30 +45,27 @@ public class BlockTableRenderer extends BlockRendererInterface{
boolean east = var1.getWorldObj().getBlock(var1.xCoord, var1.yCoord, var1.zCoord + 1) == CustomItems.table;
boolean west = var1.getWorldObj().getBlock(var1.xCoord, var1.yCoord, var1.zCoord - 1) == CustomItems.table;
legacyTable.Shape1.showModel = !south && !east;
legacyTable.Shape3.showModel = !north && !west;
legacyTable.Shape4.showModel = !north && !east;
legacyTable.Shape5.showModel = !south && !west;
table.Shape1.showModel = !south && !east;
table.Shape2.showModel = !south && !west;
table.Shape3.showModel = !north && !west;
table.Shape4.showModel = !north && !east;
legacyTable.Shape1.showModel = table.Shape1.showModel = !south && !east;
legacyTable.Shape3.showModel = table.Shape3.showModel = !north && !west;
legacyTable.Shape4.showModel = table.Shape4.showModel = !north && !east;
legacyTable.Shape5.showModel = table.Shape5.showModel = !south && !west;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glEnable(GL11.GL_ALPHA_TEST);
if(ConfigClient.LegacyTable){
setWoodTexture(var1.getBlockMetadata());
legacyTable.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
legacyTable.Table.render(0.0625f);
} else {
GL11.glEnable(GL11.GL_ALPHA_TEST);
setTableTexture(var1.getBlockMetadata());
table.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
table.Table.render(0.0625f);
GL11.glDisable(GL11.GL_ALPHA_TEST);
}
}
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -94,9 +91,9 @@ public class BlockTableRenderer extends BlockRendererInterface{
GL11.glColor3f(1, 1, 1);
table.Table.render(0.0625f);
table.Shape1.showModel = true;
table.Shape2.showModel = true;
table.Shape3.showModel = true;
table.Shape4.showModel = true;
table.Shape5.showModel = true;
table.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
@@ -2,24 +2,37 @@ package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.CustomItems;
import noppes.npcs.blocks.BlockTallLamp;
import noppes.npcs.blocks.tiles.TileTallLamp;
import noppes.npcs.client.model.blocks.ModelTallLamp;
import noppes.npcs.client.model.blocks.ModelTallLampTop;
import noppes.npcs.client.model.blocks.lamp.ModelTallLamp;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyTallLamp;
import noppes.npcs.client.model.blocks.legacy.ModelLegacyTallLampTop;
import noppes.npcs.config.ConfigClient;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class BlockTallLampRenderer extends BlockRendererInterface{
private final ModelTallLamp model = new ModelTallLamp();
private final ModelTallLampTop top = new ModelTallLampTop();
private final ModelLegacyTallLamp modelLegacy = new ModelLegacyTallLamp();
private final ModelLegacyTallLampTop topLegacy = new ModelLegacyTallLampTop();
public static final ResourceLocation resourceTop = new ResourceLocation("customnpcs","textures/cache/wool_colored_white.png");
private final ModelTallLamp model = new ModelTallLamp();
public static final ResourceLocation wood = new ResourceLocation("customnpcs","textures/models/lamp/tall/wood.png");
public static final ResourceLocation stone = new ResourceLocation("customnpcs","textures/models/lamp/tall/stone.png");
public static final ResourceLocation iron = new ResourceLocation("customnpcs","textures/models/lamp/tall/iron.png");
public static final ResourceLocation gold = new ResourceLocation("customnpcs","textures/models/lamp/tall/gold.png");
public static final ResourceLocation diamond = new ResourceLocation("customnpcs","textures/models/lamp/tall/diamond.png");
public BlockTallLampRenderer(){
((BlockTallLamp)CustomItems.tallLamp).renderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(this);
@@ -29,22 +42,43 @@ public class BlockTallLampRenderer extends BlockRendererInterface{
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileTallLamp tile = (TileTallLamp) var1;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
//GL11.glScalef(0.95f, 0.95f, 0.95f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
setMaterialTexture(var1.getBlockMetadata());
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
this.bindTexture(resourceTop);
float[] color = BlockBannerRenderer.colorTable[tile.color];
GL11.glColor3f(color[0], color[1], color[2]);
top.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
if(ConfigClient.LegacyTallLamp){
setMaterialTexture(var1.getBlockMetadata());
modelLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
this.bindTexture(resourceTop);
float[] color = BlockBannerRenderer.colorTable[tile.color];
GL11.glColor3f(color[0], color[1], color[2]);
topLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
setLampTexture(var1.getBlockMetadata());
model.Lamp.render(0.0625F);
int light = var1.getWorldObj().getLightBrightnessForSkyBlocks(var1.xCoord, var1.yCoord, var1.zCoord, 0);
int brightX = light % 65536;
int brightY = light / 65536;
// Set full brightness for the light
int fullBright = 0xF000F0;
int fullBrightX = fullBright % 65536;
int fullBrightY = fullBright / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)fullBrightX, (float)fullBrightY);
model.Light.render(0.0625F);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)brightX, (float)brightY);
float[] color = BlockBannerRenderer.colorTable[tile.color];
GL11.glColor3f(color[0], color[1], color[2]);
model.Shade.render(0.0625F);
}
GL11.glPopAttrib();
GL11.glPopMatrix();
}
@@ -56,18 +90,40 @@ public class BlockTallLampRenderer extends BlockRendererInterface{
GL11.glScalef(0.76f, 0.66f, 0.76f);
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(180, 0, 1, 0);
if(ConfigClient.LegacyTallLamp){
setMaterialTexture(metadata);
GL11.glColor3f(1, 1, 1);
modelLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
setMaterialTexture(metadata);
GL11.glColor3f(1, 1, 1);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
this.bindTexture(resourceTop);
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
GL11.glColor3f(color[0], color[1], color[2]);
topLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
} else {
setLampTexture(metadata);
model.Lamp.render(0.0625F);
model.Light.render(0.0625F);
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
GL11.glColor3f(color[0], color[1], color[2]);
model.Shade.render(0.0625F);
}
this.bindTexture(resourceTop);
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
GL11.glColor3f(color[0], color[1], color[2]);
top.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
public void setLampTexture(int meta){
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
if(meta == 1)
manager.bindTexture(stone);
else if(meta == 2)
manager.bindTexture(iron);
else if(meta == 3)
manager.bindTexture(gold);
else if(meta == 4)
manager.bindTexture(diamond);
else
manager.bindTexture(wood);
}
@Override
public int getRenderId() {
@@ -41,6 +41,7 @@ public class BlockWallBannerRenderer extends BlockRendererInterface{
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileWallBanner tile = (TileWallBanner) var1;
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glPushMatrix();
@@ -89,6 +90,7 @@ public class BlockWallBannerRenderer extends BlockRendererInterface{
doRender(var2, var4, var6, tile.rotation, tile.icon, angle_x);
}
}
GL11.glPopAttrib();
}
public void doRender(double par2, double par4, double par6, int meta, ItemStack iicon, float rotate)
{
@@ -203,6 +205,7 @@ public class BlockWallBannerRenderer extends BlockRendererInterface{
modelLegacyWallBannerFlag.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
}
else {
flag.BannerFlag.rotateAngleX = 0;
BlockBannerRenderer.setBannerMaterial(metadata);
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
@@ -0,0 +1,162 @@
package noppes.npcs.client.renderer.items;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import noppes.npcs.items.ItemRenderInterface;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class NpcItemToolRenderer implements IItemRenderer {
// Textures for the assembled paintbrush parts:
private static final ResourceLocation PAINTBRUSH_HANDLE = new ResourceLocation("noppes", "textures/items/paintbrush_handle.png");
private static final ResourceLocation PAINTBRUSH_BRUSH = new ResourceLocation("noppes", "textures/items/paintbrush_brush.png");
private static final ResourceLocation ENCHANT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
// Only handle equipped types (first person or third person equipped)
return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON;
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return false;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
// Ensure the item implements our render interface
if (!(item.getItem() instanceof ItemRenderInterface))
return;
EntityLivingBase entity = (EntityLivingBase) data[1];
GL11.glPushMatrix();
// Apply base translations/rotations
GL11.glTranslatef(0.9375F, 0.0625F, 0.0F);
GL11.glRotatef(-315.0F, 0.0F, 0.0F, 1.0F);
// For meta==1 (paintbrush) we want to assemble the texture from two parts
if (item.getItemDamage() == 1) {
renderPaintbrush(entity, item);
} else {
// For other tools, fall back on the normal special render routine.
((ItemRenderInterface) item.getItem()).renderSpecial();
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.09375F, 0.0625F, 0.0F);
renderItem3d(entity, item);
}
GL11.glPopMatrix();
}
/**
* Renders the paintbrush by drawing its handle first, then overlaying the brush part tinted
* by the NBT "Color" value (an integer/hex value).
*/
private void renderPaintbrush(EntityLivingBase entity, ItemStack item) {
Minecraft mc = Minecraft.getMinecraft();
TextureManager textureManager = mc.getTextureManager();
Tessellator tessellator = Tessellator.instance;
int width = 16;
int height = 16;
float thickness = 0.0625F;
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
// Render the handle (untinted)
textureManager.bindTexture(PAINTBRUSH_HANDLE);
// Using full texture coordinates (0→1) in the same order as vanilla's renderItemIn2D:
ItemRenderer.renderItemIn2D(tessellator, 1.0F, 0.0F, 0.0F, 1.0F, width, height, thickness);
// Get the NBT color (default is white if not present)
int color = 0xFFFFFF;
if (item.hasTagCompound() && item.getTagCompound().hasKey("Color")) {
color = item.getTagCompound().getInteger("Color");
}
float red = ((color >> 16) & 0xFF) / 255.0F;
float green = ((color >> 8) & 0xFF) / 255.0F;
float blue = (color & 0xFF) / 255.0F;
GL11.glColor3f(red, green, blue);
// Render the brush (tinted by the color)
textureManager.bindTexture(PAINTBRUSH_BRUSH);
ItemRenderer.renderItemIn2D(tessellator, 1.0F, 0.0F, 0.0F, 1.0F, width, height, thickness);
// Reset GL color to white so that subsequent rendering is not tinted
GL11.glColor3f(1.0F, 1.0F, 1.0F);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
// If the item is enchanted, render the enchanted glint effect on top
if (item.hasEffect(0)) {
renderEnchantedEffect(tessellator, textureManager);
}
}
/**
* Fallback 3D item renderer (for non-paintbrush items)
*/
private void renderItem3d(EntityLivingBase entity, ItemStack item) {
Minecraft mc = Minecraft.getMinecraft();
TextureManager textureManager = mc.getTextureManager();
Tessellator tessellator = Tessellator.instance;
textureManager.bindTexture(textureManager.getResourceLocation(item.getItemSpriteNumber()));
IIcon icon = entity.getItemIcon(item, 0);
if (icon == null) {
return;
}
float minU = icon.getMinU();
float maxU = icon.getMaxU();
float minV = icon.getMinV();
float maxV = icon.getMaxV();
int width = icon.getIconWidth();
int height = icon.getIconHeight();
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
// Note: The order here mimics vanilla's 2D item rendering
ItemRenderer.renderItemIn2D(tessellator, maxU, minV, minU, maxV, width, height, 0.0625F);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
/**
* Renders the enchanted glint overlay.
*/
private void renderEnchantedEffect(Tessellator tessellator, TextureManager textureManager) {
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
textureManager.bindTexture(ENCHANT);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
float f7 = 0.76F;
GL11.glColor4f(0.5F * f7, 0.25F * f7, 0.8F * f7, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glPushMatrix();
float f8 = 0.125F;
GL11.glScalef(f8, f8, f8);
float f9 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
GL11.glTranslatef(f9, 0.0F, 0.0F);
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(f8, f8, f8);
f9 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
GL11.glTranslatef(-f9, 0.0F, 0.0F);
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
GL11.glPopMatrix();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
}