Fixed StoneTongs and anvil cooperation, iron ingots can now be cooked
This commit is contained in:
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
|
|
||||||
mod_group=nmd.primal.forgecraft
|
mod_group=nmd.primal.forgecraft
|
||||||
mod_name=ForgeCraft
|
mod_name=ForgeCraft
|
||||||
mod_version=1.2.02
|
mod_version=1.2.03
|
||||||
forge_version=13.20.0.2226
|
forge_version=13.20.0.2226
|
||||||
mcp_mappings=snapshot_20161220
|
mcp_mappings=snapshot_20161220
|
||||||
mc_version=1.11.2
|
mc_version=1.11.2
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class ModInfo {
|
|||||||
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
||||||
//public static final String MOD_PREFIX = MOD_ID + ":";
|
//public static final String MOD_PREFIX = MOD_ID + ":";
|
||||||
public static final String MOD_CHANNEL = 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 MC_VERSIONS = "[1.11.0, 1.12.0)";
|
||||||
public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2226,);"
|
public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2226,);"
|
||||||
+ "after:primal;";
|
+ "after:primal;";
|
||||||
|
|||||||
@@ -301,19 +301,19 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tile.getSlotStack(counter).isEmpty()) {
|
if (tile.getSlotStack(counter).isEmpty()) {
|
||||||
System.out.println("Activating");
|
//System.out.println("Activating");
|
||||||
if (pItem.getTagCompound().getInteger("type") == 6) {
|
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));
|
tile.setSlotStack((counter), new ItemStack(ModItems.ironingotballhot, 1));
|
||||||
pItem.getTagCompound().setInteger("type", 0);
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
//return true;
|
//return true;
|
||||||
}
|
}
|
||||||
if (pItem.getTagCompound().getInteger("type") == 7) {
|
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));
|
tile.setSlotStack((counter), new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
pItem.getTagCompound().setInteger("type", 0);
|
pItem.getTagCompound().setInteger("type", 0);
|
||||||
System.out.println(counter);
|
///System.out.println(counter);
|
||||||
System.out.println(tile.getSlotStack(counter));
|
//System.out.println(tile.getSlotStack(counter));
|
||||||
//return true;
|
//return true;
|
||||||
}
|
}
|
||||||
if (pItem.getTagCompound().getInteger("type") == 8) {
|
if (pItem.getTagCompound().getInteger("type") == 8) {
|
||||||
@@ -454,9 +454,9 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pItem.getItem().equals(Items.DIAMOND)) {
|
if (pItem.getItem().equals(Items.DIAMOND)) {
|
||||||
System.out.println("It Is Diamond");
|
//System.out.println("It Is Diamond");
|
||||||
if (tile.getSlotStack(counter).isEmpty()) {
|
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));
|
tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
|
||||||
pItem.shrink(1);
|
pItem.shrink(1);
|
||||||
return true;
|
return true;
|
||||||
@@ -542,9 +542,9 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
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);
|
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import nmd.primal.forgecraft.CommonUtils;
|
import nmd.primal.forgecraft.CommonUtils;
|
||||||
import nmd.primal.forgecraft.ModInfo;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
|
||||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@@ -77,9 +78,27 @@ public class Bloomery extends CustomContainerFacing implements ITileEntityProvid
|
|||||||
}
|
}
|
||||||
if(!player.isSneaking()){
|
if(!player.isSneaking()){
|
||||||
if(world.getBlockState(pos).getValue(ACTIVE) == true){
|
if(world.getBlockState(pos).getValue(ACTIVE) == true){
|
||||||
Integer tempInt = tile.getHeat();
|
Integer bloomeryHeat = tile.getHeat();
|
||||||
String tempString = tempInt.toString();
|
Integer idealTemp = null;
|
||||||
ITextComponent itextcomponent = new TextComponentString(tempString);
|
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);
|
player.sendStatusMessage(itextcomponent, true);
|
||||||
//System.out.println(pos);
|
//System.out.println(pos);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -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(pItem.getItem() instanceof ToolPart){
|
||||||
if(tile.getSlotStack(4).isEmpty()){
|
if(tile.getSlotStack(4).isEmpty()){
|
||||||
|
|||||||
@@ -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 ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -99,9 +99,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) {
|
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.EAST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//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){
|
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
}
|
}
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
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 ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -130,9 +130,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) {
|
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.WEST)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//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){
|
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
}
|
}
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
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 ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -161,9 +161,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) {
|
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.SOUTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//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){
|
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
}
|
}
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
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 ((world.getBlockState(tempPos).getValue(Forge.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
return true;
|
return true;
|
||||||
@@ -192,9 +192,9 @@ public class PistonBellows extends CustomContainerFacing {
|
|||||||
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) {
|
&& (world.getBlockState(tempPos).getValue(Bloomery.FACING) == EnumFacing.NORTH)) {
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
//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){
|
if(world.getBlockState(tempPos).getValue(Bloomery.COVERED) == true){
|
||||||
tile.setHeat(tile.getHeat() + 25);
|
tile.setHeat(tile.getHeat() + 50);
|
||||||
}
|
}
|
||||||
tile.updateBlock();
|
tile.updateBlock();
|
||||||
tile.markDirty();
|
tile.markDirty();
|
||||||
|
|||||||
@@ -311,8 +311,8 @@ public class ItemStoneTongs extends Item {
|
|||||||
else return EnumActionResult.FAIL;
|
else return EnumActionResult.FAIL;
|
||||||
//System.out.println(itemstack.getTagCompound().getInteger("type"));
|
//System.out.println(itemstack.getTagCompound().getInteger("type"));
|
||||||
}
|
}
|
||||||
System.out.println(player.getHeldItem(hand).getTagCompound().getInteger("type"));
|
//System.out.println(player.getHeldItem(hand).getTagCompound().getInteger("type"));
|
||||||
return EnumActionResult.FAIL;
|
return EnumActionResult.SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,8 +320,8 @@ public class ItemStoneTongs extends Item {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced)
|
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||||
{
|
{
|
||||||
tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags"));
|
//tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags"));
|
||||||
tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type"));
|
//tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
|||||||
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
|
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(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
|
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.glPushMatrix();
|
||||||
|
|
||||||
@@ -169,7 +171,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
|||||||
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
|
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(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
|
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.glPushMatrix();
|
||||||
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getReverseZ(i) );
|
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getReverseZ(i) );
|
||||||
@@ -244,7 +248,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
|||||||
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
|
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(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
|
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.glPushMatrix();
|
||||||
GL11.glTranslated( tile.getNormalX(a), -0.49D, tile.getReverseZ(i) );
|
GL11.glTranslated( tile.getNormalX(a), -0.49D, tile.getReverseZ(i) );
|
||||||
@@ -322,7 +328,9 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
|||||||
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
|
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(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
|
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.glPushMatrix();
|
||||||
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getNormalZ(i) );
|
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getNormalZ(i) );
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import net.minecraft.client.renderer.RenderItem;
|
|||||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||||
import net.minecraft.client.renderer.texture.TextureMap;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
@@ -66,11 +67,23 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
|||||||
GL11.glTranslated(0.0F, 0.1D, 0.0F);
|
GL11.glTranslated(0.0F, 0.1D, 0.0F);
|
||||||
if(i == 2){
|
if(i == 2){
|
||||||
GL11.glTranslated(-0.3, -0.05D, -0.3D);
|
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){
|
if(i == 3){
|
||||||
GL11.glTranslated(-0.3, -0.05D, 0.3D);
|
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(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);
|
//GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||||
if(tile.getSlotStack(i).getItem() == ModItems.pickaxehead) {
|
if(tile.getSlotStack(i).getItem() == ModItems.pickaxehead) {
|
||||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
@@ -89,9 +102,17 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
|||||||
}
|
}
|
||||||
if(i == 5){
|
if(i == 5){
|
||||||
GL11.glTranslated(0.3, -0.05D, -0.3D);
|
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){
|
if(i == 6){
|
||||||
GL11.glTranslated(0.3, -0.05D, 0.3D);
|
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);
|
renderItem.renderItem(tile.getSlotStack(i), ItemCameraTransforms.TransformType.FIXED);
|
||||||
@@ -100,24 +121,6 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*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);
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
|||||||
GL11.glRotated(0, 0.0F, 1.0F, 0.0F);
|
GL11.glRotated(0, 0.0F, 1.0F, 0.0F);
|
||||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||||
//System.out.println(tile.getAnimation());
|
//System.out.println(tile.getAnimation());
|
||||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/75);
|
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||||
}
|
}
|
||||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||||
@@ -50,7 +50,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
|||||||
GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
||||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||||
//System.out.println(tile.getAnimation());
|
//System.out.println(tile.getAnimation());
|
||||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/80);
|
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||||
}
|
}
|
||||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||||
@@ -61,7 +61,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
|||||||
GL11.glRotated(270, 0.0F, 1.0F, 0.0F);
|
GL11.glRotated(270, 0.0F, 1.0F, 0.0F);
|
||||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||||
//System.out.println(tile.getAnimation());
|
//System.out.println(tile.getAnimation());
|
||||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/80);
|
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||||
}
|
}
|
||||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||||
@@ -72,7 +72,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
|||||||
GL11.glRotated(90, 0.0F, 1.0F, 0.0F);
|
GL11.glRotated(90, 0.0F, 1.0F, 0.0F);
|
||||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||||
//System.out.println(tile.getAnimation());
|
//System.out.println(tile.getAnimation());
|
||||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/80);
|
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||||
}
|
}
|
||||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||||
|
|||||||
@@ -124,6 +124,9 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
|||||||
public void setHeat(int newHeat){
|
public void setHeat(int newHeat){
|
||||||
this.heat = newHeat;
|
this.heat = newHeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCookCounter() {return this.cookCounter; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSlotLimit() {
|
public int getSlotLimit() {
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -23,18 +23,18 @@ public class TilePistonBellows extends BaseTile implements ITickable{
|
|||||||
IBlockState state = world.getBlockState(this.pos);
|
IBlockState state = world.getBlockState(this.pos);
|
||||||
if (world.getBlockState(this.getPos()).getValue(PistonBellows.ACTIVE)) {
|
if (world.getBlockState(this.getPos()).getValue(PistonBellows.ACTIVE)) {
|
||||||
iteration++;
|
iteration++;
|
||||||
if(iteration <= 30){
|
if(iteration <= 15){
|
||||||
animateIteration++;
|
animateIteration++;
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
if(iteration > 30){
|
if(iteration > 15){
|
||||||
animateIteration = 30 - (iteration - 30);
|
animateIteration = 15 - (iteration - 15);
|
||||||
if(animateIteration < 0){
|
if(animateIteration < 0){
|
||||||
animateIteration = 0;
|
animateIteration = 0;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
if(iteration > 61){
|
if(iteration > 31){
|
||||||
iteration = 0;
|
iteration = 0;
|
||||||
animateIteration = 0;
|
animateIteration = 0;
|
||||||
world.setBlockState(this.getPos(), state.withProperty(PistonBellows.ACTIVE, false), 3);
|
world.setBlockState(this.getPos(), state.withProperty(PistonBellows.ACTIVE, false), 3);
|
||||||
|
|||||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
|||||||
"modid": "forgecraft",
|
"modid": "forgecraft",
|
||||||
"name": "Kitsu's Forgecraft",
|
"name": "Kitsu's Forgecraft",
|
||||||
"description": "Forged with sweat and blood",
|
"description": "Forged with sweat and blood",
|
||||||
"version": "1.2.02",
|
"version": "1.2.03",
|
||||||
"mcversion": "1.11.2",
|
"mcversion": "1.11.2",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user