diff --git a/src/main/java/mekanism/client/render/obj/MekanismOBJModel.java b/src/main/java/mekanism/client/render/obj/MekanismOBJModel.java index 295731bd9..3ef13486d 100644 --- a/src/main/java/mekanism/client/render/obj/MekanismOBJModel.java +++ b/src/main/java/mekanism/client/render/obj/MekanismOBJModel.java @@ -1,7 +1,9 @@ package mekanism.client.render.obj; import com.google.common.collect.ImmutableMap; +import java.util.Collection; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nonnull; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -13,8 +15,8 @@ import net.minecraftforge.common.model.IModelState; public class MekanismOBJModel extends OBJModel { - public OBJModelType modelType; - public ResourceLocation location; + private OBJModelType modelType; + private ResourceLocation location; public MekanismOBJModel(OBJModelType type, MaterialLibrary matLib, ResourceLocation modelLocation) { super(matLib, modelLocation); @@ -43,15 +45,19 @@ public class MekanismOBJModel extends OBJModel { @Nonnull @Override public IModel process(@Nonnull ImmutableMap customData) { - MekanismOBJModel ret = new MekanismOBJModel(modelType, getMatLib(), location); - return ret; + return new MekanismOBJModel(modelType, getMatLib(), location); } @Nonnull @Override public IModel retexture(@Nonnull ImmutableMap textures) { - MekanismOBJModel ret = new MekanismOBJModel(modelType, getMatLib().makeLibWithReplacements(textures), location); - return ret; + return new MekanismOBJModel(modelType, getMatLib().makeLibWithReplacements(textures), location); + } + + @Nonnull + @Override + public Collection getTextures() { + return super.getTextures().stream().filter(r -> !r.getPath().startsWith("#")).collect(Collectors.toList()); } public enum OBJModelType { diff --git a/src/main/java/mekanism/client/render/obj/OBJBakedModelBase.java b/src/main/java/mekanism/client/render/obj/OBJBakedModelBase.java index a5f1222b3..614b08820 100644 --- a/src/main/java/mekanism/client/render/obj/OBJBakedModelBase.java +++ b/src/main/java/mekanism/client/render/obj/OBJBakedModelBase.java @@ -105,6 +105,7 @@ public abstract class OBJBakedModelBase extends OBJBakedModel { } } + @SuppressWarnings("unchecked") public static ImmutableMap getTexturesForOBJModel(IBakedModel model) { try { if (f_textures == null) { @@ -218,6 +219,7 @@ public abstract class OBJBakedModelBase extends OBJBakedModel { return quadList; } + @SuppressWarnings("deprecation") protected void updateStateVisibilityMap(OBJState state) { try { if (m_updateStateVisibilityMap == null) {