Move Forestry GUI icons to a new TextureMap

This commit is contained in:
mezz committed 2016-11-06 01:51:43 -08:00
1 parent d04713339c
commit 4c8d5e2f43
21 files changed
+347 -104

No files matched your search

@@ -6,7 +6,6 @@
package forestry.api.core;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -27,7 +26,10 @@ public interface IErrorState {
@SideOnly(Side.CLIENT)
void registerSprite();
@SideOnly(value = Side.CLIENT)
/**
* Sprite registered to the Gui Texture Map at {@link ITextureManager}
*/
@SideOnly(Side.CLIENT)
TextureAtlasSprite getSprite();
}
@@ -6,13 +6,29 @@
package forestry.api.core;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* Get the instance from {@link ForestryAPI#textureManager}.
*/
@SideOnly(Side.CLIENT)
public interface ITextureManager {
/**
* Location of the Forestry Gui Texture Map.
* Used for binding with {@link net.minecraft.client.renderer.texture.TextureManager#bindTexture(ResourceLocation)}
*/
ResourceLocation getGuiTextureMap();
/**
* Get a texture atlas sprite that has been registered by Forestry, for Forestry's Gui Texture Map.
*/
TextureAtlasSprite getDefault(String ident);
/**
* Register a sprite with Forestry's Gui Texture Map.
*/
TextureAtlasSprite registerGuiSprite(ResourceLocation location);
}
@@ -3,7 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@API(apiVersion = "5.0.0", owner = "Forestry", provides = "ForestryAPI|core")
@API(apiVersion = "5.1.0", owner = "Forestry", provides = "ForestryAPI|core")
package forestry.api.core;
import net.minecraftforge.fml.common.API;
@@ -5,10 +5,10 @@
******************************************************************************/
package forestry.api.mail;
import forestry.api.core.ITextureManager;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -31,6 +31,10 @@ public interface IPostalCarrier {
*/
String getName();
/**
* Sprite registered to the Gui Texture Map at {@link ITextureManager}.
* Must be 26 pixels wide and 15 pixels tall. The texture itself must be 26x26 square to be accepted by the texture map.
*/
@SideOnly(Side.CLIENT)
TextureAtlasSprite getSprite();
@@ -3,7 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@API(apiVersion = "3.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|mail")
@API(apiVersion = "3.1.0", owner = "ForestryAPI|core", provides = "ForestryAPI|mail")
package forestry.api.mail;
import net.minecraftforge.fml.common.API;