Update to Minecraft 1.13-pre7

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-15 10:00:00 +10:00
parent d1e91a8adb
commit 7e0a66fdd5
608 changed files with 17788 additions and 9378 deletions

View File

@@ -12,7 +12,7 @@
public class PortalTravelAgent {
@@ -26,8 +31,21 @@
@@ -27,8 +32,21 @@
int i = MathHelper.floor(entity.locX);
int j = MathHelper.floor(entity.locY) - 1;
int k = MathHelper.floor(entity.locZ);
@@ -36,7 +36,7 @@
for (int l = -2; l <= 2; ++l) {
for (int i1 = -2; i1 <= 2; ++i1) {
@@ -42,18 +60,63 @@
@@ -43,18 +61,63 @@
}
}
@@ -94,7 +94,7 @@
+
+ public BlockPosition findPortal(double x, double y, double z, int radius) {
+ if (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END) {
+ return this.findEndPortal(this.world.worldProvider.h());
+ return this.findEndPortal(this.world.worldProvider.d());
+ }
+ // CraftBukkit end
double d0 = -1.0D;
@@ -107,7 +107,7 @@
boolean flag1 = true;
Object object = BlockPosition.ZERO;
long k = ChunkCoordIntPair.a(i, j);
@@ -66,12 +129,12 @@
@@ -67,12 +130,12 @@
portaltravelagent_chunkcoordinatesportal.b = this.world.getTime();
flag1 = false;
} else {
@@ -120,12 +120,12 @@
- for (int i1 = -128; i1 <= 128; ++i1) {
+ for (int i1 = -radius; i1 <= radius; ++i1) {
for (BlockPosition blockposition2 = blockposition.a(l, this.world.ab() - 1 - blockposition.getY(), i1); blockposition2.getY() >= 0; blockposition2 = blockposition1) {
for (BlockPosition blockposition2 = blockposition.a(l, this.world.aa() - 1 - blockposition.getY(), i1); blockposition2.getY() >= 0; blockposition2 = blockposition1) {
blockposition1 = blockposition2.down();
if (this.world.getType(blockposition2).getBlock() == Blocks.PORTAL) {
@@ -95,6 +158,29 @@
if (this.world.getType(blockposition2).getBlock() == PortalTravelAgent.a) {
@@ -96,6 +159,29 @@
if (flag1) {
this.c.put(k, new PortalTravelAgent.ChunkCoordinatesPortal((BlockPosition) object, this.world.getTime()));
this.d.put(k, new PortalTravelAgent.ChunkCoordinatesPortal((BlockPosition) object, this.world.getTime()));
}
+ // CraftBukkit start - Move entity teleportation logic into exit
+ return (BlockPosition) object;
@@ -153,7 +153,7 @@
double d2 = (double) ((BlockPosition) object).getX() + 0.5D;
double d3 = (double) ((BlockPosition) object).getZ() + 0.5D;
@@ -132,30 +218,59 @@
@@ -133,31 +219,59 @@
f4 = 1.0F;
}
@@ -165,6 +165,7 @@
- entity.yaw = f - (float) (entity.getPortalDirection().opposite().get2DRotationValue() * 90) + (float) (shapedetector_shapedetectorcollection.getFacing().get2DRotationValue() * 90);
- if (entity instanceof EntityPlayer) {
- ((EntityPlayer) entity).playerConnection.a(d2, d5, d3, entity.yaw, entity.pitch);
- ((EntityPlayer) entity).playerConnection.syncPosition();
- } else {
- entity.setPositionRotation(d2, d5, d3, entity.yaw, entity.pitch);
- }
@@ -231,7 +232,7 @@
int l = i;
int i1 = j;
int j1 = k;
@@ -180,10 +295,10 @@
@@ -182,10 +296,10 @@
double d4;
for (i2 = i - 16; i2 <= i + 16; ++i2) {
@@ -242,9 +243,9 @@
- d2 = (double) j2 + 0.5D - entity.locZ;
+ d2 = (double) j2 + 0.5D - z; // CraftBukkit
label271:
for (k2 = this.world.ab() - 1; k2 >= 0; --k2) {
@@ -215,7 +330,7 @@
label257:
for (k2 = this.world.aa() - 1; k2 >= 0; --k2) {
@@ -217,7 +331,7 @@
}
}
@@ -253,7 +254,7 @@
d4 = d1 * d1 + d3 * d3 + d2 * d2;
if (d0 < 0.0D || d4 < d0) {
d0 = d4;
@@ -232,10 +347,10 @@
@@ -234,10 +348,10 @@
if (d0 < 0.0D) {
for (i2 = i - 16; i2 <= i + 16; ++i2) {
@@ -264,9 +265,9 @@
- d2 = (double) j2 + 0.5D - entity.locZ;
+ d2 = (double) j2 + 0.5D - z; // CraftBukkit
label219:
for (k2 = this.world.ab() - 1; k2 >= 0; --k2) {
@@ -260,7 +375,7 @@
label205:
for (k2 = this.world.aa() - 1; k2 >= 0; --k2) {
@@ -262,7 +376,7 @@
}
}
@@ -275,7 +276,7 @@
d4 = d1 * d1 + d3 * d3 + d2 * d2;
if (d0 < 0.0D || d4 < d0) {
d0 = d4;
@@ -359,5 +474,10 @@
@@ -354,5 +468,10 @@
super(blockposition.getX(), blockposition.getY(), blockposition.getZ());
this.b = i;
}