mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user