Package devs.beer.nativepackets.api
Interface NativePacketFactory
public interface NativePacketFactory
Creates native packets for the exact Minecraft version selected at startup.
Every returned object is an NMS packet owned by the active adapter. Native values supplied to factory methods are borrowed: callers must retain their validity until vanilla encodes the packet. No method accepts raw packet bytes or performs protocol translation.
-
Method Summary
Modifier and TypeMethodDescriptionactionBar(NativeText message) addEntity(int entityId, UUID entityUuid, Object nativeEntityType, double x, double y, double z, float pitch, float yaw, float headYaw, int data, double velocityX, double velocityY, double velocityZ) addTrackedWaypointAzimuth(UUID id, NativeWaypointIcon icon, float azimuth) addTrackedWaypointChunk(UUID id, NativeWaypointIcon icon, int chunkX, int chunkZ) addTrackedWaypointPosition(UUID id, NativeWaypointIcon icon, int x, int y, int z) awardStatistics(NativeValue statistics) Creates a zero-copy statistics update from an exact adapter map snapshot.blockBreakAnimation(int breakerId, int x, int y, int z, int progress) blockChangedAck(int sequence) blockDisplay(int entityId, UUID entityUuid, double x, double y, double z, float pitch, float yaw, float headYaw) blockEntityData(int x, int y, int z, NativeBlockEntityType type, NativeNbt tag) default ObjectblockEntityData(int x, int y, int z, String typeKey, NativeNbt tag) blockEntityType(String key) blockEvent(int x, int y, int z, NativeBlockState state, int type, int data) Creates a block event; type and data are encoded as unsigned bytes.blockUpdate(int x, int y, int z, NativeBlockState state) borderCenter(double x, double z) borderLerpSize(double oldSize, double newSize, long durationMillis) borderSize(double size) borderWarningDelay(int warningTimeSeconds) borderWarningDistance(int warningBlocks) bossBarAdd(UUID id, NativeText name, float progress, BossBarColor color, BossBarOverlay overlay, boolean darkenScreen, boolean playMusic, boolean createWorldFog) bossBarName(UUID id, NativeText name) bossBarProgress(UUID id, float progress) bossBarProperties(UUID id, boolean darkenScreen, boolean playMusic, boolean createWorldFog) bossBarRemove(UUID id) bossBarStyle(UUID id, BossBarColor color, BossBarOverlay overlay) chunkBatchFinished(int batchSize) chunkBiomes(List<NativeChunkBiomeData> chunks) chunkCacheCenter(int chunkX, int chunkZ) chunkCacheRadius(int radius) chunkWithLight(int chunkX, int chunkZ, NativeValue chunkData, NativeValue lightData) Creates a chunk packet retaining exact encoded chunk and light payloads.default ObjectClears the currently displayed dialog.clearTitles(boolean resetTimes) closeScreen(int containerId) codeOfConduct(String text) Creates the configuration code-of-conduct packet.collectItem(int collectedEntityId, int collectorEntityId, int amount) combatEnd(int durationTicks) combatKill(int playerId, NativeText message) commands(int rootIndex, NativeValue entries) Creates a command-tree packet retaining exact encoded entries.commandSuggestions(int requestId, int start, int length, List<CommandSuggestion> suggestions) constructor(Class<?> nativePacketClass, Class<?>... parameterTypes) Resolves an exact native packet constructor from an already linked class.constructor(String nativeClassName, Class<?>... parameterTypes) Resolves an exact native constructor once.containerContent(int containerId, int stateId, List<NativeItem> items, NativeItem carriedItem) containerData(int containerId, int propertyId, int value) cookieRequest(String key) Sets or clears an item cooldown; zero ticks clears it.cursorItem(NativeItem item) Sets the carried cursor item.customChatCompletions(ChatCompletionAction action, List<String> entries) customPayload(String channel, byte[] data) customReportDetails(Map<String, String> details) Creates client report details.damageEvent(int entityId, NativeValue damageType, int sourceCauseEntityId, int sourceDirectEntityId, NativeVector3 sourcePosition) debugBlockValue(int x, int y, int z, NativeValue update) Creates a debug block update from an exact borrowed debug-update snapshot.debugChunkValue(int chunkX, int chunkZ, NativeValue update) Creates a debug chunk update from an exact borrowed debug-update snapshot.debugEntityValue(int entityId, NativeValue update) Creates a debug entity update from an exact borrowed debug-update snapshot.debugEvent(NativeValue event) Creates a debug event from an exact borrowed debug-event snapshot.debugSample(long[] sample) Creates the tick-time debug sample and retains the supplied array.defaultSpawn(NativeGlobalPosition position, float yaw, float pitch) Sets the default spawn; dimension and pitch are encoded where supported.deleteChat(NativeValue packedSignature) Creates a signed-chat deletion from an exact packed-signature snapshot.default NativeDialogResolves a registered dialog for repeated packet creation.difficulty(NativeDifficulty difficulty, boolean locked) disconnect(NativeText reason) disguisedChat(NativeText message, NativeValue chatType) Creates unsigned/disguised chat while retaining the exact chat-type binding.displayObjective(ScoreboardDisplaySlot slot, String objectiveName) Displays an objective in a slot, or clears the slot when its name is null.displayQuaternionMetadata(int entityId, EntityMetadataField<NativeValue> field, float x, float y, float z, float w) displayVectorMetadata(int entityId, EntityMetadataField<NativeValue> field, float x, float y, float z) enabledFeatures(Set<String> featureKeys) Replaces the enabled feature-flag set from resource keys.entityAnimation(int entityId, EntityAnimation animation) entityEvent(int entityId, byte eventId) entityLink(int sourceEntityId, int destinationEntityId) entityMotion(int entityId, double velocityX, double velocityY, double velocityZ) entityPositionSync(int entityId, NativeVector3 position, NativeVector3 movement, float yaw, float pitch, boolean onGround) Creates exact entity position synchronization from supported Minecraft 1.21.3.entitySound(NativeSound sound, NativeSoundSource source, int entityId, float volume, float pitch, long seed) default ObjectentitySound(String soundKey, NativeSoundSource source, int entityId, float volume, float pitch, long seed) equipment(int entityId, List<NativeEquipment> equipment) experience(float progress, int totalExperience, int level) experienceOrb(int entityId, double x, double y, double z, int value) Creates an experience-orb spawn packet where that dedicated packet exists.explosion(NativeVector3 center, float radius, List<NativeBlockCoordinate> affectedBlocks, NativeVector3 playerKnockback, ExplosionBlockInteraction blockInteraction, NativeParticle smallParticle, NativeParticle largeParticle, NativeSound sound) fixedNumberFormat(NativeText text) gameEvent(ClientGameEvent event, float value) gameRuleValues(Map<String, String> values) Creates the dedicated client game-rule snapshot available from Minecraft 26.1.gameTestHighlightPosition(int absoluteX, int absoluteY, int absoluteZ, int relativeX, int relativeY, int relativeZ) ghostRecipe(int containerId, NativeRecipe recipe) default ObjectghostRecipe(int containerId, String recipeKey) health(float health, int food, float saturation) heldSlot(int slot) hurtAnimation(int entityId, float yaw) initializeBorder(double centerX, double centerZ, double oldSize, double newSize, long lerpDurationMillis, int absoluteMaxSize, int warningBlocks, int warningTimeSeconds) itemDisplay(int entityId, UUID entityUuid, double x, double y, double z, float pitch, float yaw, float headYaw) keepAlive(long id) levelEvent(int eventId, int x, int y, int z, int data, boolean global) lightUpdate(int chunkX, int chunkZ, NativeValue lightData) Creates a light update retaining an exact encoded light payload.login(int playerId, boolean hardcore, Set<String> levelKeys, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean limitedCrafting, NativeSpawnInfo spawnInfo, boolean onlineMode, boolean enforcesSecureChat) Creates the play-state login packet.loginCompression(int threshold) loginCustomQuery(int transactionId, String channel, byte[] data) Creates a login custom-query packet retainingdatauntil encoding.loginDisconnect(NativeText reason) loginFinished(NativeGameProfile profile, UUID sessionId) Completes login;sessionIdis encoded by Minecraft 26.2 and newer.loginHello(String serverId, byte[] publicKey, byte[] challenge, boolean authenticate) lookAt(EntityAnchor sourceAnchor, double x, double y, double z) Returns the low-disk-space warning singleton available from Minecraft 26.1.mapData(int mapId, byte scale, boolean locked, NativeValue decorations, NativeMapPatch colorPatch) merchantOffers(int containerId, NativeValue offers, int villagerLevel, int villagerExperience, boolean showProgress, boolean canRestock) Creates merchant offers retaining the exact encoded offers collection.metadata(int entityId, EntityMetadataField<?>[] fields, Object[] values) <T> Objectmetadata(int entityId, EntityMetadataField<T> field, T value) mountScreen(int containerId, int inventoryColumns, int entityId) moveMinecart(int entityId, List<NativeMinecartStep> steps) Creates minecart interpolation from supported Minecraft 1.21.3.openBook(NativeHand hand) openScreen(int containerId, NativeMenuType menuType, NativeText title) default ObjectopenScreen(int containerId, String menuTypeKey, NativeText title) openSignEditor(int x, int y, int z, boolean frontText) particles(NativeParticle particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int count) passengers(int vehicleEntityId, int... passengerEntityIds) ping(int id) playerAbilities(NativePlayerAbilities abilities) playerChat(int globalIndex, UUID sender, int index, NativeValue signature, NativeValue body, NativeText unsignedContent, NativeValue filterMask, NativeValue chatType) Creates signed player chat from retained native cryptographic values.playerInfoRemove(List<UUID> profileIds) playerInfoUpdate(Set<PlayerInfoAction> actions, List<PlayerInfoEntry> entries) Creates a player-info update without live Bukkit or NMS player objects.playerInventorySlot(int slot, NativeItem item) Sets one player-inventory slot.playerPosition(PlayerPositionChange change) playerRotation(float yaw, boolean relativeYaw, float pitch, boolean relativePitch) Rotates the local player.pong(long time) Creates the status-ping pong response.projectilePower(int entityId, double powerX, double powerY, double powerZ) Updates a projectile acceleration vector, converted to scalar power where required.Resolves a registered recipe for version-correct ghost-recipe packets.recipeBookAdd(List<NativeValue> entries, List<NativeValue> highlightedEntries, boolean replace, NativeRecipeBookSettings settings) Adds or initializes recipe-book entries.recipeBookRemove(List<NativeValue> entries, NativeRecipeBookSettings settings) Removes recipe-book entries, optionally applying settings in the same semantic update.recipeBookSettings(boolean craftingOpen, boolean craftingFiltering, boolean furnaceOpen, boolean furnaceFiltering, boolean blastFurnaceOpen, boolean blastFurnaceFiltering, boolean smokerOpen, boolean smokerFiltering) Creates immutable recipe-book settings from portable category flags.recipeBookSettings(NativeRecipeBookSettings settings) Applies recipe-book settings without changing entries.registryData(String registryKey, List<NativeRegistryEntry> entries) Creates registry synchronization entries without converting their optional NBT.relativeMove(int entityId, double x, double y, double z, boolean onGround) relativeMoveAndRotate(int entityId, double x, double y, double z, float yaw, float pitch, boolean onGround) removeEntities(int... entityIds) removeMobEffect(int entityId, NativeMobEffect effect) default ObjectremoveMobEffect(int entityId, String effectKey) Resets configuration-phase chat state.resetScore(String owner, String objectiveName) Resets one objective, or all scores for the owner whenobjectiveNameis null.resourcePackPop(UUID id) Removes one resource pack, or every pack whenidis null.resourcePackPush(UUID id, String url, String hash, boolean required, NativeText prompt) Creates a resource-pack request;promptmay be null.respawn(NativeSpawnInfo spawnInfo, boolean keepAttributes, boolean keepEntityData) Creates a play-state respawn packet with semantic keep flags.rotate(int entityId, float yaw, float pitch, boolean onGround) rotateHead(int entityId, float headYaw) rotationMetadata(int entityId, EntityMetadataField<MetadataRotation> field, float x, float y, float z) scoreboardObjective(String objectiveName, ScoreboardObjectiveAction action, NativeText displayName, ScoreboardRenderType renderType, NativeNumberFormat numberFormat) Display and render type may be null only forScoreboardObjectiveAction.REMOVE.scoreboardTeam(String teamName, ScoreboardTeamAction action, ScoreboardTeamParameters parameters, List<String> players) Parameters may be null for operations other than add and update.sectionBlocksUpdate(int sectionX, int sectionY, int sectionZ, List<SectionBlockChange> changes) selectAdvancementsTab(String tabKey) Selects a tab, or closes the advancements screen whentabKeyis null.serverData(NativeText motd, byte[] iconBytes) Creates server-list data;iconBytesmay be null when no icon is sent.serverLinks(List<NativeServerLink> links) Creates the server-links packet.setCamera(int entityId) setScore(String owner, String objectiveName, int score, NativeText display, NativeNumberFormat numberFormat) Creates a score update with optional display text and number formatting.setSlot(int containerId, int stateId, int slot, NativeItem item) default ObjectshowDialog(NativeDialog dialog) Opens a registered dialog.simulationDistance(int chunks) soundAt(NativeSound sound, NativeSoundSource source, double x, double y, double z, float volume, float pitch, long seed) default ObjectsoundAt(String soundKey, NativeSoundSource source, double x, double y, double z, float volume, float pitch, long seed) spawnInfo(String dimensionTypeKey, String dimensionKey, long seed, NativeGameMode gameMode, NativeGameMode previousGameMode, boolean debug, boolean flat, NativeGlobalPosition lastDeathLocation, int portalCooldown, int seaLevel) Resolves version-correct common player spawn state.statusResponse(NativeText description, StatusPlayers players, StatusVersion version, byte[] favicon, boolean enforcesSecureChat) Creates a server status response; optional sections may be null.stopSound(String soundKey, NativeSoundSource source) Null sound and source stop every sound; either value may be supplied independently.storeCookie(String key, byte[] payload) subtitleText(NativeText message) systemChat(NativeText message, boolean overlay) tabList(NativeText header, NativeText footer) Replies to an NBT query;tagmay be null when no result exists.teleport(int entityId, double x, double y, double z, float yaw, float pitch, boolean onGround) tickingState(float tickRate, boolean frozen) tickingStep(int steps) time(long gameTime, long dayTime, boolean daylightCycle) Synchronizes the legacy day clock or the default world clock on newer versions.titleAnimation(int fadeInTicks, int stayTicks, int fadeOutTicks) titleText(NativeText message) unloadChunk(int chunkX, int chunkZ) updateAdvancements(boolean reset, NativeValue added, NativeValue removed, NativeValue progress, boolean showAdvancements) Creates an advancement update from exact adapter collection snapshots.updateAttributes(int entityId, NativeValue attributes) Creates an attribute update from exact adapter attribute-instance snapshots.updateMobEffect(int entityId, NativeMobEffect effect, int amplifier, int durationTicks, boolean ambient, boolean visible, boolean showIcon, boolean blend) default ObjectupdateMobEffect(int entityId, String effectKey, int amplifier, int durationTicks, boolean ambient, boolean visible, boolean showIcon, boolean blend) updateRecipes(NativeValue primaryPayload, NativeValue secondaryPayload) Creates recipe-registry synchronization from exact payloads exposed byUpdateRecipesPacketView.updateTags(NativeValue tagsPayload) Creates a zero-copy registry-tag update from an exact adapter snapshot.updateTrackedWaypointAzimuth(UUID id, NativeWaypointIcon icon, float azimuth) updateTrackedWaypointChunk(UUID id, NativeWaypointIcon icon, int chunkX, int chunkZ) updateTrackedWaypointPosition(UUID id, NativeWaypointIcon icon, int x, int y, int z) vehiclePosition(double x, double y, double z, float yaw, float pitch)
-
Method Details
-
constructor
Resolves an exact native constructor once. The returned callable performs no member lookup and is suitable for repeated use.- Parameters:
nativeClassName- exact NMS packet class nameparameterTypes- exact constructor parameter types, including primitives- Returns:
- pre-resolved constructor
-
constructor
Resolves an exact native packet constructor from an already linked class.- Parameters:
nativePacketClass- exact NMS packet classparameterTypes- exact constructor parameter types, including primitives- Returns:
- pre-resolved constructor
-
relativeMove
-
relativeMoveAndRotate
Object relativeMoveAndRotate(int entityId, double x, double y, double z, float yaw, float pitch, boolean onGround) -
rotate
-
rotateHead
-
teleport
Object teleport(int entityId, double x, double y, double z, float yaw, float pitch, boolean onGround) -
playerPosition
-
vehiclePosition
-
addEntity
-
itemDisplay
-
blockDisplay
-
removeEntities
-
passengers
-
entityEvent
-
entityAnimation
-
blockBreakAnimation
-
blockChangedAck
-
collectItem
-
closeScreen
-
containerData
-
setCamera
-
keepAlive
-
ping
-
pong
Creates the status-ping pong response. -
statusResponse
Object statusResponse(NativeText description, @Nullable StatusPlayers players, @Nullable StatusVersion version, @Nullable byte[] favicon, boolean enforcesSecureChat) Creates a server status response; optional sections may be null. -
updateTags
Creates a zero-copy registry-tag update from an exact adapter snapshot. -
registryData
Creates registry synchronization entries without converting their optional NBT. -
customReportDetails
Creates client report details. Supported from Minecraft 1.21. -
serverLinks
Creates the server-links packet. Supported from Minecraft 1.21. -
codeOfConduct
Creates the configuration code-of-conduct packet. Supported from Minecraft 1.21.9. -
awardStatistics
Creates a zero-copy statistics update from an exact adapter map snapshot. -
updateAdvancements
Object updateAdvancements(boolean reset, NativeValue added, NativeValue removed, NativeValue progress, boolean showAdvancements) Creates an advancement update from exact adapter collection snapshots.showAdvancementsis ignored before Minecraft 1.21.5. -
updateAttributes
Creates an attribute update from exact adapter attribute-instance snapshots. -
deleteChat
Creates a signed-chat deletion from an exact packed-signature snapshot. -
playerRotation
Rotates the local player. Relative flags require Minecraft 1.21.9; the packet itself is available from supported Minecraft 1.21.3. -
lowDiskSpaceWarning
Object lowDiskSpaceWarning()Returns the low-disk-space warning singleton available from Minecraft 26.1. -
experienceOrb
Creates an experience-orb spawn packet where that dedicated packet exists. -
damageEvent
Object damageEvent(int entityId, NativeValue damageType, int sourceCauseEntityId, int sourceDirectEntityId, @Nullable NativeVector3 sourcePosition) -
bossBarAdd
Object bossBarAdd(UUID id, NativeText name, float progress, BossBarColor color, BossBarOverlay overlay, boolean darkenScreen, boolean playMusic, boolean createWorldFog) -
bossBarRemove
-
bossBarProgress
-
bossBarName
-
bossBarStyle
-
bossBarProperties
-
chunkBiomes
-
explosion
Object explosion(NativeVector3 center, float radius, List<NativeBlockCoordinate> affectedBlocks, @Nullable NativeVector3 playerKnockback, ExplosionBlockInteraction blockInteraction, NativeParticle smallParticle, NativeParticle largeParticle, NativeSound sound) -
mapData
Object mapData(int mapId, byte scale, boolean locked, @Nullable NativeValue decorations, @Nullable NativeMapPatch colorPatch) -
entityPositionSync
Object entityPositionSync(int entityId, NativeVector3 position, NativeVector3 movement, float yaw, float pitch, boolean onGround) Creates exact entity position synchronization from supported Minecraft 1.21.3. -
moveMinecart
Creates minecart interpolation from supported Minecraft 1.21.3. -
cursorItem
Sets the carried cursor item. Supported from Minecraft 1.21.3. -
playerInventorySlot
Sets one player-inventory slot. Supported from Minecraft 1.21.3. -
gameRuleValues
Creates the dedicated client game-rule snapshot available from Minecraft 26.1. -
addTrackedWaypointPosition
-
updateTrackedWaypointPosition
Object updateTrackedWaypointPosition(UUID id, @Nullable NativeWaypointIcon icon, int x, int y, int z) -
addTrackedWaypointChunk
-
updateTrackedWaypointChunk
Object updateTrackedWaypointChunk(UUID id, @Nullable NativeWaypointIcon icon, int chunkX, int chunkZ) -
addTrackedWaypointAzimuth
-
updateTrackedWaypointAzimuth
-
removeTrackedWaypoint
-
gameTestHighlightPosition
Object gameTestHighlightPosition(int absoluteX, int absoluteY, int absoluteZ, int relativeX, int relativeY, int relativeZ) -
debugSample
Creates the tick-time debug sample and retains the supplied array. -
debugBlockValue
Creates a debug block update from an exact borrowed debug-update snapshot. -
debugChunkValue
Creates a debug chunk update from an exact borrowed debug-update snapshot. -
debugEntityValue
Creates a debug entity update from an exact borrowed debug-update snapshot. -
debugEvent
Creates a debug event from an exact borrowed debug-event snapshot. -
clearTitles
-
titleAnimation
-
chunkCacheCenter
-
chunkCacheRadius
-
experience
-
cooldown
Sets or clears an item cooldown; zero ticks clears it. -
projectilePower
Updates a projectile acceleration vector, converted to scalar power where required. -
health
-
systemChat
-
disguisedChat
Creates unsigned/disguised chat while retaining the exact chat-type binding. -
playerChat
Object playerChat(int globalIndex, UUID sender, int index, @Nullable NativeValue signature, NativeValue body, @Nullable NativeText unsignedContent, NativeValue filterMask, NativeValue chatType) Creates signed player chat from retained native cryptographic values.globalIndexis ignored before Minecraft 1.21.5. -
actionBar
-
titleText
-
subtitleText
-
tabList
-
disconnect
-
serverData
Creates server-list data;iconBytesmay be null when no icon is sent. -
customPayload
-
unloadChunk
-
chunkWithLight
Creates a chunk packet retaining exact encoded chunk and light payloads. -
lightUpdate
Creates a light update retaining an exact encoded light payload. -
levelEvent
-
openSignEditor
-
mountScreen
-
defaultSpawn
Sets the default spawn; dimension and pitch are encoded where supported. -
time
Synchronizes the legacy day clock or the default world clock on newer versions. -
hurtAnimation
-
entityMotion
-
entityLink
-
borderCenter
-
borderSize
-
borderLerpSize
-
borderWarningDelay
-
borderWarningDistance
-
simulationDistance
-
heldSlot
-
combatEnd
-
combatEnter
Object combatEnter() -
startConfiguration
Object startConfiguration() -
loginCompression
-
loginHello
-
loginDisconnect
-
loginFinished
Completes login;sessionIdis encoded by Minecraft 26.2 and newer. -
loginCustomQuery
Creates a login custom-query packet retainingdatauntil encoding. -
difficulty
-
gameEvent
-
lookAt
-
resourcePackPush
Object resourcePackPush(UUID id, String url, String hash, boolean required, @Nullable NativeText prompt) Creates a resource-pack request;promptmay be null. -
resourcePackPop
Removes one resource pack, or every pack whenidis null. -
cookieRequest
-
storeCookie
-
transfer
-
finishConfiguration
Object finishConfiguration() -
resetChat
Object resetChat()Resets configuration-phase chat state. -
enabledFeatures
Replaces the enabled feature-flag set from resource keys. -
dialog
Resolves a registered dialog for repeated packet creation.- Throws:
UnsupportedOperationException- before Minecraft 1.21.6
-
showDialog
Opens a registered dialog.- Throws:
UnsupportedOperationException- before Minecraft 1.21.6
-
clearDialog
Clears the currently displayed dialog.- Throws:
UnsupportedOperationException- before Minecraft 1.21.6
-
selectAdvancementsTab
Selects a tab, or closes the advancements screen whentabKeyis null. -
resetScore
Resets one objective, or all scores for the owner whenobjectiveNameis null. -
blankNumberFormat
NativeNumberFormat blankNumberFormat() -
fixedNumberFormat
-
setScore
Object setScore(String owner, String objectiveName, int score, @Nullable NativeText display, @Nullable NativeNumberFormat numberFormat) Creates a score update with optional display text and number formatting. -
scoreboardObjective
Object scoreboardObjective(String objectiveName, ScoreboardObjectiveAction action, @Nullable NativeText displayName, @Nullable ScoreboardRenderType renderType, @Nullable NativeNumberFormat numberFormat) Display and render type may be null only forScoreboardObjectiveAction.REMOVE. -
displayObjective
Displays an objective in a slot, or clears the slot when its name is null. -
scoreboardTeam
Object scoreboardTeam(String teamName, ScoreboardTeamAction action, @Nullable ScoreboardTeamParameters parameters, List<String> players) Parameters may be null for operations other than add and update. -
customChatCompletions
-
commandSuggestions
Object commandSuggestions(int requestId, int start, int length, List<CommandSuggestion> suggestions) -
openBook
-
recipe
Resolves a registered recipe for version-correct ghost-recipe packets. -
updateRecipes
Creates recipe-registry synchronization from exact payloads exposed byUpdateRecipesPacketView. The secondary payload is absent on legacy releases. -
recipeBookSettings
NativeRecipeBookSettings recipeBookSettings(boolean craftingOpen, boolean craftingFiltering, boolean furnaceOpen, boolean furnaceFiltering, boolean blastFurnaceOpen, boolean blastFurnaceFiltering, boolean smokerOpen, boolean smokerFiltering) Creates immutable recipe-book settings from portable category flags. -
recipeBookAdd
Object recipeBookAdd(List<NativeValue> entries, List<NativeValue> highlightedEntries, boolean replace, @Nullable NativeRecipeBookSettings settings) Adds or initializes recipe-book entries. Legacy highlighted entries are separate; modern entries retain their own notification/highlight flags. -
recipeBookRemove
Removes recipe-book entries, optionally applying settings in the same semantic update. -
recipeBookSettings
Applies recipe-book settings without changing entries. -
ghostRecipe
-
ghostRecipe
-
openScreen
-
merchantOffers
Object merchantOffers(int containerId, NativeValue offers, int villagerLevel, int villagerExperience, boolean showProgress, boolean canRestock) Creates merchant offers retaining the exact encoded offers collection. -
commands
Creates a command-tree packet retaining exact encoded entries. -
openScreen
-
setSlot
-
containerContent
Object containerContent(int containerId, int stateId, List<NativeItem> items, NativeItem carriedItem) -
equipment
-
bundleDelimiter
Object bundleDelimiter() -
chunkBatchStart
Object chunkBatchStart() -
chunkBatchFinished
-
combatKill
-
tickingState
-
tickingStep
-
playerInfoRemove
-
playerInfoUpdate
Creates a player-info update without live Bukkit or NMS player objects. -
bundle
-
playerAbilities
-
spawnInfo
NativeSpawnInfo spawnInfo(String dimensionTypeKey, String dimensionKey, long seed, NativeGameMode gameMode, @Nullable NativeGameMode previousGameMode, boolean debug, boolean flat, @Nullable NativeGlobalPosition lastDeathLocation, int portalCooldown, int seaLevel) Resolves version-correct common player spawn state.- Parameters:
previousGameMode- previous mode, or null when unknownlastDeathLocation- last death position, or null when absentseaLevel- dimension sea level; encoded by supported Minecraft 1.21.3 and newer
-
respawn
Creates a play-state respawn packet with semantic keep flags. -
login
Object login(int playerId, boolean hardcore, Set<String> levelKeys, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean limitedCrafting, NativeSpawnInfo spawnInfo, boolean onlineMode, boolean enforcesSecureChat) Creates the play-state login packet.- Parameters:
onlineMode- encoded by Minecraft 26.2 and newer
-
initializeBorder
Object initializeBorder(double centerX, double centerZ, double oldSize, double newSize, long lerpDurationMillis, int absoluteMaxSize, int warningBlocks, int warningTimeSeconds) -
sound
-
mobEffect
-
soundAt
Object soundAt(NativeSound sound, NativeSoundSource source, double x, double y, double z, float volume, float pitch, long seed) -
soundAt
default Object soundAt(String soundKey, NativeSoundSource source, double x, double y, double z, float volume, float pitch, long seed) -
entitySound
Object entitySound(NativeSound sound, NativeSoundSource source, int entityId, float volume, float pitch, long seed) -
entitySound
default Object entitySound(String soundKey, NativeSoundSource source, int entityId, float volume, float pitch, long seed) -
stopSound
Null sound and source stop every sound; either value may be supplied independently. -
removeMobEffect
-
removeMobEffect
-
updateMobEffect
Object updateMobEffect(int entityId, NativeMobEffect effect, int amplifier, int durationTicks, boolean ambient, boolean visible, boolean showIcon, boolean blend) -
updateMobEffect
-
blockEntityType
-
tagQuery
Replies to an NBT query;tagmay be null when no result exists. -
blockEntityData
-
blockEntityData
-
blockUpdate
-
blockEvent
Creates a block event; type and data are encoded as unsigned bytes. -
sectionBlocksUpdate
Object sectionBlocksUpdate(int sectionX, int sectionY, int sectionZ, List<SectionBlockChange> changes) -
particles
Object particles(NativeParticle particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, float offsetX, float offsetY, float offsetZ, float maxSpeed, int count) -
metadata
-
metadata
-
rotationMetadata
Object rotationMetadata(int entityId, EntityMetadataField<MetadataRotation> field, float x, float y, float z) -
displayVectorMetadata
Object displayVectorMetadata(int entityId, EntityMetadataField<NativeValue> field, float x, float y, float z) -
displayQuaternionMetadata
Object displayQuaternionMetadata(int entityId, EntityMetadataField<NativeValue> field, float x, float y, float z, float w)
-