Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
Remove redundant BlockPosition creation from sleep API
Dieser Commit ist enthalten in:
Ursprung
756c38d1e4
Commit
917411fd80
@ -162,7 +162,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
Preconditions.checkArgument(location != null, "Location == null");
|
Preconditions.checkArgument(location != null, "Location == null");
|
||||||
Preconditions.checkArgument(location.getWorld().equals(getWorld()), "Cannot sleep across worlds");
|
Preconditions.checkArgument(location.getWorld().equals(getWorld()), "Cannot sleep across worlds");
|
||||||
|
|
||||||
BlockPosition blockposition = new BlockPosition(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
|
BlockPosition blockposition = new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||||
IBlockData iblockdata = getHandle().world.getType(blockposition);
|
IBlockData iblockdata = getHandle().world.getType(blockposition);
|
||||||
if (!(iblockdata.getBlock() instanceof BlockBed)) {
|
if (!(iblockdata.getBlock() instanceof BlockBed)) {
|
||||||
return false;
|
return false;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren