mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
SPIGOT-5133: Throwing items into secondary end world portal causes crash
This commit is contained in:
parent
a0e47473ce
commit
bf32933484
1 changed files with 20 additions and 3 deletions
|
@ -598,7 +598,7 @@
|
|||
}
|
||||
|
||||
public void j(boolean flag) {
|
||||
@@ -2037,20 +2378,33 @@
|
||||
@@ -2037,33 +2378,46 @@
|
||||
|
||||
@Nullable
|
||||
public Entity a(DimensionManager dimensionmanager) {
|
||||
|
@ -631,10 +631,27 @@
|
|||
- BlockPosition blockposition;
|
||||
+ BlockPosition blockposition = location; // CraftBukkit
|
||||
|
||||
- if (dimensionmanager1 == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) {
|
||||
+ if (blockposition == null) { // CraftBukkit
|
||||
if (dimensionmanager1 == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) {
|
||||
+ if (dimensionmanager1.getType() == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) { // CraftBukkit
|
||||
blockposition = worldserver1.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver1.getSpawn());
|
||||
} else if (dimensionmanager == DimensionManager.THE_END) {
|
||||
- } else if (dimensionmanager == DimensionManager.THE_END) {
|
||||
+ } else if (dimensionmanager.getType() == DimensionManager.THE_END) { // CraftBukkit
|
||||
blockposition = worldserver1.getDimensionSpawn();
|
||||
} else {
|
||||
double d0 = this.locX;
|
||||
double d1 = this.locZ;
|
||||
double d2 = 8.0D;
|
||||
|
||||
- if (dimensionmanager1 == DimensionManager.OVERWORLD && dimensionmanager == DimensionManager.NETHER) {
|
||||
+ if (dimensionmanager1.getType() == DimensionManager.OVERWORLD && dimensionmanager.getType() == DimensionManager.NETHER) { // CraftBukkit
|
||||
d0 /= 8.0D;
|
||||
d1 /= 8.0D;
|
||||
- } else if (dimensionmanager1 == DimensionManager.NETHER && dimensionmanager == DimensionManager.OVERWORLD) {
|
||||
+ } else if (dimensionmanager1.getType() == DimensionManager.NETHER && dimensionmanager.getType() == DimensionManager.OVERWORLD) { // CraftBukkit
|
||||
d0 *= 8.0D;
|
||||
d1 *= 8.0D;
|
||||
}
|
||||
@@ -2088,6 +2442,25 @@
|
||||
vec3d = shapedetector_shape.velocity;
|
||||
f = (float) shapedetector_shape.yaw;
|
||||
|
|
Loading…
Reference in a new issue