Skip to content

Commit 5fe9361

Browse files
committed
Fix a NPE and packet compat
1 parent f73c20e commit 5fe9361

File tree

5 files changed

+2
-1
lines changed

5 files changed

+2
-1
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sources/src/main/java/net/minecraft/server/Entity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.bukkit.entity.Vehicle;
2828
import co.aikar.timings.MinecraftTimings; // Paper
2929
import co.aikar.timings.Timing; // Paper
30+
import io.akarin.api.internal.Akari;
3031
import io.akarin.api.internal.mixin.IMixinWorldServer;
3132

3233
import org.bukkit.event.entity.EntityCombustByEntityEvent;
@@ -210,7 +211,7 @@ public Entity(World world) {
210211
this.length = 1.8F;
211212
this.ax = 1;
212213
this.ay = 1.0F;
213-
this.random = ((IMixinWorldServer) world).rand(); // Paper // Akarin
214+
this.random = world == null ? SHARED_RANDOM : ((IMixinWorldServer) world).rand(); // Paper // Akarin
214215
this.fireTicks = -this.getMaxFireTicks();
215216
this.justCreated = true;
216217
this.uniqueID = MathHelper.a(this.random);

0 commit comments

Comments
 (0)