summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-20 22:14:31 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-20 22:14:31 +0200
commitb40a2953324c73d5b88c81032cec2c56a9d0c564 (patch)
tree91316eb84921698069bce46951524f41960ba2b6
parentc0833c069d04ffa453a8355ff25f548431d6129d (diff)
Think I fixed the Molder render, as well as made the table work
-rw-r--r--common/darkknight/jewelrycraft/item/ItemRing.java9
-rw-r--r--common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java12
-rw-r--r--common/darkknight/jewelrycraft/worldGen/Generation.java2
3 files changed, 9 insertions, 14 deletions
diff --git a/common/darkknight/jewelrycraft/item/ItemRing.java b/common/darkknight/jewelrycraft/item/ItemRing.java
index 1207bac..1c533e4 100644
--- a/common/darkknight/jewelrycraft/item/ItemRing.java
+++ b/common/darkknight/jewelrycraft/item/ItemRing.java
@@ -112,6 +112,7 @@ public class ItemRing extends ItemBase
}
NBTTagCompound potionNBT = new NBTTagCompound();
potionNBT.setInteger("potion", potion);
+ itemStackData.setTag("potion", potionNBT);
}
/**
@@ -133,10 +134,10 @@ public class ItemRing extends ItemBase
if (stack.getTagCompound().hasKey("potion"))
{
- NBTTagCompound potionNBT = new NBTTagCompound();;
+ NBTTagCompound potionNBT = (NBTTagCompound) stack.getTagCompound().getTag("potion");
int potion = 0;
potion = potionNBT.getInteger("potion");
- list.add(EnumChatFormatting.GREEN + Integer.toString(potion));
+ list.add(EnumChatFormatting.GREEN + StatCollector.translateToLocal(new PotionEffect(potion, 4).getEffectName()));
}
}
}
@@ -146,12 +147,12 @@ public class ItemRing extends ItemBase
{
if (stack.hasTagCompound())
{
- if(stack.getTagCompound().hasKey("effect"))
+ if(stack.getTagCompound().hasKey("potion"))
{
if (par3Entity instanceof EntityPlayer)
{
EntityPlayer entityplayer = (EntityPlayer)par3Entity;
- NBTTagCompound potionNBT = new NBTTagCompound();
+ NBTTagCompound potionNBT = (NBTTagCompound) stack.getTagCompound().getTag("potion");
int potion = 0;
potion = potionNBT.getInteger("potion");
if(potion != 0 && entityplayer != null) entityplayer.addPotionEffect(new PotionEffect(potion, 4));
diff --git a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
index a5b6830..84d041a 100644
--- a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
+++ b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
@@ -45,14 +45,10 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
me.mold.getIconIndex().getInterpolatedU(0);
int decal = -4;
int decal2 = 4;
-// if (me.mold.getItemDamage() == 0)
-// decal = 32;
-// else if (me.mold.getItemDamage() > 0)
-// decal = 64;
- double minu = me.mold.getIconIndex().getInterpolatedU(decal2);
- double minv = me.mold.getIconIndex().getInterpolatedV(-decal);
- double maxu = me.mold.getIconIndex().getInterpolatedU(256*decal2);
- double maxv = me.mold.getIconIndex().getInterpolatedV(256*decal);
+ double minu = me.mold.getIconIndex().getInterpolatedU(decal2 + 48);
+ double minv = me.mold.getIconIndex().getInterpolatedV(-decal + 32);
+ double maxu = me.mold.getIconIndex().getInterpolatedU(256*decal2 + 48);
+ double maxv = me.mold.getIconIndex().getInterpolatedV(256*decal + 32);
GL11.glPushMatrix();
GL11.glScalef(1f / 16f, 1f / 16f, 1f / 16f);
GL11.glDisable(GL11.GL_LIGHTING);
diff --git a/common/darkknight/jewelrycraft/worldGen/Generation.java b/common/darkknight/jewelrycraft/worldGen/Generation.java
index 55daf7f..8e7c45b 100644
--- a/common/darkknight/jewelrycraft/worldGen/Generation.java
+++ b/common/darkknight/jewelrycraft/worldGen/Generation.java
@@ -4,9 +4,7 @@ import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
-import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
-import darkknight.jewelrycraft.block.BlockList;
import darkknight.jewelrycraft.config.ConfigHandler;
public class Generation implements IWorldGenerator