geforkt von Mirrors/Paper
SPIGOT-1540: Treat clicking on player model with ItemStack as none.
Dieser Commit ist enthalten in:
Ursprung
8b5c9c15b0
Commit
fc2609dbbe
@ -402,11 +402,11 @@
|
|||||||
+ f = to.getYaw();
|
+ f = to.getYaw();
|
||||||
+ f1 = to.getPitch();
|
+ f1 = to.getPitch();
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
- this.teleportPos = new Vec3D(d0 + d3, d1 + d4, d2 + d5);
|
|
||||||
+ this.internalTeleport(d0, d1, d2, f, f1, set);
|
+ this.internalTeleport(d0, d1, d2, f, f1, set);
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
|
- this.teleportPos = new Vec3D(d0 + d3, d1 + d4, d2 + d5);
|
||||||
+ public void teleport(Location dest) {
|
+ public void teleport(Location dest) {
|
||||||
+ internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
|
+ internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
|
||||||
+ }
|
+ }
|
||||||
@ -1121,7 +1121,7 @@
|
|||||||
ArrayList arraylist = Lists.newArrayList();
|
ArrayList arraylist = Lists.newArrayList();
|
||||||
|
|
||||||
for (int i = 0; i < this.player.activeContainer.c.size(); ++i) {
|
for (int i = 0; i < this.player.activeContainer.c.size(); ++i) {
|
||||||
@@ -851,8 +1535,273 @@
|
@@ -851,8 +1535,275 @@
|
||||||
|
|
||||||
this.player.a(this.player.activeContainer, (List) arraylist);
|
this.player.a(this.player.activeContainer, (List) arraylist);
|
||||||
} else {
|
} else {
|
||||||
@ -1153,6 +1153,8 @@
|
|||||||
+ if (player.inventory.getCarried() != null) {
|
+ if (player.inventory.getCarried() != null) {
|
||||||
+ action = packetplayinwindowclick.c() == 0 ? InventoryAction.DROP_ALL_CURSOR : InventoryAction.DROP_ONE_CURSOR;
|
+ action = packetplayinwindowclick.c() == 0 ? InventoryAction.DROP_ALL_CURSOR : InventoryAction.DROP_ONE_CURSOR;
|
||||||
+ }
|
+ }
|
||||||
|
+ } else if (packetplayinwindowclick.b() < 0) {
|
||||||
|
+ action = InventoryAction.NOTHING;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b());
|
+ Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b());
|
||||||
+ if (slot != null) {
|
+ if (slot != null) {
|
||||||
@ -1396,7 +1398,7 @@
|
|||||||
if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) {
|
if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) {
|
||||||
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true));
|
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true));
|
||||||
this.player.f = true;
|
this.player.f = true;
|
||||||
@@ -915,8 +1864,48 @@
|
@@ -915,8 +1866,48 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() <= 45;
|
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() <= 45;
|
||||||
@ -1446,7 +1448,7 @@
|
|||||||
|
|
||||||
if (flag1 && flag2 && flag3) {
|
if (flag1 && flag2 && flag3) {
|
||||||
if (itemstack == null) {
|
if (itemstack == null) {
|
||||||
@@ -940,6 +1929,7 @@
|
@@ -940,6 +1931,7 @@
|
||||||
|
|
||||||
public void a(PacketPlayInTransaction packetplayintransaction) {
|
public void a(PacketPlayInTransaction packetplayintransaction) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.x());
|
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.x());
|
||||||
@ -1454,7 +1456,7 @@
|
|||||||
Short oshort = (Short) this.k.get(this.player.activeContainer.windowId);
|
Short oshort = (Short) this.k.get(this.player.activeContainer.windowId);
|
||||||
|
|
||||||
if (oshort != null && packetplayintransaction.b() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
|
if (oshort != null && packetplayintransaction.b() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
|
||||||
@@ -950,6 +1940,7 @@
|
@@ -950,6 +1942,7 @@
|
||||||
|
|
||||||
public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
|
public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.x());
|
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.x());
|
||||||
@ -1462,7 +1464,7 @@
|
|||||||
this.player.resetIdleTimer();
|
this.player.resetIdleTimer();
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
BlockPosition blockposition = packetplayinupdatesign.a();
|
BlockPosition blockposition = packetplayinupdatesign.a();
|
||||||
@@ -966,14 +1957,30 @@
|
@@ -966,14 +1959,30 @@
|
||||||
|
|
||||||
if (!tileentitysign.b() || tileentitysign.c() != this.player) {
|
if (!tileentitysign.b() || tileentitysign.c() != this.player) {
|
||||||
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
|
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
|
||||||
@ -1494,7 +1496,7 @@
|
|||||||
|
|
||||||
tileentitysign.update();
|
tileentitysign.update();
|
||||||
worldserver.notify(blockposition, iblockdata, iblockdata, 3);
|
worldserver.notify(blockposition, iblockdata, iblockdata, 3);
|
||||||
@@ -996,11 +2003,27 @@
|
@@ -996,11 +2005,27 @@
|
||||||
|
|
||||||
public void a(PacketPlayInAbilities packetplayinabilities) {
|
public void a(PacketPlayInAbilities packetplayinabilities) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
|
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
|
||||||
@ -1523,7 +1525,7 @@
|
|||||||
ArrayList arraylist = Lists.newArrayList();
|
ArrayList arraylist = Lists.newArrayList();
|
||||||
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator();
|
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator();
|
||||||
|
|
||||||
@@ -1334,12 +2357,34 @@
|
@@ -1334,12 +2359,34 @@
|
||||||
packetdataserializer.release();
|
packetdataserializer.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren