public class MapState extends PersistentState
Modifier and Type | Class and Description |
---|---|
class |
MapState.PlayerUpdateTracker |
Modifier and Type | Field and Description |
---|---|
private Map<String,MapBannerMarker> |
banners |
byte[] |
colors |
RegistryKey<World> |
dimension |
private static Logger |
field_25019 |
private Map<String,MapFrameMarker> |
frames |
Map<String,MapIcon> |
icons |
boolean |
locked |
byte |
scale |
boolean |
showIcons |
boolean |
unlimitedTracking |
List<MapState.PlayerUpdateTracker> |
updateTrackers |
private Map<PlayerEntity,MapState.PlayerUpdateTracker> |
updateTrackersByPlayer |
int |
xCenter |
int |
zCenter |
Modifier and Type | Method and Description |
---|---|
void |
addBanner(WorldAccess world,
BlockPos pos) |
static void |
addDecorationsTag(ItemStack stack,
BlockPos pos,
String id,
MapIcon.Type type) |
private void |
addIcon(MapIcon.Type type,
WorldAccess world,
String key,
double x,
double z,
double rotation,
Text text) |
void |
calculateCenter(double x,
double z,
int scale) |
void |
copyFrom(MapState state) |
void |
fromTag(CompoundTag tag) |
Packet<?> |
getPlayerMarkerPacket(ItemStack map,
BlockView world,
PlayerEntity pos) |
MapState.PlayerUpdateTracker |
getPlayerSyncData(PlayerEntity player) |
void |
init(int x,
int z,
int scale,
boolean showIcons,
boolean unlimitedTracking,
RegistryKey<World> dimension) |
void |
markDirty(int x,
int z) |
void |
removeBanner(BlockView world,
int x,
int z) |
void |
removeFrame(BlockPos pos,
int id) |
CompoundTag |
toTag(CompoundTag tag) |
void |
update(PlayerEntity player,
ItemStack stack) |
private static final Logger field_25019
public int xCenter
public int zCenter
public RegistryKey<World> dimension
public boolean showIcons
public boolean unlimitedTracking
public byte scale
public byte[] colors
public boolean locked
public final List<MapState.PlayerUpdateTracker> updateTrackers
private final Map<PlayerEntity,MapState.PlayerUpdateTracker> updateTrackersByPlayer
private final Map<String,MapBannerMarker> banners
private final Map<String,MapFrameMarker> frames
public MapState(String key)
public void init(int x, int z, int scale, boolean showIcons, boolean unlimitedTracking, RegistryKey<World> dimension)
public void calculateCenter(double x, double z, int scale)
public void fromTag(CompoundTag tag)
fromTag
in class PersistentState
public CompoundTag toTag(CompoundTag tag)
toTag
in class PersistentState
public void copyFrom(MapState state)
public void update(PlayerEntity player, ItemStack stack)
public static void addDecorationsTag(ItemStack stack, BlockPos pos, String id, MapIcon.Type type)
private void addIcon(MapIcon.Type type, @Nullable WorldAccess world, String key, double x, double z, double rotation, @Nullable Text text)
@Nullable public Packet<?> getPlayerMarkerPacket(ItemStack map, BlockView world, PlayerEntity pos)
public void markDirty(int x, int z)
public MapState.PlayerUpdateTracker getPlayerSyncData(PlayerEntity player)
public void addBanner(WorldAccess world, BlockPos pos)
public void removeBanner(BlockView world, int x, int z)
public void removeFrame(BlockPos pos, int id)