コード例 #1
0
 public override bool CanHarvest(Items.ToolItem tool)
 {
     return(tool is PickaxeItem &&
            (tool.ToolMaterial == ToolMaterial.Iron ||
             tool.ToolMaterial == ToolMaterial.Gold ||
             tool.ToolMaterial == ToolMaterial.Diamond));
 }
コード例 #2
0
 public override bool CanHarvest(Items.ToolItem tool)
 {
     return(false);
 }
コード例 #3
0
ファイル: IronDoorBlock.cs プロジェクト: seaboy1234/Craft.Net
 public override bool CanHarvest(Items.ToolItem tool)
 {
     return(tool is PickaxeItem || tool is AxeItem);
 }
コード例 #4
0
ファイル: FarmlandBlock.cs プロジェクト: seaboy1234/Craft.Net
 public override bool GetDrop(Items.ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(new DirtBlock(), 1) };
     return(true);
 }
コード例 #5
0
ファイル: ClayBlock.cs プロジェクト: seaboy1234/Craft.Net
 public override bool GetDrop(Items.ToolItem tool, out ItemStack[] drop)
 {
     drop = new[] { new ItemStack(new ClayItem(), 4) };
     return(true);
 }