mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 21:20:04 +00:00
Updated Pedestal Model
This commit is contained in:
1 parent
f74984a014
commit
afa5bd81bd
10 files changed
+124
-47
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user