1.12.2; not well tested; book integration still broken

This commit is contained in:
2018-02-08 19:37:21 +01:00
parent 1c07cfc5ee
commit 17ae55c359
58 changed files with 612 additions and 340 deletions

View File

@@ -37,7 +37,8 @@ public class TraitPorted extends AbstractTrait {
}
@Override
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase
player, boolean wasEffective) {
if (random.nextFloat() <= 0.005) {
player.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0F, 1.0F);
teleport(player, world);
@@ -46,7 +47,8 @@ public class TraitPorted extends AbstractTrait {
@Override
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean
wasCritical, boolean wasHit) {
if (random.nextFloat() <= 0.005) {
target.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0F, 1.0F);
teleport(player, player.getEntityWorld());
@@ -66,7 +68,8 @@ public class TraitPorted extends AbstractTrait {
return;
}
e.setPosition(tPos.getX(), tPos.getY(), tPos.getZ());
ToolHelper.damageTool(e.getHeldItemMainhand(), ToolHelper.getCurrentDurability(e.getHeldItemMainhand()) / 2 + 1, e);
ToolHelper.damageTool(e.getHeldItemMainhand(), ToolHelper.getCurrentDurability(e.getHeldItemMainhand()) / 2 +
1, e);
}
@Override