mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 13:49:05 +00:00
Mailbox Remodel
This commit is contained in:
1 parent
cdc5cc0983
commit
758485b4d0
6 files changed
+78
-23
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package noppes.npcs.client.model.blocks;// Made with Blockbench 4.12.2
|
||||
// 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 ModelMailbox extends ModelBase {
|
||||
private final ModelRenderer mailbox;
|
||||
|
||||
public ModelMailbox() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
mailbox = new ModelRenderer(this);
|
||||
mailbox.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
mailbox.cubeList.add(new ModelBox(mailbox, 0, 0, -8.0F, -24.0F, -8.0F, 16, 20, 16, 0.0F));
|
||||
mailbox.cubeList.add(new ModelBox(mailbox, 0, 36, -8.0F, -4.0F, 6.0F, 2, 4, 2, 0.0F));
|
||||
mailbox.cubeList.add(new ModelBox(mailbox, 0, 36, 6.0F, -4.0F, 6.0F, 2, 4, 2, 0.0F));
|
||||
mailbox.cubeList.add(new ModelBox(mailbox, 0, 36, 6.0F, -4.0F, -8.0F, 2, 4, 2, 0.0F));
|
||||
mailbox.cubeList.add(new ModelBox(mailbox, 0, 36, -8.0F, -4.0F, -8.0F, 2, 4, 2, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
mailbox.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
+15
-15
@@ -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 ModelMailboxUS extends ModelBase {
|
||||
public class ModelLegacyMailboxUS extends ModelBase {
|
||||
// fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
@@ -20,58 +20,58 @@ public class ModelMailboxUS extends ModelBase {
|
||||
ModelRenderer Shape12;
|
||||
ModelRenderer Shape13;
|
||||
|
||||
public ModelMailboxUS() {
|
||||
public ModelLegacyMailboxUS() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 128;
|
||||
|
||||
Shape1 = new ModelRenderer(this, 0, 48);
|
||||
Shape1.addBox(0F, 0F, 0F, 16, 14, 16);
|
||||
Shape1.setRotationPoint(-8F, 8F, -8F);
|
||||
|
||||
|
||||
Shape2 = new ModelRenderer(this, 0, 79);
|
||||
Shape2.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Shape2.setRotationPoint(-8F, 22F, -8F);
|
||||
|
||||
|
||||
Shape3 = new ModelRenderer(this, 5, 79);
|
||||
Shape3.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Shape3.setRotationPoint(-8F, 22F, 7F);
|
||||
|
||||
|
||||
Shape4 = new ModelRenderer(this, 10, 79);
|
||||
Shape4.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Shape4.setRotationPoint(7F, 22F, -8F);
|
||||
|
||||
|
||||
Shape5 = new ModelRenderer(this, 15, 79);
|
||||
Shape5.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Shape5.setRotationPoint(7F, 22F, 7F);
|
||||
|
||||
|
||||
Shape6 = new ModelRenderer(this, 0, 14);
|
||||
Shape6.addBox(0F, 0F, 0F, 16, 3, 7);
|
||||
Shape6.setRotationPoint(-8F, 5F, 0F);
|
||||
|
||||
|
||||
Shape7 = new ModelRenderer(this, 0, 6);
|
||||
Shape7.addBox(0F, 0F, 0F, 16, 2, 6);
|
||||
Shape7.setRotationPoint(-8F, 3F, 0F);
|
||||
|
||||
|
||||
Shape8 = new ModelRenderer(this, 0, 0);
|
||||
Shape8.addBox(0F, 0F, 0F, 16, 1, 5);
|
||||
Shape8.setRotationPoint(-8F, 2F, 0F);
|
||||
|
||||
|
||||
Shape9 = new ModelRenderer(this, 0, 37);
|
||||
Shape9.addBox(0F, 0F, 0F, 1, 3, 7);
|
||||
Shape9.setRotationPoint(-8F, 5F, -7F);
|
||||
|
||||
|
||||
Shape10 = new ModelRenderer(this, 16, 37);
|
||||
Shape10.addBox(0F, 0F, 0F, 1, 3, 7);
|
||||
Shape10.setRotationPoint(7F, 5F, -7F);
|
||||
|
||||
|
||||
Shape11 = new ModelRenderer(this, 0, 29);
|
||||
Shape11.addBox(0F, 0F, 0F, 1, 2, 6);
|
||||
Shape11.setRotationPoint(-8F, 3F, -6F);
|
||||
|
||||
|
||||
Shape12 = new ModelRenderer(this, 14, 29);
|
||||
Shape12.addBox(0F, 0F, 0F, 1, 2, 6);
|
||||
Shape12.setRotationPoint(7F, 3F, -6F);
|
||||
|
||||
|
||||
Shape13 = new ModelRenderer(this, 0, 25);
|
||||
Shape13.addBox(0F, 0F, 0F, 16, 1, 3);
|
||||
Shape13.setRotationPoint(-8F, 2F, -3F);
|
||||
@@ -10,18 +10,23 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockMailbox;
|
||||
import noppes.npcs.client.model.blocks.ModelMailboxUS;
|
||||
import noppes.npcs.client.model.blocks.ModelMailbox;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyMailboxUS;
|
||||
import noppes.npcs.client.model.blocks.ModelMailboxWow;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class BlockMailboxRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
|
||||
|
||||
private final ModelMailboxUS model = new ModelMailboxUS();
|
||||
private final ModelMailbox mailbox = new ModelMailbox();
|
||||
private static final ResourceLocation mailbox_texture = new ResourceLocation("customnpcs","textures/models/mailbox.png");
|
||||
|
||||
private final ModelLegacyMailboxUS model = new ModelLegacyMailboxUS();
|
||||
private final ModelMailboxWow model2 = new ModelMailboxWow();
|
||||
|
||||
private static final ResourceLocation text1 = new ResourceLocation("customnpcs","textures/models/mailbox1.png");
|
||||
private static final ResourceLocation text1 = new ResourceLocation("customnpcs","textures/models/legacy/mailbox1.png");
|
||||
private static final ResourceLocation text2 = new ResourceLocation("customnpcs","textures/models/mailbox2.png");
|
||||
|
||||
|
||||
public BlockMailboxRenderer(){
|
||||
((BlockMailbox)CustomItems.mailbox).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
@@ -35,8 +40,14 @@ public class BlockMailboxRenderer extends TileEntitySpecialRenderer implements I
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90 * meta, 0, 1, 0);
|
||||
if(type == 0){
|
||||
this.bindTexture(text1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(ConfigClient.LegacyMailbox){
|
||||
this.bindTexture(text1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
GL11.glScalef(0.99f, 1f, 0.99f);
|
||||
this.bindTexture(mailbox_texture);
|
||||
mailbox.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
}
|
||||
if(type == 1){
|
||||
this.bindTexture(text2);
|
||||
@@ -54,8 +65,13 @@ public class BlockMailboxRenderer extends TileEntitySpecialRenderer implements I
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
if(metadata == 0){
|
||||
this.bindTexture(text1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(ConfigClient.LegacyMailbox){
|
||||
this.bindTexture(text1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
this.bindTexture(mailbox_texture);
|
||||
mailbox.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
}
|
||||
if(metadata == 1){
|
||||
this.bindTexture(text2);
|
||||
|
||||
@@ -114,6 +114,7 @@ public class ConfigClient
|
||||
public static boolean LegacyCandle = false;
|
||||
public static boolean LegacyTallLamp = false;
|
||||
public static boolean LegacyPedestal = false;
|
||||
public static boolean LegacyMailbox = false;
|
||||
|
||||
public static void init(File configFile)
|
||||
{
|
||||
@@ -239,6 +240,7 @@ public class ConfigClient
|
||||
LegacyCandle = config.get(MODEL, "Legacy Candle Model", false).getBoolean(false);
|
||||
LegacyTallLamp = config.get(MODEL, "Legacy Tall Lamp Model", false).getBoolean(false);
|
||||
LegacyPedestal = config.get(MODEL, "Legacy Pedestal Model", false).getBoolean(false);
|
||||
LegacyMailbox = config.get(MODEL, "Legacy Mailbox Model", false).getBoolean(false);
|
||||
|
||||
// Convert to Legacy
|
||||
if(CustomNpcs.legacyExist){
|
||||
|
||||
Reference in new issue
Block a user