summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-05-31 01:44:17 +0100
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-05-31 01:44:17 +0100
commit40487f07fa5ef31fde99713c0b842d34a0ba3622 (patch)
tree2accdb69c2507acd794d5009d520b2255763751b /src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
parentc5dfb2ef7353f13d71d8d582aa6d240420ed9ce7 (diff)
- Fixed an issue with the Liquids tab
- Changed Entity registration so it only uses 'registerModEntity' to fix potential issues - Added crystal blocks - Changed Jewelry Tab to not override TiCon tabs (sorry TiCon, your system is good, but not for me) - The player renders in the Jewelry GUI (makes it easier for you to see how the jewelry render) - The Pentagram now has an actual effect - The Pentagram now renders beneath your feet when you look down and no longer does it in your inventory; it is also a lot smaller - Working on Structures - Created my own WeightedRandomItem (why isn't this in vanilla?) - Updated the curse API so now people can specify when a curse can be activated (I believe the world is all you need :p) - Some curses can no longer aquired in hardcore (such as Rotten Heart, Midas Touch etc) which would make it impossible to work with and require a total restart of the game (as the only way to get rid of them is by dying to replace them) Hooraaay for proper changelogs!
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java')
-rw-r--r--src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java b/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
index badbfa9..68aace4 100644
--- a/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
+++ b/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java
@@ -12,6 +12,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import darkknight.jewelrycraft.api.Curse;
+import darkknight.jewelrycraft.config.ConfigHandler;
import darkknight.jewelrycraft.util.Variables;
public class ScreenHandler extends Gui
@@ -36,15 +37,15 @@ public class ScreenHandler extends Gui
ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
if (tagCache.hasKey("cursePoints") && tagCache.getInteger("cursePoints") > 0){
mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);
- for(Curse curse: Curse.getCurseList()){
- if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ if (ConfigHandler.CURSES_ENABLED) for(Curse curse: Curse.getCurseList()){
+ if (curse.canCurseBeActivated(mc.theWorld) && tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
drawTexturedModalRect(-16, -16 + (size - 6) * count, 0, 32, 144, 60);
count++;
}
}
count = 0;
- for(Curse curse: Curse.getCurseList())
- if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ if (ConfigHandler.CURSES_ENABLED) for(Curse curse: Curse.getCurseList())
+ if (curse.canCurseBeActivated(mc.theWorld) && tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
mc.renderEngine.bindTexture(new ResourceLocation(Variables.MODID, "textures/gui/" + curse.getTexturePack() + ".png"));
int tag = curse.getTextureID();
GL11.glPushMatrix();
@@ -57,8 +58,8 @@ public class ScreenHandler extends Gui
}
count = 0;
size = 16;
- for(Curse curse: Curse.getCurseList())
- if (tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
+ if (ConfigHandler.CURSES_ENABLED) for(Curse curse: Curse.getCurseList())
+ if (curse.canCurseBeActivated(mc.theWorld) && tagCache.hasKey(curse.getName()) && tagCache.getInteger(curse.getName()) > 0){
mc.fontRenderer.drawStringWithShadow(curse.getName().split(":")[1], 30, 11 + (size + 10) * count, 16777215);
if (tagCache.getInteger(curse.getName()) == 2){
mc.renderEngine.bindTexture(Variables.MISC_TEXTURE);