Initial comment to start using Blood Utils' book
This commit is contained in:
parent
d1fa088923
commit
51346b5638
90 changed files with 2272 additions and 21 deletions
48
src/api/java/bloodutils/api/entries/EntryText.java
Normal file
48
src/api/java/bloodutils/api/entries/EntryText.java
Normal file
|
@ -0,0 +1,48 @@
|
|||
package bloodutils.api.entries;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import bloodutils.api.classes.guide.GuiEntry;
|
||||
|
||||
public class EntryText implements IEntry{
|
||||
public EntryText(){
|
||||
|
||||
}
|
||||
|
||||
public EntryText(String entryName){
|
||||
this.entryName = entryName;
|
||||
}
|
||||
public String entryName;
|
||||
|
||||
@Override
|
||||
public void draw(GuiEntry entry, int width, int height, int left, int top, EntityPlayer player, String key, int page, int mX, int mY){
|
||||
int x, y;
|
||||
|
||||
if(this.entryName == null)
|
||||
this.entryName = key;
|
||||
|
||||
String s = StatCollector.translateToLocal("bu.entry." + this.entryName + "." + page);
|
||||
x = left + width / 2 - 58;
|
||||
y = (top + 15);
|
||||
|
||||
Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(true);
|
||||
Minecraft.getMinecraft().fontRenderer.drawSplitString(s, x, y, 110, 0);
|
||||
Minecraft.getMinecraft().fontRenderer.setUnicodeFlag(false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void initGui(int width, int height, int left, int top,
|
||||
EntityPlayer player, List buttonList){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button){
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue