Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ See the patches list below.
[MineTick-0017] Fix Insane Nether Portal Lag

[Migot-0009] Prevent Creature Spawning in Unloaded Chunks
[Migot-0036] Check for lava only once per tick

[Sugarcane-0022] Add YAML comments

Expand Down
17 changes: 14 additions & 3 deletions WindSpigot-Server/src/main/java/net/minecraft/server/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ public void inactiveTick() {
}
// Spigot end

// Migot start
private boolean isInLava;
private int lastLavaCheck = Integer.MIN_VALUE;
// Migot end

public int getId() {
return this.id;
}
Expand Down Expand Up @@ -1146,9 +1151,15 @@ public boolean a(Material material) {
}

public boolean ab() {
return this.world.a(
this.getBoundingBox().grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D),
Material.LAVA);
// Migot start - Check for lava only once per tick
// return this.world.a(this.getBoundingBox().grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
int currentTick = MinecraftServer.currentTick;
if (this.lastLavaCheck != currentTick) {
this.lastLavaCheck = currentTick;
this.isInLava = this.world.a(this.getBoundingBox().grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
}
return this.isInLava;
// Migot end
}

public void a(float f, float f1, float f2) {
Expand Down