mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-21 15:23:50 -07:00
Remove the broken teleport passenger vehicle with player patch
This commit is contained in:
@@ -35,4 +35,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
public static void catchOp(String reason)
|
public static void catchOp(String reason)
|
||||||
{
|
{
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -127,4 +127,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ // PaperSpigot end
|
+ // PaperSpigot end
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -22,4 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||||
packetlistenerplayout.a(this);
|
packetlistenerplayout.a(this);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public Chunk getChunkAt(int x, int z) {
|
public Chunk getChunkAt(int x, int z) {
|
||||||
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
|
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -60,4 +60,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
+ hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -32,4 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -21,4 +21,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -63,4 +63,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") );
|
+ Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -30,4 +30,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -36,4 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ tntMovesInWater = getBoolean("tnt-moves-in-water", true );
|
+ tntMovesInWater = getBoolean("tnt-moves-in-water", true );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
|
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -48,4 +48,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
|
+ log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
|
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -35,4 +35,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
|
+ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -77,4 +77,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -58,4 +58,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
|
+ log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -36,4 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
|
+ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -34,4 +34,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ weaknessEffectModifier = getDouble( "effect-modifiers.weakness", -0.5D );
|
+ weaknessEffectModifier = getDouble( "effect-modifiers.weakness", -0.5D );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -26,4 +26,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.f.put(entityplayer1.getUniqueID(), entityplayer1);
|
this.f.put(entityplayer1.getUniqueID(), entityplayer1);
|
||||||
}
|
}
|
||||||
// Added from changeDimension
|
// Added from changeDimension
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -46,4 +46,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -23,4 +23,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.fuseTicks = 80;
|
this.fuseTicks = 80;
|
||||||
this.lastX = d0;
|
this.lastX = d0;
|
||||||
this.lastY = d1;
|
this.lastY = d1;
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -30,4 +30,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
this.methodProfiler.a("cleaning");
|
this.methodProfiler.a("cleaning");
|
||||||
|
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -211,4 +211,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
{
|
{
|
||||||
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
|
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
|
||||||
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
|
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -197,4 +197,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
|
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -23,4 +23,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -283,4 +283,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -54,4 +54,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F );
|
+ playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -166,4 +166,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
};
|
};
|
||||||
|
|
||||||
public Player.Spigot spigot()
|
public Player.Spigot spigot()
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -170,4 +170,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
public InetSocketAddress getAddress() {
|
public InetSocketAddress getAddress() {
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -149,4 +149,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (itemstack != null && itemstack.count > this.getMaxStackSize()) {
|
if (itemstack != null && itemstack.count > this.getMaxStackSize()) {
|
||||||
itemstack.count = this.getMaxStackSize();
|
itemstack.count = this.getMaxStackSize();
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -36,4 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
|
+ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -115,4 +115,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
|
+ removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -18,4 +18,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CrashReport b(CrashReport crashreport) {
|
public CrashReport b(CrashReport crashreport) {
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -1,96 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aikar <aikar@aikar.co>
|
|
||||||
Date: Fri, 28 Nov 2014 00:24:18 -0600
|
|
||||||
Subject: [PATCH] Teleport passenger/vehicle with player
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
|
||||||
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
|
||||||
}
|
|
||||||
// CraftBukikt end
|
|
||||||
+ // PaperSpigot start - Teleport passenger vehicle with player
|
|
||||||
+ public void retrack() {
|
|
||||||
+ final EntityTracker entityTracker = ((WorldServer) world).getTracker();
|
|
||||||
+ entityTracker.untrackEntity(this);
|
|
||||||
+ entityTracker.track(this);
|
|
||||||
+ }
|
|
||||||
+ // PaperSpigot end
|
|
||||||
|
|
||||||
private static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
|
||||||
private static int entityCount;
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
|
||||||
// minecraftserver.getPlayerList().changeWorld(this, j, worldserver, worldserver1);
|
|
||||||
boolean before = worldserver1.chunkProviderServer.forceChunkLoad;
|
|
||||||
worldserver1.chunkProviderServer.forceChunkLoad = true;
|
|
||||||
- worldserver1.getMinecraftServer().getPlayerList().repositionEntity(this, exit, portal);
|
|
||||||
+ //worldserver1.getMinecraftServer().getPlayerList().repositionEntity(this, exit, portal); // PaperSpigot - no... this entity is dead
|
|
||||||
worldserver1.chunkProviderServer.forceChunkLoad = before;
|
|
||||||
// CraftBukkit end
|
|
||||||
this.world.methodProfiler.c("reloading");
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
|
||||||
|
|
||||||
if (entity != null) {
|
|
||||||
entity.n(this);
|
|
||||||
+ // PaperSpigot start - move entity to new location
|
|
||||||
+ exit.getBlock(); // force load
|
|
||||||
+ entity.setLocation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch());
|
|
||||||
+ // PaperSpigot end
|
|
||||||
/* CraftBukkit start - We need to do this...
|
|
||||||
if (j == 1 && i == 1) {
|
|
||||||
BlockPosition blockposition = this.world.r(worldserver1.getSpawn());
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
||||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
||||||
}
|
|
||||||
|
|
||||||
// If this player is riding another entity, we must dismount before teleporting.
|
|
||||||
- entity.mount(null);
|
|
||||||
+ // PaperSpigot start
|
|
||||||
+ entity.mount(null); // Comment out when fully working, until then leave this
|
|
||||||
+
|
|
||||||
+ Entity vehicle = entity.vehicle;
|
|
||||||
+ Entity passenger = entity.passenger;
|
|
||||||
+ if (vehicle != null) {
|
|
||||||
+ vehicle.passenger = null;
|
|
||||||
+ vehicle.teleportTo(location, false);
|
|
||||||
+ vehicle = vehicle.getBukkitEntity().getHandle();
|
|
||||||
+ entity.vehicle = vehicle;
|
|
||||||
+ vehicle.passenger = entity;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (passenger != null) {
|
|
||||||
+ passenger.vehicle = null;
|
|
||||||
+ passenger.teleportTo(location, false);
|
|
||||||
+ passenger = passenger.getBukkitEntity().getHandle();
|
|
||||||
+ entity.passenger = passenger;
|
|
||||||
+ passenger.vehicle = entity;
|
|
||||||
+ }
|
|
||||||
+ // PaperSpigot end
|
|
||||||
|
|
||||||
// Update the From Location
|
|
||||||
from = event.getFrom();
|
|
||||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
||||||
} else {
|
|
||||||
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // PaperSpigot start
|
|
||||||
+ if (vehicle != null) {
|
|
||||||
+ vehicle.retrack();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (passenger != null) {
|
|
||||||
+ passenger.retrack();
|
|
||||||
+ }
|
|
||||||
+ // PaperSpigot end
|
|
||||||
+
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
@@ -23,4 +23,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
} else {
|
} else {
|
||||||
this.b(world, blockposition, iblockdata, block);
|
this.b(world, blockposition, iblockdata, block);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -36,4 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
@@ -74,4 +74,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (!entity1.dead && entity1.k && entity1 != entity && (entity == null || entity.vehicle != entity1 && entity.passenger != entity1)) {
|
if (!entity1.dead && entity1.k && entity1 != entity && (entity == null || entity.vehicle != entity1 && entity.passenger != entity1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
1.9.5.msysgit.0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user