mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 02:34:30 +01:00
Remove the broken teleport passenger vehicle with player patch
This commit is contained in:
parent
e1e0781a99
commit
335c9c3009
37 changed files with 108 additions and 132 deletions
Spigot-Server-Patches
Ability-to-disable-asynccatcher.patchAdd-TNT-source-location-API.patchAdd-a-constructor-for-setting-header-and-footer.patchAdd-async-chunk-load-API.patchAdd-configurable-despawn-distances-for-living-entiti.patchAllow-for-toggling-of-spawn-chunks.patchAllow-nerfed-mobs-to-jump.patchAllow-specified-ItemStacks-to-retain-their-invalid-d.patchCenter-TNT-grid-sample-points.patchConfigurable-TNT-water-movement.patchConfigurable-baby-zombie-movement-speed.patchConfigurable-cactus-and-reed-natural-growth-heights.patchConfigurable-damage-multiplier-for-PvP-blocking.patchConfigurable-fishing-time-ranges.patchConfigurable-game-mechanics-changes.patchConfigurable-speed-for-water-flowing-over-lava.patchConfigurable-squid-spawn-ranges.patchConfigurable-strength-and-weakness-effect-modifiers.patchDo-not-remove-player-in-world-change.patchDrop-falling-block-entities-that-are-above-the-speci.patchFix-directional-TNT-bias.patchFix-redstone-lag-issues.patchFurther-improve-server-tick-loop.patchMove-sound-handling-out-of-the-chest-tick-loop.patchOnly-refresh-abilities-if-needed.patchOptimize-TileEntity-Ticking.patchPlayer-Exhaustion-Multipliers.patchPlayer-affects-spawning-API.patchPlayer-lookup-improvements.patchRemove-CraftBukkit-Feature-of-ItemStack-s-having-inf.patchRemove-invalid-mob-spawner-tile-entities.patchRemove-specific-entities-that-fly-through-an-unloade.patchShow-PaperSpigot-in-client-crashes-server-lists-and-.patchTeleport-passenger-vehicle-with-player.patchTemporary-fix-for-rails-dupe.patchToggle-for-player-interact-limiter.patchVanished-players-don-t-have-rights.patch
|
@ -35,4 +35,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
public static void catchOp(String reason)
|
||||
{
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -127,4 +127,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ // PaperSpigot end
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -22,4 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public Chunk getChunkAt(int x, int z) {
|
||||
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -60,4 +60,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -32,4 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -21,4 +21,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return;
|
||||
}
|
||||
// Spigot End
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -63,4 +63,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -30,4 +30,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
++i;
|
||||
}
|
||||
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -36,4 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
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);
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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 );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -77,4 +77,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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 );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -36,4 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ 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 );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -26,4 +26,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.f.put(entityplayer1.getUniqueID(), entityplayer1);
|
||||
}
|
||||
// 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.lastX = d0;
|
||||
this.lastY = d1;
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -30,4 +30,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
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()
|
||||
+ ( ( 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);
|
||||
}
|
||||
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -23,4 +23,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -283,4 +283,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+}
|
||||
\ 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 );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -166,4 +166,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
};
|
||||
|
||||
public Player.Spigot spigot()
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -170,4 +170,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
public InetSocketAddress getAddress() {
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -149,4 +149,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (itemstack != null && 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 );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -115,4 +115,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
|
@ -18,4 +18,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
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 {
|
||||
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)) {
|
||||
return false;
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue