Merge pull request #4803 from thiakil/api-update

Api update
This commit is contained in:
Aidan authored and GitHub committed 2017-11-16 12:10:57 -05:00
commit 801676b965
5 files changed
+301 -1

No files matched your search

+10
View File
@@ -2,6 +2,7 @@ package mekanism.api.gas;
import mekanism.client.render.MekanismRenderer;
import mekanism.client.render.MekanismRenderer.FluidType;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.nbt.NBTTagCompound;
@@ -43,6 +44,11 @@ public class Gas
iconLocation = new ResourceLocation(icon);
}
public Gas(String s, ResourceLocation icon){
unlocalizedName = name = s;
iconLocation = icon;
}
/**
* Creates a new Gas object that corresponds to the given Fluid
*/
@@ -139,6 +145,10 @@ public class Gas
{
return MekanismRenderer.getFluidTexture(fluid, FluidType.STILL);
}
if (sprite == null){
sprite = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(getIcon().toString());
}
return sprite;
}