Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Clean out debug logging statements
Dieser Commit ist enthalten in:
Ursprung
8ba70f0fc8
Commit
c34b4b311f
@ -41,7 +41,6 @@ import org.cloudburstmc.protocol.bedrock.packet.ModalFormResponsePacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.MovePlayerPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.NetworkSettingsPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.PlayStatusPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.PlayerAuthInputPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.RequestNetworkSettingsPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackChunkDataPacket;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.ResourcePackChunkRequestPacket;
|
||||
@ -65,7 +64,6 @@ import org.geysermc.geyser.registry.BlockRegistries;
|
||||
import org.geysermc.geyser.registry.Registries;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
import org.geysermc.geyser.session.PendingMicrosoftAuthentication;
|
||||
import org.geysermc.geyser.text.ChatColor;
|
||||
import org.geysermc.geyser.text.GeyserLocale;
|
||||
import org.geysermc.geyser.util.LoginEncryptionUtils;
|
||||
import org.geysermc.geyser.util.MathUtils;
|
||||
@ -96,11 +94,6 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
||||
}
|
||||
|
||||
private PacketSignal translateAndDefault(BedrockPacket packet) {
|
||||
if (packet instanceof PlayerAuthInputPacket) {
|
||||
//System.out.println(packet);
|
||||
} else {
|
||||
System.out.println(ChatColor.toANSI(ChatColor.GREEN) + packet + ChatColor.ANSI_RESET);
|
||||
}
|
||||
Registries.BEDROCK_PACKET_TRANSLATORS.translate(packet.getClass(), packet, session);
|
||||
return PacketSignal.HANDLED; // PacketSignal.UNHANDLED will log a WARN publicly
|
||||
}
|
||||
|
@ -66,14 +66,9 @@ import java.util.Set;
|
||||
|
||||
@Translator(packet = PlayerAuthInputPacket.class)
|
||||
public final class BedrockPlayerAuthInputTranslator extends PacketTranslator<PlayerAuthInputPacket> {
|
||||
private Set<PlayerAuthInputData> data = Set.of();
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, PlayerAuthInputPacket packet) {
|
||||
if (!data.equals(packet.getInputData())) {
|
||||
System.out.println(packet.getInputData());
|
||||
this.data = packet.getInputData();
|
||||
}
|
||||
SessionPlayerEntity entity = session.getPlayerEntity();
|
||||
|
||||
boolean wasJumping = session.getInputCache().wasJumping();
|
||||
|
@ -84,7 +84,6 @@ public class JavaRecipeBookAddTranslator extends PacketTranslator<ClientboundRec
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundRecipeBookAddPacket packet) {
|
||||
System.out.println(packet);
|
||||
int netId = session.getLastRecipeNetId().get();
|
||||
Int2ObjectMap<List<String>> javaToBedrockRecipeIds = session.getJavaToBedrockRecipeIds();
|
||||
Int2ObjectMap<GeyserRecipe> geyserRecipes = session.getCraftingRecipes();
|
||||
@ -179,12 +178,10 @@ public class JavaRecipeBookAddTranslator extends PacketTranslator<ClientboundRec
|
||||
}
|
||||
javaToBedrockRecipeIds.put(contents.id(), bedrockRecipeIds);
|
||||
session.getSmithingRecipes().add(new GeyserSmithingRecipe(smithingRecipe));
|
||||
System.out.println(new GeyserSmithingRecipe(smithingRecipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//System.out.println(craftingDataPacket);
|
||||
session.sendUpstreamPacket(craftingDataPacket);
|
||||
session.sendUpstreamPacket(recipesPacket);
|
||||
session.getLastRecipeNetId().set(netId);
|
||||
@ -301,7 +298,6 @@ public class JavaRecipeBookAddTranslator extends PacketTranslator<ClientboundRec
|
||||
}
|
||||
|
||||
if (complexInputs) {
|
||||
System.out.println(inputs);
|
||||
long size = 1;
|
||||
// See how big a cartesian product will get without creating one (Guava throws an error; not really ideal)
|
||||
for (List<ItemDescriptorWithCount> list : inputs) {
|
||||
|
@ -57,14 +57,12 @@ import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.Clientbound
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundUpdateRecipesPacket.SelectableRecipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Used to send all valid recipes from Java to Bedrock.
|
||||
@ -103,7 +101,6 @@ public class JavaUpdateRecipesTranslator extends PacketTranslator<ClientboundUpd
|
||||
public void translate(GeyserSession session, ClientboundUpdateRecipesPacket packet) {
|
||||
int netId = session.getLastRecipeNetId().get();
|
||||
CraftingDataPacket craftingDataPacket = new CraftingDataPacket();
|
||||
System.out.println(packet);
|
||||
|
||||
boolean oldSmithingTable;
|
||||
int[] smithingBase = packet.getItemSets().get(SMITHING_BASE);
|
||||
@ -115,8 +112,6 @@ public class JavaUpdateRecipesTranslator extends PacketTranslator<ClientboundUpd
|
||||
addSmithingTransformRecipes(session, craftingDataPacket.getCraftingData());
|
||||
netId = session.getLastRecipeNetId().get(); // Was updated in the above method.
|
||||
} else {
|
||||
System.out.println(Arrays.stream(smithingTemplate).mapToObj(i -> Registries.JAVA_ITEMS.get(i).javaIdentifier()).collect(Collectors.joining(" ")));
|
||||
System.out.println(Arrays.stream(smithingAddition).mapToObj(i -> Registries.JAVA_ITEMS.get(i).javaIdentifier()).collect(Collectors.joining(" ")));
|
||||
oldSmithingTable = false;
|
||||
// BDS sends armor trim templates and materials before the CraftingDataPacket
|
||||
TrimDataPacket trimDataPacket = new TrimDataPacket();
|
||||
|
@ -47,7 +47,6 @@ public class JavaPlayerPositionTranslator extends PacketTranslator<ClientboundPl
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundPlayerPositionPacket packet) {
|
||||
System.out.println(packet);
|
||||
if (!session.isLoggedIn())
|
||||
return;
|
||||
|
||||
|
@ -519,7 +519,7 @@ public class InventoryUtils {
|
||||
}
|
||||
}
|
||||
|
||||
if (!ingredients.equals(mirroredIngredients) ||
|
||||
if (ingredients.equals(mirroredIngredients) ||
|
||||
!testShapedRecipe(session, mirroredIngredients, inventoryGetter, gridDimensions, firstRow, height, firstCol, width)) {
|
||||
continue;
|
||||
}
|
||||
@ -551,7 +551,6 @@ public class InventoryUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("Found existing match for item: " + recipe);
|
||||
return recipe;
|
||||
}
|
||||
return null;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren