Modding:Advanced Items/en: Difference between revisions

From Vintage Story Wiki
Updating to match new version of source page
(Updating to match new version of source page)
Tags: Mobile edit Mobile web edit
(Updating to match new version of source page)
 
Line 73: Line 73:
{
{


<!--T:20-->
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 154: Line 153:
using Vintagestory.API.MathTools;
using Vintagestory.API.MathTools;


<!--T:30-->
namespace ExampleMods
namespace ExampleMods
{
{
Line 160: Line 158:
     {
     {


        <!--T:31-->
public override void Start(ICoreAPI api)
public override void Start(ICoreAPI api)
         {
         {
Line 167: Line 164:
         }
         }


    <!--T:32-->
}
}


    <!--T:33-->
public class TunnlerItem : Item
public class TunnlerItem : Item
     {
     {


        <!--T:34-->
public void DestroyBlocks(IWorldAccessor world, BlockPos min, BlockPos max, IPlayer player)
public void DestroyBlocks(IWorldAccessor world, BlockPos min, BlockPos max, IPlayer player)
         {
         {
Line 194: Line 188:
         }
         }


        <!--T:35-->
public override bool OnBlockBrokenWith(IWorldAccessor world, Entity byEntity, ItemSlot itemslot, BlockSelection blockSel, float dropQuantityMultiplier = 1)
public override bool OnBlockBrokenWith(IWorldAccessor world, Entity byEntity, ItemSlot itemslot, BlockSelection blockSel, float dropQuantityMultiplier = 1)
         {
         {
Line 220: Line 213:
         }
         }


    <!--T:36-->
}
}
}
}


<!--T:37-->
</syntaxhighlight>
</syntaxhighlight>


43,402

edits