Goshdurn hippy flower mod

This commit is contained in:
Jeremy Diamond committed 2014-10-18 23:05:06 -07:00
1 parent 360c59d13b
commit 4554d55a48
11 files changed
+198 -15

No files matched your search

@@ -11,6 +11,9 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import net.minecraft.client.gui.GuiButton;
import vazkii.botania.api.lexicon.LexiconEntry;
/**
@@ -54,4 +57,26 @@ public interface IGuiLexiconEntry {
* Gets the GUI's Z level for rendering.
*/
public float getZLevel();
/**
* Gets the list of buttons in this gui.
*/
public List<GuiButton> getButtonList();
/**
* Gets the total amount of ticks (+ partial ticks) the player
* has been in this gui.
*/
public float getElapsedTicks();
/**
* Gets the current partial ticks.
*/
public float getPartialTicks();
/**
* Gets the delta (1F = 1 tick) between this render call
* and the last one.
*/
public float getTickDelta();
}
@@ -14,10 +14,13 @@ package vazkii.botania.api.lexicon;
import java.util.ArrayList;
import java.util.List;
public final class LexiconCategory {
import net.minecraft.util.ResourceLocation;
public class LexiconCategory {
public final String unlocalizedName;
public final List<LexiconEntry> entries = new ArrayList<LexiconEntry>();
private ResourceLocation icon;
/**
* @param unlocalizedName The unlocalized name of this category. This will be localized by the client display.
@@ -29,4 +32,13 @@ public final class LexiconCategory {
public String getUnlocalizedName() {
return unlocalizedName;
}
public LexiconCategory setIcon(ResourceLocation icon) {
this.icon = icon;
return this;
}
public ResourceLocation getIcon() {
return icon;
}
}
@@ -11,6 +11,7 @@
*/
package vazkii.botania.api.lexicon;
import net.minecraft.client.gui.GuiButton;
import vazkii.botania.api.internal.IGuiLexiconEntry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -34,13 +35,48 @@ public abstract class LexiconPage {
public abstract void renderScreen(IGuiLexiconEntry gui, int mx, int my);
/**
* Called per update tick.
* Called per update tick. Non gui-sensitive version, kept for backwards compatibility only.
*/
@SideOnly(Side.CLIENT)
public void updateScreen() {
// NO-OP
}
/**
* Called per update tick. Feel free to override fully, the
* call to updateScreen() is for backwards compatibility.
*/
@SideOnly(Side.CLIENT)
public void updateScreen(IGuiLexiconEntry gui) {
updateScreen();
}
/**
* Called when this page is opened, be it via initGui() or when the player changes page.
* You can add buttons and whatever you'd do on initGui() here.
*/
@SideOnly(Side.CLIENT)
public void onOpened(IGuiLexiconEntry gui) {
// NO-OP
}
/**
* Called when this page is opened, be it via closing the gui or when the player changes page.
* Make sure to dispose of anything you don't use any more, such as buttons in the gui's buttonList.
*/
@SideOnly(Side.CLIENT)
public void onClosed(IGuiLexiconEntry gui) {
// NO-OP
}
/**
* Called when a button is pressed, equivalent to GuiScreen.actionPerformed.
*/
@SideOnly(Side.CLIENT)
public void onActionPerformed(IGuiLexiconEntry gui, GuiButton button) {
// NO-OP
}
/**
* Called when a key is pressed.
*/
@@ -1,4 +1,4 @@
@API(owner = "Botania", apiVersion = "18", provides = "BotaniaAPI")
@API(owner = "Botania", apiVersion = "19", provides = "BotaniaAPI")
package vazkii.botania.api;
import cpw.mods.fml.common.API;
@@ -52,7 +52,7 @@ public class BasicSignature extends SubTileSignature {
}
private String unlocalizedName(String end) {
return "tile." + SubTileSignature.SPECIAL_FLOWER_PREFIX + name + end;
return "tile.botania:" + SubTileSignature.SPECIAL_FLOWER_PREFIX + name + end;
}
}