Hey,
I've noticed Minecraft's formatting for their code looks like this:
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
{
if (attacker.isSneaking())
{
if (target.hurtTime == target.maxHurtTime && target.deathTime <= 0)
{
target.addVelocity(0D, 0.5D, 0D)
}
}
return super.hitEntity(stack, target, attacker);
}
It looks spread out, whereas there are some formats that look different like:
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
if (attacker.isSneaking()) {
if (target.hurtTime == target.maxHurtTime && target.deathTime <= 0) {
target.addVelocity(0D, 0.5D, 0D)
}
}
return super.hitEntity(stack, target, attacker);
}
The brackets are placed differently if you see what I mean.
Does it have an effect on the code or is it just for convenience purpose? I'm just curious.
Thanks!