コード例 #1
0
 @Override
 public void onHit(
     ItemStack tool,
     EntityLivingBase player,
     EntityLivingBase target,
     float damage,
     boolean isCritical) {
   ModifierNBT data = new ModifierNBT(TinkerUtil.getModifierTag(tool, name));
   Magnetic.apply(player, 30, data.level);
 }
コード例 #2
0
 @Override
 public void afterBlockBreak(
     ItemStack tool,
     World world,
     IBlockState state,
     BlockPos pos,
     EntityLivingBase player,
     boolean wasEffective) {
   ModifierNBT data = new ModifierNBT(TinkerUtil.getModifierTag(tool, name));
   Magnetic.apply(player, 30, data.level);
 }