Skip to content

add mined blocks from voxel-mine to an inventory (voxel.js plugin)

Notifications You must be signed in to change notification settings

voxel/voxel-harvest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

voxel-harvest

Add mined blocks from voxel-mine to an inventory

Listens for 'break' events (sent by voxel-mine when mining completes), sets the voxel to air, and then adds a new corresponding itempile to the specified inventory (can be set to, for example, a player's inventory connected to a voxel-inventory-hotbar).

If the item cannot fit in the inventory, the voxel is not removed (fails to mine because you can't carry it anyway).

Here's an example, before the block breaks:

screenshot before

and after, you can see the voxel is gone and an item is added to the inventory:

screenshot after

License

MIT

About

add mined blocks from voxel-mine to an inventory (voxel.js plugin)

Resources

Stars

Watchers

Forks

Packages

No packages published