2014-12-28 18:55:46 -07:00
|
|
|
using System;
|
|
|
|
using TrueCraft.API.Logic;
|
2015-02-08 02:42:38 +02:00
|
|
|
using TrueCraft.API;
|
|
|
|
using TrueCraft.Core.Logic.Items;
|
2014-12-28 18:55:46 -07:00
|
|
|
|
|
|
|
namespace TrueCraft.Core.Logic.Blocks
|
|
|
|
{
|
2015-02-08 02:42:38 +02:00
|
|
|
public class PistonBlock : BlockProvider, ICraftingRecipe
|
2014-12-28 18:55:46 -07:00
|
|
|
{
|
|
|
|
public static readonly byte BlockID = 0x21;
|
|
|
|
|
|
|
|
public override byte ID { get { return 0x21; } }
|
2015-01-22 00:49:50 -05:00
|
|
|
|
|
|
|
public override double BlastResistance { get { return 2.5; } }
|
2014-12-28 18:55:46 -07:00
|
|
|
|
|
|
|
public override double Hardness { get { return 0.5; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override byte Luminance { get { return 0; } }
|
2015-01-26 00:14:58 -05:00
|
|
|
|
|
|
|
public override bool Opaque { get { return false; } }
|
2015-01-22 00:49:50 -05:00
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override string DisplayName { get { return "Piston"; } }
|
|
|
|
|
|
|
|
public override Tuple<int, int> GetTextureMap(byte metadata)
|
|
|
|
{
|
|
|
|
return new Tuple<int, int>(11, 6);
|
|
|
|
}
|
2015-02-08 02:42:38 +02:00
|
|
|
|
|
|
|
public ItemStack[,] Pattern
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return new[,]
|
|
|
|
{
|
|
|
|
{
|
|
|
|
new ItemStack(WoodenPlanksBlock.BlockID),
|
|
|
|
new ItemStack(WoodenPlanksBlock.BlockID),
|
|
|
|
new ItemStack(WoodenPlanksBlock.BlockID)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
new ItemStack(CobblestoneBlock.BlockID),
|
|
|
|
new ItemStack(IronIngotItem.ItemID),
|
|
|
|
new ItemStack(CobblestoneBlock.BlockID)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
new ItemStack(CobblestoneBlock.BlockID),
|
|
|
|
new ItemStack(RedstoneItem.ItemID),
|
|
|
|
new ItemStack(CobblestoneBlock.BlockID)
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack Output
|
|
|
|
{
|
|
|
|
get { return new ItemStack(BlockID); }
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool SignificantMetadata
|
|
|
|
{
|
|
|
|
get { return false; }
|
|
|
|
}
|
2014-12-28 18:55:46 -07:00
|
|
|
}
|
|
|
|
|
2015-02-08 02:42:38 +02:00
|
|
|
public class StickyPistonBlock : BlockProvider, ICraftingRecipe
|
2014-12-28 18:55:46 -07:00
|
|
|
{
|
|
|
|
public static readonly byte BlockID = 0x1D;
|
|
|
|
|
|
|
|
public override byte ID { get { return 0x1D; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override double BlastResistance { get { return 2.5; } }
|
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override double Hardness { get { return 0.5; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override byte Luminance { get { return 0; } }
|
|
|
|
|
2015-01-26 00:14:58 -05:00
|
|
|
public override bool Opaque { get { return false; } }
|
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override string DisplayName { get { return "Sticky Piston"; } }
|
|
|
|
|
|
|
|
public override Tuple<int, int> GetTextureMap(byte metadata)
|
|
|
|
{
|
|
|
|
return new Tuple<int, int>(10, 6);
|
|
|
|
}
|
2015-02-08 02:42:38 +02:00
|
|
|
|
|
|
|
public ItemStack[,] Pattern
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return new[,]
|
|
|
|
{
|
|
|
|
{new ItemStack(SlimeballItem.ItemID)},
|
|
|
|
{new ItemStack(PistonBlock.BlockID)}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack Output
|
|
|
|
{
|
|
|
|
get { return new ItemStack(BlockID); }
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool SignificantMetadata
|
|
|
|
{
|
|
|
|
get { return false; }
|
|
|
|
}
|
2014-12-28 18:55:46 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public class PistonPlungerBlock : BlockProvider
|
|
|
|
{
|
|
|
|
public static readonly byte BlockID = 0x22;
|
|
|
|
|
|
|
|
public override byte ID { get { return 0x22; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override double BlastResistance { get { return 2.5; } }
|
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override double Hardness { get { return 0.5; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override byte Luminance { get { return 0; } }
|
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override string DisplayName { get { return "Piston Plunger"; } }
|
|
|
|
|
|
|
|
public override Tuple<int, int> GetTextureMap(byte metadata)
|
|
|
|
{
|
|
|
|
return new Tuple<int, int>(11, 6);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class PistonPlaceholderBlock : BlockProvider
|
|
|
|
{
|
|
|
|
public static readonly byte BlockID = 0x24;
|
|
|
|
|
|
|
|
public override byte ID { get { return 0x24; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override double BlastResistance { get { return 0; } }
|
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override double Hardness { get { return 0; } }
|
|
|
|
|
2015-01-22 00:49:50 -05:00
|
|
|
public override byte Luminance { get { return 0; } }
|
|
|
|
|
2014-12-28 18:55:46 -07:00
|
|
|
public override string DisplayName { get { return "Piston Placeholder"; } }
|
|
|
|
}
|
|
|
|
}
|