Update to Minecraft 1.16.1

This commit is contained in:
md_5
2020-06-25 10:00:00 +10:00
parent be6aaf046e
commit 7ea3c040bc
424 changed files with 5960 additions and 5636 deletions

View File

@@ -9,22 +9,10 @@
public class EntityLightning extends Entity {
private int lifeTicks;
@@ -13,9 +15,11 @@
private final boolean e;
@Nullable
private EntityPlayer f;
+ public boolean isEffect; // CraftBukkit
@@ -45,7 +47,24 @@
this.a(4);
}
public EntityLightning(World world, double d0, double d1, double d2, boolean flag) {
super(EntityTypes.LIGHTNING_BOLT, world);
+ this.isEffect = flag; // CraftBukkit
this.ac = true;
this.setPositionRotation(d0, d1, d2, 0.0F, 0.0F);
this.lifeTicks = 2;
@@ -43,7 +47,24 @@
public void tick() {
super.tick();
if (this.lifeTicks == 2) {
- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
+ // CraftBukkit start - Use relative location for far away sounds
+ // this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_THUNDER, SoundCategory.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
@@ -47,7 +35,7 @@
this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
}
@@ -59,7 +80,7 @@
@@ -61,7 +80,7 @@
}
}
@@ -55,9 +43,9 @@
+ if (this.lifeTicks >= 0 && !this.isEffect) { // CraftBukkit - add !this.isEffect
if (this.world.isClientSide) {
this.world.c(2);
} else if (!this.e) {
@@ -87,14 +108,22 @@
BlockPosition blockposition = new BlockPosition(this);
} else if (!this.isEffect) {
@@ -89,7 +108,11 @@
IBlockData iblockdata = BlockFireAbstract.a((IBlockAccess) this.world, blockposition);
if (this.world.getType(blockposition).isAir() && iblockdata.canPlace(this.world, blockposition)) {
- this.world.setTypeUpdate(blockposition, iblockdata);
@@ -69,8 +57,9 @@
}
for (int j = 0; j < i; ++j) {
BlockPosition blockposition1 = blockposition.b(this.random.nextInt(3) - 1, this.random.nextInt(3) - 1, this.random.nextInt(3) - 1);
@@ -97,7 +120,11 @@
iblockdata = BlockFireAbstract.a((IBlockAccess) this.world, blockposition1);
if (this.world.getType(blockposition1).isAir() && iblockdata.canPlace(this.world, blockposition1)) {
- this.world.setTypeUpdate(blockposition1, iblockdata);
+ // CraftBukkit start - add "!isEffect"