@Nullable public Packet<?> getPacket(ItemStack stack) { if (this.isDirty) { this.isDirty = false; return new SPacketMaps(stack.getMetadata(), MapData.this.scale, MapData.this.trackingPosition, MapData.this.mapDecorations.values(), MapData.this.colors, this.minX, this.minY, this.maxX + 1 - this.minX, this.maxY + 1 - this.minY); } else { return this.tick++ % 5 == 0 ? new SPacketMaps(stack.getMetadata(), MapData.this.scale, MapData.this.trackingPosition, MapData.this.mapDecorations.values(), MapData.this.colors, 0, 0, 0, 0) : null; } }
public Packet<?> getPacket(ItemStack stack) { if (this.isDirty) { this.isDirty = false; return new SPacketMaps(stack.getMetadata(), MapData.this.scale, MapData.this.trackingPosition, MapData.this.mapDecorations.values(), MapData.this.colors, this.minX, this.minY, this.maxX + 1 - this.minX, this.maxY + 1 - this.minY); } else { return this.tick++ % 5 == 0 ? new SPacketMaps(stack.getMetadata(), MapData.this.scale, MapData.this.trackingPosition, MapData.this.mapDecorations.values(), MapData.this.colors, 0, 0, 0, 0) : null; } }
/** * Updates the worlds MapStorage with the specified MapData for the specified map-identifier and invokes a * MapItemRenderer for it */ public void handleMaps(SPacketMaps packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); MapData mapdata = ItemMap.loadMapData(packetIn.getMapId(), this.gameController.theWorld); packetIn.setMapdataTo(mapdata); this.gameController.entityRenderer.getMapItemRenderer().updateMapTexture(mapdata); }
/** * Updates the worlds MapStorage with the specified MapData for the specified map-identifier and invokes a * MapItemRenderer for it */ void handleMaps(SPacketMaps packetIn);