Skip to content

Instantly share code, notes, and snippets.

@kindlich
Created October 19, 2018 19:07
Show Gist options
  • Save kindlich/2cc7ac3e3329be7b75bb0c67e3bfdcda to your computer and use it in GitHub Desktop.
Save kindlich/2cc7ac3e3329be7b75bb0c67e3bfdcda to your computer and use it in GitHub Desktop.
#loader contenttweaker
import mods.contenttweaker.Player;
var bluemint_hatchet_basic = mods.contenttweaker.VanillaFactory.createItem("bluemint_hatchet_basic");
bluemint_hatchet_basic.maxDamage = 60;
bluemint_hatchet_basic.toolClass = "shovel";
bluemint_hatchet_basic.itemDestroyedBlock = function(stack, world, blockstate, blockpos, entity) {
if(!world.remote){
entity.sendMessage("Event");
stack.damage(10, entity);
}
return true;
} as mods.contenttweaker.IItemDestroyedBlock;
bluemint_hatchet_basic.register();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment