diff --git a/resources/assets/tinker/textures/blocks/chest_bottom.png b/resources/assets/tinker/textures/blocks/chest_bottom.png new file mode 100644 index 00000000..e700c604 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/chest_bottom.png differ diff --git a/resources/assets/tinker/textures/blocks/chestslab_bottom.png b/resources/assets/tinker/textures/blocks/chestslab_bottom.png new file mode 100644 index 00000000..a65b9f52 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/chestslab_bottom.png differ diff --git a/resources/assets/tinker/textures/blocks/chestslab_front.png b/resources/assets/tinker/textures/blocks/chestslab_front.png new file mode 100644 index 00000000..ffb2bffb Binary files /dev/null and b/resources/assets/tinker/textures/blocks/chestslab_front.png differ diff --git a/resources/assets/tinker/textures/blocks/furnacechest_front.png b/resources/assets/tinker/textures/blocks/furnacechest_front.png new file mode 100644 index 00000000..1112a3b2 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/furnacechest_front.png differ diff --git a/resources/assets/tinker/textures/blocks/furnacechest_front_active.png b/resources/assets/tinker/textures/blocks/furnacechest_front_active.png new file mode 100644 index 00000000..cb21d858 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/furnacechest_front_active.png differ diff --git a/resources/assets/tinker/textures/blocks/furnacechest_side.png b/resources/assets/tinker/textures/blocks/furnacechest_side.png new file mode 100644 index 00000000..163fbc78 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/furnacechest_side.png differ diff --git a/resources/assets/tinker/textures/blocks/furnaceslab_front.png b/resources/assets/tinker/textures/blocks/furnaceslab_front.png new file mode 100644 index 00000000..1dad38f8 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/furnaceslab_front.png differ diff --git a/resources/assets/tinker/textures/blocks/furnaceslab_front_active.png b/resources/assets/tinker/textures/blocks/furnaceslab_front_active.png new file mode 100644 index 00000000..d55de2ad Binary files /dev/null and b/resources/assets/tinker/textures/blocks/furnaceslab_front_active.png differ diff --git a/resources/assets/tinker/textures/blocks/furnaceslab_side.png b/resources/assets/tinker/textures/blocks/furnaceslab_side.png new file mode 100644 index 00000000..d4517bff Binary files /dev/null and b/resources/assets/tinker/textures/blocks/furnaceslab_side.png differ diff --git a/resources/assets/tinker/textures/blocks/ham_bone_cooked.png b/resources/assets/tinker/textures/blocks/ham_bone_cooked.png new file mode 100644 index 00000000..6a27e1d5 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/ham_bone_cooked.png differ diff --git a/resources/assets/tinker/textures/blocks/ham_skin_cooked.png b/resources/assets/tinker/textures/blocks/ham_skin_cooked.png new file mode 100644 index 00000000..df722ae2 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/ham_skin_cooked.png differ diff --git a/resources/assets/tinker/textures/blocks/liquid_gray.png b/resources/assets/tinker/textures/blocks/liquid_gray.png new file mode 100644 index 00000000..95e3cab2 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/liquid_gray.png differ diff --git a/resources/assets/tinker/textures/blocks/liquid_gray.png.mcmeta b/resources/assets/tinker/textures/blocks/liquid_gray.png.mcmeta new file mode 100644 index 00000000..4f0718ac --- /dev/null +++ b/resources/assets/tinker/textures/blocks/liquid_gray.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/resources/assets/tinker/textures/blocks/liquid_gray_flow.png b/resources/assets/tinker/textures/blocks/liquid_gray_flow.png new file mode 100644 index 00000000..58f4017e Binary files /dev/null and b/resources/assets/tinker/textures/blocks/liquid_gray_flow.png differ diff --git a/resources/assets/tinker/textures/blocks/liquid_gray_flow.png.mcmeta b/resources/assets/tinker/textures/blocks/liquid_gray_flow.png.mcmeta new file mode 100644 index 00000000..0645f48c --- /dev/null +++ b/resources/assets/tinker/textures/blocks/liquid_gray_flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/resources/assets/tinker/textures/blocks/noteslab_chest.png b/resources/assets/tinker/textures/blocks/noteslab_chest.png new file mode 100644 index 00000000..59b4e910 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/noteslab_chest.png differ diff --git a/resources/assets/tinker/textures/blocks/noteslab_side.png b/resources/assets/tinker/textures/blocks/noteslab_side.png new file mode 100644 index 00000000..5365815f Binary files /dev/null and b/resources/assets/tinker/textures/blocks/noteslab_side.png differ diff --git a/resources/assets/tinker/textures/blocks/partbuilder_slab_chest.png b/resources/assets/tinker/textures/blocks/partbuilder_slab_chest.png new file mode 100644 index 00000000..81270d65 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/partbuilder_slab_chest.png differ diff --git a/resources/assets/tinker/textures/blocks/stenciltable_slab_chest.png b/resources/assets/tinker/textures/blocks/stenciltable_slab_chest.png new file mode 100644 index 00000000..3e769167 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/stenciltable_slab_chest.png differ diff --git a/resources/assets/tinker/textures/blocks/toolforge_slab_chest.png b/resources/assets/tinker/textures/blocks/toolforge_slab_chest.png new file mode 100644 index 00000000..da728a43 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/toolforge_slab_chest.png differ diff --git a/resources/assets/tinker/textures/blocks/toolstation_slab_chest.png b/resources/assets/tinker/textures/blocks/toolstation_slab_chest.png new file mode 100644 index 00000000..ae435166 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/toolstation_slab_chest.png differ diff --git a/resources/assets/tinker/textures/gui/minichest.png b/resources/assets/tinker/textures/gui/minichest.png new file mode 100644 index 00000000..bb74a0a0 Binary files /dev/null and b/resources/assets/tinker/textures/gui/minichest.png differ diff --git a/src/tconstruct/blocks/CraftingSlab.java b/src/tconstruct/blocks/CraftingSlab.java index b4273d79..ae0b2451 100644 --- a/src/tconstruct/blocks/CraftingSlab.java +++ b/src/tconstruct/blocks/CraftingSlab.java @@ -5,14 +5,12 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Icon; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import tconstruct.TConstruct; import tconstruct.blocks.logic.CraftingStationLogic; @@ -24,10 +22,10 @@ import tconstruct.blocks.logic.ToolStationLogic; import tconstruct.common.TContent; import tconstruct.common.TProxyCommon; import tconstruct.library.TConstructRegistry; -import tconstruct.library.blocks.InventoryBlock; +import tconstruct.library.blocks.InventorySlab; import tconstruct.util.config.PHConstruct; -public class CraftingSlab extends InventoryBlock +public class CraftingSlab extends InventorySlab { public CraftingSlab(int id, Material material) { @@ -64,24 +62,6 @@ public class CraftingSlab extends InventoryBlock return 1; } - @Override - public boolean renderAsNormalBlock () - { - return false; - } - - @Override - public boolean isOpaqueCube () - { - return false; - } - - @Override - public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) - { - return true; - } - public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y, int z) { int metadata = world.getBlockMetadata(x, y, z); @@ -169,39 +149,4 @@ public class CraftingSlab extends InventoryBlock } super.onBlockPlacedBy(world, x, y, z, entityliving, stack); } - - @Override - public void addCollisionBoxesToList (World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List arraylist, Entity entity) - { - setBlockBoundsBasedOnState(world, x, y, z); - super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity); - } - - public void setBlockBoundsForItemRender () - { - setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); - } - - public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z) - { - int meta = world.getBlockMetadata(x, y, z) / 8; - float minY = meta == 1 ? 0.5F : 0.0F; - float maxY = meta == 1 ? 1.0F : 0.5F; - setBlockBounds(0.0F, minY, 0F, 1.0F, maxY, 1.0F); - } - - public int onBlockPlaced (World par1World, int blockX, int blockY, int blockZ, int side, float clickX, float clickY, float clickZ, int metadata) - { - if (side == 1) - return metadata; - if (side == 0 || clickY >= 0.5F) - return metadata | 8; - - return metadata; - } - - public int damageDropped (int meta) - { - return meta % 8; - } } diff --git a/src/tconstruct/blocks/FurnaceSlab.java b/src/tconstruct/blocks/FurnaceSlab.java new file mode 100644 index 00000000..895fdbe0 --- /dev/null +++ b/src/tconstruct/blocks/FurnaceSlab.java @@ -0,0 +1,117 @@ +package tconstruct.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Icon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import tconstruct.TConstruct; +import tconstruct.blocks.logic.AdvancedDrawbridgeLogic; +import tconstruct.blocks.logic.DrawbridgeLogic; +import tconstruct.blocks.logic.FurnaceLogic; +import tconstruct.common.TProxyCommon; +import tconstruct.library.TConstructRegistry; +import tconstruct.library.blocks.InventorySlab; +import tconstruct.library.util.IActiveLogic; +import tconstruct.library.util.IFacingLogic; + +public class FurnaceSlab extends InventorySlab +{ + + public FurnaceSlab(int id, Material material) + { + super(id, material); + this.setCreativeTab(TConstructRegistry.blockTab); + this.setHardness(3.5f); + } + + @Override + public TileEntity createTileEntity (World world, int metadata) + { + switch (metadata % 8) + { + case 0: + return new FurnaceLogic(); + } + return null; + } + + @Override + public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer) + { + return TProxyCommon.furnaceID; + } + + @Override + public Object getModInstance () + { + return TConstruct.instance; + } + + @Override + public String[] getTextureNames () + { + String[] textureNames = { "furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top" }; + + return textureNames; + } + + @Override + public Icon getIcon (int side, int meta) + { + return icons[(meta % 8) * 3 + getTextureIndex(side)]; + } + + public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side) + { + TileEntity logic = world.getBlockTileEntity(x, y, z); + short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0; + int meta = world.getBlockMetadata(x, y, z) % 8; + + if (meta == 0) + { + if (side == direction) + { + if (((IActiveLogic) logic).getActive()) + return icons[1]; + else + return icons[0]; + } + else if (side > 1) + { + return icons[2]; + } + return icons[3]; + } + return icons[0]; + } + + public int getTextureIndex (int side) + { + if (side == 0 || side == 1) + return 3; + if (side == 3) + return 0; + + return 2; + } + + @Override + public void registerIcons (IconRegister iconRegister) + { + String[] textureNames = getTextureNames(); + this.icons = new Icon[textureNames.length]; + + for (int i = 0; i < this.icons.length; ++i) + { + if (i == 3) + this.icons[i] = iconRegister.registerIcon("minecraft:" + textureNames[i]); + else + this.icons[i] = iconRegister.registerIcon("tinker:" + textureNames[i]); + } + } +} diff --git a/src/tconstruct/blocks/MeatBlock.java b/src/tconstruct/blocks/MeatBlock.java index ab4cb3db..96069db2 100644 --- a/src/tconstruct/blocks/MeatBlock.java +++ b/src/tconstruct/blocks/MeatBlock.java @@ -182,4 +182,9 @@ public class MeatBlock extends Block { return true; } + + public boolean isBeaconBase (World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) + { + return true; + } } diff --git a/src/tconstruct/blocks/OreberryBush.java b/src/tconstruct/blocks/OreberryBush.java index 7cb41326..2955ccc3 100644 --- a/src/tconstruct/blocks/OreberryBush.java +++ b/src/tconstruct/blocks/OreberryBush.java @@ -206,7 +206,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable return true; world.setBlock(x, y, z, blockID, meta - 4, 3); - AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat)); + AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TContent.oreBerries, random.nextInt(3)+1, meta % 4 + itemMeat)); return true; } diff --git a/src/tconstruct/blocks/SoilBlock.java b/src/tconstruct/blocks/SoilBlock.java index 6d134a85..9b11e823 100644 --- a/src/tconstruct/blocks/SoilBlock.java +++ b/src/tconstruct/blocks/SoilBlock.java @@ -5,6 +5,9 @@ import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EnumCreatureAttribute; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; @@ -39,6 +42,21 @@ public class SoilBlock extends TConstructBlock } } + public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity) + { + int meta = world.getBlockMetadata(x, y, z); + if (meta < 3) + { + entity.motionX *= 0.4; + entity.motionZ *= 0.4; + if (meta != 1 && entity instanceof EntityLivingBase) + { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.id, 1)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 1)); + } + } + } + public float getBlockHardness (World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); @@ -46,6 +64,11 @@ public class SoilBlock extends TConstructBlock return Block.dirt.blockHardness; return this.blockHardness; } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) + { + return Block.slowSand.getCollisionBoundingBoxFromPool(world, x, y, z); + } /*public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { diff --git a/src/tconstruct/blocks/logic/FurnaceLogic.java b/src/tconstruct/blocks/logic/FurnaceLogic.java new file mode 100644 index 00000000..40d63980 --- /dev/null +++ b/src/tconstruct/blocks/logic/FurnaceLogic.java @@ -0,0 +1,341 @@ +package tconstruct.blocks.logic; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemHoe; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.item.ItemTool; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.INetworkManager; +import net.minecraft.network.packet.Packet; +import net.minecraft.network.packet.Packet132TileEntityData; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeDirection; +import tconstruct.inventory.FurnaceContainer; +import tconstruct.library.blocks.InventoryLogic; +import tconstruct.library.util.IActiveLogic; +import tconstruct.library.util.IFacingLogic; +import cpw.mods.fml.common.registry.GameRegistry; + +/* Slots + * 0: Input + * 1: Fuel + * 2: Output + * 3-16: Chest + */ + +public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacingLogic +{ + boolean active; + public int fuel; + public int fuelGague; + public int progress; + public int fuelScale = 200; + byte direction; + + public FurnaceLogic() + { + super(3); + active = false; + } + + @Override + public String getDefaultName () + { + return "container.furnace"; + } + + @Override + public boolean getActive () + { + return active; + } + + @Override + public void setActive (boolean flag) + { + active = flag; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + + /* Fuel gauge */ + public int gaugeProgressScaled (int scale) + { + return (progress * scale) / fuelScale; + } + + public int gaugeFuelScaled (int scale) + { + if (fuelGague == 0) + { + fuelGague = fuel; + if (fuelGague == 0) + { + fuelGague = fuelScale; + } + } + return (fuel * scale) / fuelGague; + } + + /* Item cooking */ + public void updateEntity () + { + boolean burning = isBurning(); + boolean updateInventory = false; + if (fuel <= 0 && canSmelt()) + { + fuel = fuelGague = (int) (getItemBurnTime(inventory[1])); + if (fuel > 0) + { + if (inventory[1].getItem().hasContainerItem()) //Fuel slot + { + inventory[1] = new ItemStack(inventory[1].getItem().getContainerItem()); + } + else + { + inventory[1].stackSize--; + } + if (inventory[1].stackSize <= 0) + { + inventory[1] = null; + } + updateInventory = true; + } + } + if (isBurning() && canSmelt()) + { + progress++; + if (progress >= fuelScale) + { + progress = 0; + cookItems(); + updateInventory = true; + } + } + else + { + progress = 0; + } + if (fuel > 0) + { + fuel--; + } + if (burning != isBurning()) + { + setActive(isBurning()); + updateInventory = true; + } + if (updateInventory) + { + onInventoryChanged(); + } + } + + public void cookItems () + { + if (this.canSmelt()) + { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.inventory[0]); + + if (this.inventory[2] == null) + { + this.inventory[2] = itemstack.copy(); + } + else if (this.inventory[2].isItemEqual(itemstack)) + { + inventory[2].stackSize += itemstack.stackSize; + } + + --this.inventory[0].stackSize; + + if (this.inventory[0].stackSize <= 0) + { + this.inventory[0] = null; + } + } + + } + + public boolean canSmelt () + { + if (inventory[0] == null) //Nothing here! + return false; + else + { + ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.inventory[0]); + if (itemstack == null) + return false; + if (this.inventory[2] == null) + return true; + if (!this.inventory[2].isItemEqual(itemstack)) + return false; + int result = inventory[2].stackSize + itemstack.stackSize; + return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize()); + } + } + + public boolean isBurning () + { + return fuel > 0; + } + + public ItemStack getResultFor (ItemStack stack) + { + ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack); + if (result != null) //Only valid for food + return result.copy(); + + return null; + } + + public static int getItemBurnTime (ItemStack stack) + { + if (stack == null) + { + return 0; + } + else + { + int i = stack.getItem().itemID; + Item item = stack.getItem(); + + if (stack.getItem() instanceof ItemBlock && Block.blocksList[i] != null) + { + Block block = Block.blocksList[i]; + + if (block == Block.woodSingleSlab) + { + return 150; + } + + if (block == Block.wood) + { + return 1200; + } + + if (block.blockMaterial == Material.wood) + { + return 300; + } + + if (block == Block.coalBlock) + { + return 16000; + } + } + + if (item instanceof ItemTool && ((ItemTool) item).getToolMaterialName().equals("WOOD")) return 200; + if (item instanceof ItemSword && ((ItemSword) item).getToolMaterialName().equals("WOOD")) return 200; + if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD")) return 200; + if (i == Item.stick.itemID) return 100; + if (i == Item.coal.itemID) return 1600; + if (i == Item.bucketLava.itemID) return 20000; + if (i == Block.sapling.blockID) return 100; + if (i == Item.blazeRod.itemID) return 2400; + return GameRegistry.getFuelValue(stack); + } + } + + /* NBT */ + public void readFromNBT (NBTTagCompound tags) + { + super.readFromNBT(tags); + active = tags.getBoolean("Active"); + fuel = tags.getInteger("Fuel"); + fuelGague = tags.getInteger("FuelGague"); + readNetworkNBT(tags); + } + + public void writeToNBT (NBTTagCompound tags) + { + super.writeToNBT(tags); + tags.setBoolean("Active", active); + tags.setInteger("Fuel", fuel); + tags.setInteger("FuelGague", fuelGague); + writeNetworkNBT(tags); + } + + public void readNetworkNBT (NBTTagCompound tags) + { + direction = tags.getByte("Direction"); + } + + public void writeNetworkNBT (NBTTagCompound tags) + { + tags.setByte("Direction", direction); + } + + /* Packets */ + @Override + public Packet getDescriptionPacket () + { + NBTTagCompound tag = new NBTTagCompound(); + writeNetworkNBT(tag); + return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag); + } + + @Override + public void onDataPacket (INetworkManager net, Packet132TileEntityData packet) + { + readNetworkNBT(packet.data); + worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); + } + + @Override + public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) + { + return new FurnaceContainer(inventoryplayer, this); + } + + @Override + public byte getRenderDirection () + { + return direction; + } + + @Override + public ForgeDirection getForgeDirection () + { + return ForgeDirection.VALID_DIRECTIONS[direction]; + } + + @Override + @Deprecated + public void setDirection (int side) + { + //Nope! + } + + @Override + @Deprecated + public void setDirection (float yaw, float pitch, EntityLivingBase player) + { + int facing = MathHelper.floor_double((double) (yaw / 360) + 0.5D) & 3; + switch (facing) + { + case 0: + direction = 2; + break; + + case 1: + direction = 5; + break; + + case 2: + direction = 3; + break; + + case 3: + direction = 4; + break; + } + } +} diff --git a/src/tconstruct/blocks/slime/SlimeGel.java b/src/tconstruct/blocks/slime/SlimeGel.java index 25fa7dd4..0e9f4bdc 100644 --- a/src/tconstruct/blocks/slime/SlimeGel.java +++ b/src/tconstruct/blocks/slime/SlimeGel.java @@ -6,7 +6,10 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import tconstruct.blocks.TConstructBlock; @@ -48,6 +51,10 @@ public class SlimeGel extends TConstructBlock world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume()) / 2.0F, var9.stepSound.getPitch() * 0.65F); } entity.motionY *= -1.2F; + if (entity instanceof EntityLivingBase) + { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 4)); + } } entity.fallDistance = 0; } diff --git a/src/tconstruct/client/TProxyClient.java b/src/tconstruct/client/TProxyClient.java index f1011aac..7531b3a7 100644 --- a/src/tconstruct/client/TProxyClient.java +++ b/src/tconstruct/client/TProxyClient.java @@ -91,6 +91,8 @@ public class TProxyClient extends TProxyCommon return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), x, y, z); if (ID == advDrawbridgeID) return new AdvDrawbridgeGui(player, (AdvancedDrawbridgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); + if (ID == furnaceID) + return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z)); if (ID == manualGuiID) { diff --git a/src/tconstruct/client/gui/FurnaceGui.java b/src/tconstruct/client/gui/FurnaceGui.java new file mode 100644 index 00000000..15902873 --- /dev/null +++ b/src/tconstruct/client/gui/FurnaceGui.java @@ -0,0 +1,58 @@ +package tconstruct.client.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import tconstruct.blocks.logic.FurnaceLogic; +import tconstruct.inventory.FurnaceContainer; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class FurnaceGui extends GuiContainer +{ + private static final ResourceLocation furnaceGuiTextures = new ResourceLocation("textures/gui/container/furnace.png"); + private FurnaceLogic logic; + + public FurnaceGui(InventoryPlayer inventory, FurnaceLogic furnace) + { + super(new FurnaceContainer(inventory, furnace)); + this.logic = furnace; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + protected void drawGuiContainerForegroundLayer(int par1, int par2) + { + String s = this.logic.isInvNameLocalized() ? this.logic.getInvName() : I18n.getString(this.logic.getInvName()); + this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752); + this.fontRenderer.drawString(I18n.getString("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + /** + * Draw the background layer for the GuiContainer (everything behind the items) + */ + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(furnaceGuiTextures); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + int i1; + + if (this.logic.isBurning()) + { + i1 = this.logic.gaugeFuelScaled(12); + this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2); + } + + i1 = this.logic.gaugeProgressScaled(24); + this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16); + } +} diff --git a/src/tconstruct/common/TContent.java b/src/tconstruct/common/TContent.java index 8f4d3347..8f5247b4 100644 --- a/src/tconstruct/common/TContent.java +++ b/src/tconstruct/common/TContent.java @@ -127,6 +127,7 @@ public class TContent implements IFuelHandler public static Block toolForge; public static Block craftingStationWood; public static Block craftingSlabWood; + public static Block furnaceSlab; public static Block heldItemBlock; public static Block craftedSoil; @@ -315,41 +316,6 @@ public class TContent implements IFuelHandler EntityRegistry.registerModEntity(BlueSlime.class, "EdibleSlime", 12, TConstruct.instance, 64, 5, true); //EntityRegistry.registerModEntity(MetalSlime.class, "MetalSlime", 13, TConstruct.instance, 64, 5, true); - - /*BiomeGenBase[] plains = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.PLAINS); - BiomeGenBase[] mountain = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.MOUNTAIN); - BiomeGenBase[] hills = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.HILLS); - BiomeGenBase[] swamp = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.SWAMP); - BiomeGenBase[] desert = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.DESERT); - BiomeGenBase[] frozen = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.FROZEN); - BiomeGenBase[] jungle = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.JUNGLE); - BiomeGenBase[] wasteland = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.WASTELAND); - - BiomeGenBase[] nether = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.NETHER);*/ - - /*if (PHConstruct.blueSlime) - { - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, plains); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, mountain); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, hills); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, swamp); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, desert); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, frozen); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, jungle); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, wasteland); - } - - try - { - Class.forName("extrabiomes.api.BiomeManager"); - Collection ebxlCollection = BiomeManager.getBiomes(); - BiomeGenBase[] ebxlBiomes = (BiomeGenBase[]) ebxlCollection.toArray(); - EntityRegistry.addSpawn(BlueSlime.class, PHConstruct.blueSlimeWeight, 4, 4, EnumCreatureType.monster, ebxlBiomes); - } - catch (Exception e) - { - - }*/ } public static Fluid[] fluids = new Fluid[25]; @@ -375,6 +341,10 @@ public class TContent implements IFuelHandler craftingSlabWood = new CraftingSlab(PHConstruct.woodCrafterSlab, Material.wood).setUnlocalizedName("CraftingSlab"); GameRegistry.registerBlock(craftingSlabWood, CraftingSlabItemBlock.class, "CraftingSlab"); + + furnaceSlab = new FurnaceSlab(PHConstruct.furnaceSlab, Material.rock).setUnlocalizedName("FurnaceSlab"); + GameRegistry.registerBlock(furnaceSlab, "FurnaceSlab"); + GameRegistry.registerTileEntity(FurnaceLogic.class, "TConstruct.Furnace"); heldItemBlock = new EquipBlock(PHConstruct.heldItemBlock, Material.wood).setUnlocalizedName("Frypan"); GameRegistry.registerBlock(heldItemBlock, "HeldItemBlock"); @@ -397,7 +367,7 @@ public class TContent implements IFuelHandler GameRegistry.registerBlock(metalBlock, MetalItemBlock.class, "MetalBlock"); meatBlock = new MeatBlock(PHConstruct.meatBlock).setUnlocalizedName("tconstruct.meatblock"); - GameRegistry.registerBlock(meatBlock, "MeatBlock"); + GameRegistry.registerBlock(meatBlock, HamboneItemBlock.class, "MeatBlock"); OreDictionary.registerOre("hambone", new ItemStack(meatBlock)); LanguageRegistry.addName(meatBlock, "Hambone"); diff --git a/src/tconstruct/common/TProxyCommon.java b/src/tconstruct/common/TProxyCommon.java index 4fa9f1c8..d7ca850f 100644 --- a/src/tconstruct/common/TProxyCommon.java +++ b/src/tconstruct/common/TProxyCommon.java @@ -26,8 +26,9 @@ public class TProxyCommon implements IGuiHandler public static int stencilTableID = 3; public static int frypanGuiID = 4; public static int toolForgeID = 5; - public static int smelteryGuiID = 7; + public static int smelteryGuiID = 7; + public static int furnaceID = 8; public static int drawbridgeID = 9; public static int landmineID = 10; public static int craftingStationID = 11; diff --git a/src/tconstruct/inventory/FurnaceContainer.java b/src/tconstruct/inventory/FurnaceContainer.java new file mode 100644 index 00000000..9ba49180 --- /dev/null +++ b/src/tconstruct/inventory/FurnaceContainer.java @@ -0,0 +1,183 @@ +package tconstruct.inventory; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.inventory.SlotFurnace; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.tileentity.TileEntityFurnace; +import tconstruct.blocks.logic.FurnaceLogic; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class FurnaceContainer extends Container +{ + private FurnaceLogic furnace; + private int lastCookTime; + private int lastBurnTime; + private int lastItemBurnTime; + + public FurnaceContainer(InventoryPlayer par1InventoryPlayer, FurnaceLogic par2TileEntityFurnace) + { + this.furnace = par2TileEntityFurnace; + this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17)); + this.addSlotToContainer(new Slot(par2TileEntityFurnace, 1, 56, 53)); + this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 2, 116, 35)); + int i; + + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(par1InventoryPlayer, i, 8 + i * 18, 142)); + } + } + + public void addCraftingToCrafters(ICrafting par1ICrafting) + { + super.addCraftingToCrafters(par1ICrafting); + par1ICrafting.sendProgressBarUpdate(this, 0, this.furnace.progress); + par1ICrafting.sendProgressBarUpdate(this, 1, this.furnace.fuel); + par1ICrafting.sendProgressBarUpdate(this, 2, this.furnace.fuelGague); + } + + /** + * Looks for changes made in the container, sends them to every listener. + */ + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting)this.crafters.get(i); + + if (this.lastCookTime != this.furnace.progress) + { + icrafting.sendProgressBarUpdate(this, 0, this.furnace.progress); + } + + if (this.lastBurnTime != this.furnace.fuel) + { + icrafting.sendProgressBarUpdate(this, 1, this.furnace.fuel); + } + + if (this.lastItemBurnTime != this.furnace.fuelGague) + { + icrafting.sendProgressBarUpdate(this, 2, this.furnace.fuelGague); + } + } + + this.lastCookTime = this.furnace.progress; + this.lastBurnTime = this.furnace.fuel; + this.lastItemBurnTime = this.furnace.fuelGague; + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) + { + if (par1 == 0) + { + this.furnace.progress = par2; + } + + if (par1 == 1) + { + this.furnace.fuel = par2; + } + + if (par1 == 2) + { + this.furnace.fuelGague = par2; + } + } + + public boolean canInteractWith(EntityPlayer par1EntityPlayer) + { + return this.furnace.isUseableByPlayer(par1EntityPlayer); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) + { + ItemStack itemstack = null; + Slot slot = (Slot)this.inventorySlots.get(par2); + + if (slot != null && slot.getHasStack()) + { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (par2 == 2) + { + if (!this.mergeItemStack(itemstack1, 3, 39, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + else if (par2 != 1 && par2 != 0) + { + if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) + { + if (!this.mergeItemStack(itemstack1, 0, 1, false)) + { + return null; + } + } + else if (TileEntityFurnace.isItemFuel(itemstack1)) + { + if (!this.mergeItemStack(itemstack1, 1, 2, false)) + { + return null; + } + } + else if (par2 >= 3 && par2 < 30) + { + if (!this.mergeItemStack(itemstack1, 30, 39, false)) + { + return null; + } + } + else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) + { + return null; + } + } + else if (!this.mergeItemStack(itemstack1, 3, 39, false)) + { + return null; + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack)null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } + + return itemstack; + } +} diff --git a/src/tconstruct/items/blocks/HamboneItemBlock.java b/src/tconstruct/items/blocks/HamboneItemBlock.java new file mode 100644 index 00000000..3a289786 --- /dev/null +++ b/src/tconstruct/items/blocks/HamboneItemBlock.java @@ -0,0 +1,155 @@ +package tconstruct.items.blocks; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class HamboneItemBlock extends ItemBlock +{ + public HamboneItemBlock(int id) + { + super(id); + itemUseDuration = 32; + if (Loader.isModLoaded("HungerOverhaul")) + { + healAmount = 8; + saturationModifier = 0.8f; + } + else + { + healAmount = 20; + saturationModifier = 3.0f; + } + isWolfsFavoriteMeat = true; + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) + { + list.add("\u00A74Hambone!"); + list.add("Usable for Beacon bases"); + } + + /** Number of ticks to run while 'EnumAction'ing until result. */ + public final int itemUseDuration; + + /** The amount this food item heals the player. */ + private final int healAmount; + private final float saturationModifier; + + /** Whether wolves like this food (true for raw and cooked porkchop). */ + private final boolean isWolfsFavoriteMeat; + + /** + * If this field is true, the food can be consumed even if the player don't need to eat. + */ + private boolean alwaysEdible; + + /** + * represents the potion effect that will occurr upon eating this food. Set by setPotionEffect + */ + private int potionId; + + /** set by setPotionEffect */ + private int potionDuration; + + /** set by setPotionEffect */ + private int potionAmplifier; + + /** probably of the set potion effect occurring */ + private float potionEffectProbability; + + /*public ItemFood(int par1, int par2, float par3, boolean par4) + { + super(par1); + this.itemUseDuration = 32; + this.healAmount = par2; + this.isWolfsFavoriteMeat = par4; + this.saturationModifier = par3; + this.setCreativeTab(CreativeTabs.tabFood); + } + + public ItemFood(int par1, int par2, boolean par3) + { + this(par1, par2, 0.6F, par3); + }*/ + + public ItemStack onEaten (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + --par1ItemStack.stackSize; + par3EntityPlayer.getFoodStats().addStats(getHealAmount(), getSaturationModifier()); + par2World.playSoundAtEntity(par3EntityPlayer, "random.burp", 0.5F, par2World.rand.nextFloat() * 0.1F + 0.9F); + this.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer); + return par1ItemStack; + } + + protected void onFoodEaten (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (!par2World.isRemote && this.potionId > 0 && par2World.rand.nextFloat() < this.potionEffectProbability) + { + par3EntityPlayer.addPotionEffect(new PotionEffect(this.potionId, this.potionDuration * 20, this.potionAmplifier)); + } + } + + /** + * How long it takes to use or consume an item + */ + public int getMaxItemUseDuration (ItemStack par1ItemStack) + { + return 32; + } + + /** + * returns the action that specifies what animation to play when the items is being used + */ + public EnumAction getItemUseAction (ItemStack par1ItemStack) + { + return EnumAction.eat; + } + + /** + * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + */ + public ItemStack onItemRightClick (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + { + if (par3EntityPlayer.canEat(this.alwaysEdible)) + { + par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); + } + + return par1ItemStack; + } + + public int getHealAmount () + { + return this.healAmount; + } + + /** + * gets the saturationModifier of the ItemFood + */ + public float getSaturationModifier () + { + return this.saturationModifier; + } + + /** + * Whether wolves like this food (true for raw and cooked porkchop). + */ + public boolean isWolfsFavoriteMeat () + { + return this.isWolfsFavoriteMeat; + } +} diff --git a/src/tconstruct/library/blocks/InventorySlab.java b/src/tconstruct/library/blocks/InventorySlab.java new file mode 100644 index 00000000..aa9f58df --- /dev/null +++ b/src/tconstruct/library/blocks/InventorySlab.java @@ -0,0 +1,79 @@ +package tconstruct.library.blocks; + +import java.util.List; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public abstract class InventorySlab extends InventoryBlock +{ + public InventorySlab(int id, Material material) + { + super(id, material); + } + + /* Rendering */ + @Override + public boolean renderAsNormalBlock () + { + return false; + } + + @Override + public boolean isOpaqueCube () + { + return false; + } + + @Override + public boolean shouldSideBeRendered (IBlockAccess world, int x, int y, int z, int side) + { + if (side > 1) + return super.shouldSideBeRendered(world, x, y, z, side); + + int meta = world.getBlockMetadata(x, y, z); + boolean top = (meta | 8) == 1; + if ((top && side == 0) || (!top && side == 1)) + return true; + + return super.shouldSideBeRendered(world, x, y, z, side); + } + + @Override + public void addCollisionBoxesToList (World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List arraylist, Entity entity) + { + setBlockBoundsBasedOnState(world, x, y, z); + super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity); + } + + public void setBlockBoundsForItemRender () + { + setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); + } + + public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z) + { + int meta = world.getBlockMetadata(x, y, z) / 8; + float minY = meta == 1 ? 0.5F : 0.0F; + float maxY = meta == 1 ? 1.0F : 0.5F; + setBlockBounds(0.0F, minY, 0F, 1.0F, maxY, 1.0F); + } + + public int onBlockPlaced (World par1World, int blockX, int blockY, int blockZ, int side, float clickX, float clickY, float clickZ, int metadata) + { + if (side == 1) + return metadata; + if (side == 0 || clickY >= 0.5F) + return metadata | 8; + + return metadata; + } + + public int damageDropped (int meta) + { + return meta % 8; + } +} diff --git a/src/tconstruct/util/config/PHConstruct.java b/src/tconstruct/util/config/PHConstruct.java index 470ea88e..b45f070f 100644 --- a/src/tconstruct/util/config/PHConstruct.java +++ b/src/tconstruct/util/config/PHConstruct.java @@ -104,6 +104,8 @@ public class PHConstruct slimeChannel = config.getBlock("Slime Channel", 3190).getInt(3190); slimePad = config.getBlock("Slime Pad", 3191).getInt(3191); + + furnaceSlab = config.getBlock("Furnace Slab", 3192).getInt(3192); //Thermal Expansion moltenSilver = config.getBlock("Molten Silver", 3195).getInt(3195); @@ -131,9 +133,10 @@ public class PHConstruct blood = config.getBlock("Liquid Cow", 3217).getInt(3217); moltenEnder = config.getBlock("Molten Ender", 3218).getInt(3218); - //3221+ - //3221 - //3222 + + + signalBus = config.getBlock("Signal Bus", 3221).getInt(3221); + signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222); glass = config.getBlock("Clear Glass", 3223).getInt(3223); stainedGlass = config.getBlock("Stained Glass", 3224).getInt(3224); stainedGlassClear = config.getBlock("Clear Stained Glass", 3225).getInt(3225); @@ -178,8 +181,7 @@ public class PHConstruct slimeExplosive = config.getBlock("SDX", 3247).getInt(3247); castingChannel = config.getBlock("Casting Channel", 3249).getInt(3249); woodenRail = config.getBlock("Wooden Rail", 3250).getInt(3250); - signalBus = config.getBlock("Signal Bus", 3251).getInt(3251); - signalTerminal = config.getBlock("Signal Terminal", 3252).getInt(3252); + //3251+ belongs to Natura. Go backwards! manual = config.getItem("Patterns and Misc", "Tinker's Manual", 14018).getInt(14018); blankPattern = config.getItem("Patterns and Misc", "Blank Patterns", 14019).getInt(14019); @@ -397,6 +399,7 @@ public class PHConstruct public static int heldItemBlock; public static int woodCrafter; public static int woodCrafterSlab; + public static int furnaceSlab; public static int ores; public static int lavaTank;