Fix more warnings and do some small optimizations (#1356)
* Fix more warnings and do some small optimizations * Fix more warnings in ValueConversions * Clean up some decompiler names and fix an unnecessary transformation around commands * Use (way) more compact data structure for slot map * Minor tweaks Such as map directly in the collector * I hate vanilla javac Revert map changes in latest commit
This commit is contained in:
1 parent
e4dc080657
commit
f18cfb09d2
18 files changed
+116
-139
No files matched your search
@@ -25,14 +25,14 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
|
||||
public class ServerNetworkHandler
|
||||
{
|
||||
private static Map<ServerPlayer, String> remoteCarpetPlayers = new HashMap<>();
|
||||
private static Set<ServerPlayer> validCarpetPlayers = new HashSet<>();
|
||||
private static final Map<ServerPlayer, String> remoteCarpetPlayers = new HashMap<>();
|
||||
private static final Set<ServerPlayer> validCarpetPlayers = new HashSet<>();
|
||||
|
||||
private static Map<String, BiConsumer<ServerPlayer, Tag>> dataHandlers = new HashMap<String, BiConsumer<ServerPlayer, Tag>>(){{
|
||||
put("clientCommand", (p, t) -> {
|
||||
private static final Map<String, BiConsumer<ServerPlayer, Tag>> dataHandlers = Map.of(
|
||||
"clientCommand", (p, t) -> {
|
||||
handleClientCommand(p, (CompoundTag)t);
|
||||
});
|
||||
}};
|
||||
}
|
||||
);
|
||||
|
||||
public static void handleData(FriendlyByteBuf data, ServerPlayer player)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user