区块(Chunks)以16*256*16立方块为单位存储地形和实体信息。为了提高Minecraft的运行效率,区块同时储存预处理的光照、等高线数据及其他元数据信息。 “区块”概念在Minecraft Infdev阶段时首次引进。 在Beta 1.3版本引进MCRegion之前, Minecraft以36进制编码的区块坐标为文件名,将区块信息储存在独立的“.dat”文件中(Alpha level format)。为了减少磁盘占用,MCRegion将地平面上32*32平方块内的所有区块打包存储在以十进制编码的区块坐标为文件名的“.mcr”文件中;这种存储方式降低了Minecraft运行时同时打开的文件数量。MCRegion后来被当下的Anvil文件格式取代,新格式沿用了MCRegion打包存储的方法,并使用了新的“.mca”文件格式。 Anvil文件格式相比MCRegion最大的改进是将区块分割,一个16*256*16大小的区块最多能分割出16个16*16*16的部分,所以全空区域的数据可以不被保存。支持的方块ID也从以前的0到255调整为0到4095,不过现在(2012年11月22日时)Minecraft还不能完美实现ID从0到4095的所有方块的存储,且256到4095的这些方块ID有很多已经被物品占用。 现在(2012年11月22日时),方块的辅助信息独立地被保存在区块信息内,特别的,天空光照(SkyLight)和(BlockLight)两个数组信息不在挂在方块ID后。Anvil文件格式出现后, 开发组在Notch原先设想的基础上对NBT格式(二进制命名标签格式)做出了改变,添加了一个和字节数组标签(byte array tag)相近的整数数组标签(integer array tag)——只有区块的等高线信息使用NBT格式存储。 [编辑]NBT结构- 根标签
- Level: 区块数据
- xPos: 区块的X坐标
- zPos: 区块的Z坐标
- LastUpdate: 自该区块上次更新以来经过的刻。
- TerrainPopulated: 布尔值,指示区块内的地区存不存在特殊的事物,如矿石、特殊方块、树木、地牢、花、瀑布等。如果该值为“假”或“0” 则游戏会在已经存在的方块内生成这些事物。
- Biomes: 256字节的生物群系信息,有些区块可能不具备该信息。区块内垂直的一列占用一字节空间,生物群系ID可在数据值页面查看。如果这个数组不存在,游戏在加载和保存区块时会自动添加并赋值;若数组内任何数值为“-1”,游戏也会根据正确信息改正。
- HeightMap: 1024 bytes(256 TAG_Int) of heightmap data. 16 x 16. Each byte records the lowest level in each column where the light from the sky is at full strength. Speeds computing of the SkyLight. Note: This array's indexes are ordered ZX whereas the other array indexes are ordered XZ or YZX.
- Sections: List of Compound tags, each tag is a sub-chunk of sorts.
- Y: The Y index (not coordinate) of this section. Range 0 to 15 (bottom to top), with no duplicates but some sections may be missing if empty.
- Blocks: 4096 bytes of block IDs defining the terrain. 8 bits per block, plus the bits from the below Add tag. 3D order YZX.
- Add: May not exist. 2048 bytes of additional block ID data. The value to add to (combine with) the above block ID to form the true block ID in the range 0 to 4095. 4 bits per block. 3D order YZX. Combining is done by shifting this value to the left 8 bits and then adding it to the block ID from above.
- Data: 2048 bytes of block data additionally defining parts of the terrain. 4 bits per block. 3D order YZX.
- BlockLight: 2048 bytes recording the amount of block-emitted light in each block. Makes load times faster compared to recomputing at load time. 4 bits per block. 3D order YZX.
- SkyLight: 2048 bytes recording the amount of sunlight or moonlight hitting each block. 4 bits per block. 3D order YZX.
- Entities: Each TAG_Compound in this list defines an entity in the chunk. See Entity Format below. If this list is empty it will be a list of Byte tags.
- TileEntities: Each TAG_Compound in this list defines a tile entity in the chunk. See Tile Entity Format below. If this list is empty it will be a list of Byte tags.
- TileTicks: May not exist. Each TAG_Compound in this list is an "active" block in this chunk waiting to be updated. These are used to save the state of redstone machines, falling sand or water, and other activity. See Tile Tick Format below. This tag may not exist.
[编辑]Block FormatIn the Anvil format, block positions are ordered YZX for compression purposes. The coordinate system is as follows: - X increases East, decreases West
- Y increases upwards, decreases downwards
- Z increases South, decreases North
Each section in a chunk is a 16x16x16-block area, with up to 16 sections in a chunk. Section 0 is the bottom section of the chunk, and section 15 is the top section of the chunk. To save space, completely empty sections are not saved. Within each section is a byte tag "Y" for the Y index of the section, 0 to 15, and then byte arrays for the blocks. The "Block" byte array has 4096 partial block IDs at 8 bits per block. Another byte array "Add" is used for block with IDs over 255, and is 2048 bytes of the other part of the 4096 block IDs at 4 bits per block. When both the "Block" and "Add" byte arrays exist, the partial ID from the "Add" array is shifted left 8 bits and added to the partial ID from the "Blocks" array to form the true Block ID. The "Data" byte array is also 2048 bytes for 4096 block data values at 4 bits per block. The "BlockLight" and "SkyLight" byte arrays are the same as the "Data" byte array but they are used for block light levels and sky light levels respectively. The "SkyLight" values represent how much sunlight or moonlight can potentially reach the block, independent of the current light level of the sky. The pseudo-code below shows how to access individual block information from a single section. Hover over text to see additional information or comments. byte Nibble4(byte[] arr, int index){ return index%2 == 0 ? arr[index/2]&0x0F : (arr[index/2]>>4)&0x0F; }int BlockPos = y*16*16 + z*16 + x;byte BlockID_a = Blocks[BlockPos];byte BlockID_b = Nibble4(Add, BlockPos);short BlockID = BlockID_a + (BlockID_b << 8);byte BlockData = Nibble4(Data, BlockPos);byte Blocklight = Nibble4(BlockLight, BlockPos);byte Skylight = Nibble4(SkyLight, BlockPos);[编辑]Entity FormatEvery entity is an unnamed TAG_Compound contained in the Entities list of a chunk file. The sole exception is the Player entity, stored in level.dat, or in <player>.dat files on servers. All entities share this base: - Entity data
- id: Entity ID. This tag does not exist for the Player entity.
- Pos: 3 TAG_Doubles describing the current X,Y,Z position of the entity.
- Motion: 3 TAG_Doubles describing the current dX,dY,dZ velocity of the entity in meters per tick.
- Rotation: Two TAG_Floats representing rotation in degrees.
- The entity's rotation clockwise around the Y axis (called yaw). Due west is 0. Does not exceed 360 degrees.
- The entity's declination from the horizon (called pitch). Horizontal is 0. Positive values look downward. Does not exceed positive or negative 90 degrees.
- FallDistance: Distance the entity has fallen. Larger values cause more damage when the entity lands.
- Fire: Number of ticks until the fire is put out. Negative values reflect how long the entity can stand in fire before burning. Default -1 when not on fire.
- Air: How much air the entity has, in ticks. Fills to a maximum of 300 in air, giving 15 seconds submerged before the entity starts to drown, and a total of up to 35 seconds before the entity dies (if it has 20 health). Decreases while underwater. If 0 while underwater, the entity loses 1 health per second.
- OnGround: 1 or 0 (true/false) - true if the entity is touching the ground.
- Dimension: Unknown usage; entities are only saved in the region files for the dimension they are in. -1 for The Nether, 0 for The Overworld, and 1 for The End.
- Invulnerable: 1 or 0 (true/false) - true if the entity should not take damage. This applies to living and nonliving entities alike: mobs will not take damage from any source (including potion effects) and objects such as vehicles and item frames cannot be destroyed unless their supports are removed. Note that these entities also cannot be moved by fishing rods, attacks, explosions, or projectiles.
- PortalCooldown: The number of ticks before which the entity may be teleported back through a portal of any kind. Initially starts at 900 ticks (45 seconds) after teleportation and counts down to 0.
- UUIDMost: The most significant bits of this entity's Universally Unique IDentifier. This is joined with UUIDLeast to form this entity's unique ID.
- UUIDLeast: The least significant bits of this entity's Universally Unique IDentifier.
- Riding: The data of the entity being ridden. Note that if an entity is being ridden, the topmost entity in the stack has the Pos tag, and the coordinates specify the location of the bottommost entity. Also note that the bottommost entity controls movement, while the topmost entity determines spawning conditions when created by a mob spawner.
- See this format (recursive).
[编辑]生物每个生物都有额外的标签来储存它们的血量, 状态,效果. Players 是一个生物的子类. - 生物有这些额外的特殊标签:
- Health: 该实体拥有的血量,”1”代表一半的心
- HealF: 代表血量的浮点值,如果它被设置,Health将被忽略
- AbsorptionAmount: 额外的健康效果
- AttackTime: 代表生物攻击后的无敌时间(tick)
- HurtTime: 代表生物攻击后变成红色的时间(tick)
- DeathTime: 代表生物已经死亡,控制死亡动画的时间(tick)
- Attributes: 下面的列表代表某个生物的特殊属性,这些属性在游戏内部有着不同的作用
- 特殊属性
- Name: 属性名
- Base: 属性的量
- Modifiers: A list of Modifiers acting on this Attribute. Modifiers alter the Base value in internal calculations, without changing the original copy. Note that a Modifier will never modify Base to be higher than its maximum or lower than its minimum for a given Attribute.
- An individual Modifier.
- Name: The Modifier's name.
- Amount: The amount by which this Modifier modifies the Base value in calculations.
- Operation: 0, 1, or 2. Defines the operation this Modifier executes on the Attribute's Base value. 0: Increment X by Amount, 1: Increment Y by X * Amount, 2: Y = Y * (1 + Amount) (equivalent to Increment Y by Y * Amount). The game first sets X = Base, then executes all Operation 0 modifiers, then sets Y = X, then executes all Operation 1 modifiers, and finally executes all Operation 2 modifiers.
- UUIDMost: The most significant bits of this Modifier's Universally Unique IDentifier. Used to reference modifiers in memory and ensure duplicates are not applied.
- UUIDLeast: The least significant bits of this Modifier's Universally Unique IDentifier.
- ActiveEffects: 代表生物存在的效果的列表,可能不存在
- A potion effect
- Id: 效果状态效果 ID.
- Amplifier: 效果等级,0代表1级
- Duration: 距离效果结束的时间(ticks)
- Ambient: 1 or 0 (true/false) – 代表该效果是否由信标提供.
- Equipment: 列表代表装备的物品,该列表会一直存在(哪怕是玩家),但是有可能是空的,代表没有任何物品
- 0: 生物手上的物品.
- 1: 装备(脚)
- 2: 装备(腿)
- 3: 装备(身体)
- 4: 装备(头)
- DropChances: 生物掉落物品的概率,由0-1,默认都是0.085,但如果是捡起的物品,则为1
- 0: 掉落生物手上的物品的概率
- 1: 掉落装备(脚)的概率
- 2: 掉落装备(腿)的概率
- 3: 掉落装备(身体)的概率
- 4: 掉落装备(头)的概率
- CanPickUpLoot: 1 or 0 (true/false) – 控制该生物时候可以捡起/穿上物品.
- PersistenceRequired: 1 or 0 (true/false) – 控制该生物是否可以自然消失
- CustomName: 该生物的自定义名称,该名称可以显示在生物头上,或者交易栏,死亡信息上面
- CustomNameVisible: 1 or 0 (true/false) – 如果是true,那么自定义名称会一直出现,无论光标是否指向(可能不存在)
- Leashed: 1 or 0 (true/false) – 代表该生物是否被拴住
- Leash: Either contains a UUID long pair, if this leash connects to another entity, or an X, Y, Z int trio if this leash connects to a fencepost.
- GoldenAppleOverflow(移除): 未知用途.
- File:HeartParticle.png Additional fields for mobs that can breed:
- InLove: Number of ticks until the mob loses its breeding hearts and stops searching for a mate. 0 when not searching for a mate.
- Age: Represents the age of the mob in ticks; when negative, the mob is a baby. When 0 or above, the mob is an adult. When above 0, represents the number of ticks before this mob can breed again.
- 可以被驯服的怪物有这些额外的字段:(马除外):
- Owner: 主人玩家名称,如果没有主人则为空
- Sitting: 1 or 0 (true/false) – 指定该生物是否坐下
- 蝙蝠' 有这些额外的字段:
- BatFlags: 1代表倒挂,0代表正在飞行
- 爬行者 有这些额外的字段:
- powered: 1 or 0 (true/false) – 指定爬行者是否为高压爬行者(可能不存在)
- ExplosionRadius: 爆炸半径(默认3)
- Fuse: 爬行者距离爆炸的时间(tick)(默认30)
- 末影人 有这些额外的字段:
- carried: 被末影人拿起的方块的ID,0代表没有拿起任何方块
- carriedData: Additional data 拿起方块的数据附加值,0代表没有拿起任何方块
- EntityHorse有这些额外的字段:
- Bred: 1 or 0 (true/false) – 未知用途
- ChestedHorse: 1 or 0 (true/false) – 指定马时候有箱子
- EatingHaystack: 1 or 0 (true/false) – 指定马是否吃草
- HasReproduced: 1 or 0 (true/false) – 暂未使用,始终为0
- Tame: 1 or 0 (true/false) – 指定马是否被驯服了
- Temper: 由0到100; 值越高越好驯服
- Type: 一匹马的类型, 0 = 马, 1= 驴, 2= Mule, 3 = 僵尸, 4 =骷髅.
- Variant: The variant of the horse. Determines colors. Stored as baseColor | markings << 8.
- OwnerName: 主人玩家姓名
- Items: 箱子里物品列表(如果马上有箱子)
- An item, including the Slot tag. Slots are numbered 2 to 16 for donkeys and mules, and none exist for all other horses.
- ArmorItem: 所穿的护甲(可能不存在)
- SaddleItem: 所穿的鞍(可能不存在)
- ArmorType: ( 在13w21a删除) 护甲类型. 0 = 没有, 1 = 铁, 2= 金, 3= 钻石.
- Saddle: ( 在13w21a删除) 1 or 0 (true/false) – 是否有鞍
- 恶魂 有这些额外的字段:
- ExplosionPower: 代表恶魂发出的火球的威力,默认为1.
- Ozelot has these additional fields:
- CatType: 皮肤类型ID. 0 is wild ocelot, 1 is tuxuedo, 2 is tabby and 3 is siamese. Does not determine an ocelot's behavior: it will be wild unless its Owner string is not empty, meaning wild ocelots can look like cats and vice versa.
- 猪 有这些额外的字段:
- Saddle: 1 or 0 (true/false) – 指定猪上面有/无鞍
- 羊 有这些额外的字段:
- Sheared: 1 or 0 (true/false) – 指定羊是否被剪过
- Color: 0 to 15 – 羊毛颜色,见 wool data values.
- 骷髅 有这些额外的字段:
- SkeletonType: 0 是普通骷髅, 1 是凋零骷髅.
- 史莱姆 and LavaSlime 有这些额外的字段:
- Size: 指定史莱姆的大小
- WitherBoss has these additional fields:
- Invul: The number of ticks of invulnerability left after being initially created. 0 once invulnerability has expired.
- 狼 有这些额外的字段:
- Angry: 1 or 0 (true/false) – 指定狼是否在愤怒中
- CollarColor: The dye color of this wolf's collar. Present even for wild wolves (but does not render); default value is 14.
- 16pxVillager has these additional fields:
- Profession: The ID of the texture used for this villager. This also influences trading options.
- Riches: Currently unused. Increases by the number of emeralds traded to a villager any time they are traded.
- Offers: Is generated when the trading menu is opened for the first time.
- Recipes: List of trade options.
- A trade option.
- maxUses: The maximum number of times this trade can be used before it is disabled.
- uses: The number of times this trade has been used. The trade becomes disabled when this is greater or equal to maxUses.
- buy: The first 'cost' item, without the Slot tag.
- buyB: May not exist. The second 'cost' item, without the Slot tag.
- sell: The item being sold for each set of cost items, without the Slot tag.
- VillagerGolem has these additional fields:
- PlayerCreated: 1 or 0 (true/false) - true if this golem was created by a player.
- Zombie has these additional fields:
- IsVillager: 1 or 0 (true/false) - true if this is an infected villager. May be absent on non-villager zombies.
- IsBaby: 1 or 0 (true/false) - true if this infected villager is a baby. May be absent on non-villager zombies.
- ConversionTime: -1 when not being converted back to a villager, positive for the number of ticks until conversion back into a villager. The regeneration effect will parallel this.
- PigZombie has these additional fields:
- All fields from Zombie
- Anger: Anger level. Determines the aggressivity of the creature towards players. 0 for neutral Zombie Pigmen.
[编辑]ProjectilesProjectiles are a subclass of Entity and have very obscure tags such as X,Y,Z coordinate tags despite Entity Pos tag, inTile despite inGround, and shake despite most projectiles not being arrows. - Projectiles have these additional fields:
- xTile: X coordinate of the item's position in the chunk.
- yTile: Y coordinate of the item's position in the chunk.
- zTile: Z coordinate of the item's position in the chunk.
- inTile: ID of tile projectile is in.
- shake: The "shake" when arrows hit a block.
- inGround: 1 or 0 (true/false) - If the Projectile is in the ground or hit the ground already (For arrow pickup; you cannot pickup arrows in the air)
- Arrow has these additional fields:
- inData: Metadata of tile arrow is in.
- pickup: 0 = cannot be picked up by players. 1 = can be picked up by players in survival or creative. 2 = can only be picked up by players in creative.
- player: 1 or 0 (true/false) - If pickup is not used, and this is true, the arrow can be picked up by players.
- damage: Unknown how this affects actual damage inflicted by the arrow. May not be a whole number. 2.0 for normal arrows, and increased 0.5 per level of Power enchantment on the firing bow. If the Power enchantment is present, an additional 0.5 is added on (so Power I gives a bonus of 1.0, while Power II gives 1.5).
- Fireball, SmallFireball, and WitherSkull have these additional fields:
- direction: List of 3 doubles. Should be identical to Motion.
- Fireball has these additional fields:
- ExplosionPower: The power and size of the explosion created by the fireball upon impact. Default value 1.
- ThrownEnderpearl, ThrownExpBottle, ThrownPotion, and Snowball have these additional fields:
- ownerName: The name of the player this projectile was thrown by.
- ThrownPotion has these additional fields:
- Potion: The item that was thrown, without the slot tag.
- potionValue: If the Potion tag does not exist, this value is used as the damagevalue of the thrown potion.
[编辑]ItemsItems are a subclass of Entity.
Items have these additional fields:
- Health: The health of the item, which starts at 5. Items take damage from fire, lava, and explosions. The item is destroyed when its health reaches 0.
- Age: The number of ticks the item has been "untouched". After 6000 ticks (5 minutes [1]) the item is destroyed.
Item has these additional fields:
- Item: The inventory item, without the Slot tag.
- XPOrb has these additional fields:
- Value: The amount of experience the orb gives when picked up.
[编辑]VehiclesVehicles are subclasses of Entity. - All types of Minecarts may have these additional optional fields:
- CustomDisplayTile: Optional. 1 or 0 (true/false) - whether to display the custom tile in this minecart.
- DisplayTile: Optional. The ID of the custom block in the minecart.
- DisplayData: Optional. The Data value of the custom block in the minecart.
- DisplayOffset: Optional. The offset of the block displayed in the Minecart. Positive values move the block upwards, while negative values move it downwards. A value of 16 will move the block up by exactly one multiple of its height.
- CustomName: Optional. The custom name of this minecart.
- Minecart(deprecated since 13w02a) has these additional fields:
- Type: Type of the cart: 0 - empty, 1 - with a chest, 2 - with a furnace.
- All fields from MinecartRideable, MinecartChest or MinecartFurnace depending on Type.
- MinecartChest and MinecartHopper have these additional fields:
- Items: List of items.
- An item, including the Slot tag. Slots are numbered 0 to 26 for chests, and 0 to 4 for hoppers.
- MinecartFurnace have these additional fields:
- PushX: Force along X axis, used for smooth acceleration/deceleration.
- PushZ: Force along Z axis, used for smooth acceleration/deceleration.
- Fuel: The number of ticks until the minecart runs out of fuel.
- MinecartHopper has these additional fields:
- TransferCooldown: Time until the next transfer, between 1 and 8, or 0 if there is no transfer.
- MinecartTNT has these additional fields:
- TNTFuse: Time until explosion or -1 if deactivated.
- MinecartSpawner has these additional fields:
- All fields from the MobSpawner Tile Entity, excluding the base Tile Entity fields.
[编辑]Dynamic TilesDynamic tiles are a subclass of Entity and are used to simulate realistically moving blocks. Dynamic Tile Entities | Entity ID | Name | PrimedTnt | TNT | FallingSand | Dynamic Tile |
- PrimedTnt has these additional fields:
- Fuse: Ticks until explosion.
FallingSand has these additional fields:
- Tile(deprecated): The Block ID. Not limited to only sand, gravel, dragon eggs, or anvils. Although deprecated, this value is always present.
- TileID: The Block ID, as above, but now supporting the 1-4095 range.
- TileEntityData: Optional. The tags of the tile entity for this block.
- Data: The data value for the block.
- Time: The number of ticks the entity has existed. If set to 0, the moment it ticks to 1, it will vanish if the block at its location has a different ID than the entity's TileID. If the block at its location has the same ID as its TileID when Time ticks from 0 to 1, the block will instead be deleted, and the entity will continue to fall, having overwritten it. (This was the result of Mojang's failed attempt to "fix" infinite sand/gravel/dragon egg/anvil/etc. generators by trying to have the falling sand entity delete the duplicated block the next tick) When Time goes above 600, or above 100 while the block is below Y=0, the entity is deleted.
- DropItem: 1 or 0 (true/false) - true if the block should drop an item that can be picked up when it breaks.
- HurtEntities: 1 or 0 (true/false) - true if the block should hurt entities it falls on.
- FallHurtMax: The maximum number of hitpoints of damage to inflict on entities that intersect this FallingSand. For vanilla FallingSand, always 40 (20 hearts).
- FallHurtAmount: Multiplied by the FallDistance to calculate the amount of damage to inflict. For vanilla FallingSand, always 2.
[编辑]OtherOther entity types that are a subclass of Entity but do not fit into any of the above categories. - FireworksRocketEntity has these additional fields:
- Life: The number of ticks this fireworks rocket has been flying for.
- LifeTime: The number of ticks before this fireworks rocket explodes. This value is randomized when the firework is launched: ((Flight + 1) * 10 + random(0 to 5) + random(0 to 6))
- FireworksItem: The crafted Firework Rocket item.
- Paintings and Item Frames share these additional fields:
- TileX: The X coordinate of the block the painting is placed on.
- TileY: The Y coordinate of the block the painting is placed on.
- TileZ: The Z coordinate of the block the painting is placed on.
- Direction: Direction the painting faces: 0 is south, 1 is west, 2 is north, and 3 is east.
- Dir: Same as Direction, except the meaning of values 2 and 0 are swapped. Ignored if Direction is present.
- ItemFrame has these additional fields:
- Item: The item, without the slot tag. If the item frame is empty, this tag does not exist.
- ItemDropChance: The chance the item will drop when the item frame breaks. 1.0 by default.
- ItemRotation: The number of times the item has been rotated 90 degrees clockwise.
- Painting has these additional fields:
- Motive: The name of this Painting's art.
[编辑]Tile Entity FormatTile Entities (not related to Entities) are used by Minecraft to store information about blocks that can't be stored in the 4-bits of block data the block has. All tile entities share this base: - Tile entity data
- id: Tile entity ID
- x: X coordinate of the Tile Entity.
- y: Y coordinate of the Tile Entity.
- z: Z coordinate of the Tile Entity.
Various containers may have these additional fields:
- CustomName: Optional. The name of this container, which will display in its GUI where the default name ordinarily is. For Command Blocks, the name will replace the usual '@' when using commands such as "say" and "tell".
Beacon has these additional fields:
- Levels: The number of levels available from the pyramid.
- Primary: The primary power selected, see Potion effects for IDs. 0 means none.
- Secondary: The secondary power selected, see Potion effects for IDs. 0 means none.
Cauldron has these additional fields:
- Items: List of items in the brewing stand.
- : An item, including the slot tag. Slots are numbered 0 to 3.
- BrewTime: The number of ticks the potions have been brewing for.
Chest has these additional fields:
- Items: List of items in the chest.[note 1]
- : An item, including the slot tag. Chest slots are numbered 0-26 with 0 in the top left corner.
- ↑ Double chests are simply two Chest tile entities next to each other; see Chest for which tile entity is which half of the chest.
Comparator has these additional fields:
- OutputSignal: Represents the strength of the analog signal output by this redstone comparator. Likely used because the block itself uses its four bits of metadata to determine its rotation, powered state, and subtraction mode state, and comparators can hold a specific amount of power even in circuits without redstone wire.
Control has these additional fields:
- Command: The command to issue to the server.
- SuccessCount: Represents the strength of the analog signal output by redstone comparators attached to this command block. Only updated when the command block is activated with a redstone signal.
Furnace has these additional fields:
- BurnTime: Number of ticks left before the current fuel runs out.[note 1]
- CookTime: Number of ticks the item has been smelting for. The item finishes smelting when this value reaches 200 (10 seconds). Is reset to 0 if BurnTime reaches 0.
- Items: List of items in the furnace slots.
- : An item in the furnace, including the slot tag:
Slot 0: The item(s) being smelted.
Slot 1: The item(s) to use as the next fuel source.
Slot 2: The item(s) in the result slot.
- ↑ The original maximum burning time for the current fuel isn't stored, thus the current time left is assumed to be the maximum when this Tile Entity is loaded into memory.
Hopper has these additional fields:
- Items: List of items in the hopper slots.
- : An item in the hopper, including the slot tag.
- TransferCooldown: Time unil the next transfer, naturaly between 1 and 8 or 0 if there is no transfer.
MobSpawner has these additional fields:
- SpawnPotentials: Optional. List of possible entities to spawn.[2][3] If this tag does not exist, but SpawnData exists, Minecraft will generate it the next time the spawner tries to spawn an entity. The generated list will contain a single entry derived from the EntityId and SpawnData tags.
- : A potential future spawn. After the spawner makes an attempt at spawning, it will choose one of these entries at random and use it to prepare for the next spawn.
- Type: Overwrites EntityId when preparing the next spawn.
- Weight: The chance that this spawn will be picked as compared to other spawn weights. Must be non-negative and at least 1.
- Properties: Overwrites the contents of SpawnData when preparing the next spawn. Not optional; an empty one will be created if it does not exist.
- EntityId: The Entity ID of the next entity(s) to spawn. Both Mob Entity IDs and other Entity IDs will work. Warning: If SpawnPotentials exists, this tag will get overwritten after the next spawning attempt: see above for more details.
- SpawnData: Contains tags to copy to the next spawned entity(s) after spawning. Any of the Entity or Mob tags may be used. Note that if a spawner specifies any of these tags, almost all variable data such as mob equipment, villager profession, sheep wool color, etc., will no longer be automatically generated, and must also be manually specified [4] (note that this does not apply to position data, which will be randomized as normal unless Pos is specified. Similarly, unless Size and Health are specified for a Slime or Magma Cube, these will still be randomized). This, together with EntityId, also determines the appearance of the miniature entity spinning in the spawner cage. Note: this tag is optional: if it does not exist, the next spawned entity will use the default vanilla spawning properties for this mob, including potentially randomized armor (this is true even if SpawnPotentials does exist). Warning: If SpawnPotentials exists, this tag will get overwritten after the next spawning attempt: see above for more details.
- SpawnCount: How many mobs to attempt to spawn each time.
- SpawnRange: The radius around which the spawner attempts to place mobs randomly. The spawn area is square, includes the block the spawner is in, and is centered around the spawner's x,z coordinates - not the spawner itself. It is 2 blocks high, centered around the spawner's y coordinate (its bottom), allowing mobs to spawn as high as its top surface and as low as 1 block below its bottom surface. Vertical spawn coordinates are integers, while horizontal coordinates are floating point and weighted towards values near the spawner itself.
- Delay: Ticks until next spawn. If 0, it will spawn immediately when a player enters its range. If set to -1 (this state never occurs in a natural spawner; it seems to be a feature accessed only via NBT editing), the spawner will reset its Delay, and (if SpawnPotentials exist) EntityID and SpawnData as though it had just completed a successful spawn cycle, immediately when a player enters its range. Note that setting Delay to -1 can be useful if you want the game to properly randomize the spawner's Delay, EntityID, and SpawnData, rather than starting with pre-defined values.
- MinSpawnDelay: The minimum random delay for the next spawn delay. May be equal to MaxSpawnDelay.
- MaxSpawnDelay: The maximum random delay for the next spawn delay. Warning: Setting this value to 0 crashes Minecraft. Set to at least 1.
- MaxNearbyEntities: Overrides the maximum number of nearby (within a box of spawnrange*2+1 x spawnrange*2+1 x 8 centered around the spawner block) entities whose IDs match this spawner's entity ID. Note that this is relative to a mob's hitbox, not their physical position. Also note that all entities within all chunk sections (16x16x16 cubes) overlapped by this box are tested for their ID and hitbox overlap, rather than just entities which are within the box, meaning a large amount of entities outside the box (or within it, of course) can cause substantial lag.
- RequiredPlayerRange: Overrides the block radius of the sphere of activation by players for this spawner. Note that for every gametick, a spawner will check all players in the current world to test whether a player is within this sphere.
- MaxExperience(removed): Unknown.
- RemainingExperience(removed): Unknown.
- ExperienceRegenTick(removed): Unknown.
- ExperienceRegenRate(removed): Unknown.
- ExperienceRegenAmount(removed): Unknown.
Music has these additional fields:
- note: Pitch (number of right-clicks).
Piston has these additional fields:
- blockId: Block_IDs of the block being moved.
- blockData: Data value of the block being moved.
- facing: Direction in which the block will be pushed.
- progress: How far the block has been moved.
- extending: 1 or 0 (true/false) - true if the block is being pushed.
RecordPlayer has these additional fields:
- Record: Record currently playing. 0 is no record. Otherwise, it is the item ID of the record (e.g. 2261 for the "mall" record). Other IDs can be used to make other items or blocks pop out with a data value of 0. This is always overridden by the ID in RecordItem.
- RecordItem: The item, without the Slot tag.
Sign has these additional fields:
- Text1: First row of text.
- Text2: Second row of text.
- Text3: Third row of text.
- Text4: Fourth row of text.
Only the first 16 characters of each line are read, the rest are discarded.
Skull has these additional fields:
Trap and Dropper have these additional fields:
- Items: List of items in the dispenser/dropper
- : An item, including the slot tag. Slots are numbered 0-8.
[编辑]Tile Tick FormatTile Ticks represent block updates that need to happen because they could not happen before the chunk was saved. Examples reasons for tile ticks include redstone circuits needing to continue updating, water and lava that should continue flowing, recently placed sand or gravel that should fall, etc. Tile ticks are not used for purposes such as leaf decay, where the decay information is stored in the leaf block data values and handled by Minecraft when the chunk loads. For map makers, tile ticks can be used to update blocks after a period of time has passed with the chunk loaded into memory. - A Tile Tick
- i: The ID of the block; used to activate the correct block update procedure.
- t: The number of ticks until processing should occur. May be negative when processing is overdue.
- p: If multiple tile ticks are scheduled for the same tick, tile ticks with lower p will be processed first. If they also have the same p, the order is unknown.
- x: X position
- y: Y position
- z: Z position
[编辑]References
|