Move spriting water particle to off thread
This commit is contained in:
@@ -188,7 +188,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
public boolean fromMobSpawner;
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
protected int numCollisions = 0; // Paper
|
||||
public boolean joinedWorld; // Akarin
|
||||
// Akarin start
|
||||
public boolean enderTeleport;
|
||||
public boolean spirtingWaterParticle;
|
||||
// Akarin end
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
|
||||
@@ -460,7 +463,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
*/
|
||||
|
||||
this.av();
|
||||
// Akarin start - async executor
|
||||
//this.av();
|
||||
this.spirtingWaterParticle = true;
|
||||
// Akarin end
|
||||
this.r();
|
||||
if (this.world.isClientSide) {
|
||||
this.extinguish();
|
||||
@@ -1279,6 +1285,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
}
|
||||
|
||||
public void populateSprintingWaterParticles() { this.av(); } // Akarin - OBFHELPER
|
||||
public void av() {
|
||||
if (this.isSprinting() && !this.isInWater()) {
|
||||
this.aw();
|
||||
@@ -2806,9 +2813,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
this.enderTeleport = true; // Akarin
|
||||
this.aK = true;
|
||||
this.setPositionRotation(d0, d1, d2, this.yaw, this.pitch);
|
||||
this.world.entityJoinedWorld(this, false);
|
||||
this.enderTeleport = false; // Akarin
|
||||
}
|
||||
|
||||
public void a(DataWatcherObject<?> datawatcherobject) {}
|
||||
|
||||
@@ -1210,7 +1210,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
if (!this.killed && !this.joinedWorld) { // Akarin
|
||||
if (!this.killed && !this.enderTeleport) { // Akarin
|
||||
Entity entity = damagesource.getEntity();
|
||||
EntityLiving entityliving = this.cv();
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
@@ -192,7 +193,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
||||
// CraftBukkit end
|
||||
this.v = Lists.newArrayList(new IWorldAccess[] { this.u});
|
||||
this.v = new CopyOnWriteArrayList<IWorldAccess>(new IWorldAccess[] { this.u}); // Akarin - ArrayList -> CopyOnWriteArrayList
|
||||
this.allowMonsters = true;
|
||||
this.allowAnimals = true;
|
||||
this.E = new int['\u8000'];
|
||||
@@ -1554,7 +1555,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
entity.joinedWorld = true; // Akarin
|
||||
|
||||
entity.N = entity.locX;
|
||||
entity.O = entity.locY;
|
||||
@@ -1629,7 +1629,6 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
}
|
||||
}
|
||||
}
|
||||
entity.joinedWorld = false; // Akarin
|
||||
}
|
||||
|
||||
// Paper start - Based on method below
|
||||
|
||||
Reference in New Issue
Block a user