Need More logic for the forge, double check item renderers, double check lang file, clean out old IR files, start on the forge hammer and inlay hammer
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -16,15 +16,12 @@ public static final Hashtable<Block, Integer> blockToStore = new Hashtable <Bloc
|
|||||||
put(ModBlocks.crucibleLapis, 3);
|
put(ModBlocks.crucibleLapis, 3);
|
||||||
put(ModBlocks.crucibleRedstone, 4);
|
put(ModBlocks.crucibleRedstone, 4);
|
||||||
put(ModBlocks.crucibleWootz, 5);
|
put(ModBlocks.crucibleWootz, 5);
|
||||||
//put(ModBlocks.lapisIngot, 6);
|
put(ModBlocks.lapisIngot, 6);
|
||||||
//put(ModBlocks.redstoneIngot, 7);
|
put(ModBlocks.redstoneIngot, 7);
|
||||||
//put(ModBlocks.damascusIngot, 8);
|
put(ModBlocks.damascus, 8);
|
||||||
//put(ModBlocks.myIronIngot, 9);
|
put(ModBlocks.refinedIron, 9);
|
||||||
//put(ModBlocks.hotIronBlock, 10);
|
put(ModBlocks.ironPlate, 10);
|
||||||
//put(ModBlocks.hotDamascusIngot, 11);
|
|
||||||
//put(ModBlocks.hotIronPlate, 12);
|
|
||||||
//put(ModBlocks.hotLapisIngot, 13);
|
|
||||||
//put(ModBlocks.hotRedstoneIngot, 14);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public static final Hashtable<Integer, Block> blockToGet = new Hashtable <Integer, Block>(){{
|
public static final Hashtable<Integer, Block> blockToGet = new Hashtable <Integer, Block>(){{
|
||||||
@@ -34,11 +31,11 @@ public static final Hashtable<Integer, Block> blockToGet = new Hashtable <Intege
|
|||||||
put(3, ModBlocks.crucibleLapis);
|
put(3, ModBlocks.crucibleLapis);
|
||||||
put(4, ModBlocks.crucibleRedstone);
|
put(4, ModBlocks.crucibleRedstone);
|
||||||
put(5, ModBlocks.crucibleWootz);
|
put(5, ModBlocks.crucibleWootz);
|
||||||
//put(6, ModBlocks.lapisIngot);
|
put(6, ModBlocks.lapisIngot);
|
||||||
//put(7, ModBlocks.redstoneIngot);
|
put(7, ModBlocks.redstoneIngot);
|
||||||
//put(8, ModBlocks.damascusIngot);
|
put(8, ModBlocks.damascus);
|
||||||
//put(9, ModBlocks.myIronIngot);
|
put(9, ModBlocks.refinedIron);
|
||||||
//put(10, ModBlocks.hotIronBlock);
|
put(10, ModBlocks.ironPlate);
|
||||||
//put(11, ModBlocks.hotDamascusIngot);
|
//put(11, ModBlocks.hotDamascusIngot);
|
||||||
//put(12, ModBlocks.hotIronPlate);
|
//put(12, ModBlocks.hotIronPlate);
|
||||||
//put(13, ModBlocks.hotLapisIngot);
|
//put(13, ModBlocks.hotLapisIngot);
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
package com.kitsu.medievalcraft.item.craftingtools;
|
package com.kitsu.medievalcraft.item.craftingtools;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.kitsu.medievalcraft.Main;
|
|
||||||
import com.kitsu.medievalcraft.block.crucible.CrucibleBase;
|
|
||||||
import com.kitsu.medievalcraft.item.TongsDamageTable;
|
|
||||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleBase;
|
|
||||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre;
|
|
||||||
import com.kitsu.medievalcraft.util.CustomTab;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import com.kitsu.medievalcraft.Main;
|
||||||
|
import com.kitsu.medievalcraft.block.crucible.CrucibleBase;
|
||||||
|
import com.kitsu.medievalcraft.block.ingots.IngotBase;
|
||||||
|
import com.kitsu.medievalcraft.item.TongsDamageTable;
|
||||||
|
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleBase;
|
||||||
|
import com.kitsu.medievalcraft.tileents.ingots.TileIngotBase;
|
||||||
|
import com.kitsu.medievalcraft.util.CustomTab;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
public class SlottedTongs extends Item {
|
public class SlottedTongs extends Item {
|
||||||
|
|
||||||
private String name = "slottedTongs";
|
private String name = "slottedTongs";
|
||||||
@@ -43,9 +42,16 @@ public class SlottedTongs extends Item {
|
|||||||
if(stack.getItemDamage()!=0){
|
if(stack.getItemDamage()!=0){
|
||||||
if(world.getBlock(x, y+1, z).equals(Blocks.air)){
|
if(world.getBlock(x, y+1, z).equals(Blocks.air)){
|
||||||
world.setBlock(x, y+1, z, TongsDamageTable.blockToGet.get(stack.getItemDamage()), 0, 2);
|
world.setBlock(x, y+1, z, TongsDamageTable.blockToGet.get(stack.getItemDamage()), 0, 2);
|
||||||
TileCrucibleBase tile = (TileCrucibleBase) world.getTileEntity(x, y+1, z);
|
if(world.getBlock(x, y+1, z) instanceof CrucibleBase){
|
||||||
tile.hot=true;
|
TileCrucibleBase tile = (TileCrucibleBase) world.getTileEntity(x, y+1, z);
|
||||||
stack.setItemDamage(0);
|
tile.hot=true;
|
||||||
|
stack.setItemDamage(0);
|
||||||
|
}
|
||||||
|
if(world.getBlock(x, y+1, z) instanceof IngotBase){
|
||||||
|
TileIngotBase tile = (TileIngotBase) world.getTileEntity(x, y+1, z);
|
||||||
|
tile.hot=true;
|
||||||
|
stack.setItemDamage(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,9 +64,14 @@ public class SlottedTongs extends Item {
|
|||||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if((world.getBlock(x, y, z) instanceof IngotBase) && (player.isSneaking())){
|
||||||
if(world.isRemote){
|
TileIngotBase tile = (TileIngotBase) world.getTileEntity(x, y, z);
|
||||||
//System.out.println(stack.getItemDamage());
|
Block tempBlock = world.getBlock(x, y, z);
|
||||||
|
if(tile.hot==true){
|
||||||
|
this.setDamage(stack, TongsDamageTable.blockToStore.get(tempBlock));
|
||||||
|
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -22,10 +22,13 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
|
|
||||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||||
public static final ResourceLocation CRUCIBLETEXT = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
public static final ResourceLocation CRUCIBLETEXT = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||||
|
|
||||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyLapisBlock.png");
|
public static final ResourceLocation LAPIS = new ResourceLocation("kitsumedievalcraft:models/MyHotLapisBlock.png");
|
||||||
|
public static final ResourceLocation REDSTONE = new ResourceLocation("kitsumedievalcraft:models/MyHotRedstoneBlock.png");
|
||||||
|
public static final ResourceLocation DAMASCUS = new ResourceLocation("kitsumedievalcraft:models/HotDamascusIngot.png");
|
||||||
|
public static final ResourceLocation REFINEDIRON = new ResourceLocation("kitsumedievalcraft:models/HotIronIngotBlock.png");
|
||||||
|
public static final ResourceLocation IRON_PLATE = new ResourceLocation("kitsumedievalcraft:models/HotIronPlate.png");
|
||||||
|
|
||||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||||
public IModelCustom modeltc = AdvancedModelLoader.loadModel(MODEL_TONGS_CRUCIBLE);
|
public IModelCustom modeltc = AdvancedModelLoader.loadModel(MODEL_TONGS_CRUCIBLE);
|
||||||
@@ -98,7 +101,7 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||||
modeltc.renderAll();
|
modeltc.renderAll();
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
float scale1 = 0.6F;
|
float scale1 = 0.6F;
|
||||||
GL11.glScalef(scale1, scale1, scale1);
|
GL11.glScalef(scale1, scale1, scale1);
|
||||||
@@ -108,8 +111,11 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
modelC.renderAll();
|
modelC.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stack.getItemDamage()==6){
|
if(stack.getItemDamage()==6||
|
||||||
|
stack.getItemDamage()==7||
|
||||||
|
stack.getItemDamage()==8||
|
||||||
|
stack.getItemDamage()==9){
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||||
modelti.renderAll();
|
modelti.renderAll();
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
@@ -117,11 +123,14 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
GL11.glScalef(scale1, scale1, scale1);
|
GL11.glScalef(scale1, scale1, scale1);
|
||||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
if(stack.getItemDamage()==6){Minecraft.getMinecraft().renderEngine.bindTexture(LAPIS);}
|
||||||
|
if(stack.getItemDamage()==7){Minecraft.getMinecraft().renderEngine.bindTexture(REDSTONE);}
|
||||||
|
if(stack.getItemDamage()==8){Minecraft.getMinecraft().renderEngine.bindTexture(DAMASCUS);}
|
||||||
|
if(stack.getItemDamage()==9){Minecraft.getMinecraft().renderEngine.bindTexture(REFINEDIRON);}
|
||||||
modelingot.renderAll();
|
modelingot.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
@@ -150,19 +159,25 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
modelC.renderAll();
|
modelC.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stack.getItemDamage()==6){
|
if(stack.getItemDamage()==6||
|
||||||
|
stack.getItemDamage()==7||
|
||||||
|
stack.getItemDamage()==8||
|
||||||
|
stack.getItemDamage()==9){
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||||
modelti.renderAll();
|
modelti.renderAll();
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
float scale = 1.1F;
|
float scale = 1.1F;
|
||||||
GL11.glScalef(scale, scale, scale);
|
GL11.glScalef(scale, scale, scale);
|
||||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
if(stack.getItemDamage()==6){Minecraft.getMinecraft().renderEngine.bindTexture(LAPIS);}
|
||||||
|
if(stack.getItemDamage()==7){Minecraft.getMinecraft().renderEngine.bindTexture(REDSTONE);}
|
||||||
|
if(stack.getItemDamage()==8){Minecraft.getMinecraft().renderEngine.bindTexture(DAMASCUS);}
|
||||||
|
if(stack.getItemDamage()==9){Minecraft.getMinecraft().renderEngine.bindTexture(REFINEDIRON);}
|
||||||
modelingot.renderAll();
|
modelingot.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
@@ -193,19 +208,25 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
modelC.renderAll();
|
modelC.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stack.getItemDamage()==6){
|
if(stack.getItemDamage()==6||
|
||||||
|
stack.getItemDamage()==7||
|
||||||
|
stack.getItemDamage()==8||
|
||||||
|
stack.getItemDamage()==9){
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||||
modelti.renderAll();
|
modelti.renderAll();
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
float scale = 0.6F;
|
float scale = 0.6F;
|
||||||
GL11.glScalef(scale, scale, scale);
|
GL11.glScalef(scale, scale, scale);
|
||||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
if(stack.getItemDamage()==6){Minecraft.getMinecraft().renderEngine.bindTexture(LAPIS);}
|
||||||
|
if(stack.getItemDamage()==7){Minecraft.getMinecraft().renderEngine.bindTexture(REDSTONE);}
|
||||||
|
if(stack.getItemDamage()==8){Minecraft.getMinecraft().renderEngine.bindTexture(DAMASCUS);}
|
||||||
|
if(stack.getItemDamage()==9){Minecraft.getMinecraft().renderEngine.bindTexture(REFINEDIRON);}
|
||||||
modelingot.renderAll();
|
modelingot.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
@@ -229,25 +250,31 @@ public class IRSlottedTongs implements IItemRenderer {
|
|||||||
modelC.renderAll();
|
modelC.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
if((stack.getItemDamage()==6)){
|
/*if((stack.getItemDamage()==6)){
|
||||||
float scale = 1.1F;
|
float scale = 1.1F;
|
||||||
GL11.glScalef(scale, scale, scale);
|
GL11.glScalef(scale, scale, scale);
|
||||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
Minecraft.getMinecraft().renderEngine.bindTexture(LAPIS);
|
||||||
modelingot.renderAll();
|
modelingot.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}*/
|
||||||
if(stack.getItemDamage()==6){
|
if(stack.getItemDamage()==6||
|
||||||
|
stack.getItemDamage()==7||
|
||||||
|
stack.getItemDamage()==8||
|
||||||
|
stack.getItemDamage()==9){
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||||
modelti.renderAll();
|
modelti.renderAll();
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
//Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||||
model.renderAll();
|
//model.renderAll();
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
float scale = 0.6F;
|
float scale = 0.6F;
|
||||||
GL11.glScalef(scale, scale, scale);
|
GL11.glScalef(scale, scale, scale);
|
||||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
if(stack.getItemDamage()==6){Minecraft.getMinecraft().renderEngine.bindTexture(LAPIS);}
|
||||||
|
if(stack.getItemDamage()==7){Minecraft.getMinecraft().renderEngine.bindTexture(REDSTONE);}
|
||||||
|
if(stack.getItemDamage()==8){Minecraft.getMinecraft().renderEngine.bindTexture(DAMASCUS);}
|
||||||
|
if(stack.getItemDamage()==9){Minecraft.getMinecraft().renderEngine.bindTexture(REFINEDIRON);}
|
||||||
modelingot.renderAll();
|
modelingot.renderAll();
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user