mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Update translator class names to match Mojang mappings
This commit is contained in:
parent
768b09e7fd
commit
84ae28f2c2
70 changed files with 82 additions and 75 deletions
|
@ -186,7 +186,7 @@ public class Entity {
|
|||
}
|
||||
|
||||
/**
|
||||
* Teleports an entity to a new location. Used in JavaEntityTeleportTranslator.
|
||||
* Teleports an entity to a new location. Used in JavaTeleportEntityTranslator.
|
||||
* @param session GeyserSession.
|
||||
* @param position The new position of the entity.
|
||||
* @param yaw The new yaw of the entity.
|
||||
|
@ -198,7 +198,7 @@ public class Entity {
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates an entity's head position. Used in JavaEntityHeadLookTranslator.
|
||||
* Updates an entity's head position. Used in JavaRotateHeadTranslator.
|
||||
* @param session GeyserSession.
|
||||
* @param headYaw The new head rotation of the entity.
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ public class Entity {
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates an entity's position and rotation. Used in JavaEntityPositionRotationTranslator.
|
||||
* Updates an entity's position and rotation. Used in JavaMoveEntityPosRotTranslator.
|
||||
* @param session GeyserSession
|
||||
* @param moveX The new X offset of the current position.
|
||||
* @param moveY The new Y offset of the current position.
|
||||
|
@ -221,7 +221,7 @@ public class Entity {
|
|||
}
|
||||
|
||||
/**
|
||||
* Updates an entity's rotation. Used in JavaEntityRotationTranslator.
|
||||
* Updates an entity's rotation. Used in JavaMoveEntityRotTranslator.
|
||||
* @param session GeyserSession.
|
||||
* @param yaw The new yaw of the entity.
|
||||
* @param pitch The new pitch of the entity.
|
||||
|
|
|
@ -119,7 +119,7 @@ public class MerchantInventoryTranslator extends BaseInventoryTranslator {
|
|||
|
||||
@Override
|
||||
public void openInventory(GeyserSession session, Inventory inventory) {
|
||||
//Handled in JavaTradeListTranslator
|
||||
//Handled in JavaMerchantOffersTranslator
|
||||
//TODO: send a blank inventory here in case the villager doesn't send a TradeList packet
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.StatisticsUtils;
|
||||
|
||||
@Translator(packet = ClientboundAwardStatsPacket.class)
|
||||
public class JavaStatisticsTranslator extends PacketTranslator<ClientboundAwardStatsPacket> {
|
||||
public class JavaAwardStatsTranslator extends PacketTranslator<ClientboundAwardStatsPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAwardStatsPacket packet) {
|
|
@ -33,7 +33,8 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundBossEventPacket;
|
||||
|
||||
@Translator(packet = ClientboundBossEventPacket.class)
|
||||
public class JavaBossBarTranslator extends PacketTranslator<ClientboundBossEventPacket> {
|
||||
public class JavaBossEventTranslator extends PacketTranslator<ClientboundBossEventPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundBossEventPacket packet) {
|
||||
BossBar bossBar = session.getEntityCache().getBossBar(packet.getUuid());
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import com.nukkitx.protocol.bedrock.packet.SetDifficultyPacket;
|
||||
|
||||
@Translator(packet = ClientboundChangeDifficultyPacket.class)
|
||||
public class JavaDifficultyTranslator extends PacketTranslator<ClientboundChangeDifficultyPacket> {
|
||||
public class JavaChangeDifficultyTranslator extends PacketTranslator<ClientboundChangeDifficultyPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundChangeDifficultyPacket packet) {
|
|
@ -54,7 +54,7 @@ import org.geysermc.connector.utils.EntityUtils;
|
|||
import java.util.*;
|
||||
|
||||
@Translator(packet = ClientboundCommandsPacket.class)
|
||||
public class JavaDeclareCommandsTranslator extends PacketTranslator<ClientboundCommandsPacket> {
|
||||
public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommandsPacket> {
|
||||
|
||||
private static final String[] ALL_EFFECT_IDENTIFIERS = EntityUtils.getAllEffectIdentifiers();
|
||||
private static final String[] ENUM_BOOLEAN = {"true", "false"};
|
|
@ -42,7 +42,7 @@ import org.geysermc.cumulus.util.FormType;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@Translator(packet = ClientboundCustomPayloadPacket.class)
|
||||
public class JavaPluginMessageTranslator extends PacketTranslator<ClientboundCustomPayloadPacket> {
|
||||
public class JavaCustomPayloadTranslator extends PacketTranslator<ClientboundCustomPayloadPacket> {
|
||||
private final GeyserLogger logger = GeyserConnector.getInstance().getLogger();
|
||||
|
||||
@Override
|
|
@ -31,8 +31,11 @@ import org.geysermc.connector.network.session.GeyserSession;
|
|||
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
/**
|
||||
* For the login cycle.
|
||||
*/
|
||||
@Translator(packet = ClientboundCustomQueryPacket.class)
|
||||
public class JavaLoginPluginRequestTranslator extends PacketTranslator<ClientboundCustomQueryPacket> {
|
||||
public class JavaCustomQueryTranslator extends PacketTranslator<ClientboundCustomQueryPacket> {
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundCustomQueryPacket packet) {
|
||||
// A vanilla client doesn't know any PluginMessage in the Login state, so we don't know any either.
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.network.translators.chat.MessageTranslator;
|
||||
|
||||
@Translator(packet = ClientboundDisconnectPacket.class)
|
||||
public class JavaDisconnectPacket extends PacketTranslator<ClientboundDisconnectPacket> {
|
||||
public class JavaDisconnectTranslator extends PacketTranslator<ClientboundDisconnectPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundDisconnectPacket packet) {
|
|
@ -48,7 +48,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
|
||||
@Translator(packet = ClientboundLoginPacket.class)
|
||||
public class JavaJoinGameTranslator extends PacketTranslator<ClientboundLoginPacket> {
|
||||
public class JavaLoginTranslator extends PacketTranslator<ClientboundLoginPacket> {
|
||||
private static final List<SkinPart> SKIN_PART_VALUES = Arrays.asList(SkinPart.values());
|
||||
|
||||
@Override
|
|
@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
* Indicates that the client should open a particular advancement tab
|
||||
*/
|
||||
@Translator(packet = ClientboundSelectAdvancementsTabPacket.class)
|
||||
public class JavaAdvancementsTabTranslator extends PacketTranslator<ClientboundSelectAdvancementsTabPacket> {
|
||||
public class JavaSelectAdvancementsTabTranslator extends PacketTranslator<ClientboundSelectAdvancementsTabPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSelectAdvancementsTabPacket packet) {
|
|
@ -39,7 +39,7 @@ import org.geysermc.connector.utils.LocaleUtils;
|
|||
import java.util.Map;
|
||||
|
||||
@Translator(packet = ClientboundUpdateAdvancementsPacket.class)
|
||||
public class JavaAdvancementsTranslator extends PacketTranslator<ClientboundUpdateAdvancementsPacket> {
|
||||
public class JavaUpdateAdvancementsTranslator extends PacketTranslator<ClientboundUpdateAdvancementsPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundUpdateAdvancementsPacket packet) {
|
|
@ -59,7 +59,7 @@ import static org.geysermc.connector.utils.InventoryUtils.LAST_RECIPE_NET_ID;
|
|||
* Bedrock REQUIRES a CraftingDataPacket to be sent in order to craft anything.
|
||||
*/
|
||||
@Translator(packet = ClientboundUpdateRecipesPacket.class)
|
||||
public class JavaDeclareRecipesTranslator extends PacketTranslator<ClientboundUpdateRecipesPacket> {
|
||||
public class JavaUpdateRecipesTranslator extends PacketTranslator<ClientboundUpdateRecipesPacket> {
|
||||
/**
|
||||
* Required to use the specified cartography table recipes
|
||||
*/
|
|
@ -31,7 +31,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundUpdateTagsPacket.class)
|
||||
public class JavaDeclareTagsTranslator extends PacketTranslator<ClientboundUpdateTagsPacket> {
|
||||
public class JavaUpdateTagsTranslator extends PacketTranslator<ClientboundUpdateTagsPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundUpdateTagsPacket packet) {
|
|
@ -37,7 +37,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.DimensionUtils;
|
||||
|
||||
@Translator(packet = ClientboundAnimatePacket.class)
|
||||
public class JavaEntityAnimationTranslator extends PacketTranslator<ClientboundAnimatePacket> {
|
||||
public class JavaAnimateTranslator extends PacketTranslator<ClientboundAnimatePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAnimatePacket packet) {
|
|
@ -42,7 +42,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@Translator(packet = ClientboundEntityEventPacket.class)
|
||||
public class JavaEntityStatusTranslator extends PacketTranslator<ClientboundEntityEventPacket> {
|
||||
public class JavaEntityEventTranslator extends PacketTranslator<ClientboundEntityEventPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundEntityEventPacket packet) {
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundMoveEntityPosRotPacket.class)
|
||||
public class JavaEntityPositionRotationTranslator extends PacketTranslator<ClientboundMoveEntityPosRotPacket> {
|
||||
public class JavaMoveEntityPosRotTranslator extends PacketTranslator<ClientboundMoveEntityPosRotPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundMoveEntityPosRotPacket packet) {
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundMoveEntityPosPacket.class)
|
||||
public class JavaEntityPositionTranslator extends PacketTranslator<ClientboundMoveEntityPosPacket> {
|
||||
public class JavaMoveEntityPosTranslator extends PacketTranslator<ClientboundMoveEntityPosPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundMoveEntityPosPacket packet) {
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundMoveEntityRotPacket.class)
|
||||
public class JavaEntityRotationTranslator extends PacketTranslator<ClientboundMoveEntityRotPacket> {
|
||||
public class JavaMoveEntityRotTranslator extends PacketTranslator<ClientboundMoveEntityRotPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundMoveEntityRotPacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.EntityUtils;
|
||||
|
||||
@Translator(packet = ClientboundRemoveMobEffectPacket.class)
|
||||
public class JavaEntityRemoveEffectTranslator extends PacketTranslator<ClientboundRemoveMobEffectPacket> {
|
||||
public class JavaRemoveMobEffectTranslator extends PacketTranslator<ClientboundRemoveMobEffectPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundRemoveMobEffectPacket packet) {
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundRotateHeadPacket.class)
|
||||
public class JavaEntityHeadLookTranslator extends PacketTranslator<ClientboundRotateHeadPacket> {
|
||||
public class JavaRotateHeadTranslator extends PacketTranslator<ClientboundRotateHeadPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundRotateHeadPacket packet) {
|
|
@ -35,7 +35,7 @@ import org.geysermc.connector.utils.InteractiveTagManager;
|
|||
import org.geysermc.connector.utils.LanguageUtils;
|
||||
|
||||
@Translator(packet = ClientboundSetEntityDataPacket.class)
|
||||
public class JavaEntityMetadataTranslator extends PacketTranslator<ClientboundSetEntityDataPacket> {
|
||||
public class JavaSetEntityDataTranslator extends PacketTranslator<ClientboundSetEntityDataPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetEntityDataPacket packet) {
|
|
@ -39,7 +39,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
* Called when a leash is attached, removed or updated from an entity
|
||||
*/
|
||||
@Translator(packet = ClientboundSetEntityLinkPacket.class)
|
||||
public class JavaEntityAttachTranslator extends PacketTranslator<ClientboundSetEntityLinkPacket> {
|
||||
public class JavaSetEntityLinkTranslator extends PacketTranslator<ClientboundSetEntityLinkPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetEntityLinkPacket packet) {
|
|
@ -37,13 +37,15 @@ import com.nukkitx.math.vector.Vector3f;
|
|||
import com.nukkitx.protocol.bedrock.packet.SetEntityMotionPacket;
|
||||
|
||||
@Translator(packet = ClientboundSetEntityMotionPacket.class)
|
||||
public class JavaEntityVelocityTranslator extends PacketTranslator<ClientboundSetEntityMotionPacket> {
|
||||
public class JavaSetEntityMotionTranslator extends PacketTranslator<ClientboundSetEntityMotionPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetEntityMotionPacket packet) {
|
||||
Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
|
||||
Entity entity;
|
||||
if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
|
||||
entity = session.getPlayerEntity();
|
||||
} else {
|
||||
entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
|
||||
}
|
||||
if (entity == null) return;
|
||||
|
|
@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.network.translators.item.ItemTranslator;
|
||||
|
||||
@Translator(packet = ClientboundSetEquipmentPacket.class)
|
||||
public class JavaEntityEquipmentTranslator extends PacketTranslator<ClientboundSetEquipmentPacket> {
|
||||
public class JavaSetEquipmentTranslator extends PacketTranslator<ClientboundSetEquipmentPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetEquipmentPacket packet) {
|
|
@ -40,7 +40,7 @@ import org.geysermc.connector.utils.EntityUtils;
|
|||
import java.util.Arrays;
|
||||
|
||||
@Translator(packet = ClientboundSetPassengersPacket.class)
|
||||
public class JavaEntitySetPassengersTranslator extends PacketTranslator<ClientboundSetPassengersPacket> {
|
||||
public class JavaSetPassengersTranslator extends PacketTranslator<ClientboundSetPassengersPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetPassengersPacket packet) {
|
|
@ -41,7 +41,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
* Bedrock uses it for arrows and item entities, but not experience orbs.
|
||||
*/
|
||||
@Translator(packet = ClientboundTakeItemEntityPacket.class)
|
||||
public class JavaEntityCollectItemTranslator extends PacketTranslator<ClientboundTakeItemEntityPacket> {
|
||||
public class JavaTakeItemEntityTranslator extends PacketTranslator<ClientboundTakeItemEntityPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundTakeItemEntityPacket packet) {
|
|
@ -33,7 +33,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundTeleportEntityPacket.class)
|
||||
public class JavaEntityTeleportTranslator extends PacketTranslator<ClientboundTeleportEntityPacket> {
|
||||
public class JavaTeleportEntityTranslator extends PacketTranslator<ClientboundTeleportEntityPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundTeleportEntityPacket packet) {
|
|
@ -33,7 +33,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundUpdateAttributesPacket.class)
|
||||
public class JavaEntityPropertiesTranslator extends PacketTranslator<ClientboundUpdateAttributesPacket> {
|
||||
public class JavaUpdateAttributesTranslator extends PacketTranslator<ClientboundUpdateAttributesPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundUpdateAttributesPacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.EntityUtils;
|
||||
|
||||
@Translator(packet = ClientboundUpdateMobEffectPacket.class)
|
||||
public class JavaEntityEffectTranslator extends PacketTranslator<ClientboundUpdateMobEffectPacket> {
|
||||
public class JavaUpdateMobEffectTranslator extends PacketTranslator<ClientboundUpdateMobEffectPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundUpdateMobEffectPacket packet) {
|
|
@ -37,7 +37,7 @@ import org.geysermc.connector.network.translators.world.block.BlockStateValues;
|
|||
import org.geysermc.connector.utils.ChunkUtils;
|
||||
|
||||
@Translator(packet = ClientboundBlockBreakAckPacket.class)
|
||||
public class JavaPlayerActionAckTranslator extends PacketTranslator<ClientboundBlockBreakAckPacket> {
|
||||
public class JavaBlockBreakAckTranslator extends PacketTranslator<ClientboundBlockBreakAckPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundBlockBreakAckPacket packet) {
|
|
@ -38,7 +38,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.skin.SkinManager;
|
||||
|
||||
@Translator(packet = ClientboundPlayerInfoPacket.class)
|
||||
public class JavaPlayerListEntryTranslator extends PacketTranslator<ClientboundPlayerInfoPacket> {
|
||||
public class JavaPlayerInfoTranslator extends PacketTranslator<ClientboundPlayerInfoPacket> {
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundPlayerInfoPacket packet) {
|
||||
if (packet.getAction() != PlayerListEntryAction.ADD_PLAYER && packet.getAction() != PlayerListEntryAction.REMOVE_PLAYER)
|
|
@ -47,7 +47,7 @@ import org.geysermc.connector.utils.EntityUtils;
|
|||
import org.geysermc.connector.utils.LanguageUtils;
|
||||
|
||||
@Translator(packet = ClientboundPlayerPositionPacket.class)
|
||||
public class JavaPlayerPositionRotationTranslator extends PacketTranslator<ClientboundPlayerPositionPacket> {
|
||||
public class JavaPlayerPositionTranslator extends PacketTranslator<ClientboundPlayerPositionPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundPlayerPositionPacket packet) {
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundSetCarriedItemPacket.class)
|
||||
public class JavaPlayerChangeHeldItemTranslator extends PacketTranslator<ClientboundSetCarriedItemPacket> {
|
||||
public class JavaSetCarriedItemTranslator extends PacketTranslator<ClientboundSetCarriedItemPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetCarriedItemPacket packet) {
|
|
@ -37,7 +37,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import java.util.Arrays;
|
||||
|
||||
@Translator(packet = ClientboundSetExperiencePacket.class)
|
||||
public class JavaPlayerSetExperienceTranslator extends PacketTranslator<ClientboundSetExperiencePacket> {
|
||||
public class JavaSetExperienceTranslator extends PacketTranslator<ClientboundSetExperiencePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetExperiencePacket packet) {
|
|
@ -38,7 +38,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import java.util.List;
|
||||
|
||||
@Translator(packet = ClientboundSetHealthPacket.class)
|
||||
public class JavaPlayerHealthTranslator extends PacketTranslator<ClientboundSetHealthPacket> {
|
||||
public class JavaSetHealthTranslator extends PacketTranslator<ClientboundSetHealthPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetHealthPacket packet) {
|
|
@ -43,7 +43,7 @@ import java.lang.reflect.Constructor;
|
|||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
@Translator(packet = ClientboundAddEntityPacket.class)
|
||||
public class JavaSpawnEntityTranslator extends PacketTranslator<ClientboundAddEntityPacket> {
|
||||
public class JavaAddEntityTranslator extends PacketTranslator<ClientboundAddEntityPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAddEntityPacket packet) {
|
|
@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundAddExperienceOrbPacket.class)
|
||||
public class JavaSpawnExpOrbTranslator extends PacketTranslator<ClientboundAddExperienceOrbPacket> {
|
||||
public class JavaAddExperienceOrbTranslator extends PacketTranslator<ClientboundAddExperienceOrbPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAddExperienceOrbPacket packet) {
|
|
@ -39,7 +39,7 @@ import java.lang.reflect.Constructor;
|
|||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
@Translator(packet = ClientboundAddMobPacket.class)
|
||||
public class JavaSpawnLivingEntityTranslator extends PacketTranslator<ClientboundAddMobPacket> {
|
||||
public class JavaAddMobTranslator extends PacketTranslator<ClientboundAddMobPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAddMobPacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.PaintingType;
|
||||
|
||||
@Translator(packet = ClientboundAddPaintingPacket.class)
|
||||
public class JavaSpawnPaintingTranslator extends PacketTranslator<ClientboundAddPaintingPacket> {
|
||||
public class JavaAddPaintingTranslator extends PacketTranslator<ClientboundAddPaintingPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAddPaintingPacket packet) {
|
|
@ -36,7 +36,7 @@ import org.geysermc.connector.utils.LanguageUtils;
|
|||
import org.geysermc.connector.skin.SkinManager;
|
||||
|
||||
@Translator(packet = ClientboundAddPlayerPacket.class)
|
||||
public class JavaSpawnPlayerTranslator extends PacketTranslator<ClientboundAddPlayerPacket> {
|
||||
public class JavaAddPlayerTranslator extends PacketTranslator<ClientboundAddPlayerPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundAddPlayerPacket packet) {
|
|
@ -38,7 +38,7 @@ import org.geysermc.connector.registry.type.ItemMapping;
|
|||
import org.geysermc.connector.utils.BlockUtils;
|
||||
|
||||
@Translator(packet = ClientboundBlockDestructionPacket.class)
|
||||
public class JavaBlockBreakAnimTranslator extends PacketTranslator<ClientboundBlockDestructionPacket> {
|
||||
public class JavaBlockDestructionTranslator extends PacketTranslator<ClientboundBlockDestructionPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundBlockDestructionPacket packet) {
|
|
@ -42,7 +42,7 @@ import org.geysermc.connector.network.translators.world.block.entity.SkullBlockE
|
|||
import org.geysermc.connector.utils.BlockEntityUtils;
|
||||
|
||||
@Translator(packet = ClientboundBlockEntityDataPacket.class)
|
||||
public class JavaUpdateTileEntityTranslator extends PacketTranslator<ClientboundBlockEntityDataPacket> {
|
||||
public class JavaBlockEntityDataTranslator extends PacketTranslator<ClientboundBlockEntityDataPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundBlockEntityDataPacket packet) {
|
|
@ -45,7 +45,7 @@ import org.geysermc.connector.network.translators.world.block.entity.PistonBlock
|
|||
import org.geysermc.connector.utils.Direction;
|
||||
|
||||
@Translator(packet = ClientboundBlockEventPacket.class)
|
||||
public class JavaBlockValueTranslator extends PacketTranslator<ClientboundBlockEventPacket> {
|
||||
public class JavaBlockEventTranslator extends PacketTranslator<ClientboundBlockEventPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundBlockEventPacket packet) {
|
|
@ -39,7 +39,7 @@ import org.geysermc.connector.registry.BlockRegistries;
|
|||
import org.geysermc.connector.utils.ChunkUtils;
|
||||
|
||||
@Translator(packet = ClientboundBlockUpdatePacket.class)
|
||||
public class JavaBlockChangeTranslator extends PacketTranslator<ClientboundBlockUpdatePacket> {
|
||||
public class JavaBlockUpdateTranslator extends PacketTranslator<ClientboundBlockUpdatePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundBlockUpdatePacket packet) {
|
|
@ -37,7 +37,7 @@ import org.geysermc.connector.registry.Registries;
|
|||
import org.geysermc.connector.registry.type.SoundMapping;
|
||||
|
||||
@Translator(packet = ClientboundCustomSoundPacket.class)
|
||||
public class JavaPlaySoundTranslator extends PacketTranslator<ClientboundCustomSoundPacket> {
|
||||
public class JavaCustomSoundTranslator extends PacketTranslator<ClientboundCustomSoundPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundCustomSoundPacket packet) {
|
|
@ -41,7 +41,7 @@ import org.geysermc.connector.network.translators.world.block.BlockStateValues;
|
|||
import org.geysermc.connector.utils.ChunkUtils;
|
||||
|
||||
@Translator(packet = ClientboundExplodePacket.class)
|
||||
public class JavaExplosionTranslator extends PacketTranslator<ClientboundExplodePacket> {
|
||||
public class JavaExplodeTranslator extends PacketTranslator<ClientboundExplodePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundExplodePacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import java.util.Iterator;
|
||||
|
||||
@Translator(packet = ClientboundForgetLevelChunkPacket.class)
|
||||
public class JavaUnloadChunkTranslator extends PacketTranslator<ClientboundForgetLevelChunkPacket> {
|
||||
public class JavaForgetLevelChunkTranslator extends PacketTranslator<ClientboundForgetLevelChunkPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundForgetLevelChunkPacket packet) {
|
|
@ -46,7 +46,7 @@ import org.geysermc.connector.network.translators.inventory.translators.PlayerIn
|
|||
import org.geysermc.connector.utils.LocaleUtils;
|
||||
|
||||
@Translator(packet = ClientboundGameEventPacket.class)
|
||||
public class JavaNotifyClientTranslator extends PacketTranslator<ClientboundGameEventPacket> {
|
||||
public class JavaGameEventTranslator extends PacketTranslator<ClientboundGameEventPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundGameEventPacket packet) {
|
|
@ -47,7 +47,7 @@ import static org.geysermc.connector.utils.ChunkUtils.MINIMUM_ACCEPTED_HEIGHT;
|
|||
import static org.geysermc.connector.utils.ChunkUtils.MINIMUM_ACCEPTED_HEIGHT_OVERWORLD;
|
||||
|
||||
@Translator(packet = ClientboundLevelChunkPacket.class)
|
||||
public class JavaChunkDataTranslator extends PacketTranslator<ClientboundLevelChunkPacket> {
|
||||
public class JavaLevelChunkTranslator extends PacketTranslator<ClientboundLevelChunkPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundLevelChunkPacket packet) {
|
|
@ -46,7 +46,7 @@ import java.util.Collections;
|
|||
import java.util.Locale;
|
||||
|
||||
@Translator(packet = ClientboundLevelEventPacket.class)
|
||||
public class JavaPlayEffectTranslator extends PacketTranslator<ClientboundLevelEventPacket> {
|
||||
public class JavaLevelEventTranslator extends PacketTranslator<ClientboundLevelEventPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundLevelEventPacket packet) {
|
|
@ -47,7 +47,7 @@ import java.util.concurrent.ThreadLocalRandom;
|
|||
import java.util.function.Function;
|
||||
|
||||
@Translator(packet = ClientboundLevelParticlesPacket.class)
|
||||
public class JavaSpawnParticleTranslator extends PacketTranslator<ClientboundLevelParticlesPacket> {
|
||||
public class JavaLevelParticlesTranslator extends PacketTranslator<ClientboundLevelParticlesPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundLevelParticlesPacket packet) {
|
|
@ -38,7 +38,8 @@ import org.geysermc.connector.utils.DimensionUtils;
|
|||
import org.geysermc.connector.utils.MapColor;
|
||||
|
||||
@Translator(packet = ClientboundMapItemDataPacket.class)
|
||||
public class JavaMapDataTranslator extends PacketTranslator<ClientboundMapItemDataPacket> {
|
||||
public class JavaMapItemDataTranslator extends PacketTranslator<ClientboundMapItemDataPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundMapItemDataPacket packet) {
|
||||
com.nukkitx.protocol.bedrock.packet.ClientboundMapItemDataPacket mapItemDataPacket = new com.nukkitx.protocol.bedrock.packet.ClientboundMapItemDataPacket();
|
|
@ -33,7 +33,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.ChunkUtils;
|
||||
|
||||
@Translator(packet = ClientboundSectionBlocksUpdatePacket.class)
|
||||
public class JavaMultiBlockChangeTranslator extends PacketTranslator<ClientboundSectionBlocksUpdatePacket> {
|
||||
public class JavaSectionBlocksUpdateTranslator extends PacketTranslator<ClientboundSectionBlocksUpdatePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSectionBlocksUpdatePacket packet) {
|
|
@ -33,7 +33,7 @@ import org.geysermc.connector.utils.ChunkUtils;
|
|||
import com.nukkitx.math.vector.Vector3i;
|
||||
|
||||
@Translator(packet = ClientboundSetChunkCacheCenterPacket.class)
|
||||
public class JavaUpdateViewPositionTranslator extends PacketTranslator<ClientboundSetChunkCacheCenterPacket> {
|
||||
public class JavaSetChunkCacheCenterTranslator extends PacketTranslator<ClientboundSetChunkCacheCenterPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetChunkCacheCenterPacket packet) {
|
|
@ -31,7 +31,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundSetChunkCacheRadiusPacket.class)
|
||||
public class JavaUpdateViewDistanceTranslator extends PacketTranslator<ClientboundSetChunkCacheRadiusPacket> {
|
||||
public class JavaSetChunkCacheRadiusTranslator extends PacketTranslator<ClientboundSetChunkCacheRadiusPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetChunkCacheRadiusPacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.DimensionUtils;
|
||||
|
||||
@Translator(packet = ClientboundSetDefaultSpawnPositionPacket.class)
|
||||
public class JavaSpawnPositionTranslator extends PacketTranslator<ClientboundSetDefaultSpawnPositionPacket> {
|
||||
public class JavaSetDefaultSpawnPositionTranslator extends PacketTranslator<ClientboundSetDefaultSpawnPositionPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetDefaultSpawnPositionPacket packet) {
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.PacketTranslator;
|
|||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ClientboundSetTimePacket.class)
|
||||
public class JavaUpdateTimeTranslator extends PacketTranslator<ClientboundSetTimePacket> {
|
||||
public class JavaSetTimeTranslator extends PacketTranslator<ClientboundSetTimePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetTimePacket packet) {
|
|
@ -41,7 +41,7 @@ import org.geysermc.connector.registry.Registries;
|
|||
import org.geysermc.connector.registry.type.SoundMapping;
|
||||
|
||||
@Translator(packet = ClientboundSoundPacket.class)
|
||||
public class JavaPlayBuiltinSoundTranslator extends PacketTranslator<ClientboundSoundPacket> {
|
||||
public class JavaSoundTranslator extends PacketTranslator<ClientboundSoundPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSoundPacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.scoreboard.Scoreboard;
|
|||
import org.geysermc.connector.scoreboard.ScoreboardUpdater;
|
||||
|
||||
@Translator(packet = ClientboundSetDisplayObjectivePacket.class)
|
||||
public class JavaDisplayScoreboardTranslator extends PacketTranslator<ClientboundSetDisplayObjectivePacket> {
|
||||
public class JavaSetDisplayObjectiveTranslator extends PacketTranslator<ClientboundSetDisplayObjectivePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundSetDisplayObjectivePacket packet) {
|
|
@ -42,7 +42,7 @@ import org.geysermc.connector.scoreboard.ScoreboardUpdater;
|
|||
import org.geysermc.connector.scoreboard.UpdateType;
|
||||
|
||||
@Translator(packet = ClientboundSetObjectivePacket.class)
|
||||
public class JavaScoreboardObjectiveTranslator extends PacketTranslator<ClientboundSetObjectivePacket> {
|
||||
public class JavaSetObjectiveTranslator extends PacketTranslator<ClientboundSetObjectivePacket> {
|
||||
private final GeyserLogger logger = GeyserConnector.getInstance().getLogger();
|
||||
|
||||
@Override
|
|
@ -44,7 +44,7 @@ import java.util.Arrays;
|
|||
import java.util.Set;
|
||||
|
||||
@Translator(packet = ClientboundSetPlayerTeamPacket.class)
|
||||
public class JavaTeamTranslator extends PacketTranslator<ClientboundSetPlayerTeamPacket> {
|
||||
public class JavaSetPlayerTeamTranslator extends PacketTranslator<ClientboundSetPlayerTeamPacket> {
|
||||
private final GeyserLogger logger = GeyserConnector.getInstance().getLogger();
|
||||
|
||||
@Override
|
|
@ -43,10 +43,10 @@ import org.geysermc.connector.scoreboard.ScoreboardUpdater;
|
|||
import org.geysermc.connector.utils.LanguageUtils;
|
||||
|
||||
@Translator(packet = ClientboundSetScorePacket.class)
|
||||
public class JavaUpdateScoreTranslator extends PacketTranslator<ClientboundSetScorePacket> {
|
||||
public class JavaSetScoreTranslator extends PacketTranslator<ClientboundSetScorePacket> {
|
||||
private final GeyserLogger logger;
|
||||
|
||||
public JavaUpdateScoreTranslator() {
|
||||
public JavaSetScoreTranslator() {
|
||||
logger = GeyserConnector.getInstance().getLogger();
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ import org.geysermc.connector.network.translators.Translator;
|
|||
import org.geysermc.connector.utils.InventoryUtils;
|
||||
|
||||
@Translator(packet = ClientboundContainerClosePacket.class)
|
||||
public class JavaCloseWindowTranslator extends PacketTranslator<ClientboundContainerClosePacket> {
|
||||
public class JavaContainerCloseTranslator extends PacketTranslator<ClientboundContainerClosePacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundContainerClosePacket packet) {
|
|
@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.inventory.InventoryTranslator;
|
|||
import org.geysermc.connector.utils.InventoryUtils;
|
||||
|
||||
@Translator(packet = ClientboundContainerSetContentPacket.class)
|
||||
public class JavaWindowItemsTranslator extends PacketTranslator<ClientboundContainerSetContentPacket> {
|
||||
public class JavaContainerSetContentTranslator extends PacketTranslator<ClientboundContainerSetContentPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundContainerSetContentPacket packet) {
|
|
@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.inventory.InventoryTranslator;
|
|||
import org.geysermc.connector.utils.InventoryUtils;
|
||||
|
||||
@Translator(packet = ClientboundContainerSetDataPacket.class)
|
||||
public class JavaWindowPropertyTranslator extends PacketTranslator<ClientboundContainerSetDataPacket> {
|
||||
public class JavaContainerSetDataTranslator extends PacketTranslator<ClientboundContainerSetDataPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundContainerSetDataPacket packet) {
|
|
@ -55,7 +55,7 @@ import java.util.UUID;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Translator(packet = ClientboundContainerSetSlotPacket.class)
|
||||
public class JavaSetSlotTranslator extends PacketTranslator<ClientboundContainerSetSlotPacket> {
|
||||
public class JavaContainerSetSlotTranslator extends PacketTranslator<ClientboundContainerSetSlotPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundContainerSetSlotPacket packet) {
|
|
@ -50,7 +50,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
@Translator(packet = ClientboundHorseScreenOpenPacket.class)
|
||||
public class JavaOpenHorseWindowTranslator extends PacketTranslator<ClientboundHorseScreenOpenPacket> {
|
||||
public class JavaHorseScreenOpenTranslator extends PacketTranslator<ClientboundHorseScreenOpenPacket> {
|
||||
|
||||
private static final NbtMap ARMOR_SLOT;
|
||||
private static final NbtMap CARPET_SLOT;
|
|
@ -48,7 +48,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
@Translator(packet = ClientboundMerchantOffersPacket.class)
|
||||
public class JavaTradeListTranslator extends PacketTranslator<ClientboundMerchantOffersPacket> {
|
||||
public class JavaMerchantOffersTranslator extends PacketTranslator<ClientboundMerchantOffersPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundMerchantOffersPacket packet) {
|
|
@ -37,7 +37,7 @@ import org.geysermc.connector.utils.InventoryUtils;
|
|||
import org.geysermc.connector.utils.LocaleUtils;
|
||||
|
||||
@Translator(packet = ClientboundOpenScreenPacket.class)
|
||||
public class JavaOpenWindowTranslator extends PacketTranslator<ClientboundOpenScreenPacket> {
|
||||
public class JavaOpenScreenTranslator extends PacketTranslator<ClientboundOpenScreenPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(GeyserSession session, ClientboundOpenScreenPacket packet) {
|
Loading…
Reference in a new issue