예제 #1
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new Slot[0];
     if (tool is ShovelItem)
         drop = new[] { new Slot((ushort)new SnowballItem(), 1) };
     return tool is ShovelItem;
 }
예제 #2
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     drop = new ItemStack[0];
     if (tool is ShovelItem)
         drop = new[] { new ItemStack(new SnowballItem(), 1) };
     return tool is ShovelItem;
 }
예제 #3
0
 public override bool CanHarvest(ToolItem tool)
 {
     return tool is PickaxeItem &&
         (tool.ToolMaterial == ToolMaterial.Iron ||
         tool.ToolMaterial == ToolMaterial.Gold ||
         tool.ToolMaterial == ToolMaterial.Diamond);
 }
예제 #4
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     if (Metadata >= 3)
         drop = new[] { new ItemStack(new NetherWartItem(), (sbyte)MathHelper.Random.Next(2, 4)) };
     else
         drop = new[] { new ItemStack(new NetherWartItem()) };
     return true;
 }
예제 #5
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drops)
 {
     if (Metadata == 7)
         drops = new[] { new ItemStack(new CarrotItem(), (sbyte)MathHelper.Random.Next(1, 4)) };
     else
         drops = new[] { new ItemStack(new CarrotItem()) };
     return true;
 }
예제 #6
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     if (Metadata != 7)
         drop = new[] { new ItemStack(new SeedsItem(), 1) };
     else
         drop = new[] { new ItemStack(new WheatItem(), 1), new ItemStack(new SeedsItem(), (sbyte)MathHelper.Random.Next(1, 4)) };
     return true;
 }
예제 #7
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     if (Size != CocoaPlantSize.Large)
         drop = new[] { new ItemStack(new DyeItem(), 1, (short)DyeItem.DyeType.CocoaBeans) };
     else
         drop = new[] { new ItemStack(new DyeItem(), 3, (short)DyeItem.DyeType.CocoaBeans) };
     return true;
 }
예제 #8
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot((ushort)new RedstoneItem(), (byte)DataUtility.Random.Next(4, 5)) };
     return tool is PickaxeItem &&
         (tool.ToolMaterial == ToolMaterial.Iron ||
         tool.ToolMaterial == ToolMaterial.Gold ||
         tool.ToolMaterial == ToolMaterial.Diamond);
 }
예제 #9
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot(new RedstoneItem(), (sbyte)MathHelper.Random.Next(4, 5)) };
     return tool is PickaxeItem &&
         (tool.ToolMaterial == ToolMaterial.Iron ||
         tool.ToolMaterial == ToolMaterial.Gold ||
         tool.ToolMaterial == ToolMaterial.Diamond);
 }
예제 #10
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     if ((Metadata & 0xC) <= 4)
         drop = new[] { new Slot((ushort)new CocoaBeanItem(), 1) };
     else
         drop = new[] { new Slot((ushort)new CocoaBeanItem(), 3) };
     return true;
 }
예제 #11
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     if (DataUtility.Random.Next(10) == 0)
     {
         drop = new[] { new Slot((ushort)new FlintItem(), 1) };
         return true;
     }
     return base.GetDrop(tool, out drop);
 }
예제 #12
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     if (MathHelper.Random.Next(10) == 0)
     {
         drop = new[] { new ItemStack(new FlintItem(), 1) };
         return true;
     }
     return base.GetDrop(tool, out drop);
 }
예제 #13
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     if (DataUtility.Random.Next(100) == 0)
     {
         drop = new[] { new Slot((ushort)new PotatoItem(), (byte)DataUtility.Random.Next(1, 4)),
             new Slot((ushort)new PoisonousPotatoItem(), 1) };
     }
     else
     {
         drop = new[] { new Slot((ushort)new PotatoItem(), (byte)DataUtility.Random.Next(1, 4)) };
     }
     return true;
 }
예제 #14
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     if (MathHelper.Random.Next(100) == 0)
     {
         drop = new[] { new Slot(new PotatoItem(), (sbyte)MathHelper.Random.Next(1, 4)),
             new Slot(new PoisonousPotatoItem(), 1) };
     }
     else
     {
         drop = new[] { new Slot(new PotatoItem(), (sbyte)MathHelper.Random.Next(1, 4)) };
     }
     return true;
 }
예제 #15
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     if (Metadata == 7)
     {
         if (MathHelper.Random.Next(100) == 0)
         {
             drop = new[] { new ItemStack(new PotatoItem(), (sbyte)MathHelper.Random.Next(1, 4)),
             new ItemStack(new PoisonousPotatoItem(), 1) };
         }
         else
             drop = new[] { new ItemStack(new PotatoItem(), (sbyte)MathHelper.Random.Next(1, 4)) };
     }
     else
         drop = new[] { new ItemStack(new PotatoItem()) };
     return true;
 }
예제 #16
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(new SugarCanesItem(), 1) };
     return true;
 }
예제 #17
0
 public override bool CanHarvest(ToolItem tool)
 {
     return tool is DiamondPickaxeItem;
 }
예제 #18
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot(new StringItem(), 1) };
     return true;
 }
예제 #19
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(new DirtBlock(), 1) };
     return true;
 }
예제 #20
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot((ushort)new RedstoneItem(), 1) };
     return true;
 }
예제 #21
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(new PumpkinSeedsItem(), 1) };
     return true;
 }
예제 #22
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot((ushort)new SeedsItem(), 1) };
     return DataUtility.Random.Next(0, 5) == 0; // TODO: Find exact value
 }
예제 #23
0
파일: Block.cs 프로젝트: cpancake/Craft.Net
 public virtual bool CanHarvest(ToolItem tool)
 {
     if (Hardness == -1)
         return false;
     return true;
 }
예제 #24
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot(new RedstoneTorchActiveBlock(), 1) };
     return true;
 }
예제 #25
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot(new GlowstoneDustItem(), (sbyte)MathHelper.Random.Next(2, 4)) };
     return true;
 }
예제 #26
0
 public override bool GetDrop(ToolItem tool, out Slot[] drop)
 {
     drop = new[] { new Slot((ushort)new DirtBlock(), 1) };
     return true;
 }
예제 #27
0
 public override bool GetDrop(ToolItem tool, out Slot[] drops)
 {
     drops = new[] { new Slot((ushort)new BookItem(), 3) };
     return true;
 }
예제 #28
0
 public override bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(new NetherQuartzItem()) };
     return tool is PickaxeItem;
 }
예제 #29
0
 public override bool CanHarvest(ToolItem tool)
 {
     return false;
 }
예제 #30
0
파일: Block.cs 프로젝트: cpancake/Craft.Net
 public virtual bool GetDrop(ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(this.Id, 1, this.Metadata) };
     return CanHarvest(tool);
 }