跳转至

@minecraft/server

文档版本:1.21.0.24

@minecraft/server模块的1.12.0-internal版本,UUID为b26a4d4c-afdf-4690-88f8-931846312678。该模块是服务端的基础模块。

依赖

该模块依赖于以下模块:

  • @minecraft/common|1.1.0|77ec12b4-1b2b-4c98-8d34-d1cd63f849d5

常量

HudElementsCount
static read-only HudElementsCount = 13;
HudVisibilityCount
static read-only HudVisibilityCount = 2;
isInternal
static read-only isInternal = True;
MoonPhaseCount
static read-only MoonPhaseCount = 8;
TicksPerDay
static read-only TicksPerDay = 24000;
TicksPerSecond
static read-only TicksPerSecond = 20;

对象

system
static read-only system: System;
world
static read-only world: World;

描述
BiomeType
BiomeTypes
Block
BlockComponent
BlockComponentEntityFallOnEvent
BlockComponentOnPlaceEvent
BlockComponentPlayerDestroyEvent
BlockComponentPlayerInteractEvent
BlockComponentPlayerPlaceBeforeEvent
BlockComponentRandomTickEvent
BlockComponentRegistry
BlockComponentStepOffEvent
BlockComponentStepOnEvent
BlockComponentTickEvent
BlockEvent
BlockExplodeAfterEvent
BlockExplodeAfterEventSignal
BlockInventoryComponent
BlockLavaContainerComponent
BlockLiquidContainerComponent
BlockLocationIterator
BlockPermutation
BlockPistonComponent
BlockPotionContainerComponent
BlockRecordPlayerComponent
BlockSignComponent
BlockSnowContainerComponent
BlockStates
BlockStateType
BlockType
BlockTypes
BlockVolume
BlockVolumeBase
BlockWaterContainerComponent
BoundingBoxUtils
ButtonPushAfterEvent
ButtonPushAfterEventSignal
Camera
ChatSendAfterEvent
ChatSendAfterEventSignal
ChatSendBeforeEvent
ChatSendBeforeEventSignal
CommandResult
Component
CompoundBlockVolume
Container
ContainerSlot
DataDrivenEntityTriggerAfterEvent
DataDrivenEntityTriggerAfterEventSignal
Dimension
DimensionType
DimensionTypes
Effect
EffectAddAfterEvent
EffectAddAfterEventSignal
EffectAddBeforeEvent
EffectAddBeforeEventSignal
EffectType
EffectTypes
EnchantmentType
EnchantmentTypes
Entity
EntityAddRiderComponent
EntityAgeableComponent
EntityAttributeComponent
EntityBaseMovementComponent
EntityBreathableComponent
EntityCanClimbComponent
EntityCanFlyComponent
EntityCanPowerJumpComponent
EntityColor2Component
EntityColorComponent
EntityComponent
EntityDefinitionFeedItem
EntityDieAfterEvent
EntityDieAfterEventSignal
EntityEquippableComponent
EntityFireImmuneComponent
EntityFloatsInLiquidComponent
EntityFlyingSpeedComponent
EntityFrictionModifierComponent
EntityGroundOffsetComponent
EntityHealableComponent
EntityHealthChangedAfterEvent
EntityHealthChangedAfterEventSignal
EntityHealthComponent
EntityHitBlockAfterEvent
EntityHitBlockAfterEventSignal
EntityHitEntityAfterEvent
EntityHitEntityAfterEventSignal
EntityHurtAfterEvent
EntityHurtAfterEventSignal
EntityInventoryComponent
EntityIsBabyComponent
EntityIsChargedComponent
EntityIsChestedComponent
EntityIsDyeableComponent
EntityIsHiddenWhenInvisibleComponent
EntityIsIgnitedComponent
EntityIsIllagerCaptainComponent
EntityIsSaddledComponent
EntityIsShakingComponent
EntityIsShearedComponent
EntityIsStackableComponent
EntityIsStunnedComponent
EntityIsTamedComponent
EntityItemComponent
EntityIterator
EntityLavaMovementComponent
EntityLeashableComponent
EntityLoadAfterEvent
EntityLoadAfterEventSignal
EntityMarkVariantComponent
EntityMovementAmphibiousComponent
EntityMovementBasicComponent
EntityMovementComponent
EntityMovementFlyComponent
EntityMovementGenericComponent
EntityMovementGlideComponent
EntityMovementHoverComponent
EntityMovementJumpComponent
EntityMovementSkipComponent
EntityMovementSwayComponent
EntityNavigationClimbComponent
EntityNavigationComponent
EntityNavigationFloatComponent
EntityNavigationFlyComponent
EntityNavigationGenericComponent
EntityNavigationHoverComponent
EntityNavigationWalkComponent
EntityNpcComponent
EntityOnFireComponent
EntityProjectileComponent
EntityPushThroughComponent
EntityRemoveAfterEvent
EntityRemoveAfterEventSignal
EntityRemoveBeforeEvent
EntityRemoveBeforeEventSignal
EntityRideableComponent
EntityRidingComponent
EntityScaleComponent
EntitySkinIdComponent
EntitySpawnAfterEvent
EntitySpawnAfterEventSignal
EntityStrengthComponent
EntityTameableComponent
EntityTameMountComponent
EntityType
EntityTypeFamilyComponent
EntityTypeIterator
EntityTypes
EntityUnderwaterMovementComponent
EntityVariantComponent
EntityWantsJockeyComponent
ExplosionAfterEvent
ExplosionAfterEventSignal
ExplosionBeforeEvent
ExplosionBeforeEventSignal
FeedItem
FeedItemEffect
FilterGroup
FluidContainer
GameRuleChangeAfterEvent
GameRuleChangeAfterEventSignal
GameRules
IButtonPushAfterEventSignal
ILeverActionAfterEventSignal
IPlayerJoinAfterEventSignal
IPlayerLeaveAfterEventSignal
IPlayerSpawnAfterEventSignal
ItemCompleteUseAfterEvent
ItemCompleteUseAfterEventSignal
ItemCompleteUseEvent
ItemComponent
ItemComponentBeforeDurabilityDamageEvent
ItemComponentCompleteUseEvent
ItemComponentConsumeEvent
ItemComponentHitEntityEvent
ItemComponentMineBlockEvent
ItemComponentRegistry
ItemComponentUseEvent
ItemComponentUseOnEvent
ItemCooldownComponent
ItemDurabilityComponent
ItemEnchantableComponent
ItemFoodComponent
ItemReleaseUseAfterEvent
ItemReleaseUseAfterEventSignal
ItemStack
ItemStartUseAfterEvent
ItemStartUseAfterEventSignal
ItemStartUseOnAfterEvent
ItemStartUseOnAfterEventSignal
ItemStopUseAfterEvent
ItemStopUseAfterEventSignal
ItemStopUseOnAfterEvent
ItemStopUseOnAfterEventSignal
ItemType
ItemTypes
ItemUseAfterEvent
ItemUseAfterEventSignal
ItemUseBeforeEvent
ItemUseBeforeEventSignal
ItemUseOnAfterEvent
ItemUseOnAfterEventSignal
ItemUseOnBeforeEvent
ItemUseOnBeforeEventSignal
ItemUseOnEvent
LeverActionAfterEvent
LeverActionAfterEventSignal
ListBlockVolume
MessageReceiveAfterEvent
MinecraftDimensionTypes
MolangVariableMap
PistonActivateAfterEvent
PistonActivateAfterEventSignal
Player
PlayerBreakBlockAfterEvent
PlayerBreakBlockAfterEventSignal
PlayerBreakBlockBeforeEvent
PlayerBreakBlockBeforeEventSignal
PlayerDimensionChangeAfterEvent
PlayerDimensionChangeAfterEventSignal
PlayerGameModeChangeAfterEvent
PlayerGameModeChangeAfterEventSignal
PlayerGameModeChangeBeforeEvent
PlayerGameModeChangeBeforeEventSignal
PlayerInputPermissionCategoryChangeAfterEvent
PlayerInputPermissionCategoryChangeAfterEventSignal
PlayerInputPermissions
PlayerInteractWithBlockAfterEvent
PlayerInteractWithBlockAfterEventSignal
PlayerInteractWithBlockBeforeEvent
PlayerInteractWithBlockBeforeEventSignal
PlayerInteractWithEntityAfterEvent
PlayerInteractWithEntityAfterEventSignal
PlayerInteractWithEntityBeforeEvent
PlayerInteractWithEntityBeforeEventSignal
PlayerIterator
PlayerJoinAfterEvent
PlayerJoinAfterEventSignal
PlayerLeaveAfterEvent
PlayerLeaveAfterEventSignal
PlayerLeaveBeforeEvent
PlayerLeaveBeforeEventSignal
PlayerPlaceBlockAfterEvent
PlayerPlaceBlockAfterEventSignal
PlayerPlaceBlockBeforeEvent
PlayerPlaceBlockBeforeEventSignal
PlayerSpawnAfterEvent
PlayerSpawnAfterEventSignal
PressurePlatePopAfterEvent
PressurePlatePopAfterEventSignal
PressurePlatePushAfterEvent
PressurePlatePushAfterEventSignal
ProjectileHitBlockAfterEvent
ProjectileHitBlockAfterEventSignal
ProjectileHitEntityAfterEvent
ProjectileHitEntityAfterEventSignal
Scoreboard
ScoreboardIdentity
ScoreboardObjective
ScoreboardScoreInfo
ScreenDisplay
ScriptEventCommandMessageAfterEvent
ScriptEventCommandMessageAfterEventSignal
Seat
ServerMessageAfterEventSignal
Structure
StructureManager
System
SystemAfterEvents
SystemBeforeEvents
TargetBlockHitAfterEvent
TargetBlockHitAfterEventSignal
Trigger
TripWireTripAfterEvent
TripWireTripAfterEventSignal
WatchdogTerminateBeforeEvent
WatchdogTerminateBeforeEventSignal
WeatherChangeAfterEvent
WeatherChangeAfterEventSignal
WeatherChangeBeforeEvent
WeatherChangeBeforeEventSignal
World
WorldAfterEvents
WorldBeforeEvents
WorldInitializeAfterEvent
WorldInitializeAfterEventSignal
WorldInitializeBeforeEvent
WorldInitializeBeforeEventSignal

接口

接口 描述
BiomeSearchOptions
BlockCustomComponent
BlockEventOptions
BlockFillOptions
BlockFilter
BlockHitInformation
BlockRaycastHit
BlockRaycastOptions
BoundingBox
CameraDefaultOptions
CameraEaseOptions
CameraFadeOptions
CameraFadeTimeOptions
CameraSetFacingOptions
CameraSetLocationOptions
CameraSetPosOptions
CameraSetRotOptions
CompoundBlockVolumeItem
DefinitionModifier
DimensionLocation
Enchantment
EntityApplyDamageByProjectileOptions
EntityApplyDamageOptions
EntityDamageSource
EntityDataDrivenTriggerEventOptions
EntityEffectOptions
EntityEventOptions
EntityFilter
EntityHitInformation
EntityQueryOptions
EntityQueryPropertyOptions
EntityQueryScoreOptions
EntityRaycastHit
EntityRaycastOptions
EqualsComparison
ExplosionOptions
GreaterThanComparison
GreaterThanOrEqualsComparison
ItemCustomComponent
LessThanComparison
LessThanOrEqualsComparison
MusicOptions
NotEqualsComparison
PlayAnimationOptions
PlayerSoundOptions
ProjectileShootOptions
RangeComparison
RawMessage
RawMessageScore
RawText
RGB
RGBA
ScoreboardObjectiveDisplayOptions
ScriptEventMessageFilterOptions
SpawnEntityOptions
StructureCreateOptions
StructurePlaceOptions
TeleportOptions
TitleDisplayOptions
Vector2
Vector3
VectorXZ
WorldSoundOptions

枚举

枚举 描述
BlockComponentTypes
BlockPistonState
BlockVolumeIntersection
CompoundBlockVolumeAction
CompoundBlockVolumePositionRelativity
Difficulty
Direction
DisplaySlotId
DyeColor
EasingType
EnchantmentSlot
EntityComponentTypes
EntityDamageCause
EntityInitializationCause
EntityLifetimeState
EquipmentSlot
FluidType
GameMode
GameRule
HudElement
HudVisibility
InputPermissionCategory
ItemComponentTypes
ItemLockMode
MoonPhase
ObjectiveSortOrder
PaletteColor
ScoreboardIdentityType
ScriptEventSource
SignSide
StructureAnimationMode
StructureMirrorAxis
StructureRotation
StructureSaveMode
TimeOfDay
WatchdogTerminateReason
WeatherType

类型别名

类型别名 描述
BlockComponentTypeMap
EntityComponentTypeMap
ItemComponentTypeMap

错误

错误 描述
CommandError
EnchantmentLevelOutOfBoundsError
EnchantmentTypeNotCompatibleError
EnchantmentTypeUnknownIdError
InvalidContainerSlotError
InvalidStructureError
ItemCustomComponentAlreadyRegisteredError
ItemCustomComponentNameError
ItemCustomComponentReloadNewComponentError
ItemCustomComponentReloadNewEventError
ItemCustomComponentReloadVersionError
LocationInUnloadedChunkError
LocationOutOfWorldBoundariesError
UnloadedChunksError