Fix incorrect random nextLong to nextInt (#8009)

This commit is contained in:
Jake Potrebic 2022-06-17 00:00:17 -07:00 committed by GitHub
parent 81f2eece54
commit e269a0a00b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 146 additions and 171 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bfc7736bfe538b615343b6f41f2a670493e2c701..22c9fcb8b0a75e59fc6838b9f33430b6c476cdc1 100644
index 04ef49808013c3d0c9ec4593d01532549e954270..51a312e841945315a65b42c0c47af5c516eba814 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -374,6 +374,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -379,6 +379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// Spigot end
// Paper start
protected int numCollisions = 0; // Paper
@ -16,7 +16,7 @@ index bfc7736bfe538b615343b6f41f2a670493e2c701..22c9fcb8b0a75e59fc6838b9f33430b6
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
@@ -1953,6 +1954,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1958,6 +1959,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -27,7 +27,7 @@ index bfc7736bfe538b615343b6f41f2a670493e2c701..22c9fcb8b0a75e59fc6838b9f33430b6
// Paper end
return nbt;
} catch (Throwable throwable) {
@@ -2090,6 +2095,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2095,6 +2100,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.originWorld = originWorld;
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
}