diff --git a/src/main/java/ebf/XmlBuilder.java b/src/main/java/ebf/XmlBuilder.java index 4bc79ede63..d2a4b893ce 100644 --- a/src/main/java/ebf/XmlBuilder.java +++ b/src/main/java/ebf/XmlBuilder.java @@ -36,6 +36,14 @@ public XmlBuilder(String str){ buildString=str; buildXML(); } + + public XmlBuilder updateData(String str){ + if(str.hashCode()!=buildString.hashCode()){ + buildString=str; + buildXML(); + } + return this; + } public XmlBuilder(){} /* *----------put Section---------- diff --git a/src/main/java/train/client/render/RenderRollingStock.java b/src/main/java/train/client/render/RenderRollingStock.java index e87631461f..f298830ee6 100644 --- a/src/main/java/train/client/render/RenderRollingStock.java +++ b/src/main/java/train/client/render/RenderRollingStock.java @@ -56,12 +56,7 @@ public static void renderTheMinecart(EntityRollingStock cart, double x, double y GL11.glLightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE); GL11.glShadeModel(GL_SMOOTH); GL11.glEnable(GL_NORMALIZE); - long var10 = cart.getEntityId() * 493286711L; - var10 = var10 * var10 * 4392167121L + var10 * 98761L; - float var12 = (((var10 >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - float var13 = (((var10 >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - float var14 = (((var10 >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - GL11.glTranslatef(var12, var13, var14); + double var15 = cart.lastTickPosX + (cart.posX - cart.lastTickPosX) * time; double var17 = cart.lastTickPosY + (cart.posY - cart.lastTickPosY) * time; double var19 = cart.lastTickPosZ + (cart.posZ - cart.lastTickPosZ) * time; @@ -204,10 +199,10 @@ public static void renderTheMinecart(EntityRollingStock cart, double x, double y //GL11.glRotatef(180.0F - yaw, 0.0F, 1.0F, 0.0F); if (cart.bogieLoco != null) {// || cart.bogieUtility[0]!=null){ - GL11.glRotatef((float) -cart.anglePitchClient, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-cart.anglePitchClient, 0.0F, 0.0F, 1.0F); } else { if (renderYVect != null) { - pitch = (float) cart.anglePitchClient / 60; + pitch = cart.anglePitchClient / 60; if (cart.rotationYawClientReal > -5 && cart.rotationYawClientReal < 5) { pitch = -pitch; } diff --git a/src/main/java/train/client/render/models/Model29080DOT111.java b/src/main/java/train/client/render/models/Model29080DOT111.java index 40013e7892..9b48af60a0 100644 --- a/src/main/java/train/client/render/models/Model29080DOT111.java +++ b/src/main/java/train/client/render/models/Model29080DOT111.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model29080DOT111 extends ModelConverter //Same as Filename @@ -469,7 +470,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==15){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==15){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); diff --git a/src/main/java/train/client/render/models/Model40highcube.java b/src/main/java/train/client/render/models/Model40highcube.java index 73eda51519..91b9b06444 100644 --- a/src/main/java/train/client/render/models/Model40highcube.java +++ b/src/main/java/train/client/render/models/Model40highcube.java @@ -9,6 +9,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model40highcube extends ModelConverter //Same as Filename @@ -378,7 +379,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.055,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==8){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==8){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/Model440R_Back.java b/src/main/java/train/client/render/models/Model440R_Back.java index 31bc97076b..a9c1447b73 100644 --- a/src/main/java/train/client/render/models/Model440R_Back.java +++ b/src/main/java/train/client/render/models/Model440R_Back.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model440R_Back extends ModelConverter //Same as Filename @@ -1429,7 +1430,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/440_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/440_bogie.png")); diff --git a/src/main/java/train/client/render/models/Model440R_Front.java b/src/main/java/train/client/render/models/Model440R_Front.java index 07db72a2c3..65f77b7eae 100644 --- a/src/main/java/train/client/render/models/Model440R_Front.java +++ b/src/main/java/train/client/render/models/Model440R_Front.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model440R_Front extends ModelConverter //Same as Filename @@ -1577,7 +1578,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/440_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/440_bogie.png")); diff --git a/src/main/java/train/client/render/models/Model440R_Mid.java b/src/main/java/train/client/render/models/Model440R_Mid.java index 7e2d278392..4ff98c7779 100644 --- a/src/main/java/train/client/render/models/Model440R_Mid.java +++ b/src/main/java/train/client/render/models/Model440R_Mid.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model440R_Mid extends ModelConverter //Same as Filename @@ -1388,7 +1389,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/440_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/440_bogie.png")); diff --git a/src/main/java/train/client/render/models/Model60centerbeam.java b/src/main/java/train/client/render/models/Model60centerbeam.java index f160c81908..a6db8e81a6 100644 --- a/src/main/java/train/client/render/models/Model60centerbeam.java +++ b/src/main/java/train/client/render/models/Model60centerbeam.java @@ -19,6 +19,7 @@ import train.client.render.models.loads.Modelwrappedwood; import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model60centerbeam extends ModelConverter //Same as Filename @@ -338,11 +339,11 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f int cargo = ((Freight) entity).getAmmountOfCargo(); if (cargo != 0) { if(cargo<=9) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -374,11 +375,11 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); } else if(cargo<=18 && cargo>9) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -436,11 +437,11 @@ else if(cargo<=18 && cargo>9) { GL11.glPopMatrix(); } else if(cargo<=27 && cargo>18) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -524,11 +525,11 @@ else if(cargo<=27 && cargo>18) { GL11.glPopMatrix(); } else if(cargo<=36 && cargo>27) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -630,11 +631,11 @@ else if(cargo<=36 && cargo>27) { GL11.glPopMatrix(); } else if(cargo<=45 && cargo>36) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -758,11 +759,11 @@ else if(cargo<=45 && cargo>36) { GL11.glPopMatrix(); } else { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0) { + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -900,7 +901,7 @@ else if(cargo<=45 && cargo>36) { } } //Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70truck_Black.png")); - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); diff --git a/src/main/java/train/client/render/models/Model66centerbeam.java b/src/main/java/train/client/render/models/Model66centerbeam.java index c5a55f3769..d154b6a021 100644 --- a/src/main/java/train/client/render/models/Model66centerbeam.java +++ b/src/main/java/train/client/render/models/Model66centerbeam.java @@ -18,6 +18,7 @@ import train.client.render.models.loads.Modelwrappedwood; import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model66centerbeam extends ModelConverter //Same as Filename @@ -302,13 +303,13 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f int cargo = ((Freight) entity).getAmmountOfCargo(); if (cargo != 0) { if(cargo<=9) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==4) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -340,13 +341,13 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); } else if(cargo<=18 && cargo>9) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==4) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -404,13 +405,13 @@ else if(cargo<=18 && cargo>9) { GL11.glPopMatrix(); } else if(cargo<=27 && cargo>18) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==4) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -494,13 +495,13 @@ else if(cargo<=27 && cargo>18) { GL11.glPopMatrix(); } else if(cargo<=36 && cargo>27) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==4) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -610,13 +611,13 @@ else if(cargo<=36 && cargo>27) { GL11.glPopMatrix(); } else if(cargo<=45 && cargo>36) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==4) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -752,13 +753,13 @@ else if(cargo<=45 && cargo>36) { GL11.glPopMatrix(); } else { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==4) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -915,7 +916,7 @@ else if(cargo<=45 && cargo>36) { } } //Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70truck_Black.png")); - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); diff --git a/src/main/java/train/client/render/models/Model73centerbeam.java b/src/main/java/train/client/render/models/Model73centerbeam.java index 86132157a5..80312feeb3 100644 --- a/src/main/java/train/client/render/models/Model73centerbeam.java +++ b/src/main/java/train/client/render/models/Model73centerbeam.java @@ -18,6 +18,7 @@ import train.client.render.models.loads.Modelwrappedwood; import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Model73centerbeam extends ModelConverter //Same as Filename @@ -372,13 +373,13 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f int cargo = ((Freight) entity).getAmmountOfCargo(); if (cargo != 0) { if(cargo<=9) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7345) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==13451) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==13451) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -410,13 +411,13 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); } else if(cargo<=18 && cargo>9) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7345) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==13451) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==13451) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -474,13 +475,13 @@ else if(cargo<=18 && cargo>9) { GL11.glPopMatrix(); } else if(cargo<=27 && cargo>18) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7345) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==13451) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==13451) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -564,13 +565,13 @@ else if(cargo<=27 && cargo>18) { GL11.glPopMatrix(); } else if(cargo<=36 && cargo>27) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7345) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==13451) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==13451) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -680,13 +681,13 @@ else if(cargo<=36 && cargo>27) { GL11.glPopMatrix(); } else if(cargo<=45 && cargo>36) { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7345) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==13451) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==13451) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -822,13 +823,13 @@ else if(cargo<=45 && cargo>36) { GL11.glPopMatrix(); } else { - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_thickthin.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7345) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_canfor.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==13451) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==13451) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_irving.png")); - }else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + }else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_washaska.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/loads/wrappedwood_portbec.png")); @@ -985,7 +986,7 @@ else if(cargo<=45 && cargo>36) { } } //Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70truck_Black.png")); - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); diff --git a/src/main/java/train/client/render/models/ModelACFGN60SeatCoach.java b/src/main/java/train/client/render/models/ModelACFGN60SeatCoach.java index 1af6f03855..468eedfaf2 100644 --- a/src/main/java/train/client/render/models/ModelACFGN60SeatCoach.java +++ b/src/main/java/train/client/render/models/ModelACFGN60SeatCoach.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelACFGN60SeatCoach extends ModelConverter//Same as Filename @@ -2462,9 +2463,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==123456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==123456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelACFGNRPO_30.java b/src/main/java/train/client/render/models/ModelACFGNRPO_30.java index ae030a9df3..81855ac913 100644 --- a/src/main/java/train/client/render/models/ModelACFGNRPO_30.java +++ b/src/main/java/train/client/render/models/ModelACFGNRPO_30.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelACFGNRPO_30 extends ModelConverter//Same as Filename @@ -1915,9 +1916,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==123456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==123456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelAlcoPA.java b/src/main/java/train/client/render/models/ModelAlcoPA.java index 84924045f8..7b60d46b8a 100644 --- a/src/main/java/train/client/render/models/ModelAlcoPA.java +++ b/src/main/java/train/client/render/models/ModelAlcoPA.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -3080,9 +3081,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/AlcoPATruckNKPBlue.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 9) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 9) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/AlcoPATruckSilver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/AlcoPATruckBlack.png")); diff --git a/src/main/java/train/client/render/models/ModelAlcoPB.java b/src/main/java/train/client/render/models/ModelAlcoPB.java index 6c980ea9e1..7a00c694bb 100644 --- a/src/main/java/train/client/render/models/ModelAlcoPB.java +++ b/src/main/java/train/client/render/models/ModelAlcoPB.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1511,7 +1512,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/AlcoPATruckSilver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/AlcoPATruckBlack.png")); diff --git a/src/main/java/train/client/render/models/ModelAlcoS2.java b/src/main/java/train/client/render/models/ModelAlcoS2.java index 6f8ab78f24..a627528660 100644 --- a/src/main/java/train/client/render/models/ModelAlcoS2.java +++ b/src/main/java/train/client/render/models/ModelAlcoS2.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelAlcoS2 extends ModelConverter //Same as Filename @@ -991,7 +992,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==15){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==15){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blunttruck_Green.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blunttruck_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelB23.java b/src/main/java/train/client/render/models/ModelB23.java index 3ae62d7d0a..a5030876d1 100644 --- a/src/main/java/train/client/render/models/ModelB23.java +++ b/src/main/java/train/client/render/models/ModelB23.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1426,7 +1427,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3247) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3247) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.33, 0); @@ -1435,7 +1436,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_LightGrey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.33, 0); @@ -1444,7 +1445,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 9){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_bnsf_h1.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.33, 0); @@ -1453,7 +1454,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_up.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.33, 0); @@ -1462,7 +1463,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.33, 0); diff --git a/src/main/java/train/client/render/models/ModelBP4.java b/src/main/java/train/client/render/models/ModelBP4.java index 31ab34f79f..afa83a9921 100644 --- a/src/main/java/train/client/render/models/ModelBP4.java +++ b/src/main/java/train/client/render/models/ModelBP4.java @@ -17,6 +17,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelBP4 extends ModelConverter @@ -992,7 +993,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==5){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==5){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/bp4bogie_purple.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/bp4bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelBR155.java b/src/main/java/train/client/render/models/ModelBR155.java index 7de688102b..abf32ff719 100644 --- a/src/main/java/train/client/render/models/ModelBR155.java +++ b/src/main/java/train/client/render/models/ModelBR155.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelBR155 extends ModelConverter //Same as Filename @@ -939,7 +940,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==5465){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==5465){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BR155_bogies_noised.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BR155_bogies_noised.png")); diff --git a/src/main/java/train/client/render/models/ModelBapGP15.java b/src/main/java/train/client/render/models/ModelBapGP15.java index a3afcbd41b..770da21360 100644 --- a/src/main/java/train/client/render/models/ModelBapGP15.java +++ b/src/main/java/train/client/render/models/ModelBapGP15.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1632,7 +1633,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.4, 0.15, 0); @@ -1641,7 +1642,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.85, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1231||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 345||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5345||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3456||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13453) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1231||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 345||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5345||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3456||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13453) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.15, 0); @@ -1651,7 +1652,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucc.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_spooki_up_trash.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.15, 0); @@ -1662,7 +1663,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3456) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3456) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Stale_Egg.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.15, 0); diff --git a/src/main/java/train/client/render/models/ModelBeep.java b/src/main/java/train/client/render/models/ModelBeep.java index a82bcdc2ed..504832f7a5 100644 --- a/src/main/java/train/client/render/models/ModelBeep.java +++ b/src/main/java/train/client/render/models/ModelBeep.java @@ -9,6 +9,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelBeep extends ModelConverter //Same as Filename @@ -746,7 +747,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==135465){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==135465){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Grey.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelC415H.java b/src/main/java/train/client/render/models/ModelC415H.java index fe0e036236..55c3216e72 100644 --- a/src/main/java/train/client/render/models/ModelC415H.java +++ b/src/main/java/train/client/render/models/ModelC415H.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1516,7 +1517,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 135461 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7234 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8546 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5546) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 135461 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7234 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8546 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5546) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/AAR_typeB_V3_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, -0.06, 0); @@ -1525,7 +1526,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.35, 0, 0); typeB2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/HiAd_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.0, 0); @@ -1534,7 +1535,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.33, 0, 0); hiAd.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13244 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 145) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13244 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 145) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/HiAd_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.0, 0); diff --git a/src/main/java/train/client/render/models/ModelC415L.java b/src/main/java/train/client/render/models/ModelC415L.java index 61f8bd344b..cbd891f6bc 100644 --- a/src/main/java/train/client/render/models/ModelC415L.java +++ b/src/main/java/train/client/render/models/ModelC415L.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1213,7 +1214,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 135461 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7234 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8546 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5546) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 135461 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7234 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8546 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5546) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/TypeB_2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, -0.06, 0); @@ -1222,7 +1223,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.35, 0, 0); typeB2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 0 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5462) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 0 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5462) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/HiAd_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.0, 0); @@ -1231,7 +1232,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.33, 0, 0); hiAd.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13244 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 145) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13244 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 145) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/HiAd_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.0, 0); diff --git a/src/main/java/train/client/render/models/ModelC415S.java b/src/main/java/train/client/render/models/ModelC415S.java index ef8be16faa..1b92bf1a64 100644 --- a/src/main/java/train/client/render/models/ModelC415S.java +++ b/src/main/java/train/client/render/models/ModelC415S.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1481,7 +1482,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 135461 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7234 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8546 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5546) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 135461 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7234 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8546 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5546) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/TypeB_2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, -0.06, 0); @@ -1490,7 +1491,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.35, 0, 0); typeB2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/HiAd_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.0, 0); @@ -1499,7 +1500,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.33, 0, 0); hiAd.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13244 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 145) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13244 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 145) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/HiAd_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, 0.0, 0); diff --git a/src/main/java/train/client/render/models/ModelC424.java b/src/main/java/train/client/render/models/ModelC424.java index e06e420e86..5dd04f951f 100644 --- a/src/main/java/train/client/render/models/ModelC424.java +++ b/src/main/java/train/client/render/models/ModelC424.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelC424 extends ModelConverter //Same as Filename @@ -1390,7 +1391,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.25, 0); diff --git a/src/main/java/train/client/render/models/ModelC425.java b/src/main/java/train/client/render/models/ModelC425.java index edc9ede218..30fb61c600 100644 --- a/src/main/java/train/client/render/models/ModelC425.java +++ b/src/main/java/train/client/render/models/ModelC425.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelC425 extends ModelConverter //Same as Filename @@ -1390,7 +1391,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14234) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14234) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.25, 0); diff --git a/src/main/java/train/client/render/models/ModelCF7.java b/src/main/java/train/client/render/models/ModelCF7.java index b961478e38..1d23756dea 100644 --- a/src/main/java/train/client/render/models/ModelCF7.java +++ b/src/main/java/train/client/render/models/ModelCF7.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelCF7 extends ModelConverter //Same as Filename @@ -656,7 +657,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==5465){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==5465){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/classic_blomberg_b_black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/classic_blomberg_b_lightgrey.png")); diff --git a/src/main/java/train/client/render/models/ModelCF7Angle.java b/src/main/java/train/client/render/models/ModelCF7Angle.java index 1dc8ae42a5..df5b63c7fd 100644 --- a/src/main/java/train/client/render/models/ModelCF7Angle.java +++ b/src/main/java/train/client/render/models/ModelCF7Angle.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -2169,11 +2170,11 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 17||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 19 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 21||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 22 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 20||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13 + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 17||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 19 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 21||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 22 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 20||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13 ) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); @@ -2183,7 +2184,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 23||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 23||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_DarkerGrey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.28, 0.17, 0); @@ -2192,7 +2193,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1340) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1340) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_spooki_up_trash.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.28, 0.17, 0); @@ -2201,7 +2202,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7324||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7324||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.3, 0.325, 0); diff --git a/src/main/java/train/client/render/models/ModelCF7round.java b/src/main/java/train/client/render/models/ModelCF7round.java index ad53acdc3f..eeef45c055 100644 --- a/src/main/java/train/client/render/models/ModelCF7round.java +++ b/src/main/java/train/client/render/models/ModelCF7round.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -2181,11 +2182,11 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 17||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 19 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 21||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 22 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 20||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 24234 + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 17||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 19 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 21||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 22 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 20||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 24234 ) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); @@ -2195,7 +2196,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 23||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 23||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_DarkerGrey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.28, 0.17, 0); @@ -2204,7 +2205,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1340) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1340) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_spooki_up_trash.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.28, 0.17, 0); @@ -2213,7 +2214,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7324||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7324||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.3, 0.325, 0); diff --git a/src/main/java/train/client/render/models/ModelDB143.java b/src/main/java/train/client/render/models/ModelDB143.java index c779562579..f3c81ce2b5 100644 --- a/src/main/java/train/client/render/models/ModelDB143.java +++ b/src/main/java/train/client/render/models/ModelDB143.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelDB143 extends ModelConverter //Same as Filename @@ -571,7 +572,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==5465){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==5465){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/143_Bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/143_Bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelDH643.java b/src/main/java/train/client/render/models/ModelDH643.java index 9d8a589ba3..1b21a7d338 100644 --- a/src/main/java/train/client/render/models/ModelDH643.java +++ b/src/main/java/train/client/render/models/ModelDH643.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1101,7 +1102,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/trimount2_Black.png")); GL11.glPushMatrix(); GL11.glRotatef(180, 0, 1, 0); diff --git a/src/main/java/train/client/render/models/ModelDRGW01400Caboose.java b/src/main/java/train/client/render/models/ModelDRGW01400Caboose.java index 019e6655d0..268f9624b6 100644 --- a/src/main/java/train/client/render/models/ModelDRGW01400Caboose.java +++ b/src/main/java/train/client/render/models/ModelDRGW01400Caboose.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelDRGW01400Caboose extends ModelConverter //Same as Filename @@ -994,7 +995,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14234|| entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2347){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14234|| entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2347){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/swing-motion_caboose_Truck_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.055, 0, 0); diff --git a/src/main/java/train/client/render/models/ModelDash840B.java b/src/main/java/train/client/render/models/ModelDash840B.java index 39149a7ca6..4729c3301a 100644 --- a/src/main/java/train/client/render/models/ModelDash840B.java +++ b/src/main/java/train/client/render/models/ModelDash840B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1303,7 +1304,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_up.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.33, 0); @@ -1312,7 +1313,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.27, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.33, 0); diff --git a/src/main/java/train/client/render/models/ModelDash840BB.java b/src/main/java/train/client/render/models/ModelDash840BB.java index 92be2d9592..e864b3cca4 100644 --- a/src/main/java/train/client/render/models/ModelDash840BB.java +++ b/src/main/java/train/client/render/models/ModelDash840BB.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -986,7 +987,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_up.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.33, 0); @@ -995,7 +996,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.27, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.33, 0); diff --git a/src/main/java/train/client/render/models/ModelDash840BW.java b/src/main/java/train/client/render/models/ModelDash840BW.java index 2dfc75a62f..f92044190d 100644 --- a/src/main/java/train/client/render/models/ModelDash840BW.java +++ b/src/main/java/train/client/render/models/ModelDash840BW.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1222,7 +1223,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_up.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.33, 0); @@ -1231,7 +1232,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.27, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.33, 0); diff --git a/src/main/java/train/client/render/models/ModelDash840C.java b/src/main/java/train/client/render/models/ModelDash840C.java index 82f4db2ef6..3e98d152bd 100644 --- a/src/main/java/train/client/render/models/ModelDash840C.java +++ b/src/main/java/train/client/render/models/ModelDash840C.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1306,7 +1307,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 843||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1544) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 843||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1544) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb3_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.75, 0.07, 0); @@ -1315,7 +1316,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.52, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb3_UpMoment.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.75, 0.07, 0); diff --git a/src/main/java/train/client/render/models/ModelDash9_44CW.java b/src/main/java/train/client/render/models/ModelDash9_44CW.java index 2df4f29dae..dc217e48ba 100644 --- a/src/main/java/train/client/render/models/ModelDash9_44CW.java +++ b/src/main/java/train/client/render/models/ModelDash9_44CW.java @@ -11,6 +11,7 @@ import train.client.render.models.cabs.ModelD9_Cab4Window; import train.client.render.models.cabs.ModelD9_CabSquareWindow; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -743,7 +744,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/newgevotruck_LightGrey.png")); //supposed to be LightGrey, is black for testing GL11.glPushMatrix(); GL11.glTranslatef(-1.8F, 0.0F, 0F); @@ -758,7 +759,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPushMatrix(); theCabbo1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/newgevotruck_Black.png")); GL11.glPushMatrix(); GL11.glTranslatef(-1.8F, 0.0F, 0F); @@ -773,7 +774,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPushMatrix(); theCabbo2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/newgevotruck_Black.png")); GL11.glPushMatrix(); GL11.glTranslatef(-1.8F, 0.0F, 0F); diff --git a/src/main/java/train/client/render/models/ModelDepressedFlatbed.java b/src/main/java/train/client/render/models/ModelDepressedFlatbed.java index e7ae836a97..022b591993 100644 --- a/src/main/java/train/client/render/models/ModelDepressedFlatbed.java +++ b/src/main/java/train/client/render/models/ModelDepressedFlatbed.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.Tessellator; import train.client.render.RenderRollingStock; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelDepressedFlatbed extends ModelConverter //Same as Filename @@ -56,21 +57,21 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f trucks.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix(); - if( entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7) { + if( entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/CharB1.png")); GL11.glPushMatrix(); GL11.glTranslated(0.9, 0.14, -0.0425); GL11.glScalef(0.55f, 0.55f, 0.55f); tank1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if( entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0) { + } else if( entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/PanzerI.png")); GL11.glPushMatrix(); GL11.glTranslated(0.45,0.025,-0.11); GL11.glScalef(0.55f,0.55f,0.55f); tank3.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix(); - }else if( entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11) { + }else if( entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/gp7_Yellow.png")); GL11.glPushMatrix(); GL11.glTranslated(0.3,0.45,-0.1); diff --git a/src/main/java/train/client/render/models/ModelEF1.java b/src/main/java/train/client/render/models/ModelEF1.java index a375bbff31..3bc20866ff 100644 --- a/src/main/java/train/client/render/models/ModelEF1.java +++ b/src/main/java/train/client/render/models/ModelEF1.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelEF1 extends ModelConverter //Same as Filename @@ -867,7 +868,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/ef1tp_black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/ef1d_black.png")); diff --git a/src/main/java/train/client/render/models/ModelEF1B.java b/src/main/java/train/client/render/models/ModelEF1B.java index bcc0ebead2..93d16e27a2 100644 --- a/src/main/java/train/client/render/models/ModelEF1B.java +++ b/src/main/java/train/client/render/models/ModelEF1B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelEF1B extends ModelConverter //Same as Filename @@ -392,7 +393,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/ef1d_black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/ef1d_black.png")); diff --git a/src/main/java/train/client/render/models/ModelEMDE7A.java b/src/main/java/train/client/render/models/ModelEMDE7A.java index d942119d0e..2a6564b801 100644 --- a/src/main/java/train/client/render/models/ModelEMDE7A.java +++ b/src/main/java/train/client/render/models/ModelEMDE7A.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -2448,7 +2449,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckSilverFriction.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckBlackFriction.png")); diff --git a/src/main/java/train/client/render/models/ModelEMDE7B.java b/src/main/java/train/client/render/models/ModelEMDE7B.java index ebddb77ff1..b083192b8b 100644 --- a/src/main/java/train/client/render/models/ModelEMDE7B.java +++ b/src/main/java/train/client/render/models/ModelEMDE7B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1451,7 +1452,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckSilverFriction.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckBlackFriction.png")); diff --git a/src/main/java/train/client/render/models/ModelEMDE8A.java b/src/main/java/train/client/render/models/ModelEMDE8A.java index 5b3666549c..26f9bf5ee4 100644 --- a/src/main/java/train/client/render/models/ModelEMDE8A.java +++ b/src/main/java/train/client/render/models/ModelEMDE8A.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -2221,10 +2222,10 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckSilver.png")); } - else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 9){ + else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckSilverFriction.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckBlack.png")); diff --git a/src/main/java/train/client/render/models/ModelEMDE8B.java b/src/main/java/train/client/render/models/ModelEMDE8B.java index ec7d3603eb..a96c0021d6 100644 --- a/src/main/java/train/client/render/models/ModelEMDE8B.java +++ b/src/main/java/train/client/render/models/ModelEMDE8B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1095,10 +1096,10 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckSilver.png")); } - else if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ + else if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/NewBlombergA1ATruckSilverFriction.png")); } else { diff --git a/src/main/java/train/client/render/models/ModelEP1A.java b/src/main/java/train/client/render/models/ModelEP1A.java index 2d60eb9c67..d07d696017 100644 --- a/src/main/java/train/client/render/models/ModelEP1A.java +++ b/src/main/java/train/client/render/models/ModelEP1A.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelEP1A extends ModelConverter //Same as Filename @@ -1011,7 +1012,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/ef1tp_black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/ef1d_black.png")); diff --git a/src/main/java/train/client/render/models/ModelES44.java b/src/main/java/train/client/render/models/ModelES44.java index b653806343..93618660a5 100644 --- a/src/main/java/train/client/render/models/ModelES44.java +++ b/src/main/java/train/client/render/models/ModelES44.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelES44 extends ModelConverter //Same as Filename @@ -990,7 +991,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14345){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14345){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/gevotruck_Grey.png")); //i love the smell of pointless code in the morning GL11.glPushMatrix(); GL11.glTranslatef(-1.85F ,0.4F,0F); @@ -1002,7 +1003,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(1.9F,0.4F,0); theTrucks2.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/newgevotruck_LightGrey.png")); GL11.glPushMatrix(); GL11.glTranslatef(-1.8F ,-0.0F,0F); diff --git a/src/main/java/train/client/render/models/ModelF7A.java b/src/main/java/train/client/render/models/ModelF7A.java index efd844ceac..6094e3b845 100644 --- a/src/main/java/train/client/render/models/ModelF7A.java +++ b/src/main/java/train/client/render/models/ModelF7A.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelF7A extends ModelConverter //Same as Filename @@ -1709,7 +1710,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 16) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 16) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-0.9, -0.01, 0); @@ -1718,7 +1719,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.2, 0, 0); theTrucc.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_2_Espee.png")); GL11.glPushMatrix(); GL11.glTranslated(-0.9, -0.01, 0); diff --git a/src/main/java/train/client/render/models/ModelF7B.java b/src/main/java/train/client/render/models/ModelF7B.java index bb2dd291bc..02c9cbef22 100644 --- a/src/main/java/train/client/render/models/ModelF7B.java +++ b/src/main/java/train/client/render/models/ModelF7B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelF7B extends ModelConverter //Same as Filename @@ -953,7 +954,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, -0.01, 0); @@ -962,7 +963,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.45, 0.0, 0); theTrucc.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_2_Espee.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.2, -0.01, 0); diff --git a/src/main/java/train/client/render/models/ModelFMH16_66.java b/src/main/java/train/client/render/models/ModelFMH16_66.java index 61a488200c..b14c9b205c 100644 --- a/src/main/java/train/client/render/models/ModelFMH16_66.java +++ b/src/main/java/train/client/render/models/ModelFMH16_66.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -2330,7 +2331,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FM_trimount_TVA_Blue.png")); GL11.glPushMatrix(); GL11.glRotatef(180, 0, 1, 0); diff --git a/src/main/java/train/client/render/models/ModelFMH24_66.java b/src/main/java/train/client/render/models/ModelFMH24_66.java index 0f23ef1261..be150e05b4 100644 --- a/src/main/java/train/client/render/models/ModelFMH24_66.java +++ b/src/main/java/train/client/render/models/ModelFMH24_66.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -2906,7 +2907,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FM_trimount_SP_Grey.png")); GL11.glPushMatrix(); GL11.glRotatef(180, 0, 1, 0); @@ -2919,7 +2920,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); } - else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ + else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FM_trimount_Silver.png")); GL11.glPushMatrix(); GL11.glRotatef(180, 0, 1, 0); diff --git a/src/main/java/train/client/render/models/ModelFMH24_66L.java b/src/main/java/train/client/render/models/ModelFMH24_66L.java index 94e6c79a84..4d5544b6f0 100644 --- a/src/main/java/train/client/render/models/ModelFMH24_66L.java +++ b/src/main/java/train/client/render/models/ModelFMH24_66L.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1891,7 +1892,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14325){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14325){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FM_trimount_SP_Grey.png")); GL11.glPushMatrix(); GL11.glRotatef(180, 0, 1, 0); @@ -1904,7 +1905,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); } - else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ + else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FM_trimount_Silver.png")); GL11.glPushMatrix(); GL11.glRotatef(180, 0, 1, 0); diff --git a/src/main/java/train/client/render/models/ModelFOLM1B.java b/src/main/java/train/client/render/models/ModelFOLM1B.java index 58d91c0f1f..e4102b84ea 100644 --- a/src/main/java/train/client/render/models/ModelFOLM1B.java +++ b/src/main/java/train/client/render/models/ModelFOLM1B.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelFOLM1B extends ModelConverter //Same as Filename @@ -641,7 +642,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==8){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==8){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FOL_M1_Bogie_grey.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FOL_M1_Bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelFOL_M1.java b/src/main/java/train/client/render/models/ModelFOL_M1.java index d991e4250e..8fa2efc7c0 100644 --- a/src/main/java/train/client/render/models/ModelFOL_M1.java +++ b/src/main/java/train/client/render/models/ModelFOL_M1.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelFOL_M1 extends ModelBase @@ -799,7 +800,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==8){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==8){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FOL_M1_Bogie_grey.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FOL_M1_Bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelGE44Ton.java b/src/main/java/train/client/render/models/ModelGE44Ton.java index b30bfdc039..5856b9082a 100644 --- a/src/main/java/train/client/render/models/ModelGE44Ton.java +++ b/src/main/java/train/client/render/models/ModelGE44Ton.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGE44Ton extends ModelConverter //Same as Filename @@ -837,7 +838,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==5465){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==5465){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/tonnertruck_black_roller")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/tonnertruck_black_friction.png")); diff --git a/src/main/java/train/client/render/models/ModelGM6C.java b/src/main/java/train/client/render/models/ModelGM6C.java index a0f692f869..ec3f17e5bd 100644 --- a/src/main/java/train/client/render/models/ModelGM6C.java +++ b/src/main/java/train/client/render/models/ModelGM6C.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1516,9 +1517,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Blue.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Grey.png")); diff --git a/src/main/java/train/client/render/models/ModelGP15.java b/src/main/java/train/client/render/models/ModelGP15.java index ada36c2a4c..6612cb8e59 100644 --- a/src/main/java/train/client/render/models/ModelGP15.java +++ b/src/main/java/train/client/render/models/ModelGP15.java @@ -13,6 +13,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGP15 extends ModelConverter //Same as Filename @@ -595,7 +596,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14651){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14651){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/classic_blomberg_b_black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/classic_blomberg_b_harbor_grey.png")); diff --git a/src/main/java/train/client/render/models/ModelGP30.java b/src/main/java/train/client/render/models/ModelGP30.java index 2d47cc7266..62f730a8eb 100644 --- a/src/main/java/train/client/render/models/ModelGP30.java +++ b/src/main/java/train/client/render/models/ModelGP30.java @@ -11,6 +11,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1412,7 +1413,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.5, 0.15, 0); @@ -1431,7 +1432,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix();*/ - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.3, 0); diff --git a/src/main/java/train/client/render/models/ModelGP38dash2.java b/src/main/java/train/client/render/models/ModelGP38dash2.java index e2f01d851f..d3cfa53a11 100644 --- a/src/main/java/train/client/render/models/ModelGP38dash2.java +++ b/src/main/java/train/client/render/models/ModelGP38dash2.java @@ -10,6 +10,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGP38dash2 extends ModelConverter @@ -1702,7 +1703,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3457||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3458||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3455) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3457||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3458||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3455) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.5, 0.15, 0); @@ -1711,7 +1712,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3247) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3247) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.5, 0.3, 0); @@ -1721,7 +1722,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks3.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13454||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13454||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.3, 0); diff --git a/src/main/java/train/client/render/models/ModelGP38dash9W.java b/src/main/java/train/client/render/models/ModelGP38dash9W.java index 112a9ea7c5..3374ebf6f7 100644 --- a/src/main/java/train/client/render/models/ModelGP38dash9W.java +++ b/src/main/java/train/client/render/models/ModelGP38dash9W.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1456,7 +1457,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3456) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3456) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.5, 0.15, 0); diff --git a/src/main/java/train/client/render/models/ModelGP49.java b/src/main/java/train/client/render/models/ModelGP49.java index e1c665e372..71c679f813 100644 --- a/src/main/java/train/client/render/models/ModelGP49.java +++ b/src/main/java/train/client/render/models/ModelGP49.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1253,7 +1254,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 643||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1235||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12351||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3457||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3458||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3455) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 643||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1235||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12351||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3457||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3458||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3455) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.5, 0.15, 0); diff --git a/src/main/java/train/client/render/models/ModelGP7BAP.java b/src/main/java/train/client/render/models/ModelGP7BAP.java index 61d2172c45..eaea5c1940 100644 --- a/src/main/java/train/client/render/models/ModelGP7BAP.java +++ b/src/main/java/train/client/render/models/ModelGP7BAP.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGP7BAP extends ModelConverter //Same as Filename @@ -1289,7 +1290,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.4, 0.11, 0); @@ -1308,7 +1309,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } */else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 89) { + } */else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 89) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.15, 0); @@ -1318,7 +1319,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.4, -0.25, 0); diff --git a/src/main/java/train/client/render/models/ModelGP7b.java b/src/main/java/train/client/render/models/ModelGP7b.java index d3d3c9c982..ad09392c9f 100644 --- a/src/main/java/train/client/render/models/ModelGP7b.java +++ b/src/main/java/train/client/render/models/ModelGP7b.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGP7b extends ModelConverter //Same as Filename @@ -979,7 +980,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.4, 0.11, 0); @@ -998,7 +999,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks3.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - }*/ else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 89) { + }*/ else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 89) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.15, 0); diff --git a/src/main/java/train/client/render/models/ModelGP7u.java b/src/main/java/train/client/render/models/ModelGP7u.java index 498028782e..a8e6c4022f 100644 --- a/src/main/java/train/client/render/models/ModelGP7u.java +++ b/src/main/java/train/client/render/models/ModelGP7u.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGP7u extends ModelConverter //Same as Filename @@ -857,7 +858,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 80) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 80) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.25, 0); @@ -876,7 +877,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } */else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4) { + } */else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.4, -0.05, 0); diff --git a/src/main/java/train/client/render/models/ModelGP9.java b/src/main/java/train/client/render/models/ModelGP9.java index e2b079d40a..823395803b 100644 --- a/src/main/java/train/client/render/models/ModelGP9.java +++ b/src/main/java/train/client/render/models/ModelGP9.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGP9 extends ModelConverter //Same as Filename @@ -1312,7 +1313,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.4, 0.11, 0); @@ -1331,7 +1332,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } */else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 89) { + } */else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 89) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.65, 0.15, 0); diff --git a/src/main/java/train/client/render/models/ModelGS4Baggage.java b/src/main/java/train/client/render/models/ModelGS4Baggage.java index 4bb3711149..fbb03fca1e 100644 --- a/src/main/java/train/client/render/models/ModelGS4Baggage.java +++ b/src/main/java/train/client/render/models/ModelGS4Baggage.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGS4Baggage extends ModelBase @@ -420,7 +421,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f gs4baggageModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie_Red.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelGS4Passenger.java b/src/main/java/train/client/render/models/ModelGS4Passenger.java index fe74ea21c1..8a33713a7a 100644 --- a/src/main/java/train/client/render/models/ModelGS4Passenger.java +++ b/src/main/java/train/client/render/models/ModelGS4Passenger.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGS4Passenger extends ModelBase @@ -433,7 +434,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { gs4passengerModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie_Red.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelGS4Tail.java b/src/main/java/train/client/render/models/ModelGS4Tail.java index fb4ca32a18..1db0a10294 100644 --- a/src/main/java/train/client/render/models/ModelGS4Tail.java +++ b/src/main/java/train/client/render/models/ModelGS4Tail.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGS4Tail extends ModelBase @@ -672,7 +673,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { gs4tailModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie_Red.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelGS4Tavern.java b/src/main/java/train/client/render/models/ModelGS4Tavern.java index f548fa04bb..af65039935 100644 --- a/src/main/java/train/client/render/models/ModelGS4Tavern.java +++ b/src/main/java/train/client/render/models/ModelGS4Tavern.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGS4Tavern extends ModelBase @@ -625,7 +626,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { gs4tavernModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==2){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==2){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/gs4_bogie_Red.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/GS4_bogie.png")); diff --git a/src/main/java/train/client/render/models/ModelGSI60FootBulkheadFlat.java b/src/main/java/train/client/render/models/ModelGSI60FootBulkheadFlat.java index 12ccb9a26b..5bd3c1600d 100644 --- a/src/main/java/train/client/render/models/ModelGSI60FootBulkheadFlat.java +++ b/src/main/java/train/client/render/models/ModelGSI60FootBulkheadFlat.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelGSI60FootBulkheadFlat extends ModelConverter //Same as Filename @@ -1464,7 +1465,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9534){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9534){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelH1044.java b/src/main/java/train/client/render/models/ModelH1044.java index c8d5a37b24..b3a9bef3fb 100644 --- a/src/main/java/train/client/render/models/ModelH1044.java +++ b/src/main/java/train/client/render/models/ModelH1044.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelH1044 extends ModelConverter //Same as Filename @@ -1063,7 +1064,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==15 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==15 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Silver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelHBC1C.java b/src/main/java/train/client/render/models/ModelHBC1C.java index a0a145c5b8..5d98360bd2 100644 --- a/src/main/java/train/client/render/models/ModelHBC1C.java +++ b/src/main/java/train/client/render/models/ModelHBC1C.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelHBC1C extends ModelConverter //Same as Filename @@ -1268,7 +1269,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14|| entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14|| entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/swing-motion_caboose_Truck_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.055, 0, 0); diff --git a/src/main/java/train/client/render/models/ModelHH660.java b/src/main/java/train/client/render/models/ModelHH660.java index 4866f9d44d..6c70bb2dac 100644 --- a/src/main/java/train/client/render/models/ModelHH660.java +++ b/src/main/java/train/client/render/models/ModelHH660.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelHH660 extends ModelConverter //Same as Filename @@ -975,7 +976,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1453){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1453){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blunttruck_Green.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blunttruck_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelMILW40boxcar.java b/src/main/java/train/client/render/models/ModelMILW40boxcar.java index 562cc2f1a9..c7294ba9e9 100644 --- a/src/main/java/train/client/render/models/ModelMILW40boxcar.java +++ b/src/main/java/train/client/render/models/ModelMILW40boxcar.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelMILW40boxcar extends ModelConverter //Same as Filename @@ -501,7 +502,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.375F,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelMillGondola.java b/src/main/java/train/client/render/models/ModelMillGondola.java index a57bf83dbb..c933080277 100644 --- a/src/main/java/train/client/render/models/ModelMillGondola.java +++ b/src/main/java/train/client/render/models/ModelMillGondola.java @@ -10,6 +10,7 @@ import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelMillGondola extends ModelConverter //Same as Filename @@ -309,7 +310,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.15,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelNRE3gs21b.java b/src/main/java/train/client/render/models/ModelNRE3gs21b.java index 09c42f44d5..5d9bd5ec78 100644 --- a/src/main/java/train/client/render/models/ModelNRE3gs21b.java +++ b/src/main/java/train/client/render/models/ModelNRE3gs21b.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelNRE3gs21b extends ModelConverter //Same as Filename @@ -1325,7 +1326,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2346||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2341||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 154325341||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3457||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3458||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3455) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2346||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2341||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 154325341||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3457||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3458||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3455) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.15, 0); @@ -1334,7 +1335,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_spooki_up_trash.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.15, 0); @@ -1344,7 +1345,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13454||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13454||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.55, 0.3, 0); diff --git a/src/main/java/train/client/render/models/ModelOWO60Verticube.java b/src/main/java/train/client/render/models/ModelOWO60Verticube.java index 51a9ca1e59..45e3ef3da9 100644 --- a/src/main/java/train/client/render/models/ModelOWO60Verticube.java +++ b/src/main/java/train/client/render/models/ModelOWO60Verticube.java @@ -8,6 +8,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelOWO60Verticube extends ModelConverter @@ -339,7 +340,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } else { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); diff --git a/src/main/java/train/client/render/models/ModelOreJenny.java b/src/main/java/train/client/render/models/ModelOreJenny.java index 47e2bb04ed..8738a330b5 100644 --- a/src/main/java/train/client/render/models/ModelOreJenny.java +++ b/src/main/java/train/client/render/models/ModelOreJenny.java @@ -9,6 +9,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelOreJenny extends ModelConverter //Same as Filename @@ -200,7 +201,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(1.19,0,0.03); trucc.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/Ore_jenny_Truck2.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/Ore_jenny_Truck2_journal_boxes.png")); diff --git a/src/main/java/train/client/render/models/ModelPS140.java b/src/main/java/train/client/render/models/ModelPS140.java index 074f1d57b6..3165a42534 100644 --- a/src/main/java/train/client/render/models/ModelPS140.java +++ b/src/main/java/train/client/render/models/ModelPS140.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS140 extends ModelConverter //Same as Filename @@ -261,7 +262,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.25,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==16 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==16 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS150.java b/src/main/java/train/client/render/models/ModelPS150.java index 3a32c2d5ed..3f2bbdba26 100644 --- a/src/main/java/train/client/render/models/ModelPS150.java +++ b/src/main/java/train/client/render/models/ModelPS150.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS150 extends ModelConverter //Same as Filename @@ -246,7 +247,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.875,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==10){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==10){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS160.java b/src/main/java/train/client/render/models/ModelPS160.java index 9ba29dcb36..5567fe9029 100644 --- a/src/main/java/train/client/render/models/ModelPS160.java +++ b/src/main/java/train/client/render/models/ModelPS160.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS160 extends ModelConverter //Same as Filename @@ -246,7 +247,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.25,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==15){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==15){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS30SeatParlor.java b/src/main/java/train/client/render/models/ModelPS30SeatParlor.java index 10b898e4db..4e1f0b0898 100644 --- a/src/main/java/train/client/render/models/ModelPS30SeatParlor.java +++ b/src/main/java/train/client/render/models/ModelPS30SeatParlor.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS30SeatParlor extends ModelConverter//Same as Filename @@ -2026,9 +2027,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1234){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1234){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS52SeatCoach.java b/src/main/java/train/client/render/models/ModelPS52SeatCoach.java index 022de660d4..65e59e2eb5 100644 --- a/src/main/java/train/client/render/models/ModelPS52SeatCoach.java +++ b/src/main/java/train/client/render/models/ModelPS52SeatCoach.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS52SeatCoach extends ModelConverter //Same as Filename @@ -2066,9 +2067,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS54SeatCoach_Lounge.java b/src/main/java/train/client/render/models/ModelPS54SeatCoach_Lounge.java index b6669ba810..10460b6152 100644 --- a/src/main/java/train/client/render/models/ModelPS54SeatCoach_Lounge.java +++ b/src/main/java/train/client/render/models/ModelPS54SeatCoach_Lounge.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS54SeatCoach_Lounge extends ModelConverter//Same as Filename @@ -2398,9 +2399,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS58SeatCoach_Observation.java b/src/main/java/train/client/render/models/ModelPS58SeatCoach_Observation.java index 74744d164e..faee505f17 100644 --- a/src/main/java/train/client/render/models/ModelPS58SeatCoach_Observation.java +++ b/src/main/java/train/client/render/models/ModelPS58SeatCoach_Observation.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS58SeatCoach_Observation extends ModelConverter//Same as Filename @@ -2391,9 +2392,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==8){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==8){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS73Baggage.java b/src/main/java/train/client/render/models/ModelPS73Baggage.java index adbe5ab7ec..1acb57dfec 100644 --- a/src/main/java/train/client/render/models/ModelPS73Baggage.java +++ b/src/main/java/train/client/render/models/ModelPS73Baggage.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS73Baggage extends ModelConverter //Same as Filename @@ -973,7 +974,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPS85Baggage.java b/src/main/java/train/client/render/models/ModelPS85Baggage.java index 087941c068..5f0cfef6e1 100644 --- a/src/main/java/train/client/render/models/ModelPS85Baggage.java +++ b/src/main/java/train/client/render/models/ModelPS85Baggage.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPS85Baggage extends ModelConverter//Same as Filename @@ -1125,9 +1126,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSBM56SeatCoach.java b/src/main/java/train/client/render/models/ModelPSBM56SeatCoach.java index 841c71af8e..fc35dda72d 100644 --- a/src/main/java/train/client/render/models/ModelPSBM56SeatCoach.java +++ b/src/main/java/train/client/render/models/ModelPSBM56SeatCoach.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSBM56SeatCoach extends ModelConverter//Same as Filename @@ -2021,9 +2022,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==123456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==123456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSBMCombine.java b/src/main/java/train/client/render/models/ModelPSBMCombine.java index 5fbcf94a06..66736d35fc 100644 --- a/src/main/java/train/client/render/models/ModelPSBMCombine.java +++ b/src/main/java/train/client/render/models/ModelPSBMCombine.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSBMCombine extends ModelConverter//Same as Filename @@ -1719,9 +1720,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==123456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==123456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSBMDiner_Lounge.java b/src/main/java/train/client/render/models/ModelPSBMDiner_Lounge.java index b2be2109e3..8bb5562078 100644 --- a/src/main/java/train/client/render/models/ModelPSBMDiner_Lounge.java +++ b/src/main/java/train/client/render/models/ModelPSBMDiner_Lounge.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSBMDiner_Lounge extends ModelConverter//Same as Filename @@ -2585,9 +2586,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==7){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==7){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSCombine.java b/src/main/java/train/client/render/models/ModelPSCombine.java index a0caf1115b..17e2014169 100644 --- a/src/main/java/train/client/render/models/ModelPSCombine.java +++ b/src/main/java/train/client/render/models/ModelPSCombine.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSCombine extends ModelConverter //Same as Filename @@ -2127,7 +2128,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSLunchCounter_Lounge.java b/src/main/java/train/client/render/models/ModelPSLunchCounter_Lounge.java index cbca3f423e..ff3eebe9dc 100644 --- a/src/main/java/train/client/render/models/ModelPSLunchCounter_Lounge.java +++ b/src/main/java/train/client/render/models/ModelPSLunchCounter_Lounge.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSLunchCounter_Lounge extends ModelConverter//Same as Filename @@ -2736,9 +2737,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSRPO.java b/src/main/java/train/client/render/models/ModelPSRPO.java index c262e4b31c..c045fb00bb 100644 --- a/src/main/java/train/client/render/models/ModelPSRPO.java +++ b/src/main/java/train/client/render/models/ModelPSRPO.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSRPO extends ModelConverter //Same as Filename @@ -1625,7 +1626,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==11){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==11){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSRPOPM.java b/src/main/java/train/client/render/models/ModelPSRPOPM.java index 4ff5dfe556..e72ae29f47 100644 --- a/src/main/java/train/client/render/models/ModelPSRPOPM.java +++ b/src/main/java/train/client/render/models/ModelPSRPOPM.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSRPOPM extends ModelConverter //Same as Filename @@ -1292,7 +1293,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==6464){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==6464){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSSleeper565.java b/src/main/java/train/client/render/models/ModelPSSleeper565.java index 4b32a4aec0..675031c7f1 100644 --- a/src/main/java/train/client/render/models/ModelPSSleeper565.java +++ b/src/main/java/train/client/render/models/ModelPSSleeper565.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSSleeper565 extends ModelConverter //Same as Filename @@ -2634,9 +2635,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSSleeper565DRGW.java b/src/main/java/train/client/render/models/ModelPSSleeper565DRGW.java index 2924b15b9d..b669e0ee0a 100644 --- a/src/main/java/train/client/render/models/ModelPSSleeper565DRGW.java +++ b/src/main/java/train/client/render/models/ModelPSSleeper565DRGW.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSSleeper565DRGW extends ModelConverter //Same as Filename @@ -2337,9 +2338,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==0){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==0){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 123232) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 123232) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png"));// diff --git a/src/main/java/train/client/render/models/ModelPScenterDiner.java b/src/main/java/train/client/render/models/ModelPScenterDiner.java index 4d0d418693..7f32bf205b 100644 --- a/src/main/java/train/client/render/models/ModelPScenterDiner.java +++ b/src/main/java/train/client/render/models/ModelPScenterDiner.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPScenterDiner extends ModelConverter //Same as Filename @@ -2277,9 +2278,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==1324544){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==1324544){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13242) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13242) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelPSscrewyoutoomanydiners.java b/src/main/java/train/client/render/models/ModelPSscrewyoutoomanydiners.java index 02ae9a95dd..fa474cd5d9 100644 --- a/src/main/java/train/client/render/models/ModelPSscrewyoutoomanydiners.java +++ b/src/main/java/train/client/render/models/ModelPSscrewyoutoomanydiners.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelPSscrewyoutoomanydiners extends ModelConverter //Same as Filename @@ -2278,9 +2279,9 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==14){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==14){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_silver.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13242) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13242) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/BAP_41-N-11_truck_NKP_blue.png")); }else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/41-N-11_truck_black.png")); diff --git a/src/main/java/train/client/render/models/ModelRSD15.java b/src/main/java/train/client/render/models/ModelRSD15.java index 56c0f0cf89..ed15728304 100644 --- a/src/main/java/train/client/render/models/ModelRSD15.java +++ b/src/main/java/train/client/render/models/ModelRSD15.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1929,7 +1930,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14321){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/trimount1_Black.png"));//1 brake cylinder vs 2 GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.0, 0); diff --git a/src/main/java/train/client/render/models/ModelReefer64Foot.java b/src/main/java/train/client/render/models/ModelReefer64Foot.java index fe6ac961d5..820db31188 100644 --- a/src/main/java/train/client/render/models/ModelReefer64Foot.java +++ b/src/main/java/train/client/render/models/ModelReefer64Foot.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelReefer64Foot extends ModelConverter //Same as Filename @@ -268,7 +269,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelSD40dash2.java b/src/main/java/train/client/render/models/ModelSD40dash2.java index e96e09d3c4..19c531b704 100644 --- a/src/main/java/train/client/render/models/ModelSD40dash2.java +++ b/src/main/java/train/client/render/models/ModelSD40dash2.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1788,11 +1789,11 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Blue.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4 ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4 ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Grey.png")); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6 ) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6 ) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_BeanSniff.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelSD70Mac.java b/src/main/java/train/client/render/models/ModelSD70Mac.java index acf827bd18..629aa9704d 100644 --- a/src/main/java/train/client/render/models/ModelSD70Mac.java +++ b/src/main/java/train/client/render/models/ModelSD70Mac.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelSD70Mac extends ModelConverter //Same as Filename @@ -1006,8 +1007,8 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/htsctruck_LightGrey.png")); } /*else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromStringAbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())) == 4) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c2h_Grey.png")); diff --git a/src/main/java/train/client/render/models/ModelSD9.java b/src/main/java/train/client/render/models/ModelSD9.java index f6673b5764..ad4c7175be 100644 --- a/src/main/java/train/client/render/models/ModelSD9.java +++ b/src/main/java/train/client/render/models/ModelSD9.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1581,7 +1582,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 0) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 0) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil_c1_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.63, 0.0, 0); @@ -1590,7 +1591,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.12, 0, 0); theTrucc.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/Flexi_C1_bnsf_h1.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.63, 0.0, 0); diff --git a/src/main/java/train/client/render/models/ModelSW1.java b/src/main/java/train/client/render/models/ModelSW1.java index 491fb73101..8720da50ed 100644 --- a/src/main/java/train/client/render/models/ModelSW1.java +++ b/src/main/java/train/client/render/models/ModelSW1.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -885,7 +886,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blunttruck_Brown.png")); GL11.glPushMatrix(); GL11.glTranslated(-0.9, 0.25, 0); @@ -896,7 +897,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4) { //this is for the emd demo skin to have silver trucks eventually + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4) { //this is for the emd demo skin to have silver trucks eventually Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Silver.png"));// replace with grey eventually GL11.glPushMatrix(); GL11.glTranslated(-1.0F ,0.0F,0F); diff --git a/src/main/java/train/client/render/models/ModelSW1200.java b/src/main/java/train/client/render/models/ModelSW1200.java index 43132e21a0..e64aaf7d2a 100644 --- a/src/main/java/train/client/render/models/ModelSW1200.java +++ b/src/main/java/train/client/render/models/ModelSW1200.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1699,7 +1700,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.0F ,0.0F,0F); @@ -1709,7 +1710,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2344 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 42343227) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2344 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 42343227) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil2_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.0, 0.33, 0); @@ -1718,7 +1719,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.0, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 10) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 10) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.0, 0.33, 0); @@ -1727,7 +1728,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.0, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_SP.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.0F ,0.0F,0F); diff --git a/src/main/java/train/client/render/models/ModelSW1500.java b/src/main/java/train/client/render/models/ModelSW1500.java index 5e5393ac18..8885ebdd36 100644 --- a/src/main/java/train/client/render/models/ModelSW1500.java +++ b/src/main/java/train/client/render/models/ModelSW1500.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1680,7 +1681,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13244) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13244) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.05, 0.33, 0); @@ -1689,7 +1690,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.13, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4 || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4 || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil2_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.05, 0.33, 0); @@ -1698,7 +1699,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.13, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/flexicoil2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.05, 0.33, 0); diff --git a/src/main/java/train/client/render/models/ModelSW8.java b/src/main/java/train/client/render/models/ModelSW8.java index d79d82b78a..3afab09d2a 100644 --- a/src/main/java/train/client/render/models/ModelSW8.java +++ b/src/main/java/train/client/render/models/ModelSW8.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelSW8 extends ModelConverter //Same as Filename @@ -608,7 +609,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 16546455) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 16546455) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Black_Brown.png"));//this code is here for other truck colors once i get around to it GL11.glPushMatrix(); GL11.glTranslated(-0.6, 0.0, 0); @@ -619,7 +620,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4546) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4546) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeA_Black.png"));//this code is here for other truck colors once i get around to it GL11.glPushMatrix(); GL11.glTranslated(-0.6F ,0.0F,0F); diff --git a/src/main/java/train/client/render/models/ModelSkeletonLogCar.java b/src/main/java/train/client/render/models/ModelSkeletonLogCar.java index 94fe2f2983..d65346cedf 100644 --- a/src/main/java/train/client/render/models/ModelSkeletonLogCar.java +++ b/src/main/java/train/client/render/models/ModelSkeletonLogCar.java @@ -18,8 +18,8 @@ import fexcraft.tmt.slim.Tessellator; import train.client.render.models.loads.ModelBigLog; import train.client.render.models.loads.ModelMixedLogs; -import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.Arrays; @@ -311,7 +311,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glPopMatrix(); }*/ } - if(AbstractTrains.getColorFromString(freight.getColor()) == 5465469){ + if(DepreciatedUtil.getColorFromString(freight.getColor()) == 5465469){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/FrictionTruck_Greyish.png")); diff --git a/src/main/java/train/client/render/models/ModelU18B.java b/src/main/java/train/client/render/models/ModelU18B.java index ce88b2ab1c..4c835b5447 100644 --- a/src/main/java/train/client/render/models/ModelU18B.java +++ b/src/main/java/train/client/render/models/ModelU18B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1484,8 +1485,8 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7324) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7324) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_CSXBlue.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.3, 0.335, 0); @@ -1494,7 +1495,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.58, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12345){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12345){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/TypeB_2_Silver.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.27, -0.025, 0); @@ -1503,7 +1504,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theB.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 12){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 12){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/TypeB_2_Black_FNM.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.27, -0.025, 0); @@ -1512,11 +1513,11 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theB.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8 - || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 0 - || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5 - || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 13 - || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 3){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8 + || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 0 + || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5 + || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 13 + || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 3){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/TypeB_2_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.27, -0.025, 0); @@ -1525,13 +1526,13 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.55, 0, 0); theB.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14 - || entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 18 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 10 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 15 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 17){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14 + || entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 18 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 10 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 15 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 17){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_2_Blac.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.3, -0.025, 0); @@ -1540,8 +1541,8 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.6, 0, 0); theBlomb.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4 - ||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 2278){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4 + ||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 2278){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_2_CSXBlue.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.3, -0.025, 0); diff --git a/src/main/java/train/client/render/models/ModelU23B.java b/src/main/java/train/client/render/models/ModelU23B.java index 81e9315027..c04ebc110a 100644 --- a/src/main/java/train/client/render/models/ModelU23B.java +++ b/src/main/java/train/client/render/models/ModelU23B.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1632,7 +1633,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 7) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.335, 0); @@ -1641,7 +1642,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 16){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 16){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/typeb_LightGrey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.335, 0); @@ -1650,7 +1651,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks1.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 5){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 5){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.17, 0); @@ -1659,7 +1660,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.05, 0, 0); theTrucks3.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 6){ + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 6){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb2_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.52, 0.335, 0); diff --git a/src/main/java/train/client/render/models/ModelU36C.java b/src/main/java/train/client/render/models/ModelU36C.java index e1a2de37c4..12eb85ed72 100644 --- a/src/main/java/train/client/render/models/ModelU36C.java +++ b/src/main/java/train/client/render/models/ModelU36C.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; import java.util.ArrayList; @@ -1149,7 +1150,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } } - if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 8||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { + if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 8||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 14) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb3_Black.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.375, -0.25, 0); @@ -1159,7 +1160,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f theTrucks2.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix(); - } else if (entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { + } else if (entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 4||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 1||entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor()) == 11) { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/fb3_Grey.png")); GL11.glPushMatrix(); GL11.glTranslated(-1.375, -0.25, 0); diff --git a/src/main/java/train/client/render/models/ModelVersaLongi.java b/src/main/java/train/client/render/models/ModelVersaLongi.java index 769954c910..83e3365074 100644 --- a/src/main/java/train/client/render/models/ModelVersaLongi.java +++ b/src/main/java/train/client/render/models/ModelVersaLongi.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelVersaLongi extends ModelConverter //Same as Filename @@ -376,7 +377,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.5, 0, 0.03); bogie.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelVersaTrans.java b/src/main/java/train/client/render/models/ModelVersaTrans.java index 370b6fad13..3c1417b9ce 100644 --- a/src/main/java/train/client/render/models/ModelVersaTrans.java +++ b/src/main/java/train/client/render/models/ModelVersaTrans.java @@ -18,6 +18,7 @@ import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; import train.common.api.Freight; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelVersaTrans extends ModelConverter //Same as Filename @@ -397,7 +398,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(2.5, 0, 0.03); bogie.render(entity, f, f1, f2, f3, f4, f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/ModelWWCPGP7.java b/src/main/java/train/client/render/models/ModelWWCPGP7.java index 678dccc343..3cba79714c 100644 --- a/src/main/java/train/client/render/models/ModelWWCPGP7.java +++ b/src/main/java/train/client/render/models/ModelWWCPGP7.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelWWCPGP7 extends ModelConverter //Same as Filename @@ -3526,7 +3527,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==5465){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==5465){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_wwcp_black.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/blombergB_wwcp_black.png")); diff --git a/src/main/java/train/client/render/models/ModelWoodchipHopper.java b/src/main/java/train/client/render/models/ModelWoodchipHopper.java index 0f876bee01..fa5e8eff91 100644 --- a/src/main/java/train/client/render/models/ModelWoodchipHopper.java +++ b/src/main/java/train/client/render/models/ModelWoodchipHopper.java @@ -7,6 +7,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class ModelWoodchipHopper extends ModelConverter //Same as Filename @@ -394,7 +395,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f GL11.glTranslated(3.75,0,0.03); bogie.render(entity,f,f1,f2,f3,f4,f5); GL11.glPopMatrix();*/ - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3456){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3456){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/Modelhicube60foot.java b/src/main/java/train/client/render/models/Modelhicube60foot.java index 6bfd345efc..e89974b9c3 100644 --- a/src/main/java/train/client/render/models/Modelhicube60foot.java +++ b/src/main/java/train/client/render/models/Modelhicube60foot.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Modelhicube60foot extends ModelConverter //Same as Filename @@ -623,7 +624,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f bodyModel[i].render(f5); } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==9){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==9){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Greyish.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/70Ton_Black.png")); diff --git a/src/main/java/train/client/render/models/Modelrenfe446end.java b/src/main/java/train/client/render/models/Modelrenfe446end.java index 554ca04c95..0e791187cf 100644 --- a/src/main/java/train/client/render/models/Modelrenfe446end.java +++ b/src/main/java/train/client/render/models/Modelrenfe446end.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Modelrenfe446end extends ModelConverter //Same as Filename @@ -1667,7 +1668,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); diff --git a/src/main/java/train/client/render/models/Modelrenfe446middle.java b/src/main/java/train/client/render/models/Modelrenfe446middle.java index f24a86d417..29bf47d675 100644 --- a/src/main/java/train/client/render/models/Modelrenfe446middle.java +++ b/src/main/java/train/client/render/models/Modelrenfe446middle.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Modelrenfe446middle extends ModelConverter //Same as Filename @@ -1645,7 +1646,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); diff --git a/src/main/java/train/client/render/models/Modelrenfe450endA.java b/src/main/java/train/client/render/models/Modelrenfe450endA.java index baebd3527e..ff4b2f08e6 100644 --- a/src/main/java/train/client/render/models/Modelrenfe450endA.java +++ b/src/main/java/train/client/render/models/Modelrenfe450endA.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Modelrenfe450endA extends ModelConverter //Same as Filename @@ -1686,7 +1687,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); diff --git a/src/main/java/train/client/render/models/Modelrenfe450endB.java b/src/main/java/train/client/render/models/Modelrenfe450endB.java index 8f48807c94..14b7657243 100644 --- a/src/main/java/train/client/render/models/Modelrenfe450endB.java +++ b/src/main/java/train/client/render/models/Modelrenfe450endB.java @@ -17,6 +17,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Modelrenfe450endB extends ModelConverter //Same as Filename @@ -1896,7 +1897,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); diff --git a/src/main/java/train/client/render/models/Modelrenfe450middle.java b/src/main/java/train/client/render/models/Modelrenfe450middle.java index 3aac1733a9..b9f51753c4 100644 --- a/src/main/java/train/client/render/models/Modelrenfe450middle.java +++ b/src/main/java/train/client/render/models/Modelrenfe450middle.java @@ -16,6 +16,7 @@ import fexcraft.tmt.slim.ModelRendererTurbo; import fexcraft.tmt.slim.Tessellator; import train.common.api.AbstractTrains; +import train.common.core.util.DepreciatedUtil; import train.common.library.Info; public class Modelrenfe450middle extends ModelConverter //Same as Filename @@ -1647,7 +1648,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f } } - if(entity instanceof AbstractTrains && AbstractTrains.getColorFromString(((AbstractTrains) entity).getColor())==3455){ + if(entity instanceof AbstractTrains && DepreciatedUtil.getColorFromString(((AbstractTrains) entity).getColor())==3455){ Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); } else { Tessellator.bindTexture(new ResourceLocation(Info.resourceLocation, "textures/trains/446_bogie.png")); diff --git a/src/main/java/train/common/api/AbstractTrains.java b/src/main/java/train/common/api/AbstractTrains.java index 78ff2f304a..4df005dfdc 100644 --- a/src/main/java/train/common/api/AbstractTrains.java +++ b/src/main/java/train/common/api/AbstractTrains.java @@ -25,6 +25,7 @@ import train.common.adminbook.ItemAdminBook; import train.common.core.handlers.ConfigHandler; import train.common.core.handlers.TrainHandler; +import train.common.core.util.DepreciatedUtil; import train.common.items.ItemChunkLoaderActivator; import train.common.items.ItemRollingStock; import train.common.items.ItemWrench; @@ -244,51 +245,6 @@ public int getUniqueTrainID() { return uniqueID; } - public void manageChunkLoading() { - //if(this instanceof Locomotive)System.out.println("I'm alive. Remote: " + worldObj.isRemote); - if (!worldObj.isRemote && this.uniqueID == -1) { - if (FMLCommonHandler.instance().getMinecraftServerInstance() != null) { - //TraincraftSaveHandler.createFile(FMLCommonHandler.instance().getMinecraftServerInstance()); - //int readID = TraincraftSaveHandler.readInt(FMLCommonHandler.instance().getMinecraftServerInstance(), "numberOfTrains:"); - //int newID = setNewUniqueID(readID); - setNewUniqueID(this.getEntityId()); - //TraincraftSaveHandler.writeValue(FMLCommonHandler.instance().getMinecraftServerInstance(), "numberOfTrains:", new String("" + newID)); - //System.out.println("Train is missing an ID, adding new one for "+this.trainName+" "+this.uniqueID); - } - } - shouldChunkLoad = getFlag(7); - if (shouldChunkLoad) { - if (this.chunkTicket == null) { - this.requestTicket(); - } - } - } - - @Override - public void onUpdate() { - super.onUpdate(); - if (!(this instanceof EntityRollingStock)) { - manageChunkLoading(); - } - /* - * if (worldObj.isRemote) { if (this.getFlag(6)) { if (this.chunks != - * null) { Iterator var3 = this.chunks.iterator(); while - * (var3.hasNext()) { ChunkCoordIntPair var4 = (ChunkCoordIntPair) - * var3.next(); int x = var4.getCenterXPos(); int z = - * var4.getCenterZPosition(); - * this.worldObj.spawnParticle("mobSpellAmbient", x, posY, z, 0, 0, 0); - * for (int i = 0; i < 10; i++) { this.worldObj.spawnParticle("portal", - * x + (this.rand.nextDouble() - 0.5D) * (double) 8, this.posY + - * this.rand.nextDouble() * (double) 6 - 0.25D, z + - * (this.rand.nextDouble() - 0.5D) * (double) 8, (this.rand.nextDouble() - * - 0.5D) * 2.0D, -this.rand.nextDouble(), (this.rand.nextDouble() - - * 0.5D) * 2.0D); } } } else { this.setupChunks(this.chunkCoordX, - * this.chunkCoordZ); } } } else if (!ConfigHandler.CHUNK_LOADING) { - * this.releaseTicket(); } else { if (this.ticket == null) { - * this.requestTicket(); } } - */ - } - @Override public void setDead() { ForgeChunkManager.releaseTicket(chunkTicket); @@ -355,7 +311,7 @@ public boolean interactFirst(EntityPlayer entityplayer) { public void setColor(int color) { TrainRecord trainRecord = Traincraft.instance.traincraftRegistry.findTrainRecordByItem(getCartItem().getItem()); if (trainRecord != null && !trainRecord.getLiveries().isEmpty()) { - if (color == -1 || !trainRecord.getLiveries().contains(getColorAsString(color))) { + if (color == -1 || !trainRecord.getLiveries().contains(DepreciatedUtil.getColorAsString(color))) { color = color+1>trainRecord.getLiveries().size()-1?0:color+1; } entity_data.putString("color", trainRecord.getLiveries().get(color)); @@ -386,7 +342,7 @@ public void setRenderPitch(float pitch) { } public String getColor() { - entity_data = new XmlBuilder(dataWatcher.getWatchableObjectString(12)); + entity_data.updateData(dataWatcher.getWatchableObjectString(12)); return entity_data.getString("color"); } @@ -490,111 +446,6 @@ public void setInformation(String trainType, String trainOwner, String trainCrea } } - public static String getColorAsString(int i) { - switch (i) { - case 0: - return "Black"; - case 1: - return "Red"; - case 2: - return "Green"; - case 3: - return "Brown"; - case 4: - return "Blue"; - case 5: - return "Purple"; - case 6: - return "Cyan"; - case 7: - return "LightGrey"; - case 8: - return "Grey"; - case 13: - return "Magenta"; - case 10: - return "Lime"; - case 11: - return "Yellow"; - case 12: - return "LightBlue"; - case 9: - return "Pink"; - case 14: - return "Orange"; - case 15: - return "White"; - case 16: - return "Skin16"; - case 17: - return "Skin17"; - case 18: - return "Skin18"; - case 19: - return "Skin19"; - case 20: - return "Skin20"; - case 21: - return "Skin21"; - case 22: - return "Skin22"; - case 23: - return "Skin23"; - case 24: - return "Skin24"; - case 25: - return "Skin25"; - case 26: - return "Skin26"; - case 27: - return "Skin27"; - case 28: - return "Skin28"; - case 29: - return "Skin29"; - case 30: - return "Skin30"; - case 100: - return "Empty"; - case 101: - return "Full"; - default: - return "" + i; - } - } - - public static int getColorFromString(String color) { - if (color.equals("Black")) return 0; - if (color.equals("Red")) return 1; - if (color.equals("Green")) return 2; - if (color.equals("Brown")) return 3; - if (color.equals("Blue")) return 4; - if (color.equals("Purple")) return 5; - if (color.equals("Cyan")) return 6; - if (color.equals("LightGrey")) return 7; - if (color.equals("Grey")) return 8; - if (color.equals("Magenta")) return 13; - if (color.equals("Lime")) return 10; - if (color.equals("Yellow")) return 11; - if (color.equals("LightBlue")) return 12; - if (color.equals("Pink")) return 9; - if (color.equals("Orange")) return 14; - if (color.equals("White")) return 15; - if (color.equals("Skin16")) return 16; - if (color.equals("Skin17")) return 17; - if (color.equals("Skin18")) return 18; - if (color.equals("Skin19")) return 19; - if (color.equals("Skin20")) return 20; - if (color.equals("Skin21")) return 21; - if (color.equals("Skin22")) return 22; - if (color.equals("Skin23")) return 23; - if (color.equals("Skin24")) return 24; - if (color.equals("Skin25")) return 25; - if (color.equals("Empty")) return 100; - if (color.equals("Full")) return 101; - return -1; - } - public void dropCartAsItem(boolean isCreative) { if (!isCreative && !itemdropped) { itemdropped = true; @@ -795,4 +646,76 @@ public OverlayTextureManager getOverlayTextureContainer() { public boolean acceptsOverlayTextures() { return acceptsOverlayTextures; } + + + /** + * Functionality imported from TC5 + */ + + public String transportName(){return getSpec().getName();} + + public String transportcountry(){return "";} + + public String transportYear(){return "";} + + public String transportFuelType(){ + if(this instanceof SteamTrain) { + return "Steam"; + } else if(this instanceof DieselTrain) { + return "Diesel"; + } else if(this instanceof ElectricTrain) { + return "Electric"; + } + + return ""; + } + + public boolean isFictional(){return false;} + + public String[] additionalItemText(){return getSpec().getAdditionnalTooltip().split("\n");} + /**the top speed in km/h for the transport. + * not used tor rollingstock.*/ + public int transportTopSpeed(){return getSpec().getMaxSpeed();} + /**the top speed in km/h for the transportwhen moving in reverse, default is half for diesel and 75% for others. + * not used tor rollingstock.*/ + public float transportTopSpeedReverse(){return this instanceof DieselTrain?transportTopSpeed()*0.5f:transportTopSpeed();} + /**this is the default value to define the acceleration speed and pulling power of a transport.*/ + public int transportMetricHorsePower(){return getSpec().getMHP();} + /**the tractive effort for the transport, this is a fallback if metric horsepower (mhp) is not available*/ + public float transportTractiveEffort(){return 0;} + + /**defines the size of the inventory row by row, not counting any special slots like for fuel. + * end result number of slots is this times 9. plus any crafting/fuel slots + * may not return null*/ + public int getInventoryRows(){return (int)(getSpec().getCargoCapacity()*1.1111111111112);} + + /**defines the capacity of the fluidTank tank. + * each value defibes another tank. + * Usually value is 1,000 *the cubic meter capacity, so 242 gallons, is 0.9161 cubic meters, which is 916.1 tank capacity + * mind you one water bucket is values at 1000, a full cubic meter of water. + *example: + * return new int[]{11000, 1000}; + * may return null*/ + public int[] getTankCapacity(){return null;} + + /**defines the rider position offsets, with 0 being the center of the entity. + * Each set of coords represents a new rider seat, with the first one being the "driver" + * example: + * return new float[][]{{x1,y1,z1},{x2,y2,z2}, etc...}; + * may return null*/ + public float[][] getRiderOffsets(){return null;} + + + /**returns the size of the hitbox in blocks. + * example: + * return new float[]{x,y,z}; + * may not return null*/ + public float[] getHitboxSize(){return new float[]{3,1.5f,0.21f};} + + /**defines if the transport is immune to explosions*/ + public boolean isReinforced(){return false;} + + + /**defines the weight of the transport.*/ + public float weightKg(){return (float)getSpec().getMass()*10f;} } \ No newline at end of file diff --git a/src/main/java/train/common/api/EntityRollingStock.java b/src/main/java/train/common/api/EntityRollingStock.java index 9fc6f8e5c4..28a4639ade 100644 --- a/src/main/java/train/common/api/EntityRollingStock.java +++ b/src/main/java/train/common/api/EntityRollingStock.java @@ -47,6 +47,7 @@ import train.common.core.HandleOverheating; import train.common.core.handlers.*; import train.common.core.network.PacketRollingStockRotation; +import train.common.core.util.DepreciatedUtil; import train.common.core.util.TraincraftUtil; import train.common.entity.rollingStock.EntityTracksBuilder; import train.common.items.ItemPaintbrushThing; @@ -58,7 +59,6 @@ import train.common.library.GuiIDs; import train.common.tile.TileTCRail; import train.common.tile.TileTCRailGag; -import tv.twitch.chat.Chat; import java.util.ArrayList; import java.util.List; @@ -631,22 +631,28 @@ public void onUpdate() { this.hasSpawnedBogie = true; } - super.manageChunkLoading(); - /** - * Set the uniqueID if the entity doesn't have one. + * manage chunkloading */ if (!worldObj.isRemote && this.uniqueID == -1) { if (FMLCommonHandler.instance().getMinecraftServerInstance() != null) { - //TraincraftSaveHandler.createFile(FMLCommonHandler.instance().getMinecraftServerInstance()); - //int readID = TraincraftSaveHandler.readInt(FMLCommonHandler.instance().getMinecraftServerInstance(), "numberOfTrains:"); - //int newID = setNewUniqueID(readID); - //TraincraftSaveHandler seems to not work, may cause uniqueID bug. setNewUniqueID(this.getEntityId()); + } + } + shouldChunkLoad = getFlag(7); + if (shouldChunkLoad) { + if (this.chunkTicket == null) { + this.requestTicket(); + } + } - //TraincraftSaveHandler.writeValue(FMLCommonHandler.instance().getMinecraftServerInstance(), "numberOfTrains:", "" + newID); - + /** + * Set the uniqueID if the entity doesn't have one. + */ + if (!worldObj.isRemote && this.uniqueID == -1) { + if (FMLCommonHandler.instance().getMinecraftServerInstance() != null) { + setNewUniqueID(this.getEntityId()); } } @@ -733,11 +739,6 @@ public void onUpdate() { } return; } - - /* - * if(this.updateTicks<5){ - - */ /** * As entities can't be registered in nbttagcompound I had to setup this * system... When world loads, only the (double) Link1 and Link2 are @@ -780,33 +781,10 @@ public void onUpdate() { double bogieX1 = (this.posX + (rotationCos1 * Math.abs(bogieShift))); double bogieZ1 = (this.posZ + (rotationSin1 * Math.abs(bogieShift))); this.bogieLoco.setPosition(bogieX1, bogieLoco.posY, bogieZ1); - /* - * double rads = this.serverRealRotation * - * 3.141592653589793D / 180.0D; double pitchRads = - * this.renderPitch * 3.141592653589793D / 180.0D; - * this.bogieLoco[bog].setPosition((float) (posX - - * Math.cos(rads) * this.bogieShift[bog]), (float) posY + - * ((Math.tan(pitchRads) * -this.bogieShift[bog]) + - * getMountedYOffset()), (float) (posZ - Math.sin(rads) * - * this.bogieShift[bog])); - */ + } firstLoad = false; - /* - * for (int bog = 0; bog < this.bogieUtility.length; bog++) { if - * (bogieUtility[bog] != null) { - * - * double rads = this.serverRealRotation * 3.141592653589793D / - * 180.0D; double pitchRads = this.renderPitch * 3.141592653589793D - * / 180.0D; this.bogieUtility[bog].setPosition((float) (posX - - * Math.cos(rads) * this.bogieShift[bog]), (float) posY + - * ((Math.tan(pitchRads) * -this.bogieShift[bog]) + - * getMountedYOffset()), (float) (posZ - Math.sin(rads) * - * this.bogieShift[bog])); - - * [bog].posX+" "+ this.bogieUtility[bog].posY - * +" "+this.bogieUtility[bog].posZ); } } - */ + needsBogieUpdate = false; } if (bogieLoco != null) { @@ -853,9 +831,7 @@ public void onUpdate() { } else { float rotation = rotationYaw; - float delta = MathHelper.wrapAngleTo180_float(this.rotationYaw - this.previousServerRealRotation); //Math.abs(this.rotationYaw - this.previousServerRealRotation); - - this.previousServerRealRotation = this.rotationYaw; + float delta = MathHelper.wrapAngleTo180_float(this.rotationYaw - this.previousServerRealRotation); if (delta < -179.0F || delta > 179.0F) { // if (delta > 170.0F || delta < 190.0F) { @@ -878,16 +854,11 @@ public void onUpdate() { float tempPitch = rollingServerPitch; float tempPitch2 = tempPitch; if (Math.abs(zDist) > 0.02) { - double rads = Math.atan((posY - prevPosY) / zDist); tempPitch = (float) ((Math.atan((posY - prevPosY) / zDist)) * degrees); } else if (Math.abs(xDist) > 0.02) { tempPitch = (float) ((Math.atan((posY - prevPosY) / xDist)) * degrees); - //pitch=tempPitch; } - //if (Math.abs(tempPitch) > 16) { - //tempPitch=Math.copySign(16, tempPitch); - //} if (tempPitch2 < tempPitch && Math.abs(tempPitch2 - tempPitch) > 3) { tempPitch2 += 3; } else if (tempPitch2 > tempPitch && Math.abs(tempPitch2 - tempPitch) > 3) { @@ -1721,7 +1692,7 @@ public boolean interactFirst(EntityPlayer entityplayer) { if (itemstack != null && itemstack.getItem() instanceof ItemDye) { if (this.getSpec().getLiveries().size() > 0) { for (int i = 0; i < this.getSpec().getLiveries().size(); i++) { - if (itemstack.getItemDamage() == getColorFromString(this.getSpec().getLiveries().get(i))) { + if (itemstack.getItemDamage() == DepreciatedUtil.getColorFromString(this.getSpec().getLiveries().get(i))) { this.setColor(this.getSpec().getLiveries().get(i)); itemstack.stackSize--; diff --git a/src/main/java/train/common/api/Locomotive.java b/src/main/java/train/common/api/Locomotive.java index 4e47aee76e..a2cf369867 100644 --- a/src/main/java/train/common/api/Locomotive.java +++ b/src/main/java/train/common/api/Locomotive.java @@ -127,7 +127,9 @@ public Locomotive(World world) { inventorySize = numCargoSlots + numCargoSlots2 + numCargoSlots1; dataWatcher.addObject(2, 0); this.setDefaultMass(0); - this.setCustomSpeed(getMaxSpeed()); + if(world!=null) { + this.setCustomSpeed(transportTopSpeed()); + } dataWatcher.addObject(3, destination); dataWatcher.addObject(22, locoState); dataWatcher.addObject(24, fuelTrain); diff --git a/src/main/java/train/common/api/TrainRecord.java b/src/main/java/train/common/api/TrainRecord.java index 5682bfc011..567bdf81aa 100644 --- a/src/main/java/train/common/api/TrainRecord.java +++ b/src/main/java/train/common/api/TrainRecord.java @@ -13,6 +13,7 @@ public abstract class TrainRecord { public List skins = new ArrayList<>(); + @Deprecated public abstract String getName(); public abstract String getInternalName(); @@ -21,8 +22,10 @@ public abstract class TrainRecord { public abstract String getTrainType(); + @Deprecated public abstract int getMHP(); + @Deprecated public abstract int getMaxSpeed(); public abstract double getMass(); @@ -54,6 +57,7 @@ public List getLiveries() { public abstract int getGuiRenderScale(); + @Deprecated public abstract String getAdditionnalTooltip(); public abstract int getCargoCapacity(); @@ -67,14 +71,28 @@ public static TrainRecord makeEntry(String entryName, String internalName, Class return makeEntry(entryName, internalName, entityClass, item, trainType, MHP, maxSpeed, mass, fuelConsumption, waterConsumption, heatingTime, accelerationRate, brakeRate, tankCapacity, 0, colors, guiRenderScale, bogieLocoPosition, ""); } + @Deprecated + /** + * #param entryName is depreciated + * #param additionalTooltip is depreciated. + */ public static TrainRecord makeEntry(String entryName, String internalName, Class entityClass, Item item, String trainType, int MHP, int maxSpeed, double mass, int fuelConsumption, int waterConsumption, int heatingTime, double accelerationRate, double brakeRate, int tankCapacity, String[] colors, int guiRenderScale, double bogieLocoPositions, String additionnalTooltip) { return makeEntry(entryName, internalName, entityClass, item, trainType, MHP, maxSpeed, mass, fuelConsumption, waterConsumption, heatingTime, accelerationRate, brakeRate, tankCapacity, 0, colors, guiRenderScale, bogieLocoPositions, additionnalTooltip); } - + @Deprecated + /** + * #param entryName is depreciated + * #param additionalTooltip is depreciated. + */ public static TrainRecord makeEntry(String entryName, String internalName, Class entityClass, Item item, String trainType, double mass, String[] colors, int guiRenderScale, int cargoCapacity, String additionnalTooltip) { return makeEntry(entryName, internalName, entityClass, item, trainType, 0, 0, mass, 0, 0, 0, 0, 0, 0, cargoCapacity, colors, guiRenderScale, 0, additionnalTooltip); } + @Deprecated + /** + * #param entryName is depreciated + * #param additionalTooltip is depreciated. + */ public static TrainRecord makeEntry(final String entryName, final String internalName, final Class entityClass, final Item item, final String trainType, final int MHP, final int maxSpeed, final double mass, final int fuelConsumption, final int waterConsumption, final int heatingTime, final double accelerationRate, final double brakeRate, final int tankCapacity, final int cargoCapacity, final String[] colors, final int guiRenderScale, final double bogieLocoPositions, final String additionnalTooltip) { return new TrainRecord() { @Override diff --git a/src/main/java/train/common/core/util/DepreciatedUtil.java b/src/main/java/train/common/core/util/DepreciatedUtil.java new file mode 100644 index 0000000000..784de893a2 --- /dev/null +++ b/src/main/java/train/common/core/util/DepreciatedUtil.java @@ -0,0 +1,108 @@ +package train.common.core.util; + +public class DepreciatedUtil { + public static String getColorAsString(int i) { + switch (i) { + case 0: + return "Black"; + case 1: + return "Red"; + case 2: + return "Green"; + case 3: + return "Brown"; + case 4: + return "Blue"; + case 5: + return "Purple"; + case 6: + return "Cyan"; + case 7: + return "LightGrey"; + case 8: + return "Grey"; + case 13: + return "Magenta"; + case 10: + return "Lime"; + case 11: + return "Yellow"; + case 12: + return "LightBlue"; + case 9: + return "Pink"; + case 14: + return "Orange"; + case 15: + return "White"; + case 16: + return "Skin16"; + case 17: + return "Skin17"; + case 18: + return "Skin18"; + case 19: + return "Skin19"; + case 20: + return "Skin20"; + case 21: + return "Skin21"; + case 22: + return "Skin22"; + case 23: + return "Skin23"; + case 24: + return "Skin24"; + case 25: + return "Skin25"; + case 26: + return "Skin26"; + case 27: + return "Skin27"; + case 28: + return "Skin28"; + case 29: + return "Skin29"; + case 30: + return "Skin30"; + case 100: + return "Empty"; + case 101: + return "Full"; + default: + return "" + i; + } + } + + public static int getColorFromString(String color) { + if (color.equals("Black")) return 0; + if (color.equals("Red")) return 1; + if (color.equals("Green")) return 2; + if (color.equals("Brown")) return 3; + if (color.equals("Blue")) return 4; + if (color.equals("Purple")) return 5; + if (color.equals("Cyan")) return 6; + if (color.equals("LightGrey")) return 7; + if (color.equals("Grey")) return 8; + if (color.equals("Magenta")) return 13; + if (color.equals("Lime")) return 10; + if (color.equals("Yellow")) return 11; + if (color.equals("LightBlue")) return 12; + if (color.equals("Pink")) return 9; + if (color.equals("Orange")) return 14; + if (color.equals("White")) return 15; + if (color.equals("Skin16")) return 16; + if (color.equals("Skin17")) return 17; + if (color.equals("Skin18")) return 18; + if (color.equals("Skin19")) return 19; + if (color.equals("Skin20")) return 20; + if (color.equals("Skin21")) return 21; + if (color.equals("Skin22")) return 22; + if (color.equals("Skin23")) return 23; + if (color.equals("Skin24")) return 24; + if (color.equals("Skin25")) return 25; + if (color.equals("Empty")) return 100; + if (color.equals("Full")) return 101; + return -1; + } +} diff --git a/src/main/java/train/common/entity/rollingStock/EntityTankLava.java b/src/main/java/train/common/entity/rollingStock/EntityTankLava.java index 9b7f801f5e..5979196a0a 100644 --- a/src/main/java/train/common/entity/rollingStock/EntityTankLava.java +++ b/src/main/java/train/common/entity/rollingStock/EntityTankLava.java @@ -50,9 +50,9 @@ public void onUpdate() { if (worldObj.isRemote) return; if (getAmount() > 0) - setColor(TraincraftUtil.getByteFromColor("Full")); + setColor("Full"); if (getAmount() <= 0) - setColor(TraincraftUtil.getByteFromColor("Empty")); + setColor("Empty"); } @Override diff --git a/src/main/java/train/common/generation/ComponentVillageTrainstation.java b/src/main/java/train/common/generation/ComponentVillageTrainstation.java index 08dd538ae5..988365e840 100644 --- a/src/main/java/train/common/generation/ComponentVillageTrainstation.java +++ b/src/main/java/train/common/generation/ComponentVillageTrainstation.java @@ -5,8 +5,8 @@ import net.minecraft.world.gen.structure.StructureBoundingBox; import net.minecraft.world.gen.structure.StructureComponent; import net.minecraft.world.gen.structure.StructureVillagePieces; -import train.common.api.AbstractTrains; import train.common.api.EntityRollingStock; +import train.common.core.util.DepreciatedUtil; import train.common.entity.rollingStock.*; import train.common.library.BlockIDs; @@ -183,13 +183,13 @@ public boolean addComponentParts(World world, Random random, StructureBoundingBo cart.setTrainOwner("VillagerJoe"); cart.shouldChunkLoad=false; if (rD == 4) { - cart.setColor(AbstractTrains.getColorFromString("Blue")); + cart.setColor("Blue"); } if (rD == 7) { - cart.setColor(AbstractTrains.getColorFromString("Red")); + cart.setColor("Red"); } if (rD == 5) { - cart.setColor(AbstractTrains.getColorFromString("Brown")); + cart.setColor("Brown"); } world.spawnEntityInWorld(cart); cart.setInformation(cart.getTrainType(), "VillagerJoe", "VillagerJoe", cart.getCartItem().getItem().getItemStackDisplayName(cart.getCartItem()), -1); @@ -218,10 +218,10 @@ public boolean addComponentParts(World world, Random random, StructureBoundingBo cart.setLocationAndAngles(j2 + 0.5D, k2, l2 + 0.5D, 90.0F, 0.0F); cart.setTrainOwner("VillagerJoe"); if (rD == 4) { - cart.setColor(AbstractTrains.getColorFromString("Blue")); + cart.setColor("Blue"); } if (rD == 5) { - cart.setColor(AbstractTrains.getColorFromString("Brown")); + cart.setColor("Brown"); } world.spawnEntityInWorld(cart); } diff --git a/src/main/java/train/common/items/ItemRollingStock.java b/src/main/java/train/common/items/ItemRollingStock.java index 72829311e5..06f5a6e140 100644 --- a/src/main/java/train/common/items/ItemRollingStock.java +++ b/src/main/java/train/common/items/ItemRollingStock.java @@ -3,6 +3,7 @@ import com.mojang.authlib.GameProfile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ebf.tim.utility.CommonUtil; import mods.railcraft.api.carts.IMinecart; import mods.railcraft.api.core.items.IMinecartItem; import net.minecraft.block.BlockRailBase; @@ -16,11 +17,13 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import train.common.Traincraft; import train.common.api.*; import train.common.core.handlers.ConfigHandler; +import train.common.core.util.DepreciatedUtil; import train.common.core.util.TraincraftUtil; import train.common.entity.rollingStock.EntityTracksBuilder; import train.common.items.ItemTCRail.TrackTypes; @@ -37,6 +40,15 @@ public class ItemRollingStock extends ItemMinecart implements IMinecart, IMineca private final String trainName; private String trainCreator; + private AbstractTrains entity=null; + + private AbstractTrains getEntity(){ + if(entity==null){ + entity=Traincraft.instance.traincraftRegistry.findTrainRecordByItem(this).getEntity(null); + } + return entity; + } + public ItemRollingStock(String iconName) { super(1); this.iconName = iconName; @@ -82,44 +94,92 @@ public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlaye if (par1ItemStack.hasTagCompound()) { NBTTagCompound var5 = par1ItemStack.getTagCompound(); trainCreator = var5.getString("trainCreator"); - /*if (id > 0) - par3List.add("\u00a77" + "ID: " + id);*/ if (!trainCreator.isEmpty()) { par3List.add("\u00a77" + "Creator: " + trainCreator); } - int color = var5.getInteger("trainColor"); - if (var5.hasKey("trainColor") && color <= 16) { - par3List.add("\u00a77" + "Color: " + AbstractTrains.getColorAsString(color)); + if (var5.hasKey("train_Color")) { + par3List.add("\u00a77" + "Color: " + var5.getString("train_Color")); } } - double mass = getMass(); - int power = getMHP(); - int maxSpeed = getMaxSpeed(); - String additionnalInfo = getAdditionnalInfo(); - if (!getTrainType().isEmpty()) { - par3List.add("\u00a77" + "Type: " + getTrainType()); - } - if (power > 0) { - par3List.add("\u00a77" + "Power: " + power + " Mhp"); - } - if (mass != 0) { - par3List.add("\u00a77" + "Mass: " + (mass * 10)); - } - if (maxSpeed > 0) { - par3List.add("\u00a77" + "Max Speed: " + maxSpeed); - } - if(getCargoCapacity()>0){ - par3List.add("\u00a77" + "Slots: "+getCargoCapacity()); - } - /*if(additionnalInfo!=null){ - for(String info : additionnalInfo){ - par3List.add("\u00a77" + info); + + if(getEntity()!=null){ + //year is the tell for if the TC4.5 API was used in favor of 4.3's. + if(!getEntity().transportYear().equals("")) { + if (getEntity().transportYear() != null) { + par3List.add(EnumChatFormatting.GRAY + t("menu.item.year") + ": " + getEntity().transportYear()); + } + if(getEntity().transportcountry()!=null) { + par3List.add(EnumChatFormatting.GRAY + t("menu.item.country") + ": " + + t("menu.item." + getEntity().transportcountry().toLowerCase())); + } + } + + if(getEntity().transportFuelType()!=null && !getEntity().transportFuelType().equals("")) { + par3List.add(EnumChatFormatting.RED + t("menu.item.fueltype") + ": " + + t("menu.item."+getEntity().transportFuelType().toLowerCase())); + } + + StringBuilder s = new StringBuilder(); + par3List.add(EnumChatFormatting.RED + t("menu.item.types")+":"); + if (getEntity() instanceof Locomotive){ + s.append(t("menu.item.locomotive")+", "); + if(entity instanceof IPassenger){ + s.append(t("menu.item.passenger")+", "); + } + if(entity instanceof Freight){ + s.append(t("menu.item.freight")+", "); + } + } else { + s.append(t("menu.item.rollingstock")+", "); + if(entity instanceof IPassenger){ + s.append(t("menu.item.passenger")+", "); + } + if(entity instanceof Tender){ + s.append(t("menu.item.tender")+", "); + } else if(entity instanceof LiquidTank){ + s.append(t("menu.item.tanker")+", "); + } + if(entity instanceof AbstractWorkCart){ + s.append(t("menu.item.workcart")+", "); + } + if(entity instanceof Freight){ + s.append(t("menu.item.freight")+", "); + } + } + s.delete(s.lastIndexOf(", "),s.length()); + + par3List.add(EnumChatFormatting.RED +s.toString()); + + par3List.add(EnumChatFormatting.GREEN + t("menu.item.weight") +": " + getEntity().weightKg() + "kg"); + if (getEntity().transportTopSpeed()!=0){ + par3List.add(EnumChatFormatting.GREEN + t("menu.item.speed") +": " + getEntity().transportTopSpeed() +" km/h"); + + if (getEntity().transportMetricHorsePower() !=0){ + par3List.add(EnumChatFormatting.GREEN +t("menu.item.mhp") +": " + getEntity().transportMetricHorsePower()); + } + if (getEntity().transportTractiveEffort() != 0){ + par3List.add(EnumChatFormatting.GREEN + t("menu.item.tractiveeffort") +": " + getEntity().transportTractiveEffort() + " lbf"); + } + } + if(getEntity().getInventoryRows()>0){ + par3List.add(EnumChatFormatting.BLUE +t("menu.item.isizeof")+ ": " + (getEntity().getInventoryRows()*9) + " " + t("menu.item.slots")); + } + if(getEntity().getRiderOffsets()!=null){ + par3List.add(EnumChatFormatting.BLUE +t("menu.item.seats")+ ": " + getEntity().getRiderOffsets().length); + } + if (getEntity().isFictional()){ + par3List.add(EnumChatFormatting.WHITE +t("menu.item.fictional")); + } + if (getEntity().additionalItemText()!=null){ + for (String a : getEntity().additionalItemText()) { + if(!a.equals("")) { + par3List.add(EnumChatFormatting.LIGHT_PURPLE + a); + } + } } - }*/ - if(getAdditionnalInfo()!=null){ - par3List.add("\u00a77" + getAdditionnalInfo()); } + } @Override public EnumRarity getRarity(ItemStack par1ItemStack) { @@ -138,9 +198,7 @@ public int getMaxSpeed() { public int getMHP() { return Traincraft.instance.traincraftRegistry.findTrainRecordByItem(this).getMHP(); } - public String getAdditionnalInfo() { - return Traincraft.instance.traincraftRegistry.findTrainRecordByItem(this).getAdditionnalTooltip(); - } + public int getCargoCapacity() { return Traincraft.instance.traincraftRegistry.findTrainRecordByItem(this).getCargoCapacity(); } @@ -621,9 +679,8 @@ else if ((meta == 0 || meta == 2) && (world.getBlock(i, j, k + 1) == BlockIDs.tc if (uniID != -1) rollingStock.getEntityData().setInteger("uniqueID", uniID); trainCreator = var5.getString("trainCreator"); - int trainColor = var5.getInteger("trainColor"); - if (var5.hasKey("trainColor")) - rollingStock.setColor(trainColor); + if (var5.hasKey("train_Color")) + rollingStock.setColor(var5.getString("train_Color")); rollingStock.trainCreator = trainCreator; if (var5.hasKey("overlayTextureConfigTag")) // Import overlay configuration from NBT and apply it to the entity. rollingStock.getOverlayTextureContainer().importFromConfigTag(var5.getCompoundTag("overlayTextureConfigTag")); @@ -678,7 +735,7 @@ public static ItemStack setPersistentData(@Nullable ItemStack oldStack, @Nullabl if(player!=null && player.length()>1) { tag.setString("theOwner", player); } - tag.setString("trainColor",color); + tag.setString("train_Color",color); } else { tag.setString("trainCreator", creator!=null && creator.length()>1?creator:"Creative"); } @@ -693,6 +750,9 @@ public static ItemStack setPersistentData(@Nullable ItemStack oldStack, @Nullabl } + private static String t(String translate){ + return CommonUtil.translate(translate); + } @Override public boolean canBePlacedByNonPlayer(ItemStack cart) {