mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-21 18:15:51 +01:00
fix: logging is not necessary even if ServerPlayer.mobCounts field is not found (#3162)
* fix: logging is not necessary even if ServerPlayer.mobCounts field is not found That field is Paper-specific thing, so it would not exist on Spigot, which will cause confusing error message. * chore: add comment on Player.mobCounts MH fields
This commit is contained in:
parent
708bf13afd
commit
5e85b8a035
@ -2367,7 +2367,8 @@ public class NMSImpl implements NMSBridge {
|
||||
private static final MethodHandle NAVIGATION_S = NMS.getFinalSetter(NavigationAbstract.class, "s");
|
||||
private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getSetter(NavigationAbstract.class, "b");
|
||||
public static final Location PACKET_CACHE_LOCATION = new Location(null, 0, 0, 0);
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(EntityPlayer.class, "mobCounts");
|
||||
// Player.mobCounts: workaround for an issue which suppresses mobs being spawn near NPC players on Paper. Need to check for every update.
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(EntityPlayer.class, "mobCounts", false);
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_GETTER = NMS.getGetter(PlayerChunkMap.class,
|
||||
"viewDistance");
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_SETTER = NMS.getSetter(PlayerChunkMap.class,
|
||||
|
@ -2345,7 +2345,8 @@ public class NMSImpl implements NMSBridge {
|
||||
private static final MethodHandle NAVIGATION_PATHFINDER = NMS.getFinalSetter(PathNavigation.class, "t");
|
||||
private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getFirstSetter(PathNavigation.class, Level.class);
|
||||
public static final Location PACKET_CACHE_LOCATION = new Location(null, 0, 0, 0);
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts");
|
||||
// Player.mobCounts: workaround for an issue which suppresses mobs being spawn near NPC players on Paper. Need to check for every update.
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts", false);
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_GETTER = NMS.getGetter(ChunkMap.class, "J");
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_SETTER = NMS.getSetter(ChunkMap.class, "J");
|
||||
private static final MethodHandle PUFFERFISH_C = NMS.getSetter(Pufferfish.class, "bU");
|
||||
|
@ -2394,7 +2394,8 @@ public class NMSImpl implements NMSBridge {
|
||||
private static final MethodHandle NAVIGATION_PATHFINDER = NMS.getFinalSetter(PathNavigation.class, "t");
|
||||
private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getFirstSetter(PathNavigation.class, Level.class);
|
||||
public static final Location PACKET_CACHE_LOCATION = new Location(null, 0, 0, 0);
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts");
|
||||
// Player.mobCounts: workaround for an issue which suppresses mobs being spawn near NPC players on Paper. Need to check for every update.
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts", false);
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_GETTER = NMS.getGetter(ChunkMap.class, "N");
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_SETTER = NMS.getSetter(ChunkMap.class, "N");
|
||||
private static MethodHandle PORTAL_ENTRANCE_POS_GETTER = NMS.getGetter(Entity.class, "ai");
|
||||
|
@ -2632,7 +2632,8 @@ public class NMSImpl implements NMSBridge {
|
||||
private static final MethodHandle NAVIGATION_PATHFINDER = NMS.getFirstFinalSetter(PathNavigation.class,
|
||||
PathFinder.class);
|
||||
private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getFirstSetter(PathNavigation.class, Level.class);
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts");
|
||||
// Player.mobCounts: workaround for an issue which suppresses mobs being spawn near NPC players on Paper. Need to check for every update.
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts", false);
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_GETTER = NMS.getFirstGetter(ChunkMap.class,
|
||||
int.class);
|
||||
private static final MethodHandle PLAYER_CHUNK_MAP_VIEW_DISTANCE_SETTER = NMS.getFirstSetter(ChunkMap.class,
|
||||
|
@ -2723,7 +2723,8 @@ public class NMSImpl implements NMSBridge {
|
||||
private static final MethodHandle NAVIGATION_PATHFINDER = NMS.getFirstFinalSetter(PathNavigation.class,
|
||||
PathFinder.class);
|
||||
private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getFirstSetter(PathNavigation.class, Level.class);
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts");
|
||||
// Player.mobCounts: workaround for an issue which suppresses mobs being spawn near NPC players on Paper. Need to check for every update.
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts", false);
|
||||
|
||||
private static final MethodHandle PLAYER_INFO_ENTRIES_LIST = NMS
|
||||
.getFirstFinalSetter(ClientboundPlayerInfoUpdatePacket.class, List.class);
|
||||
|
@ -2705,7 +2705,8 @@ public class NMSImpl implements NMSBridge {
|
||||
private static final MethodHandle NAVIGATION_PATHFINDER = NMS.getFirstFinalSetter(PathNavigation.class,
|
||||
PathFinder.class);
|
||||
private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getFirstSetter(PathNavigation.class, Level.class);
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts");
|
||||
// Player.mobCounts: workaround for an issue which suppresses mobs being spawn near NPC players on Paper. Need to check for every update.
|
||||
public static final MethodHandle PAPER_PLAYER_MOB_COUNTS = NMS.getGetter(ServerPlayer.class, "mobCounts", false);
|
||||
private static final MethodHandle PLAYER_INFO_ENTRIES_LIST = NMS
|
||||
.getFirstFinalSetter(ClientboundPlayerInfoUpdatePacket.class, List.class);
|
||||
private static final MethodHandle PLAYERINFO_ENTRIES = PLAYER_INFO_ENTRIES_LIST;
|
||||
|
Loading…
Reference in New Issue
Block a user