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

@@ -52,7 +52,8 @@ public class TraitTantrum extends AbstractTrait {
if (data.amount >= max_charges) {
TagUtil.setEnchantEffect(tool, true);
if (event.getHarvester() instanceof EntityPlayerMP) {
Sounds.PlaySoundForPlayer(event.getHarvester(), Sounds.shocking_discharge, 1f, 0.8f + .2f * random.nextFloat());
Sounds.PlaySoundForPlayer(event.getHarvester(), Sounds.shocking_discharge, 1f, 0.8f + .2f *
random.nextFloat());
}
}
data.write(tag);
@@ -71,7 +72,8 @@ public class TraitTantrum extends AbstractTrait {
Data data = Data.read(tag);
if (data.amount > 1f) {
double d = Math.min(Utils.round2(random.nextDouble() * data.amount), max_power);
w.newExplosion(event.getEntityPlayer(), pos.getX(), pos.getY(), pos.getZ(), (float) Math.pow((double) 1.2f, d), false, true);
w.newExplosion(event.getEntityPlayer(), pos.getX(), pos.getY(), pos.getZ(), (float) Math.pow((double)
1.2f, d), false, true);
data.amount -= d;
data.write(tag);
TagUtil.setExtraTag(tool, tag);