Skip to content

Commit

Permalink
Added Lights
Browse files Browse the repository at this point in the history
Happy Third Rail Thursday
Added lights for:
Bagnall
142
230
378
387
389
442
  • Loading branch information
squidman888 committed Sep 7, 2023
1 parent 2299226 commit 2cbd59c
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 96 deletions.
Binary file modified raw_models/Class_230.mtb
Binary file not shown.
Binary file modified raw_models/Class_378.mtb
Binary file not shown.
44 changes: 32 additions & 12 deletions src/main/java/train/client/render/models/ModelBagnall.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

package train.client.render.models;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
import tmt.ModelConverter;
import tmt.ModelRendererTurbo;

Expand Down Expand Up @@ -144,10 +147,10 @@ private void initbodyModel_1()
bodyModel[108] = new ModelRendererTurbo(this, 289, 57, textureX, textureY); // Box 109
bodyModel[109] = new ModelRendererTurbo(this, 305, 57, textureX, textureY); // Box 110
bodyModel[110] = new ModelRendererTurbo(this, 2, 13, textureX, textureY); // Box 112
bodyModel[111] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[112] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[113] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[114] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[111] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[112] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[113] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[114] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[115] = new ModelRendererTurbo(this, 238, 66, textureX, textureY); // Box 121
bodyModel[116] = new ModelRendererTurbo(this, 238, 66, textureX, textureY); // Box 122
bodyModel[117] = new ModelRendererTurbo(this, 238, 66, textureX, textureY); // Box 123
Expand All @@ -158,14 +161,14 @@ private void initbodyModel_1()
bodyModel[122] = new ModelRendererTurbo(this, 218, 64, textureX, textureY); // Box 125
bodyModel[123] = new ModelRendererTurbo(this, 218, 68, textureX, textureY); // Box 125
bodyModel[124] = new ModelRendererTurbo(this, 218, 68, textureX, textureY); // Box 125
bodyModel[125] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[126] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[127] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[128] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[129] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[130] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[131] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[132] = new ModelRendererTurbo(this, 401, 65, textureX, textureY); // Lamp
bodyModel[125] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[126] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[127] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[128] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[129] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[130] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[131] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp
bodyModel[132] = new ModelRendererTurbo(this, 401, 65, textureX, textureY, "lamp"); // Lamp

bodyModel[0].addBox(0F, 0F, 0F, 1, 8, 18, 0F); // Box 0
bodyModel[0].setRotationPoint(-27F, -1F, -9F);
Expand Down Expand Up @@ -574,4 +577,21 @@ public ArrayList<double[]> getSmokePosition() {
}
};
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

for (int i = 0; i < 133; i++) {
if (bodyModel[i].boxName != null && bodyModel[i].boxName.contains("lamp")) {
Minecraft.getMinecraft().entityRenderer.disableLightmap(1D);
bodyModel[i].render(f5);
Minecraft.getMinecraft().entityRenderer.enableLightmap(1D);
} else if (bodyModel[i].boxName != null && bodyModel[i].boxName.contains("cull")) {
GL11.glDisable(GL11.GL_CULL_FACE);
bodyModel[i].render(f5);
GL11.glEnable(GL11.GL_CULL_FACE);
} else {
bodyModel[i].render(f5);
}
}
}

}
56 changes: 34 additions & 22 deletions src/main/java/train/client/render/models/ModelClass142.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

package train.client.render.models;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
import tmt.ModelConverter;
import tmt.ModelRendererTurbo;

Expand Down Expand Up @@ -38,23 +41,23 @@ private void initbodyModel_1()
bodyModel[2] = new ModelRendererTurbo(this, 41, 1, textureX, textureY); // Box 2
bodyModel[3] = new ModelRendererTurbo(this, 73, 1, textureX, textureY); // Box 3
bodyModel[4] = new ModelRendererTurbo(this, 1, 1, textureX, textureY); // Box 79
bodyModel[5] = new ModelRendererTurbo(this, 25, 1, textureX, textureY); // Lamp
bodyModel[6] = new ModelRendererTurbo(this, 33, 1, textureX, textureY); // Lamp
bodyModel[7] = new ModelRendererTurbo(this, 89, 1, textureX, textureY); // Lamp
bodyModel[8] = new ModelRendererTurbo(this, 97, 1, textureX, textureY); // Lamp
bodyModel[9] = new ModelRendererTurbo(this, 105, 1, textureX, textureY); // Lamp
bodyModel[10] = new ModelRendererTurbo(this, 113, 1, textureX, textureY); // Lamp
bodyModel[11] = new ModelRendererTurbo(this, 121, 1, textureX, textureY); // Lamp
bodyModel[12] = new ModelRendererTurbo(this, 129, 1, textureX, textureY); // Lamp
bodyModel[5] = new ModelRendererTurbo(this, 25, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[6] = new ModelRendererTurbo(this, 33, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[7] = new ModelRendererTurbo(this, 89, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[8] = new ModelRendererTurbo(this, 97, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[9] = new ModelRendererTurbo(this, 105, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[10] = new ModelRendererTurbo(this, 113, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[11] = new ModelRendererTurbo(this, 121, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[12] = new ModelRendererTurbo(this, 129, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[13] = new ModelRendererTurbo(this, 137, 1, textureX, textureY); // Box 21
bodyModel[14] = new ModelRendererTurbo(this, 145, 1, textureX, textureY); // Lamp
bodyModel[15] = new ModelRendererTurbo(this, 153, 1, textureX, textureY); // Lamp
bodyModel[16] = new ModelRendererTurbo(this, 161, 1, textureX, textureY); // Lamp
bodyModel[17] = new ModelRendererTurbo(this, 169, 1, textureX, textureY); // Lamp
bodyModel[18] = new ModelRendererTurbo(this, 177, 1, textureX, textureY); // Lamp
bodyModel[19] = new ModelRendererTurbo(this, 185, 1, textureX, textureY); // Lamp
bodyModel[20] = new ModelRendererTurbo(this, 193, 1, textureX, textureY); // Lamp
bodyModel[21] = new ModelRendererTurbo(this, 201, 1, textureX, textureY); // Lamp
bodyModel[14] = new ModelRendererTurbo(this, 145, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[15] = new ModelRendererTurbo(this, 153, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[16] = new ModelRendererTurbo(this, 161, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[17] = new ModelRendererTurbo(this, 169, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[18] = new ModelRendererTurbo(this, 177, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[19] = new ModelRendererTurbo(this, 185, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[20] = new ModelRendererTurbo(this, 193, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[21] = new ModelRendererTurbo(this, 201, 1, textureX, textureY, "lamp"); // Lamp
bodyModel[22] = new ModelRendererTurbo(this, 209, 1, textureX, textureY); // Box 30
bodyModel[23] = new ModelRendererTurbo(this, 209, 1, textureX, textureY); // Box 32
bodyModel[24] = new ModelRendererTurbo(this, 217, 1, textureX, textureY); // Box 25
Expand Down Expand Up @@ -904,12 +907,21 @@ private void initbodyModel_1()
bodyModel[216].addShapeBox(0F, 0F, 0F, 10, 1, 1, 0F,0F, 0F, 0.4F, 0F, 0F, 0.4F, 0F, 0F, -0.8F, 0F, 0F, -0.8F, 0F, -0.5F, 0.4F, 0F, -0.5F, 0.4F, 0F, -0.5F, -0.78F, 0F, -0.5F, -0.78F); // Box 95
bodyModel[216].setRotationPoint(29F, -16F, 9.8F);
}

public ArrayList<double[]> getSmokePosition() {
return new ArrayList<double[]>() {
{
add(new double[]{-0.8, 1.2D, 0.4});
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

for (int i = 0; i < 217; i++) {
if (bodyModel[i].boxName != null && bodyModel[i].boxName.contains("lamp")) {
Minecraft.getMinecraft().entityRenderer.disableLightmap(1D);
bodyModel[i].render(f5);
Minecraft.getMinecraft().entityRenderer.enableLightmap(1D);
} else if (bodyModel[i].boxName != null && bodyModel[i].boxName.contains("cull")) {
GL11.glDisable(GL11.GL_CULL_FACE);
bodyModel[i].render(f5);
GL11.glEnable(GL11.GL_CULL_FACE);
} else {
bodyModel[i].render(f5);
}
};
}
}

}
36 changes: 28 additions & 8 deletions src/main/java/train/client/render/models/ModelClass230.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
package train.client.render.models; //Path where the model is located


import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
import tmt.ModelConverter;
import tmt.ModelRendererTurbo;

Expand Down Expand Up @@ -38,7 +41,7 @@ private void initbodyModel_1()
bodyModel[3] = new ModelRendererTurbo(this, 390, 89, textureX, textureY); // Box 6
bodyModel[4] = new ModelRendererTurbo(this, 241, 72, textureX, textureY); // Box 9
bodyModel[5] = new ModelRendererTurbo(this, 257, 1, textureX, textureY); // Box 10
bodyModel[6] = new ModelRendererTurbo(this, 1, 73, textureX, textureY); // Box 11
bodyModel[6] = new ModelRendererTurbo(this, 1, 73, textureX, textureY, "lamp"); // lamp
bodyModel[7] = new ModelRendererTurbo(this, 305, 1, textureX, textureY); // Box 13
bodyModel[8] = new ModelRendererTurbo(this, 461, 66, textureX, textureY); // Box 14
bodyModel[9] = new ModelRendererTurbo(this, 440, 66, textureX, textureY); // Box 15
Expand Down Expand Up @@ -166,9 +169,9 @@ private void initbodyModel_1()
bodyModel[131] = new ModelRendererTurbo(this, 481, 108, textureX, textureY); // Box 22
bodyModel[132] = new ModelRendererTurbo(this, 113, 70, textureX, textureY); // Box 111
bodyModel[133] = new ModelRendererTurbo(this, 132, 70, textureX, textureY); // Box 111
bodyModel[134] = new ModelRendererTurbo(this, 16, 73, textureX, textureY); // Box 11
bodyModel[135] = new ModelRendererTurbo(this, 1, 73, textureX, textureY); // Box 11
bodyModel[136] = new ModelRendererTurbo(this, 16, 73, textureX, textureY); // Box 11
bodyModel[134] = new ModelRendererTurbo(this, 16, 73, textureX, textureY, "lamp"); // lamp
bodyModel[135] = new ModelRendererTurbo(this, 1, 73, textureX, textureY, "lamp"); // lamp
bodyModel[136] = new ModelRendererTurbo(this, 16, 73, textureX, textureY, "lamp"); // lamp
bodyModel[137] = new ModelRendererTurbo(this, 136, 72, textureX, textureY); // Box 111
bodyModel[138] = new ModelRendererTurbo(this, 148, 70, textureX, textureY); // Box 111
bodyModel[139] = new ModelRendererTurbo(this, 136, 72, textureX, textureY); // Box 111
Expand Down Expand Up @@ -218,7 +221,7 @@ private void initbodyModel_1()
bodyModel[5].addShapeBox(0F, 0F, 0F, 1, 1, 19, 0F,0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0.05F, 0F, 0F, 0.05F, 0F, 0F, 0.05F, 0F, 0F, 0.05F); // Box 10
bodyModel[5].setRotationPoint(-33F, -14F, -9.5F);

bodyModel[6].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.9F, 0F, 0F, -3.9F, 0F, 0F, -3.9F, -3.9F, -0.2F, -3.9F, -3.9F, -0.2F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, -3.9F, -0.2F, 0F, -3.9F); // Box 11
bodyModel[6].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.9F, 0F, 0F, -3.9F, 0F, 0F, -3.9F, -3.9F, -0.2F, -3.9F, -3.9F, -0.2F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, -3.9F, -0.2F, 0F, -3.9F); // lamp
bodyModel[6].setRotationPoint(-33.5F, -4.7F, -8.5F);

bodyModel[7].addShapeBox(0F, 0F, 0F, 1, 18, 20, 0F,-0.8F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, -0.8F, 0F, 0F, -0.8F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, -0.8F, 0F, 0F); // Box 13
Expand Down Expand Up @@ -608,13 +611,13 @@ private void initbodyModel_1()
bodyModel[133].addShapeBox(0F, 0F, 0F, 2, 1, 1, 0F,0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F); // Box 111
bodyModel[133].setRotationPoint(-35F, 5.6F, -1F);

bodyModel[134].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.6F, 0F, 0F, -3.6F, 0F, 0F, -3.6F, -3.6F, -0.2F, -3.6F, -3.6F, -0.2F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, -3.6F, -0.2F, 0F, -3.6F); // Box 11
bodyModel[134].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.6F, 0F, 0F, -3.6F, 0F, 0F, -3.6F, -3.6F, -0.2F, -3.6F, -3.6F, -0.2F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, -3.6F, -0.2F, 0F, -3.6F); // lamp
bodyModel[134].setRotationPoint(-33.5F, -5.8F, -9.5F);

bodyModel[135].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.9F, -3.9F, 0F, -3.9F, -3.9F, 0F, -3.9F, 0F, -0.2F, -3.9F, 0F, -0.2F, 0F, -3.9F, 0F, 0F, -3.9F, 0F, 0F, 0F, -0.2F, 0F, 0F); // Box 11
bodyModel[135].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.9F, -3.9F, 0F, -3.9F, -3.9F, 0F, -3.9F, 0F, -0.2F, -3.9F, 0F, -0.2F, 0F, -3.9F, 0F, 0F, -3.9F, 0F, 0F, 0F, -0.2F, 0F, 0F); // lamp
bodyModel[135].setRotationPoint(-33.5F, -4.7F, 3.5F);

bodyModel[136].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.6F, -3.6F, 0F, -3.6F, -3.6F, 0F, -3.6F, 0F, -0.2F, -3.6F, 0F, -0.2F, 0F, -3.6F, 0F, 0F, -3.6F, 0F, 0F, 0F, -0.2F, 0F, 0F); // Box 11
bodyModel[136].addShapeBox(0F, 0F, 0F, 1, 5, 5, 0F,-0.2F, -3.6F, -3.6F, 0F, -3.6F, -3.6F, 0F, -3.6F, 0F, -0.2F, -3.6F, 0F, -0.2F, 0F, -3.6F, 0F, 0F, -3.6F, 0F, 0F, 0F, -0.2F, 0F, 0F); // lamp
bodyModel[136].setRotationPoint(-33.5F, -5.8F, 4.5F);

bodyModel[137].addShapeBox(0F, 0F, 0F, 1, 2, 4, 0F,-0.5F, -0.5F, 0F, -0.2F, -0.5F, 0F, -0.2F, -0.5F, 0F, -0.3F, -0.5F, 0F, 0F, 0F, 0F, -0.7F, 0F, 0F, -0.7F, 0F, 0F, 0.2F, 0F, 0F); // Box 111
Expand Down Expand Up @@ -711,4 +714,21 @@ private void initbodyModel_1()
bodyModel[166].addShapeBox(0F, 0F, 0F, 4, 1, 16, 0F,0F, 0F, 0F, -2F, 0F, 0F, -2F, 0F, -8F, 0F, 0F, -8F, 0F, 0F, 0F, -2F, 0F, 0F, -2F, 0F, -8F, 0F, 0F, -8F); // Box 11
bodyModel[166].setRotationPoint(-32.3F, -3.9F, -10F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

for (int i = 0; i < 167; i++) {
if (bodyModel[i].boxName != null && bodyModel[i].boxName.contains("lamp")) {
Minecraft.getMinecraft().entityRenderer.disableLightmap(1D);
bodyModel[i].render(f5);
Minecraft.getMinecraft().entityRenderer.enableLightmap(1D);
} else if (bodyModel[i].boxName != null && bodyModel[i].boxName.contains("cull")) {
GL11.glDisable(GL11.GL_CULL_FACE);
bodyModel[i].render(f5);
GL11.glEnable(GL11.GL_CULL_FACE);
} else {
bodyModel[i].render(f5);
}
}
}

}
Loading

0 comments on commit 2cbd59c

Please sign in to comment.