summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-21 17:34:32 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-21 17:34:32 +0200
commit8e3546bfaf49e0e7805cb43e69cd2d3996ea484b (patch)
tree7adb166c96ee27b1a20b9c3a46eb8bba0341e4df
parent4d44f0da49a8676fe557ba5da9022428a6b6f061 (diff)
Trying Stuff
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java3
-rw-r--r--common/darkknight/jewelrycraft/block/BlockSmelter.java26
-rw-r--r--common/darkknight/jewelrycraft/config/ConfigHandler.java4
-rw-r--r--common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java2
-rw-r--r--common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java41
-rw-r--r--resources/assets/jewelrycraft/lang/en_US.lang2
-rw-r--r--resources/assets/jewelrycraft/textures/items/clayIngotMold.pngbin449 -> 493 bytes
-rw-r--r--resources/assets/jewelrycraft/textures/items/ingotMold.pngbin440 -> 500 bytes
-rw-r--r--resources/assets/jewelrycraft/textures/items/ingotShadow.png.mcmeta5
-rw-r--r--resources/assets/jewelrycraft/textures/items/necklace.pngbin303 -> 284 bytes
10 files changed, 42 insertions, 41 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java
index 22fca62..5b6465a 100644
--- a/common/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/common/darkknight/jewelrycraft/block/BlockMolder.java
@@ -12,6 +12,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import darkknight.jewelrycraft.config.ConfigHandler;
import darkknight.jewelrycraft.item.ItemList;
import darkknight.jewelrycraft.item.ItemRing;
import darkknight.jewelrycraft.tileentity.TileEntityMolder;
@@ -112,7 +113,7 @@ public class BlockMolder extends BlockContainer
me.hasJewelBase = false;
}
else if (me.hasMoltenMetal && me.cooling > 0)
- player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.molder.metaliscooling"));
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.molder.metaliscooling") + " (" + ((ConfigHandler.ingotCoolingTime - me.cooling)*100/ConfigHandler.ingotCoolingTime) + "%)");
else if (me.mold.itemID == ItemList.molds.itemID && !me.hasMoltenMetal)
player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.molder.moldisempty"));
else if (me.mold.itemID != ItemList.molds.itemID)
diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java
index 2f90b34..e83afb2 100644
--- a/common/darkknight/jewelrycraft/block/BlockSmelter.java
+++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java
@@ -62,13 +62,13 @@ public class BlockSmelter extends BlockContainer
ItemStack item = entityPlayer.inventory.getCurrentItem();
if (te != null && !world.isRemote)
{
- if (!te.hasMetal && !te.hasMoltenMetal && item != null && item.getUnlocalizedName().toLowerCase().contains("ingot") && !item.getDisplayName().contains("Mold"))
+ if (!te.hasMetal && !te.hasMoltenMetal && item != null && item.getUnlocalizedName().toLowerCase().contains("ingot") && !item.getUnlocalizedName().toLowerCase().contains("mold"))
{
entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.nowsmeltingingot", item.getDisplayName()));
te.metal = item.copy();
te.metal.stackSize = 1;
te.hasMetal = true;
- te.melting = ConfigHandler.ingotSmeltingTime;
+ te.melting = ConfigHandler.ingotMeltingTime;
if (!entityPlayer.capabilities.isCreativeMode) --item.stackSize;
}
else if (te.hasMetal && !te.hasMoltenMetal && item != null && item.getDisplayName().contains("Ingot") && !item.getDisplayName().contains("Mold"))
@@ -77,7 +77,7 @@ public class BlockSmelter extends BlockContainer
entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.hasmolteningot", te.moltenMetal.getDisplayName()));
else if (item != null && !item.getUnlocalizedName().toLowerCase().contains("ingot") && item.getDisplayName().contains("Ingot"))
entityPlayer.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.itemrenamedtoingot"));
- else if (item != null && !item.getUnlocalizedName().toLowerCase().contains("ingot"))
+ else if (item != null && (!item.getUnlocalizedName().toLowerCase().contains("ingot") || item.getUnlocalizedName().toLowerCase().contains("mold")))
entityPlayer.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.itemneedstobeingot"));
if (te.hasMetal && entityPlayer.isSneaking())
@@ -105,9 +105,9 @@ public class BlockSmelter extends BlockContainer
else if (world.getBlockMetadata(i, j, k) == 3)
me = (TileEntityMolder) world.getBlockTileEntity(i - 1, j, k);
- if (te.hasMoltenMetal && me != null && !world.isRemote)
+ if (me != null && !world.isRemote)
{
- if (isConnectedToMolder(world, i, j, k) && me.hasMold && !me.hasMoltenMetal && !me.hasJewelBase)
+ if (te.hasMoltenMetal && isConnectedToMolder(world, i, j, k) && me != null && me.hasMold && !me.hasMoltenMetal && !me.hasJewelBase)
{
me.moltenMetal = te.moltenMetal;
me.hasMoltenMetal = true;
@@ -116,14 +116,18 @@ public class BlockSmelter extends BlockContainer
te.hasMoltenMetal = false;
me.isDirty = true;
}
- else if (me.hasMoltenMetal)
- player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderhasmoltenmetal"));
- else if (!me.hasMold)
+ else if (te.hasMetal && te.melting > 0)
+ player.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.metalismelting", te.metal.getDisplayName()) + " (" + ((ConfigHandler.ingotMeltingTime - te.melting)*100/ConfigHandler.ingotMeltingTime) + "%)");
+ else if (te.hasMoltenMetal && !isConnectedToMolder(world, i, j, k))
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderismissing"));
+ else if (!me.hasMold && te.hasMoltenMetal)
player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderhasnomold"));
- else if (me.hasJewelBase)
+ else if (me.hasMoltenMetal && te.hasMoltenMetal)
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderhasmoltenmetal"));
+ else if (me.hasJewelBase && te.hasMoltenMetal)
player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.modlerhasitem"));
- else
- player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderismissing"));
+ else
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.empty"));
te.isDirty = true;
}
diff --git a/common/darkknight/jewelrycraft/config/ConfigHandler.java b/common/darkknight/jewelrycraft/config/ConfigHandler.java
index a9b3923..6a62ac6 100644
--- a/common/darkknight/jewelrycraft/config/ConfigHandler.java
+++ b/common/darkknight/jewelrycraft/config/ConfigHandler.java
@@ -18,7 +18,7 @@ public class ConfigHandler
public static int idJewelCraftingTable = 1753;
public static int ingotCoolingTime = 200;
- public static int ingotSmeltingTime = 1500;
+ public static int ingotMeltingTime = 1500;
public static int jewelryCraftingTime = 2000;
private static boolean isInitialized = false;
@@ -43,7 +43,7 @@ public class ConfigHandler
idJewelCraftingTable = config.getBlock("Jeweler's Crafting Table", idJewelCraftingTable).getInt();
ingotCoolingTime = config.get("timers", "Molder Ingot Cooling Time", ingotCoolingTime).getInt();
- ingotSmeltingTime = config.get("timers", "Ingot Smelting Time", ingotSmeltingTime).getInt();
+ ingotMeltingTime = config.get("timers", "Ingot Melting Time", ingotMeltingTime).getInt();
jewelryCraftingTime = config.get("timers", "Jewelry Crafting Time", jewelryCraftingTime).getInt();
config.save();
diff --git a/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java b/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java
index dc56d02..e68699b 100644
--- a/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java
+++ b/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java
@@ -86,7 +86,7 @@ public class TileEntityJewelrsCraftingTableRender extends TileEntitySpecialRende
}
}
tessellator.startDrawingQuads();
- for(float f=0; f<=1; f+=0.001){
+ for(float f=0; f<=1; f+=0.1){
tessellator.addVertexWithUV(3, 9, -5+f, minu, minv);
tessellator.addVertexWithUV(-2.2, 9, -5+f, maxu, minv);
tessellator.addVertexWithUV(-2.2, 14, -5+f, maxu, maxv);
diff --git a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
index 1d65eea..210b260 100644
--- a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
+++ b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java
@@ -49,15 +49,13 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
String texture = me.jewelBase.getIconIndex().getIconName().substring(me.jewelBase.getIconIndex().getIconName().lastIndexOf(":") + 1) + ".png";
ResourceLocation lava = new ResourceLocation(domain, "textures/items/" + texture);
Minecraft.getMinecraft().renderEngine.bindTexture(lava);
- me.jewelBase.getIconIndex().getInterpolatedU(0);
- int decal = -4;
- int decal2 = 4;
- double minu = me.jewelBase.getIconIndex().getInterpolatedU(decal2 + 48);
- double minv = me.jewelBase.getIconIndex().getInterpolatedV(-decal + 48);
- double maxu = me.jewelBase.getIconIndex().getInterpolatedU(256*decal2 + 48);
- double maxv = me.jewelBase.getIconIndex().getInterpolatedV(256*decal + 48);
+ double minu = me.jewelBase.getIconIndex().getMinU();
+ double minv = me.jewelBase.getIconIndex().getMinV();
+ double maxu = me.jewelBase.getIconIndex().getMaxU();
+ double maxv = me.jewelBase.getIconIndex().getMaxV();
GL11.glPushMatrix();
GL11.glScalef(1f / 16f, 1f / 16f, 1f / 16f);
+ GL11.glRotatef(180F, 0F, 1F, 0F);
GL11.glDisable(GL11.GL_LIGHTING);
ItemRing.addMetal(me.jewelBase, me.ringMetal);
int color = me.jewelBase.getItem().getColorFromItemStack(me.jewelBase, 0);
@@ -65,12 +63,15 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
float green = (float)(color >> 8 & 255) / 255.0F;
float blue = (float)(color & 255) / 255.0F;
if(!me.jewelBase.getDisplayName().contains("Ingot")) GL11.glColor4f(red, green, blue, 1F);
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV(5, 21, 5, minu, minv);
- tessellator.addVertexWithUV(-5, 21, 5, maxu, minv);
- tessellator.addVertexWithUV(-5, 21, -5, maxu, maxv);
- tessellator.addVertexWithUV(5, 21, -5, minu, maxv);
- tessellator.draw();
+ for(float f = 0; f <= 0.3; f+=0.01)
+ {
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV(5, 20.8 + f, 5, minu, minv);
+ tessellator.addVertexWithUV(-5, 20.8 + f, 5, maxu, minv);
+ tessellator.addVertexWithUV(-5, 20.8 + f, -5, maxu, maxv);
+ tessellator.addVertexWithUV(5, 20.8 + f, -5, minu, maxv);
+ tessellator.draw();
+ }
GL11.glColor4f(1, 1F, 1F, 1.0F);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
@@ -82,16 +83,14 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer
String texture = "textures/items/" + name + ".png";
ResourceLocation lava = new ResourceLocation("jewelrycraft", texture);
Minecraft.getMinecraft().renderEngine.bindTexture(lava);
- me.mold.getIconIndex().getInterpolatedU(0);
- int decal = -4;
- int decal2 = 4;
- 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);
+ double minu = me.mold.getIconIndex().getMinU();
+ double minv = me.mold.getIconIndex().getMinV();
+ double maxu = me.mold.getIconIndex().getMaxU();
+ double maxv = me.mold.getIconIndex().getMaxV();
GL11.glPushMatrix();
- GL11.glScalef(1f / 16f, 1f / 16f, 1f / 16f);
GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glScalef(1f / 16f, 1f / 16f, 1f / 16f);
+ GL11.glRotatef(180F, 0F, 1F, 0F);
for (float f = 0; f <= 2; f += 0.01)
{
diff --git a/resources/assets/jewelrycraft/lang/en_US.lang b/resources/assets/jewelrycraft/lang/en_US.lang
index fb109b4..efd1e57 100644
--- a/resources/assets/jewelrycraft/lang/en_US.lang
+++ b/resources/assets/jewelrycraft/lang/en_US.lang
@@ -25,6 +25,8 @@ chatmessage.jewelrycraft.smelter.molderhasnomold=The Molder doesn't have a mold
chatmessage.jewelrycraft.smelter.modlerhasitem=The Molder contains an item in it. Now you wouldn't want it to be destroyed, would you?
chatmessage.jewelrycraft.smelter.molderismissing=You need a Molder in front of this block in order to pour the molten metal!
chatmessage.jewelrycraft.smelter.nowsmeltingingot=Smelter is now smelting a %s.
+chatmessage.jewelrycraft.smelter.metalismelting=%s is being melted.
+chatmessage.jewelrycraft.smelter.empty=The Smelter is empty.
chatmessage.jewelrycraft.table.hasenditem=First take out the crafted jewel before inserting new stuff.
chatmessage.jewelrycraft.table.missingjewelryandmodifier=You need a ring and a modifier.
chatmessage.jewelrycraft.table.missingjewelry=You're missing a piece of jewelry.
diff --git a/resources/assets/jewelrycraft/textures/items/clayIngotMold.png b/resources/assets/jewelrycraft/textures/items/clayIngotMold.png
index b76fed2..0fecb22 100644
--- a/resources/assets/jewelrycraft/textures/items/clayIngotMold.png
+++ b/resources/assets/jewelrycraft/textures/items/clayIngotMold.png
Binary files differ
diff --git a/resources/assets/jewelrycraft/textures/items/ingotMold.png b/resources/assets/jewelrycraft/textures/items/ingotMold.png
index c8e9aa9..0575de5 100644
--- a/resources/assets/jewelrycraft/textures/items/ingotMold.png
+++ b/resources/assets/jewelrycraft/textures/items/ingotMold.png
Binary files differ
diff --git a/resources/assets/jewelrycraft/textures/items/ingotShadow.png.mcmeta b/resources/assets/jewelrycraft/textures/items/ingotShadow.png.mcmeta
deleted file mode 100644
index 09994da..0000000
--- a/resources/assets/jewelrycraft/textures/items/ingotShadow.png.mcmeta
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "animation": {
- "frametime": 4
- }
-} \ No newline at end of file
diff --git a/resources/assets/jewelrycraft/textures/items/necklace.png b/resources/assets/jewelrycraft/textures/items/necklace.png
index 21a3b1c..054744d 100644
--- a/resources/assets/jewelrycraft/textures/items/necklace.png
+++ b/resources/assets/jewelrycraft/textures/items/necklace.png
Binary files differ