use of net.minecraft.network.play.server.SPacketMaps in project Magma by magmafoundation.
the class CraftPlayer method sendMap.
@Override
public void sendMap(MapView map) {
if (getHandle().connection == null)
return;
RenderData data = ((CraftMapView) map).render(this);
Collection<MapDecoration> icons = new ArrayList<>();
for (MapCursor cursor : data.cursors) {
if (cursor.isVisible()) {
icons.add(new MapDecoration(MapDecoration.Type.byIcon(cursor.getRawType()), cursor.getX(), cursor.getY(), cursor.getDirection()));
}
}
SPacketMaps packet = new SPacketMaps(map.getId(), map.getScale().getValue(), true, icons, data.buffer, 0, 0, 128, 128);
getHandle().connection.sendPacket(packet);
}
use of net.minecraft.network.play.server.SPacketMaps in project CumServerPro by MCUmbrella.
the class CraftPlayer method sendMap.
@Override
public void sendMap(MapView map) {
if (getHandle().connection == null)
return;
RenderData data = ((CraftMapView) map).render(this);
Collection<MapDecoration> icons = new ArrayList<>();
for (MapCursor cursor : data.cursors) {
if (cursor.isVisible()) {
icons.add(new MapDecoration(MapDecoration.Type.byIcon(cursor.getRawType()), cursor.getX(), cursor.getY(), cursor.getDirection()));
}
}
SPacketMaps packet = new SPacketMaps(map.getId(), map.getScale().getValue(), true, icons, data.buffer, 0, 0, 128, 128);
getHandle().connection.sendPacket(packet);
}
Aggregations