mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Upgraded Barrel & Campfire Models
This commit is contained in:
1 parent
435c31ddda
commit
db9ac7f7c4
19 files changed
+466
-206
No files matched your search
@@ -14,6 +14,7 @@ import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.blocks.tiles.TileCampfire;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.Random;
|
||||
@@ -31,14 +32,14 @@ public class BlockCampfire extends BlockLightable{
|
||||
public TileEntity createNewTileEntity(World var1, int var2) {
|
||||
return new TileCampfire();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
ItemStack item = player.inventory.getCurrentItem();
|
||||
if(item == null)
|
||||
return true;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
|
||||
if((item.getItem() == Items.flint || item.getItem() == Items.flint_and_steel) && unlitBlock() == this){
|
||||
if(world.rand.nextInt(3) == 0 && !world.isRemote)
|
||||
super.onBlockActivated(world, x, y, z, player, par6, par7, par8, par9);
|
||||
@@ -49,11 +50,11 @@ public class BlockCampfire extends BlockLightable{
|
||||
item.damageItem(1, player);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(item.getItem() == Item.getItemFromBlock(Blocks.sand) && litBlock() == this){
|
||||
super.onBlockActivated(world, x, y, z, player, par6, par7, par8, par9);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,23 +69,25 @@ public class BlockCampfire extends BlockLightable{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta == 1)
|
||||
return;
|
||||
|
||||
|
||||
if(random.nextInt(36) == 0){
|
||||
world.playSound(x + 0.5F, y + 0.5F, z + 0.5F, "fire.fire", 1.0F + random.nextFloat(), 0.3F + random.nextFloat() * 0.7f , false);
|
||||
}
|
||||
|
||||
|
||||
TileCampfire tile = (TileCampfire) world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
float xOffset = 0.5f, yOffset = 0.7f, zOffset = 0.5f;
|
||||
|
||||
double d0 = (double)((float)x + xOffset);
|
||||
double d1 = (double)((float)y + yOffset);
|
||||
double d2 = (double)((float)z + zOffset);
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
CustomNpcs.proxy.spawnParticle("largesmoke", d0, d1, d2, 0.0D, 0.0D, 0.0D, 2);
|
||||
CustomNpcs.proxy.spawnParticle("flame", d0, d1, d2, 0.0D, 0.0D, 0.0D, 4);
|
||||
|
||||
if(ConfigClient.LegacyCampfire){
|
||||
CustomNpcs.proxy.spawnParticle("largesmoke", d0, d1, d2, 0.0D, 0.0D, 0.0D, 2);
|
||||
CustomNpcs.proxy.spawnParticle("flame", d0, d1, d2, 0.0D, 0.0D, 0.0D, 4);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
package noppes.npcs.client.model.blocks.barrel;
|
||||
|
||||
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 BarrelCore extends ModelBase {
|
||||
private final ModelRenderer bb_main;
|
||||
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;
|
||||
|
||||
public BarrelCore() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
bb_main = new ModelRenderer(this);
|
||||
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
bb_main.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 1.5708F, 0.0F, -1.5708F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 6, -6, 0.0F, -5.0F, -5.0F, 0, 10, 10, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -14.5F, 0.0F);
|
||||
bb_main.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.0F, 1.5708F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 2, 2.5F, -5.5F, 5.5F, 8, 11, 0, 0.0F));
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 8, 2, 2.5F, -5.5F, -5.5F, 8, 11, 0, 0.0F));
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 3, -1.5F, -5.0F, -5.0F, 16, 10, 0, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(0.0F, -14.5F, 0.0F);
|
||||
bb_main.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 1.5708F, 0.0F, 1.5708F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 8, 2, 2.5F, -5.5F, -5.5F, 8, 11, 0, 0.0F));
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 0, 2, 2.5F, -5.5F, 5.5F, 8, 11, 0, 0.0F));
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 6, -5, -1.5F, -5.0F, -5.0F, 0, 10, 10, 0.0F));
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 0, 5, -1.5F, -5.0F, -5.0F, 16, 10, 0, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(0.0F, -14.5F, 0.0F);
|
||||
bb_main.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, -1.5708F, 0.0F, 1.5708F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 0, 4, -1.5F, -5.0F, -5.0F, 16, 10, 0, 0.0F));
|
||||
|
||||
cube_r5 = new ModelRenderer(this);
|
||||
cube_r5.setRotationPoint(0.0F, -8.0F, 5.0F);
|
||||
bb_main.addChild(cube_r5);
|
||||
setRotationAngle(cube_r5, 3.1416F, 0.0F, 1.5708F);
|
||||
cube_r5.cubeList.add(new ModelBox(cube_r5, 0, 3, -8.0F, -5.0F, 0.0F, 16, 10, 0, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float 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,47 +0,0 @@
|
||||
package noppes.npcs.client.model.blocks.barrel;// Made with Blockbench 4.9.4
|
||||
// Exported for Minecraft version 1.7 - 1.12
|
||||
// Paste this class into your mod and generate all required imports
|
||||
|
||||
|
||||
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 BarrelTrim extends ModelBase {
|
||||
private final ModelRenderer bb_main;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
|
||||
public BarrelTrim() {
|
||||
textureWidth = 32;
|
||||
textureHeight = 32;
|
||||
|
||||
bb_main = new ModelRenderer(this);
|
||||
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 0, 7, 0.0F, -16.5F, -4.0F, 2, 1, 2, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -8.0F, 0.0F);
|
||||
bb_main.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, -1.5708F, 0.0F, 1.5708F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 0, -6.0F, -6.0F, -6.0F, 2, 12, 12, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -3.0F, 0.0F);
|
||||
bb_main.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 1.5708F, 0.0F, 1.5708F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 0, -1.0F, -6.0F, -6.0F, 2, 12, 12, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package noppes.npcs.client.model.blocks.barrel;
|
||||
|
||||
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 ModelBarrel extends ModelBase {
|
||||
private final ModelRenderer Wall;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
private final ModelRenderer Trim;
|
||||
private final ModelRenderer Base;
|
||||
|
||||
public ModelBarrel() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Wall = new ModelRenderer(this);
|
||||
Wall.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Wall.cubeList.add(new ModelBox(Wall, 0, 0, 5.0F, -16.0F, 5.0F, 1, 16, 1, 0.0F));
|
||||
Wall.cubeList.add(new ModelBox(Wall, 0, 0, 5.0F, -16.0F, -6.0F, 1, 16, 1, 0.0F));
|
||||
Wall.cubeList.add(new ModelBox(Wall, 0, 0, -6.0F, -16.0F, -6.0F, 1, 16, 1, 0.0F));
|
||||
Wall.cubeList.add(new ModelBox(Wall, 0, 0, -6.0F, -16.0F, 5.0F, 1, 16, 1, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(-6.5F, -8.0F, 0.0F);
|
||||
Wall.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 1.5708F, 0.0F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 0, -0.5F, -6.0F, -8.0F, 1, 12, 16, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -8.0F, 6.5F);
|
||||
Wall.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.0F, 1.5708F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 14, -8.0F, -6.0F, -0.5F, 16, 12, 1, 0.0F));
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 14, -8.0F, -6.0F, -13.5F, 16, 12, 1, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(6.5F, -8.0F, 0.0F);
|
||||
Wall.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, -1.5708F, 0.0F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 0, 0, -0.5F, -6.0F, -8.0F, 1, 12, 16, 0.0F));
|
||||
|
||||
Trim = new ModelRenderer(this);
|
||||
Trim.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Trim.cubeList.add(new ModelBox(Trim, 4, 28, -6.5F, -5.0F, 5.5F, 13, 2, 2, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 34, 17, 5.5F, -5.0F, -6.5F, 2, 2, 13, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 4, 28, -6.5F, -5.0F, -7.5F, 13, 2, 2, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 34, 17, -7.5F, -5.0F, -6.5F, 2, 2, 13, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 4, 28, -6.5F, -13.0F, -7.5F, 13, 2, 2, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 4, 28, -6.5F, -13.0F, 5.5F, 13, 2, 2, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 34, 17, -7.5F, -13.0F, -6.5F, 2, 2, 13, 0.0F));
|
||||
Trim.cubeList.add(new ModelBox(Trim, 34, 17, 5.5F, -13.0F, -6.5F, 2, 2, 13, 0.0F));
|
||||
|
||||
Base = new ModelRenderer(this);
|
||||
Base.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Base.cubeList.add(new ModelBox(Base, 16, 2, -6.0F, -15.0F, -6.0F, 12, 1, 12, 0.0F));
|
||||
Base.cubeList.add(new ModelBox(Base, 16, 2, -6.0F, -2.0F, -6.0F, 12, 1, 12, 0.0F));
|
||||
}
|
||||
|
||||
public void renderBase(float f5){
|
||||
Base.render(f5);
|
||||
}
|
||||
|
||||
public void renderTrim(float f5){
|
||||
Trim.render(f5);
|
||||
}
|
||||
|
||||
public void renderWall(float f5){
|
||||
Wall.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,57 @@
|
||||
package noppes.npcs.client.model.blocks.campfire;
|
||||
|
||||
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 ModelCampfireFlame extends ModelBase {
|
||||
private final ModelRenderer[] frames;
|
||||
private static int frameDuration = 2;
|
||||
|
||||
public ModelCampfireFlame() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 144;
|
||||
|
||||
frames = new ModelRenderer[9];
|
||||
|
||||
// Create frames and add them to the array
|
||||
frames[0] = new ModelRenderer(this);
|
||||
frames[0].setRotationPoint(0.0F, 16.5F, 0.0F);
|
||||
frames[0].cubeList.add(new ModelBox(frames[0], 0, 0, -8.0F, -8.5F, 0.0F, 16, 16, 0, 0.0F));
|
||||
|
||||
ModelRenderer cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
frames[0].addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 0, -8.0F, -8.5F, 0.0F, 16, 16, 0, 0.0F));
|
||||
|
||||
// Repeat the above for all frames, incrementing texture offsets for each frame
|
||||
for (int i = 1; i < 9; i++) {
|
||||
frames[i] = new ModelRenderer(this);
|
||||
frames[i].setRotationPoint(0.0F, 16.5F, 0.0F);
|
||||
frames[i].cubeList.add(new ModelBox(frames[i], 0, i * 16 + 1, -8.0F, -8.5F, 0.0F, 16, 16, 0, 0.0F));
|
||||
|
||||
ModelRenderer cube_r = new ModelRenderer(this);
|
||||
cube_r.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
frames[i].addChild(cube_r);
|
||||
setRotationAngle(cube_r, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r.cubeList.add(new ModelBox(cube_r, 0, i * 16 + 1, -8.0F, -8.5F, 0.0F, 16, 16, 0, 0.0F));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float world_time, float f1, float f2, float f3, float f4, float f5) {
|
||||
// Calculate the current frame directly using modulo arithmetic
|
||||
int frameIndex = ((int) world_time / frameDuration) % frames.length;
|
||||
|
||||
// Render only the current frame
|
||||
frames[frameIndex].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,51 @@
|
||||
package noppes.npcs.client.model.blocks.campfire;
|
||||
|
||||
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 ModelCampfireLog extends ModelBase {
|
||||
private final ModelRenderer bb_main;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
|
||||
public ModelCampfireLog() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 16;
|
||||
|
||||
bb_main = new ModelRenderer(this);
|
||||
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(1.25F, -6.3F, 1.25F);
|
||||
bb_main.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.5449F, -1.0854F, -0.744F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 0, -1.0F, -4.0F, -1.0F, 3, 10, 3, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(-1.5F, -6.0F, -0.25F);
|
||||
bb_main.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.0F, 0.3927F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 0, -2.0F, -4.0F, -1.0F, 3, 10, 3, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(1.5F, -6.0F, -2.25F);
|
||||
bb_main.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, -0.3295F, 0.7268F, -0.4754F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 0, 0, -2.0F, -4.5F, -1.0F, 3, 10, 3, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package noppes.npcs.client.model.blocks.campfire;
|
||||
|
||||
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 ModelCampfireStone extends ModelBase {
|
||||
private final ModelRenderer bb_main;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
|
||||
public ModelCampfireStone() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 16;
|
||||
|
||||
bb_main = new ModelRenderer(this);
|
||||
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 18, 5, 4.0F, -2.0F, 1.0F, 3, 2, 4, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 18, 2, -4.0F, -3.0F, -7.0F, 4, 3, 3, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 17, 0, -3.0F, -3.0F, 5.0F, 4, 3, 3, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 18, 2, -8.0F, -3.0F, -1.0F, 3, 3, 4, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 18, 11, -6.0F, -2.0F, 3.0F, 3, 2, 3, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 16, 0, -7.0F, -2.0F, -5.0F, 3, 2, 4, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 18, 11, 4.0F, -2.0F, -6.0F, 3, 2, 3, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(6.5F, -1.5F, -1.0F);
|
||||
bb_main.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 18, 2, -2.0F, -1.5F, -1.5F, 4, 3, 3, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(2.5F, -1.5F, -6.0F);
|
||||
bb_main.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 18, 5, -1.0F, -0.5F, -2.5F, 3, 2, 4, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(3.5F, -1.5F, 5.5F);
|
||||
bb_main.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 20, 1, -0.5F, -0.5F, -1.5F, 2, 2, 4, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float 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;
|
||||
}
|
||||
}
|
||||
+19
-19
@@ -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 ModelBarrel extends ModelBase
|
||||
public class ModelLegacyBarrel extends ModelBase
|
||||
{
|
||||
ModelRenderer Plank1;
|
||||
ModelRenderer Plank2;
|
||||
@@ -18,70 +18,70 @@ public class ModelBarrel extends ModelBase
|
||||
ModelRenderer Plank10;
|
||||
ModelRenderer Plank11;
|
||||
ModelRenderer Plank12;
|
||||
|
||||
public ModelBarrel()
|
||||
{
|
||||
|
||||
public ModelLegacyBarrel()
|
||||
{
|
||||
Plank1 = new ModelRenderer(this, 10, 0);
|
||||
Plank1.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank1.setRotationPoint(0F, 7.01F, 0F);
|
||||
setRotation(Plank1, 0F, 0F, 1.570796F);
|
||||
|
||||
|
||||
Plank2 = new ModelRenderer(this, 10, 8);
|
||||
Plank2.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank2.setRotationPoint(0F, 7F, 0F);
|
||||
setRotation(Plank2, 0F, 0.5235988F, 1.570796F);
|
||||
|
||||
|
||||
Plank3 = new ModelRenderer(this, 10, 0);
|
||||
Plank3.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank3.setRotationPoint(0F, 7.01F, 0F);
|
||||
setRotation(Plank3, 0F, 1.047198F, 1.570796F);
|
||||
|
||||
|
||||
Plank4 = new ModelRenderer(this, 10, 8);
|
||||
Plank4.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank4.setRotationPoint(0F, 7F, 0F);
|
||||
setRotation(Plank4, 0F, 1.570796F, 1.570796F);
|
||||
|
||||
|
||||
Plank5 = new ModelRenderer(this, 10, 0);
|
||||
Plank5.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank5.setRotationPoint(0F, 7.01F, 0F);
|
||||
setRotation(Plank5, 0F, 2.094395F, 1.570796F);
|
||||
|
||||
|
||||
Plank6 = new ModelRenderer(this, 10, 8);
|
||||
Plank6.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank6.setRotationPoint(0F, 7F, 0F);
|
||||
setRotation(Plank6, 0F, 2.617994F, 1.570796F);
|
||||
|
||||
|
||||
Plank7 = new ModelRenderer(this, 10, 0);
|
||||
Plank7.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank7.setRotationPoint(0F, 7.01F, 0F);
|
||||
setRotation(Plank7, 0F, 3.150901F, 1.570796F);
|
||||
|
||||
|
||||
Plank8 = new ModelRenderer(this, 10, 8);
|
||||
Plank8.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank8.setRotationPoint(0F, 7F, 0F);
|
||||
setRotation(Plank8, 0F, -2.617994F, 1.570796F);
|
||||
|
||||
|
||||
Plank9 = new ModelRenderer(this, 10, 0);
|
||||
Plank9.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank9.setRotationPoint(0F, 7.01F, 0F);
|
||||
setRotation(Plank9, 0F, -2.094395F, 1.570796F);
|
||||
|
||||
|
||||
Plank10 = new ModelRenderer(this, 10, 8);
|
||||
Plank10.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank10.setRotationPoint(0F, 7F, 0F);
|
||||
setRotation(Plank10, 0F, -1.570796F, 1.570796F);
|
||||
|
||||
|
||||
Plank11 = new ModelRenderer(this, 10, 0);
|
||||
Plank11.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank11.setRotationPoint(0F, 7.01F, 0F);
|
||||
setRotation(Plank11, 0F, -1.047198F, 1.570796F);
|
||||
|
||||
|
||||
Plank12 = new ModelRenderer(this, 10, 0);
|
||||
Plank12.addBox(0F, 6.5F, -2F, 17, 1, 4);
|
||||
Plank12.setRotationPoint(0F, 7F, 0F);
|
||||
setRotation(Plank12, 0F, -0.5235988F, 1.570796F);
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
@@ -98,13 +98,13 @@ public class ModelBarrel extends ModelBase
|
||||
Plank11.render(f5);
|
||||
Plank12.render(f5);
|
||||
}
|
||||
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = y;
|
||||
model.rotateAngleY = x;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+8
-8
@@ -1,38 +1,38 @@
|
||||
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 ModelBarrelLit extends ModelBase
|
||||
public class ModelLegacyBarrelLid extends ModelBase
|
||||
{
|
||||
ModelRenderer Top;
|
||||
ModelRenderer Bottom;
|
||||
|
||||
public ModelBarrelLit()
|
||||
|
||||
public ModelLegacyBarrelLid()
|
||||
{
|
||||
Top = new ModelRenderer(this, 0, 0);
|
||||
Top.addBox(0F, 0F, 0F, 16, 0, 16);
|
||||
Top.setRotationPoint(-8F, 9F, -8F);
|
||||
|
||||
|
||||
Bottom = new ModelRenderer(this, 0, 0);
|
||||
Bottom.addBox(0F, 0F, 0F, 16, 0, 16);
|
||||
Bottom.setRotationPoint(-8F, 23F, -8F);
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
Bottom.render(f5);
|
||||
Top.render(f5);
|
||||
}
|
||||
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = y;
|
||||
model.rotateAngleY = x;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -4,28 +4,37 @@ 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.texture.TextureManager;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockBarrel;
|
||||
import noppes.npcs.blocks.tiles.TileColorable;
|
||||
import noppes.npcs.client.model.blocks.ModelBarrel;
|
||||
import noppes.npcs.client.model.blocks.ModelBarrelLit;
|
||||
import noppes.npcs.client.model.blocks.barrel.BarrelCore;
|
||||
import noppes.npcs.client.model.blocks.barrel.BarrelTrim;
|
||||
import noppes.npcs.client.model.blocks.barrel.ModelBarrel;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyBarrel;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyBarrelLid;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockBarrelRenderer extends BlockRendererInterface{
|
||||
|
||||
private final ModelBarrel model = new ModelBarrel();
|
||||
private final ModelBarrelLit modelLit = new ModelBarrelLit();
|
||||
private static final ResourceLocation resource1 = new ResourceLocation("customnpcs","textures/models/Barrel.png");
|
||||
// Legacy
|
||||
private final ModelLegacyBarrel legacyModel = new ModelLegacyBarrel();
|
||||
private final ModelLegacyBarrelLid legacyLid = new ModelLegacyBarrelLid();
|
||||
private static final ResourceLocation legacy_texture = new ResourceLocation("customnpcs","textures/models/Barrel.png");
|
||||
|
||||
|
||||
private final BarrelCore core = new BarrelCore();
|
||||
private final BarrelTrim trim = new BarrelTrim();
|
||||
private static final ResourceLocation trimTexture = new ResourceLocation("customnpcs","textures/models/BarrelTrim.png");
|
||||
// Modern
|
||||
private final ModelBarrel barrel = new ModelBarrel();
|
||||
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");
|
||||
|
||||
public BlockBarrelRenderer(){
|
||||
((BlockBarrel)CustomItems.barrel).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
@@ -39,17 +48,38 @@ public class BlockBarrelRenderer extends BlockRendererInterface{
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.42f, (float)var6 + 0.5f);
|
||||
GL11.glScalef(1.2f, 0.94f,1.2f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
core.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(trimTexture);
|
||||
trim.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
if(ConfigClient.LegacyBarrel){
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.42f, (float)var6 + 0.5f);
|
||||
GL11.glScalef(1.2f, 0.94f,1.2f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(legacy_texture);
|
||||
legacyLid.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else {
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
GL11.glScalef(1.0f, 1.0f,1.0f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
barrel.renderWall(0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(trimTexture);
|
||||
barrel.renderTrim(0.0625F);
|
||||
setLidTexture(var1.getBlockMetadata());
|
||||
barrel.renderBase(0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -58,20 +88,55 @@ public class BlockBarrelRenderer extends BlockRendererInterface{
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 1.05f, 0);
|
||||
GL11.glScalef(1f, 1f, 1f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
if(ConfigClient.LegacyBarrel){
|
||||
GL11.glTranslatef(0, 0.75f, 0);
|
||||
GL11.glScalef(0.7f, 0.7f, 0.7f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
setWoodTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(legacy_texture);
|
||||
legacyLid.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else {
|
||||
GL11.glTranslatef(0, 0.9f, 0);
|
||||
GL11.glScalef(0.9f, 0.9f, 0.9f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
setWoodTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
barrel.renderWall(0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(trimTexture);
|
||||
barrel.renderTrim(0.0625F);
|
||||
setLidTexture(metadata);
|
||||
barrel.renderBase(0.0625F);
|
||||
}
|
||||
|
||||
setWoodTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
core.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(trimTexture);
|
||||
trim.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLidTexture(int meta){
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
if(meta == 1)
|
||||
manager.bindTexture(oak_lid);
|
||||
else if(meta == 2)
|
||||
manager.bindTexture(oak_lid);
|
||||
else if(meta == 3)
|
||||
manager.bindTexture(oak_lid);
|
||||
else if(meta == 4)
|
||||
manager.bindTexture(oak_lid);
|
||||
else if(meta == 5)
|
||||
manager.bindTexture(oak_lid);
|
||||
else
|
||||
manager.bindTexture(oak_lid);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return CustomItems.barrel.getRenderType();
|
||||
}
|
||||
|
||||
@@ -5,17 +5,29 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockRotated;
|
||||
import noppes.npcs.blocks.tiles.TileColorable;
|
||||
import noppes.npcs.client.model.blocks.ModelCampfire;
|
||||
import noppes.npcs.client.model.blocks.campfire.ModelCampfireFlame;
|
||||
import noppes.npcs.client.model.blocks.campfire.ModelCampfireLog;
|
||||
import noppes.npcs.client.model.blocks.campfire.ModelCampfireStone;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockCampfireRenderer extends BlockRendererInterface{
|
||||
|
||||
private final ModelCampfire model = new ModelCampfire();
|
||||
|
||||
// Legacy
|
||||
private final ModelCampfire legacy_model = new ModelCampfire();
|
||||
|
||||
// Modern
|
||||
private final ModelCampfireFlame flameModel = new ModelCampfireFlame();
|
||||
private final ModelCampfireLog logsModel = new ModelCampfireLog();
|
||||
private final ModelCampfireStone stonesModel = new ModelCampfireStone();
|
||||
|
||||
|
||||
public BlockCampfireRenderer(){
|
||||
((BlockRotated)CustomItems.campfire).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
((BlockRotated)CustomItems.campfire_unlit).renderId = ((BlockRotated)CustomItems.campfire).renderId;
|
||||
@@ -29,15 +41,29 @@ public class BlockCampfireRenderer extends BlockRendererInterface{
|
||||
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(PlanksOak);
|
||||
model.renderLog(0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Stone);
|
||||
model.renderRock(0.0625F);
|
||||
|
||||
if(ConfigClient.LegacyCampfire){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(PlanksOak);
|
||||
legacy_model.renderLog(0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Stone);
|
||||
legacy_model.renderRock(0.0625F);
|
||||
}
|
||||
else {
|
||||
Block block = tile.getBlockType();
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Logs);
|
||||
logsModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Cobble);
|
||||
stonesModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(block == CustomItems.campfire){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Flame);
|
||||
flameModel.render(null, tile.getWorldObj().getWorldTime(), 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -51,10 +77,19 @@ public class BlockCampfireRenderer extends BlockRendererInterface{
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(PlanksOak);
|
||||
model.renderLog(0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Stone);
|
||||
model.renderRock(0.0625F);
|
||||
|
||||
if(ConfigClient.LegacyCampfire){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(PlanksOak);
|
||||
legacy_model.renderLog(0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Stone);
|
||||
legacy_model.renderRock(0.0625F);
|
||||
}
|
||||
else {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Logs);
|
||||
logsModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Cobble);
|
||||
stonesModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -24,16 +24,13 @@ public abstract class BlockRendererInterface extends TileEntitySpecialRenderer i
|
||||
protected static final ResourceLocation PlanksAcacia = new ResourceLocation("customnpcs","textures/cache/planks_acacia.png");
|
||||
protected static final ResourceLocation PlanksJungle = new ResourceLocation("customnpcs","textures/cache/planks_jungle.png");
|
||||
|
||||
|
||||
protected static final ResourceLocation MCPlanksOak = new ResourceLocation("customnpcs","textures/cache/planks_oak.png");
|
||||
protected static final ResourceLocation MCPlanksBigOak = new ResourceLocation("customnpcs","textures/cache/planks_big_oak.png");
|
||||
protected static final ResourceLocation MCPlanksSpruce = new ResourceLocation("customnpcs","textures/cache/planks_spruce.png");
|
||||
protected static final ResourceLocation MCPlanksBirch = new ResourceLocation("customnpcs","textures/cache/planks_birch.png");
|
||||
protected static final ResourceLocation MCPlanksAcacia = new ResourceLocation("customnpcs","textures/cache/planks_acacia.png");
|
||||
protected static final ResourceLocation MCPlanksJungle = new ResourceLocation("customnpcs","textures/cache/planks_jungle.png");
|
||||
|
||||
protected static final ResourceLocation Steel = new ResourceLocation("customnpcs","textures/models/Steel.png");
|
||||
protected static final RenderItem renderer = new RenderItem();
|
||||
|
||||
protected static final ResourceLocation Logs = new ResourceLocation("textures/blocks/log_oak.png");
|
||||
protected static final ResourceLocation Cobble = new ResourceLocation("textures/blocks/cobblestone.png");
|
||||
protected static final ResourceLocation Flame = new ResourceLocation("customnpcs","textures/models/flame.png");
|
||||
|
||||
protected static final RenderItem renderer = new RenderItem();
|
||||
|
||||
public static float colorTable[][] = {
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ public class ConfigClient
|
||||
public final static String GENERAL = "General";
|
||||
public final static String VISUAL = "Visual";
|
||||
public final static String QUESTING = "Questing";
|
||||
public final static String MODEL = "Model";
|
||||
|
||||
|
||||
/**
|
||||
@@ -72,6 +73,14 @@ public class ConfigClient
|
||||
public static Property BannerAlertsProperty;
|
||||
public static boolean BannerAlerts = true;
|
||||
|
||||
/**
|
||||
* Model Properties
|
||||
**/
|
||||
public static boolean LegacyCampfire = false;
|
||||
public static boolean LegacyChair = false;
|
||||
public static boolean LegacyBarrel = false;
|
||||
public static boolean LegacyCarpentryBench = false;
|
||||
|
||||
public static void init(File configFile)
|
||||
{
|
||||
config = new Configuration(configFile);
|
||||
@@ -128,6 +137,11 @@ public class ConfigClient
|
||||
BannerAlertsProperty = config.get(VISUAL, "All Banner Alerts", true, "Universal enable/disable for Banner Alerts");
|
||||
BannerAlerts = BannerAlertsProperty.getBoolean(true);
|
||||
|
||||
LegacyCampfire = config.get(MODEL, "Legacy Campfire Model", false).getBoolean(false);
|
||||
LegacyBarrel = config.get(MODEL, "Legacy Barrel Model", false).getBoolean(false);
|
||||
LegacyChair = config.get(MODEL, "Legacy Chair Model", false).getBoolean(false);
|
||||
LegacyCarpentryBench = config.get(MODEL, "Legacy Carpentry Bench Model", false).getBoolean(false);
|
||||
|
||||
// Convert to Legacy
|
||||
if(CustomNpcs.legacyExist){
|
||||
EnableChatBubbles = LegacyConfig.EnableChatBubbles;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 405 B |
Binary file not shown.
|
After Width: | Height: | Size: 511 B |
Binary file not shown.
|
After Width: | Height: | Size: 269 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2,
|
||||
"interpolate": true,
|
||||
"frames": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8
|
||||
]
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 387 B |
Reference in new issue
Block a user