|
55 | 55 | import org.bukkit.craftbukkit.inventory.CraftItemStack; |
56 | 56 | import org.bukkit.craftbukkit.map.CraftMapCanvas; |
57 | 57 | import org.bukkit.craftbukkit.map.CraftMapView; |
58 | | -import org.bukkit.craftbukkit.util.CraftLocation; |
59 | 58 | import org.bukkit.entity.Entity; |
60 | 59 | import org.bukkit.entity.EntityType; |
61 | 60 | import org.bukkit.entity.LivingEntity; |
@@ -144,7 +143,7 @@ else if (entityType == EntityType.ENDERMAN) { |
144 | 143 |
|
145 | 144 | @Override |
146 | 145 | public void showBlockAction(Player player, Location location, int action, int state) { |
147 | | - BlockPos position = CraftLocation.toBlockPosition(location); |
| 146 | + BlockPos position = Handler.toBlockPos(location); |
148 | 147 | Block block = ((CraftWorld) location.getWorld()).getHandle().getBlockState(position).getBlock(); |
149 | 148 | send(player, new ClientboundBlockEventPacket(position, block, action, state)); |
150 | 149 | } |
@@ -187,12 +186,12 @@ public void showSignEditor(Player player, Location location) { // TODO: MC 1.18: |
187 | 186 | } |
188 | 187 | else { |
189 | 188 | sign = null; |
190 | | - toOpen = CraftLocation.toBlockPosition(toCheck); |
| 189 | + toOpen = Handler.toBlockPos(toCheck); |
191 | 190 | break; |
192 | 191 | } |
193 | 192 | } |
194 | 193 | if (sign != null) { |
195 | | - toOpen = CraftLocation.toBlockPosition(sign.getLocation()); |
| 194 | + toOpen = Handler.toBlockPos(sign.getLocation()); |
196 | 195 | SignSide front = sign.getSide(Side.FRONT); |
197 | 196 | for (int line = 0; line < 4; line++) { |
198 | 197 | front.setLine(line, ""); |
@@ -350,9 +349,9 @@ public void enableNetworkManager() { |
350 | 349 |
|
351 | 350 | @Override |
352 | 351 | public void showDebugTestMarker(Player player, Location location, ColorTag color, String name, int time) { |
353 | | - BlockPos nmsPos = CraftLocation.toBlockPosition(location); |
| 352 | + BlockPos nmsPos = Handler.toBlockPos(location); |
354 | 353 | LocationTag displayPos = !name.isEmpty() ? LocationTag.valueOf(name, CoreUtilities.noDebugContext) : null; |
355 | | - send(player, new ClientboundGameTestHighlightPosPacket(nmsPos, displayPos != null ? CraftLocation.toBlockPosition(displayPos) : nmsPos)); |
| 354 | + send(player, new ClientboundGameTestHighlightPosPacket(nmsPos, displayPos != null ? Handler.toBlockPos(displayPos) : nmsPos)); |
356 | 355 | } |
357 | 356 |
|
358 | 357 | @Override |
|
0 commit comments