本文整理汇总了Java中org.bukkit.craftbukkit.map.RenderData类的典型用法代码示例。如果您正苦于以下问题:Java RenderData类的具体用法?Java RenderData怎么用?Java RenderData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RenderData类属于org.bukkit.craftbukkit.map包,在下文中一共展示了RenderData类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendMap
import org.bukkit.craftbukkit.map.RenderData; //导入依赖的package包/类
@Override
public void sendMap(MapView map) {
if (getHandle().playerNetServerHandler == null) return;
RenderData data = ((CraftMapView) map).render(this);
for (int x = 0; x < 128; ++x) {
byte[] bytes = new byte[131];
bytes[1] = (byte) x;
for (int y = 0; y < 128; ++y) {
bytes[y + 3] = data.buffer[y * 128 + x];
}
net.minecraft.network.play.server.S34PacketMaps packet = new net.minecraft.network.play.server.S34PacketMaps(map.getId(), bytes);
getHandle().playerNetServerHandler.sendPacket(packet);
}
}
示例2: sendMap
import org.bukkit.craftbukkit.map.RenderData; //导入依赖的package包/类
@Override
public void sendMap(MapView map) {
if (getHandle().playerConnection == null) return;
RenderData data = ((CraftMapView) map).render(this);
for (int x = 0; x < 128; ++x) {
byte[] bytes = new byte[131];
bytes[1] = (byte) x;
for (int y = 0; y < 128; ++y) {
bytes[y + 3] = data.buffer[y * 128 + x];
}
PacketPlayOutMap packet = new PacketPlayOutMap(map.getId(), bytes);
getHandle().playerConnection.sendPacket(packet);
}
}
示例3: sendMap
import org.bukkit.craftbukkit.map.RenderData; //导入依赖的package包/类
@Override
public void sendMap(MapView map) {
if (getHandle().playerConnection == null) return;
RenderData data = ((CraftMapView) map).render(this);
Collection<MapIcon> icons = new ArrayList<MapIcon>();
for (MapCursor cursor : data.cursors) {
if (cursor.isVisible()) {
icons.add(new MapIcon(cursor.getRawType(), cursor.getX(), cursor.getY(), cursor.getDirection()));
}
}
PacketPlayOutMap packet = new PacketPlayOutMap(map.getId(), map.getScale().getValue(), icons, data.buffer, 0, 0, 0, 0);
getHandle().playerConnection.sendPacket(packet);
}
示例4: sendMap
import org.bukkit.craftbukkit.map.RenderData; //导入依赖的package包/类
public void sendMap(MapView map) {
if (getHandle().playerConnection == null) return;
RenderData data = ((CraftMapView) map).render(this);
for (int x = 0; x < 128; ++x) {
byte[] bytes = new byte[131];
bytes[1] = (byte) x;
for (int y = 0; y < 128; ++y) {
bytes[y + 3] = data.buffer[y * 128 + x];
}
Packet131ItemData packet = new Packet131ItemData((short) Material.MAP.getId(), map.getId(), bytes);
getHandle().playerConnection.sendPacket(packet);
}
}
示例5: sendMap
import org.bukkit.craftbukkit.map.RenderData; //导入依赖的package包/类
@Override
public void sendMap(MapView map) {
if (getHandle().playerConnection == null) return;
RenderData data = ((CraftMapView) map).render(this);
Collection<MapIcon> icons = new ArrayList<MapIcon>();
for (MapCursor cursor : data.cursors) {
if (cursor.isVisible()) {
icons.add(new MapIcon(cursor.getRawType(), cursor.getX(), cursor.getY(), cursor.getDirection()));
}
}
PacketPlayOutMap packet = new PacketPlayOutMap(map.getId(), map.getScale().getValue(), true, icons, data.buffer, 0, 0, 0, 0);
getHandle().playerConnection.sendPacket(packet);
}
示例6: sendMap
import org.bukkit.craftbukkit.map.RenderData; //导入依赖的package包/类
public void sendMap(MapView map) {
if (getHandle().field_71135_a == null) return;
RenderData data = ((CraftMapView) map).render(this);
for (int x = 0; x < 128; ++x) {
byte[] bytes = new byte[131];
bytes[1] = (byte) x;
for (int y = 0; y < 128; ++y) {
bytes[y + 3] = data.buffer[y * 128 + x];
}
net.minecraft.network.packet.Packet131MapData packet = new net.minecraft.network.packet.Packet131MapData((short) Material.MAP.getId(), map.getId(), bytes);
getHandle().field_71135_a.func_72567_b(packet);
}
}