diff --git a/1.11/gradle.properties b/1.11/gradle.properties index 1781441e..338814b5 100644 --- a/1.11/gradle.properties +++ b/1.11/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G mod_group=nmd.primal.forgecraft mod_name=ForgeCraft -mod_version=1.2.02 +mod_version=1.2.03 forge_version=13.20.0.2226 mcp_mappings=snapshot_20161220 mc_version=1.11.2 diff --git a/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java b/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java index 65b5acba..84d0297b 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java @@ -17,7 +17,7 @@ public class ModInfo { public static final String MOD_NAME = "Kitsu's ForgeCraft"; //public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_CHANNEL = MOD_ID; - public static final String MOD_VERSION = "1.2.02"; + public static final String MOD_VERSION = "1.2.03"; public static final String MC_VERSIONS = "[1.11.0, 1.12.0)"; public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2226,);" + "after:primal;"; diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java index 3b07ff42..4733150d 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java @@ -301,19 +301,19 @@ public class Anvil extends CustomContainerFacing { } if (tile.getSlotStack(counter).isEmpty()) { - System.out.println("Activating"); + //System.out.println("Activating"); if (pItem.getTagCompound().getInteger("type") == 6) { - System.out.println("Tongs meta = 6"); + //System.out.println("Tongs meta = 6"); tile.setSlotStack((counter), new ItemStack(ModItems.ironingotballhot, 1)); pItem.getTagCompound().setInteger("type", 0); //return true; } if (pItem.getTagCompound().getInteger("type") == 7) { - System.out.println("Tongs meta = 7"); + //System.out.println("Tongs meta = 7"); tile.setSlotStack((counter), new ItemStack(ModItems.ironchunkhot, 1)); pItem.getTagCompound().setInteger("type", 0); - System.out.println(counter); - System.out.println(tile.getSlotStack(counter)); + ///System.out.println(counter); + //System.out.println(tile.getSlotStack(counter)); //return true; } if (pItem.getTagCompound().getInteger("type") == 8) { @@ -454,9 +454,9 @@ public class Anvil extends CustomContainerFacing { } if (pItem.getItem().equals(Items.DIAMOND)) { - System.out.println("It Is Diamond"); + //System.out.println("It Is Diamond"); if (tile.getSlotStack(counter).isEmpty()) { - System.out.println("Slot is empty"); + //System.out.println("Slot is empty"); tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1)); pItem.shrink(1); return true; @@ -542,9 +542,9 @@ public class Anvil extends CustomContainerFacing { @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - if(!worldIn.isRemote) { + //if(!worldIn.isRemote) { worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2); - } + //} } @Override diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java index 7e0337a0..8963b111 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Bloomery.java @@ -25,6 +25,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import nmd.primal.forgecraft.CommonUtils; import nmd.primal.forgecraft.ModInfo; +import nmd.primal.forgecraft.crafting.BloomeryCrafting; import nmd.primal.forgecraft.tiles.TileBloomery; import java.util.Random; @@ -77,9 +78,27 @@ public class Bloomery extends CustomContainerFacing implements ITileEntityProvid } if(!player.isSneaking()){ if(world.getBlockState(pos).getValue(ACTIVE) == true){ - Integer tempInt = tile.getHeat(); - String tempString = tempInt.toString(); - ITextComponent itextcomponent = new TextComponentString(tempString); + Integer bloomeryHeat = tile.getHeat(); + Integer idealTemp = null; + Integer cookCounter = tile.getCookCounter(); + Integer idealCookTime = null; + Integer remainingTime = null; + + String stringBloomeryHeat = bloomeryHeat.toString(); + String stringIdealTemp = ""; + String stringRemainingTime = ""; + + BloomeryCrafting recipe = BloomeryCrafting.getRecipe(tile.getSlotStack(1)); + if(recipe != null) { + idealTemp = recipe.getHeatThreshold(); + idealCookTime = recipe.getIdealTime(); + stringIdealTemp = idealTemp.toString(); + remainingTime = idealCookTime - cookCounter; + stringRemainingTime = remainingTime.toString(); + + } + + ITextComponent itextcomponent = new TextComponentString("Current Temp: " + stringBloomeryHeat + " Ideal Temp: " + stringIdealTemp + " Ticks Remaining: " + stringRemainingTime); player.sendStatusMessage(itextcomponent, true); //System.out.println(pos); return true; diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java index b0da2023..c2cf328e 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Forge.java @@ -199,6 +199,16 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/ } } } + //Needs Ore Dictionary Compat + if (pItem.getItem().equals(new ItemStack(Items.IRON_INGOT).getItem())) { + for (int i = 2; i < 7; i++) { + if (tile.getSlotStack(i).isEmpty()) { + tile.setSlotStack(i, new ItemStack(Items.IRON_INGOT, 1)); + pItem.shrink(1); + return true; + } + } + } if(pItem.getItem() instanceof ToolPart){ if(tile.getSlotStack(4).isEmpty()){ diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java index f0421221..4a531173 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java @@ -86,7 +86,7 @@ public class PistonBellows extends CustomContainerFacing { if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); tile.updateBlock(); tile.markDirty(); return true; @@ -99,9 +99,9 @@ public class PistonBellows extends CustomContainerFacing { && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){ - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); } tile.updateBlock(); tile.markDirty(); @@ -117,7 +117,7 @@ public class PistonBellows extends CustomContainerFacing { if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); tile.updateBlock(); tile.markDirty(); return true; @@ -130,9 +130,9 @@ public class PistonBellows extends CustomContainerFacing { && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){ - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); } tile.updateBlock(); tile.markDirty(); @@ -148,7 +148,7 @@ public class PistonBellows extends CustomContainerFacing { if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); tile.updateBlock(); tile.markDirty(); return true; @@ -161,9 +161,9 @@ public class PistonBellows extends CustomContainerFacing { && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){ - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); } tile.updateBlock(); tile.markDirty(); @@ -179,7 +179,7 @@ public class PistonBellows extends CustomContainerFacing { if ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); tile.updateBlock(); tile.markDirty(); return true; @@ -192,9 +192,9 @@ public class PistonBellows extends CustomContainerFacing { && (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){ - tile.setHeat(tile.getHeat() + 25); + tile.setHeat(tile.getHeat() + 50); } tile.updateBlock(); tile.markDirty(); diff --git a/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java b/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java index e1aae3c0..02a05ed4 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java @@ -311,8 +311,8 @@ public class ItemStoneTongs extends Item { else return EnumActionResult.FAIL; //System.out.println(itemstack.getTagCompound().getInteger("type")); } - System.out.println(player.getHeldItem(hand).getTagCompound().getInteger("type")); - return EnumActionResult.FAIL; + //System.out.println(player.getHeldItem(hand).getTagCompound().getInteger("type")); + return EnumActionResult.SUCCESS; } @@ -320,8 +320,8 @@ public class ItemStoneTongs extends Item { @SideOnly(Side.CLIENT) public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean advanced) { - tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags")); - tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type")); + //tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags")); + //tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type")); } } diff --git a/1.11/src/main/java/nmd/primal/forgecraft/renders/TileAnvilRender.java b/1.11/src/main/java/nmd/primal/forgecraft/renders/TileAnvilRender.java index 47509f3d..3e4ad82e 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/renders/TileAnvilRender.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/renders/TileAnvilRender.java @@ -93,7 +93,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) || (tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) || - tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) + tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) || + tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) || + tile.getSlotStack(counter).getItem().equals(Items.EMERALD) ){ GL11.glPushMatrix(); @@ -169,7 +171,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) || (tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) || - tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) + tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) || + tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) || + tile.getSlotStack(counter).getItem().equals(Items.EMERALD) ){ GL11.glPushMatrix(); GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getReverseZ(i) ); @@ -244,7 +248,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) || (tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) || - tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) + tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) || + tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) || + tile.getSlotStack(counter).getItem().equals(Items.EMERALD) ){ GL11.glPushMatrix(); GL11.glTranslated( tile.getNormalX(a), -0.49D, tile.getReverseZ(i) ); @@ -322,7 +328,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) || (tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) || - tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) + tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) || + tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) || + tile.getSlotStack(counter).getItem().equals(Items.EMERALD) ){ GL11.glPushMatrix(); GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getNormalZ(i) ); diff --git a/1.11/src/main/java/nmd/primal/forgecraft/renders/TileForgeRender.java b/1.11/src/main/java/nmd/primal/forgecraft/renders/TileForgeRender.java index 975563bc..6c01ea02 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/renders/TileForgeRender.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/renders/TileForgeRender.java @@ -6,6 +6,7 @@ import net.minecraft.client.renderer.RenderItem; import net.minecraft.client.renderer.block.model.ItemCameraTransforms; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.init.Items; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; @@ -66,11 +67,23 @@ public class TileForgeRender extends TileEntitySpecialRenderer GL11.glTranslated(0.0F, 0.1D, 0.0F); if(i == 2){ GL11.glTranslated(-0.3, -0.05D, -0.3D); + if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){ + GL11.glScalef(0.5f, 0.5f, 0.5f); + GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f); + } } if(i == 3){ GL11.glTranslated(-0.3, -0.05D, 0.3D); + if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){ + GL11.glScalef(0.5f, 0.5f, 0.5f); + GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f); + } } if(i == 4){ + if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){ + GL11.glScalef(0.5f, 0.5f, 0.5f); + GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f); + } //GL11.glScalef(0.6F, 0.6F, 0.6F); if(tile.getSlotStack(i).getItem() == ModItems.pickaxehead) { GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F); @@ -89,9 +102,17 @@ public class TileForgeRender extends TileEntitySpecialRenderer } if(i == 5){ GL11.glTranslated(0.3, -0.05D, -0.3D); + if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){ + GL11.glScalef(0.5f, 0.5f, 0.5f); + GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f); + } } if(i == 6){ GL11.glTranslated(0.3, -0.05D, 0.3D); + if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){ + GL11.glScalef(0.5f, 0.5f, 0.5f); + GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f); + } } renderItem.renderItem(tile.getSlotStack(i), ItemCameraTransforms.TransformType.FIXED); @@ -100,24 +121,6 @@ public class TileForgeRender extends TileEntitySpecialRenderer } } - /*if (!stack1.isEmpty()) { - int stackRotation = stack1.getCount(); - GL11.glPushMatrix(); - GL11.glScalef(scale, scale, scale); - GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); - renderItem.renderItem(stack1, renderItem.getItemModelMesher().getItemModel(stack1)); - GL11.glPopMatrix(); - for(int i = 0; i < Math.ceil(stackRotation/8) + 1; i++){ - GL11.glPushMatrix(); - GL11.glScalef(scale, scale, scale); - GL11.glRotated(45.0F * i, 0.0F, 1.0F, 0.0F); - GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); - GL11.glTranslated(xTrans, yTrans, 0.0D); - renderItem.renderItem(stack1, renderItem.getItemModelMesher().getItemModel(stack1)); - GL11.glPopMatrix(); - } - }*/ - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY); GL11.glPopMatrix(); } diff --git a/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java b/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java index 21c96b78..7f1b8c91 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java @@ -40,7 +40,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer 30){ - animateIteration = 30 - (iteration - 30); + if(iteration > 15){ + animateIteration = 15 - (iteration - 15); if(animateIteration < 0){ animateIteration = 0; } // } - if(iteration > 61){ + if(iteration > 31){ iteration = 0; animateIteration = 0; world.setBlockState(this.getPos(), state.withProperty(PistonBellows.ACTIVE, false), 3); diff --git a/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg b/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg index b6ee9d1f..135a2ddf 100644 Binary files a/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg and b/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg differ diff --git a/1.11/src/main/resources/mcmod.info b/1.11/src/main/resources/mcmod.info index bae28be2..acf78295 100644 --- a/1.11/src/main/resources/mcmod.info +++ b/1.11/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ "modid": "forgecraft", "name": "Kitsu's Forgecraft", "description": "Forged with sweat and blood", - "version": "1.2.02", + "version": "1.2.03", "mcversion": "1.11.2", "url": "", "updateUrl": "",