mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 23:44:38 +00:00
1.21.2 (#171)
* partially implement 24w35a * start updating to 24w39a + itemcomponent codegen * fix codegen and broken packets to finish updating to 24w39a :D * update to 1.21.2 except for blocks * update ServerboundPlayerInputPacket impl
This commit is contained in:
parent
abc7b43b8c
commit
40e4096d24
41 changed files with 3686 additions and 968 deletions
|
@ -11,7 +11,7 @@ A collection of Rust crates for making Minecraft bots, clients, and tools.
|
||||||
|
|
||||||
<!-- The line below is automatically read and updated by the migrate script, so don't change it manually. -->
|
<!-- The line below is automatically read and updated by the migrate script, so don't change it manually. -->
|
||||||
|
|
||||||
_Currently supported Minecraft version: `1.21.1`._
|
_Currently supported Minecraft version: `1.21.2`._
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Azalea is still very unfinished, though most crates are in a somewhat useable state
|
> Azalea is still very unfinished, though most crates are in a somewhat useable state
|
||||||
|
|
|
@ -457,7 +457,7 @@ impl Client {
|
||||||
debug!("Got compression request {:?}", p.compression_threshold);
|
debug!("Got compression request {:?}", p.compression_threshold);
|
||||||
conn.set_compression_threshold(p.compression_threshold);
|
conn.set_compression_threshold(p.compression_threshold);
|
||||||
}
|
}
|
||||||
ClientboundLoginPacket::GameProfile(p) => {
|
ClientboundLoginPacket::LoginFinished(p) => {
|
||||||
debug!(
|
debug!(
|
||||||
"Got profile {:?}. handshake is finished and we're now switching to the configuration state",
|
"Got profile {:?}. handshake is finished and we're now switching to the configuration state",
|
||||||
p.game_profile
|
p.game_profile
|
||||||
|
|
|
@ -393,8 +393,8 @@ pub fn process_packet_events(ecs: &mut World) {
|
||||||
|
|
||||||
*player_abilities = PlayerAbilities::from(p);
|
*player_abilities = PlayerAbilities::from(p);
|
||||||
}
|
}
|
||||||
ClientboundGamePacket::SetCarriedItem(p) => {
|
ClientboundGamePacket::SetCursorItem(p) => {
|
||||||
debug!("Got set carried item packet {p:?}");
|
debug!("Got set cursor item packet {p:?}");
|
||||||
}
|
}
|
||||||
ClientboundGamePacket::UpdateTags(_p) => {
|
ClientboundGamePacket::UpdateTags(_p) => {
|
||||||
debug!("Got update tags packet");
|
debug!("Got update tags packet");
|
||||||
|
@ -415,9 +415,6 @@ pub fn process_packet_events(ecs: &mut World) {
|
||||||
ClientboundGamePacket::EntityEvent(_p) => {
|
ClientboundGamePacket::EntityEvent(_p) => {
|
||||||
// debug!("Got entity event packet {p:?}");
|
// debug!("Got entity event packet {p:?}");
|
||||||
}
|
}
|
||||||
ClientboundGamePacket::Recipe(_p) => {
|
|
||||||
debug!("Got recipe packet");
|
|
||||||
}
|
|
||||||
ClientboundGamePacket::PlayerPosition(p) => {
|
ClientboundGamePacket::PlayerPosition(p) => {
|
||||||
debug!("Got player position packet {p:?}");
|
debug!("Got player position packet {p:?}");
|
||||||
|
|
||||||
|
@ -445,25 +442,25 @@ pub fn process_packet_events(ecs: &mut World) {
|
||||||
let is_z_relative = p.relative_arguments.z;
|
let is_z_relative = p.relative_arguments.z;
|
||||||
|
|
||||||
let (delta_x, new_pos_x) = if is_x_relative {
|
let (delta_x, new_pos_x) = if is_x_relative {
|
||||||
last_sent_position.x += p.x;
|
last_sent_position.x += p.pos.x;
|
||||||
(delta_movement.x, position.x + p.x)
|
(delta_movement.x, position.x + p.pos.x)
|
||||||
} else {
|
} else {
|
||||||
last_sent_position.x = p.x;
|
last_sent_position.x = p.pos.x;
|
||||||
(0.0, p.x)
|
(0.0, p.pos.x)
|
||||||
};
|
};
|
||||||
let (delta_y, new_pos_y) = if is_y_relative {
|
let (delta_y, new_pos_y) = if is_y_relative {
|
||||||
last_sent_position.y += p.y;
|
last_sent_position.y += p.pos.y;
|
||||||
(delta_movement.y, position.y + p.y)
|
(delta_movement.y, position.y + p.pos.y)
|
||||||
} else {
|
} else {
|
||||||
last_sent_position.y = p.y;
|
last_sent_position.y = p.pos.y;
|
||||||
(0.0, p.y)
|
(0.0, p.pos.y)
|
||||||
};
|
};
|
||||||
let (delta_z, new_pos_z) = if is_z_relative {
|
let (delta_z, new_pos_z) = if is_z_relative {
|
||||||
last_sent_position.z += p.z;
|
last_sent_position.z += p.pos.z;
|
||||||
(delta_movement.z, position.z + p.z)
|
(delta_movement.z, position.z + p.pos.z)
|
||||||
} else {
|
} else {
|
||||||
last_sent_position.z = p.z;
|
last_sent_position.z = p.pos.z;
|
||||||
(0.0, p.z)
|
(0.0, p.pos.z)
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut y_rot = p.y_rot;
|
let mut y_rot = p.y_rot;
|
||||||
|
@ -1475,6 +1472,17 @@ pub fn process_packet_events(ecs: &mut World) {
|
||||||
ClientboundGamePacket::PongResponse(_) => {}
|
ClientboundGamePacket::PongResponse(_) => {}
|
||||||
ClientboundGamePacket::StoreCookie(_) => {}
|
ClientboundGamePacket::StoreCookie(_) => {}
|
||||||
ClientboundGamePacket::Transfer(_) => {}
|
ClientboundGamePacket::Transfer(_) => {}
|
||||||
|
ClientboundGamePacket::MoveMinecart(_) => {}
|
||||||
|
ClientboundGamePacket::SetHeldSlot(_) => {}
|
||||||
|
ClientboundGamePacket::SetPlayerInventory(_) => {}
|
||||||
|
ClientboundGamePacket::ProjectilePower(_) => {}
|
||||||
|
ClientboundGamePacket::CustomReportDetails(_) => {}
|
||||||
|
ClientboundGamePacket::ServerLinks(_) => {}
|
||||||
|
ClientboundGamePacket::EntityPositionSync(_) => {}
|
||||||
|
ClientboundGamePacket::PlayerRotation(_) => {}
|
||||||
|
ClientboundGamePacket::RecipeBookAdd(_) => {}
|
||||||
|
ClientboundGamePacket::RecipeBookRemove(_) => {}
|
||||||
|
ClientboundGamePacket::RecipeBookSettings(_) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -56,6 +56,7 @@ pub enum Particle {
|
||||||
InstantEffect,
|
InstantEffect,
|
||||||
Item(ItemParticle),
|
Item(ItemParticle),
|
||||||
Vibration(VibrationParticle),
|
Vibration(VibrationParticle),
|
||||||
|
Trail,
|
||||||
ItemSlime,
|
ItemSlime,
|
||||||
ItemCobweb,
|
ItemCobweb,
|
||||||
ItemSnowball,
|
ItemSnowball,
|
||||||
|
@ -119,6 +120,7 @@ pub enum Particle {
|
||||||
OminousSpawning,
|
OminousSpawning,
|
||||||
RaidOmen,
|
RaidOmen,
|
||||||
TrialOmen,
|
TrialOmen,
|
||||||
|
BlockCrumble,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ParticleKind> for Particle {
|
impl From<ParticleKind> for Particle {
|
||||||
|
@ -239,6 +241,8 @@ impl From<ParticleKind> for Particle {
|
||||||
ParticleKind::OminousSpawning => Self::OminousSpawning,
|
ParticleKind::OminousSpawning => Self::OminousSpawning,
|
||||||
ParticleKind::RaidOmen => Self::RaidOmen,
|
ParticleKind::RaidOmen => Self::RaidOmen,
|
||||||
ParticleKind::TrialOmen => Self::TrialOmen,
|
ParticleKind::TrialOmen => Self::TrialOmen,
|
||||||
|
ParticleKind::Trail => Self::Trail,
|
||||||
|
ParticleKind::BlockCrumble => Self::BlockCrumble,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable};
|
||||||
use azalea_chat::FormattedText;
|
use azalea_chat::FormattedText;
|
||||||
use azalea_core::{position::GlobalPos, resource_location::ResourceLocation};
|
use azalea_core::{position::GlobalPos, resource_location::ResourceLocation};
|
||||||
use azalea_registry::{
|
use azalea_registry::{
|
||||||
Attribute, Block, DataComponentKind, Enchantment, HolderSet, Item, MobEffect, Potion,
|
Attribute, Block, ConsumeEffectKind, DataComponentKind, Enchantment, EntityKind, HolderSet,
|
||||||
TrimMaterial, TrimPattern,
|
Item, MobEffect, Potion, SoundEvent, TrimMaterial, TrimPattern,
|
||||||
};
|
};
|
||||||
use simdnbt::owned::{Nbt, NbtCompound};
|
use simdnbt::owned::{Nbt, NbtCompound};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
@ -51,6 +51,8 @@ pub fn from_kind(
|
||||||
) -> Result<Box<dyn EncodableDataComponent>, BufReadError> {
|
) -> Result<Box<dyn EncodableDataComponent>, BufReadError> {
|
||||||
// if this is causing a compile-time error, look at DataComponents.java in the
|
// if this is causing a compile-time error, look at DataComponents.java in the
|
||||||
// decompiled vanilla code to see how to implement new components
|
// decompiled vanilla code to see how to implement new components
|
||||||
|
|
||||||
|
// note that this match statement is updated by genitemcomponents.py
|
||||||
Ok(match kind {
|
Ok(match kind {
|
||||||
DataComponentKind::CustomData => Box::new(CustomData::read_from(buf)?),
|
DataComponentKind::CustomData => Box::new(CustomData::read_from(buf)?),
|
||||||
DataComponentKind::MaxStackSize => Box::new(MaxStackSize::read_from(buf)?),
|
DataComponentKind::MaxStackSize => Box::new(MaxStackSize::read_from(buf)?),
|
||||||
|
@ -77,7 +79,6 @@ pub fn from_kind(
|
||||||
}
|
}
|
||||||
DataComponentKind::IntangibleProjectile => Box::new(IntangibleProjectile::read_from(buf)?),
|
DataComponentKind::IntangibleProjectile => Box::new(IntangibleProjectile::read_from(buf)?),
|
||||||
DataComponentKind::Food => Box::new(Food::read_from(buf)?),
|
DataComponentKind::Food => Box::new(Food::read_from(buf)?),
|
||||||
DataComponentKind::FireResistant => Box::new(FireResistant::read_from(buf)?),
|
|
||||||
DataComponentKind::Tool => Box::new(Tool::read_from(buf)?),
|
DataComponentKind::Tool => Box::new(Tool::read_from(buf)?),
|
||||||
DataComponentKind::StoredEnchantments => Box::new(StoredEnchantments::read_from(buf)?),
|
DataComponentKind::StoredEnchantments => Box::new(StoredEnchantments::read_from(buf)?),
|
||||||
DataComponentKind::DyedColor => Box::new(DyedColor::read_from(buf)?),
|
DataComponentKind::DyedColor => Box::new(DyedColor::read_from(buf)?),
|
||||||
|
@ -116,7 +117,18 @@ pub fn from_kind(
|
||||||
DataComponentKind::Bees => Box::new(Bees::read_from(buf)?),
|
DataComponentKind::Bees => Box::new(Bees::read_from(buf)?),
|
||||||
DataComponentKind::Lock => Box::new(Lock::read_from(buf)?),
|
DataComponentKind::Lock => Box::new(Lock::read_from(buf)?),
|
||||||
DataComponentKind::ContainerLoot => Box::new(ContainerLoot::read_from(buf)?),
|
DataComponentKind::ContainerLoot => Box::new(ContainerLoot::read_from(buf)?),
|
||||||
DataComponentKind::JukeboxPlayable => todo!(),
|
DataComponentKind::JukeboxPlayable => Box::new(JukeboxPlayable::read_from(buf)?),
|
||||||
|
DataComponentKind::Consumable => Box::new(Consumable::read_from(buf)?),
|
||||||
|
DataComponentKind::UseRemainder => Box::new(UseRemainder::read_from(buf)?),
|
||||||
|
DataComponentKind::UseCooldown => Box::new(UseCooldown::read_from(buf)?),
|
||||||
|
DataComponentKind::Enchantable => Box::new(Enchantable::read_from(buf)?),
|
||||||
|
DataComponentKind::Repairable => Box::new(Repairable::read_from(buf)?),
|
||||||
|
DataComponentKind::ItemModel => Box::new(ItemModel::read_from(buf)?),
|
||||||
|
DataComponentKind::DamageResistant => Box::new(DamageResistant::read_from(buf)?),
|
||||||
|
DataComponentKind::Equippable => Box::new(Equippable::read_from(buf)?),
|
||||||
|
DataComponentKind::Glider => Box::new(Glider::read_from(buf)?),
|
||||||
|
DataComponentKind::TooltipStyle => Box::new(TooltipStyle::read_from(buf)?),
|
||||||
|
DataComponentKind::DeathProtection => Box::new(DeathProtection::read_from(buf)?),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,10 +368,6 @@ pub struct Food {
|
||||||
}
|
}
|
||||||
impl DataComponent for Food {}
|
impl DataComponent for Food {}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, McBuf)]
|
|
||||||
pub struct FireResistant;
|
|
||||||
impl DataComponent for FireResistant {}
|
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, McBuf)]
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
pub struct ToolRule {
|
pub struct ToolRule {
|
||||||
pub blocks: HolderSet<Block, ResourceLocation>,
|
pub blocks: HolderSet<Block, ResourceLocation>,
|
||||||
|
@ -664,3 +672,111 @@ pub struct JukeboxPlayable {
|
||||||
pub show_in_tooltip: bool,
|
pub show_in_tooltip: bool,
|
||||||
}
|
}
|
||||||
impl DataComponent for JukeboxPlayable {}
|
impl DataComponent for JukeboxPlayable {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct Consumable {
|
||||||
|
pub consume_seconds: f32,
|
||||||
|
pub animation: ItemUseAnimation,
|
||||||
|
pub sound: SoundEvent,
|
||||||
|
pub has_consume_particles: bool,
|
||||||
|
pub on_consuime_effects: Vec<ConsumeEffectKind>,
|
||||||
|
}
|
||||||
|
impl DataComponent for Consumable {}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy, PartialEq, McBuf)]
|
||||||
|
pub enum ItemUseAnimation {
|
||||||
|
None,
|
||||||
|
Eat,
|
||||||
|
Drink,
|
||||||
|
Block,
|
||||||
|
Bow,
|
||||||
|
Spear,
|
||||||
|
Crossbow,
|
||||||
|
Spyglass,
|
||||||
|
TootHorn,
|
||||||
|
Brush,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct UseRemainder {
|
||||||
|
pub convert_into: ItemSlot,
|
||||||
|
}
|
||||||
|
impl DataComponent for UseRemainder {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct UseCooldown {
|
||||||
|
pub seconds: f32,
|
||||||
|
pub cooldown_group: Option<ResourceLocation>,
|
||||||
|
}
|
||||||
|
impl DataComponent for UseCooldown {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct Enchantable {
|
||||||
|
#[var]
|
||||||
|
pub value: u32,
|
||||||
|
}
|
||||||
|
impl DataComponent for Enchantable {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct Repairable {
|
||||||
|
pub items: HolderSet<Item, ResourceLocation>,
|
||||||
|
}
|
||||||
|
impl DataComponent for Repairable {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct ItemModel {
|
||||||
|
pub resource_location: ResourceLocation,
|
||||||
|
}
|
||||||
|
impl DataComponent for ItemModel {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct DamageResistant {
|
||||||
|
// in the vanilla code this is
|
||||||
|
// ```
|
||||||
|
// StreamCodec.composite(
|
||||||
|
// TagKey.streamCodec(Registries.DAMAGE_TYPE), DamageResistant::types, DamageResistant::new
|
||||||
|
// );
|
||||||
|
// ```
|
||||||
|
// i'm not entirely sure if this is meant to be a vec or something, i just made it a
|
||||||
|
// resourcelocation for now
|
||||||
|
pub types: ResourceLocation,
|
||||||
|
}
|
||||||
|
impl DataComponent for DamageResistant {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct Equippable {
|
||||||
|
pub slot: EquipmentSlot,
|
||||||
|
pub equip_sound: SoundEvent,
|
||||||
|
pub model: Option<ResourceLocation>,
|
||||||
|
pub allowed_entities: HolderSet<EntityKind, ResourceLocation>,
|
||||||
|
}
|
||||||
|
impl DataComponent for Equippable {}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, McBuf)]
|
||||||
|
pub enum EquipmentSlot {
|
||||||
|
Mainhand,
|
||||||
|
Offhand,
|
||||||
|
Hand,
|
||||||
|
Feet,
|
||||||
|
Legs,
|
||||||
|
Chest,
|
||||||
|
Head,
|
||||||
|
Armor,
|
||||||
|
Body,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct Glider;
|
||||||
|
impl DataComponent for Glider {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct TooltipStyle {
|
||||||
|
pub resource_location: ResourceLocation,
|
||||||
|
}
|
||||||
|
impl DataComponent for TooltipStyle {}
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, McBuf)]
|
||||||
|
pub struct DeathProtection {
|
||||||
|
pub death_effects: Vec<ConsumeEffectKind>,
|
||||||
|
}
|
||||||
|
impl DataComponent for DeathProtection {}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1739,11 +1739,11 @@ impl BlockWithShape for BlockState {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_shape_empty(&self) -> bool {
|
fn is_shape_empty(&self) -> bool {
|
||||||
matches!(self.id, 0|25..=78|80..=111|1944..=1991|2004..=2010|2063..=2090|2355..=2872|2978..=4273|4278..=4285|4302..=4589|4662..=4681|4762..=5537|5626..=5651|5716..=5733|5738..=5772|5799..=5814|5858..=5862|5864..=5865|6813..=6998|7001..=7002|7005..=7006|7009..=7010|7013..=7014|7017..=7018|7021..=7022|7025..=7026|7385..=7388|7406|7521..=7664|7925|7928|8249|8252|8595..=8826|9143..=9174|9320..=9343|10367..=10398|10747..=11078|11310..=11311|11314..=11315|11318..=11319|11322..=11323|11326..=11327|11330..=11331|11334..=11335|11338..=11339|11342..=11343|11346..=11347|11350..=11351|11354..=11355|11358..=11359|11362..=11363|11366..=11367|11370..=11371|11374..=11375|11378..=11379|11382..=11383|11386..=11387|11390..=11391|11394..=11395|11398..=11399|11402..=11403|11406..=11407|11410..=11411|11414..=11415|11418..=11419|11422..=11423|11426..=11427|11430..=11431|11434..=11435|11438..=11439|11442..=11443|11446..=11447|11450..=11451|11454..=11455|11458..=11459|11462..=11463|11466..=11467|11470..=11471|11474..=11475|11478..=11479|11482..=11483|11486..=11487|11490..=11491|11494..=11495|11498..=11499|11502..=11503|11506..=11507|11510..=11511|11514..=11515|11518..=11519|11522..=11523|11526..=11527|11530..=11531|11534..=11535|11538..=11539|11542..=11543|11546..=11547|11550..=11551|11554..=11555|11558..=11559|11562..=11563|12495..=12496|12499|12501|12503|12505|12507..=12512|12514|12549|12760..=12786|12813..=12932|12944|12958..=12961|14166|14169|14490|14493|14814|14817|15138|15141|15462|15465|15786|15789|16110|16113|16434|16437|16758|16761|17082|17085|17406|17409|17730|17733|18054|18057|18575..=18578|18592|18594..=18595|18609|18611..=18665|18680..=18683|18876..=18877|18880..=18881|18884..=18885|18888..=18889|18892..=18893|18896..=18897|18900..=18901|18904..=18905|18908..=18909|18912..=18913|18916..=18917|18920..=18921|18924..=18925|18928..=18929|18932..=18933|18936..=18937|19100..=19147|19276..=19355|19547|19550|19967|19970|20372..=20397|20404|20407|21174|21177|21585|21588|21997|22000|22318|22800..=22927|24769..=24823|24827..=24842|24850..=24851|24858..=24859|24866..=24867|24874..=24901|25000|25003|25411|25414|25822|25825|26233|26236|26572)
|
matches!(self.id, 0|29..=42|45..=84|86..=117|1987..=2034|2047..=2053|2106..=2133|2398..=2915|3030..=4325|4330..=4337|4354..=4577|4610..=4673|4746..=4765|4846..=4901|4910..=5373|5438..=5693|5790..=5815|5880..=5893|5896..=5899|5904..=5938|5965..=5980|6024..=6028|6030..=6031|7043..=7228|7231..=7232|7235..=7236|7239..=7240|7243..=7244|7247..=7248|7251..=7252|7255..=7256|7615..=7618|7636|7751..=7894|8155|8158|8479|8482|8826..=9009|9034..=9081|9398..=9429|9575..=9598|10702..=10733|11082..=11413|11651..=11652|11655..=11656|11659..=11660|11663..=11664|11667..=11668|11671..=11672|11675..=11676|11679..=11680|11683..=11684|11687..=11688|11691..=11692|11695..=11696|11699..=11700|11703..=11704|11707..=11708|11711..=11712|11715..=11716|11719..=11720|11723..=11724|11727..=11728|11731..=11732|11735..=11736|11739..=11740|11743..=11744|11747..=11748|11751..=11752|11755..=11756|11759..=11760|11763..=11764|11767..=11768|11771..=11772|11775..=11776|11779..=11780|11783..=11784|11787..=11788|11791..=11792|11795..=11796|11799..=11800|11803..=11804|11807..=11808|11811..=11812|11815..=11816|11819..=11820|11823..=11824|11827..=11828|11831..=11832|11835..=11836|11839..=11840|11875..=11876|11879..=11880|11883..=11884|11887..=11888|11891..=11892|11895..=11896|11899..=11900|11903..=11904|11907..=11908|11911..=11912|11915..=11916|11919..=11920|11923..=11924|11927..=11928|11931..=11932|11935..=11936|12964..=12965|12968|12970|12972|12974|12976..=12981|12983|13018|13229..=13255|13282..=13401|13413|13427..=13430|14635|14638|14959|14962|15283|15286|15607|15610|15931|15934|16255|16258|16579|16582|16903|16906|17227|17230|17551|17554|17875|17878|18199|18202|18523|18526|19044..=19047|19061|19063..=19064|19078|19080..=19134|19149..=19152|19345..=19346|19349..=19350|19353..=19354|19357..=19358|19361..=19362|19365..=19366|19369..=19370|19373..=19374|19377..=19378|19381..=19382|19385..=19386|19389..=19390|19393..=19394|19397..=19398|19401..=19402|19405..=19406|19569..=19616|19745..=19824|20016|20019|20436|20439|20841..=20866|20873|20876|21643|21646|22054|22057|22466|22469|22787|23269..=23396|25238..=25292|25296..=25311|25319..=25320|25327..=25328|25335..=25336|25343..=25370|25469|25472|25880|25883|26291|26294|26702|26705|27041)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_shape_full(&self) -> bool {
|
fn is_shape_full(&self) -> bool {
|
||||||
matches!(self.id, 1..=24|79|112..=1687|1998..=2003|2017..=2022|2047..=2062|2091..=2354|2873|4274..=4277|4294..=4301|5734..=5737|5780..=5781|5798|5815..=5816|5849|5851..=5857|5863|5866..=5873|5945..=5960|6537..=6740|6811..=6812|7269..=7270|7272|7415|7417..=7418|7511..=7512|7665|7906..=7918|9223..=9224|9235..=9239|9344..=9371|10364..=10366|10463..=10465|10710..=10711|10716..=10717|10722..=10727|10744..=10746|11079..=11081|11166..=11167|11172..=11173|11178..=11179|11184..=11185|11190..=11191|11196..=11197|11202..=11203|11208..=11209|11214..=11215|11220..=11221|11226..=11227|11232..=11233|11238..=11239|11244..=11245|11250..=11251|11256..=11257|11262..=11263|11268..=11269|11274..=11275|11280..=11281|11286..=11287|11292..=11293|11298..=11299|11304..=11309|12404..=12413|12494|12515..=12548|12550..=12759|12787|12803..=12812|12941|14086..=14087|14092..=14093|14098..=14099|14104..=14105|14110..=14111|14116..=14117|14122..=14123|14128..=14129|14134..=14135|14140..=14141|14146..=14147|14152..=14153|14158..=14159|18404..=18437|18466|18579..=18591|18593|18596..=18608|18610|18666..=18667|18672..=18673|18678..=18679|19356..=19371|19381..=19444|19446..=19454|19459..=19460|19869..=19874|19879..=19880|20285|20370..=20371|20722..=20724|21031..=21032|21081|21086..=21087|21492|21497..=21498|21903..=21904|21909..=21910|22315..=22317|22799|22928..=22929|22938..=22955|23280..=23281|23286..=23287|23292..=23293|23298..=23307|23632..=23633|23638..=23639|23644..=23645|23650..=23651|24676..=24723|24768|24843|24902|24904..=24907|24992..=24993|25318|25403..=25404|25729|25814..=25815|26140|26225..=26226|26551..=26560|26563..=26571|26573|26590..=26643)
|
matches!(self.id, 1..=21|26..=28|85|118..=156|160..=188|192..=245|249..=447|476..=1730|2041..=2046|2060..=2065|2090..=2105|2134..=2397|2916|4326..=4329|4346..=4353|5900..=5903|5946..=5947|5964|5981..=5982|6015|6017..=6023|6029|6032..=6039|6111..=6126|6767..=6970|7041..=7042|7499..=7500|7502|7645|7647..=7648|7741..=7742|7895|8136..=8148|9478..=9479|9490..=9494|9599..=9626|10699..=10701|10798..=10800|11045..=11046|11051..=11052|11057..=11062|11079..=11081|11414..=11416|11501..=11502|11507..=11508|11513..=11514|11519..=11520|11525..=11526|11531..=11532|11537..=11538|11549..=11550|11555..=11556|11561..=11562|11567..=11568|11573..=11574|11579..=11580|11585..=11586|11591..=11592|11597..=11598|11603..=11604|11609..=11610|11615..=11616|11621..=11622|11627..=11628|11633..=11634|11639..=11640|11645..=11650|12873..=12882|12963|12984..=13017|13019..=13228|13256|13272..=13281|13410|14555..=14556|14561..=14562|14567..=14568|14573..=14574|14579..=14580|14585..=14586|14591..=14592|14597..=14598|14603..=14604|14609..=14610|14615..=14616|14621..=14622|14627..=14628|18873..=18906|18935|19048..=19060|19062|19065..=19077|19079|19135..=19136|19141..=19142|19147..=19148|19825..=19840|19850..=19913|19915..=19923|19928..=19929|20338..=20343|20348..=20349|20754|20839..=20840|21191..=21193|21500..=21501|21550|21555..=21556|21961|21966..=21967|22372..=22373|22378..=22379|22784..=22786|23268|23397..=23398|23407..=23424|23749..=23750|23755..=23756|23761..=23762|23767..=23776|24101..=24102|24107..=24108|24113..=24114|24119..=24120|25145..=25192|25237|25312|25371|25373..=25376|25461..=25462|25787|25872..=25873|26198|26283..=26284|26609|26694..=26695|27020..=27029|27032..=27040|27042|27059..=27112)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,6 @@ pub struct CommonPlayerSpawnInfo {
|
||||||
pub last_death_location: Option<GlobalPos>,
|
pub last_death_location: Option<GlobalPos>,
|
||||||
#[var]
|
#[var]
|
||||||
pub portal_cooldown: u32,
|
pub portal_cooldown: u32,
|
||||||
|
#[var]
|
||||||
|
pub sea_level: i32,
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ pub struct ClientInformation {
|
||||||
/// Whether the client should show up as "Anonymous Player" in the server
|
/// Whether the client should show up as "Anonymous Player" in the server
|
||||||
/// list.
|
/// list.
|
||||||
pub allows_listing: bool,
|
pub allows_listing: bool,
|
||||||
|
pub particle_status: ParticleStatus,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ClientInformation {
|
impl Default for ClientInformation {
|
||||||
|
@ -43,6 +44,7 @@ impl Default for ClientInformation {
|
||||||
main_hand: HumanoidArm::Right,
|
main_hand: HumanoidArm::Right,
|
||||||
text_filtering_enabled: false,
|
text_filtering_enabled: false,
|
||||||
allows_listing: false,
|
allows_listing: false,
|
||||||
|
particle_status: ParticleStatus::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,6 +79,14 @@ pub struct ModelCustomization {
|
||||||
pub hat: bool,
|
pub hat: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(McBuf, Clone, Copy, Debug, PartialEq, Eq, Default)]
|
||||||
|
pub enum ParticleStatus {
|
||||||
|
#[default]
|
||||||
|
All,
|
||||||
|
Decreased,
|
||||||
|
Minimal,
|
||||||
|
}
|
||||||
|
|
||||||
impl Default for ModelCustomization {
|
impl Default for ModelCustomization {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
@ -169,6 +179,7 @@ mod tests {
|
||||||
main_hand: HumanoidArm::Left,
|
main_hand: HumanoidArm::Left,
|
||||||
text_filtering_enabled: true,
|
text_filtering_enabled: true,
|
||||||
allows_listing: true,
|
allows_listing: true,
|
||||||
|
particle_status: ParticleStatus::Decreased,
|
||||||
};
|
};
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
data.write_into(&mut buf).unwrap();
|
data.write_into(&mut buf).unwrap();
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundCustomReportDetailsPacket {
|
||||||
|
// azalea doesn't implement max lengths yet
|
||||||
|
|
||||||
|
// max length = 32
|
||||||
|
// key string is limited to 128 bytes
|
||||||
|
// value string is limited to 4096 bytes
|
||||||
|
pub details: HashMap<String, String>,
|
||||||
|
}
|
19
azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs
Executable file
19
azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_core::position::Vec3;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundEntityPositionSyncPacket {
|
||||||
|
#[var]
|
||||||
|
pub id: u32,
|
||||||
|
pub values: PositionMoveRotation,
|
||||||
|
pub on_ground: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(McBuf, Clone, Debug)]
|
||||||
|
pub struct PositionMoveRotation {
|
||||||
|
pub position: Vec3,
|
||||||
|
pub delta_movement: Vec3,
|
||||||
|
pub y_rot: f32,
|
||||||
|
pub x_rot: f32,
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_core::position::Vec3;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundMoveMinecartPacket {
|
||||||
|
#[var]
|
||||||
|
pub entity_id: u32,
|
||||||
|
pub lerp_steps: Vec<MinecartStep>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct MinecartStep {
|
||||||
|
pub position: Vec3,
|
||||||
|
pub movement: Vec3,
|
||||||
|
pub y_rot: u8,
|
||||||
|
pub x_rot: u8,
|
||||||
|
pub weight: f32,
|
||||||
|
}
|
|
@ -26,6 +26,7 @@ pub struct PlayerInfoEntry {
|
||||||
pub latency: i32,
|
pub latency: i32,
|
||||||
pub game_mode: GameMode,
|
pub game_mode: GameMode,
|
||||||
pub display_name: Option<FormattedText>,
|
pub display_name: Option<FormattedText>,
|
||||||
|
pub list_order: i32,
|
||||||
pub chat_session: Option<RemoteChatSessionData>,
|
pub chat_session: Option<RemoteChatSessionData>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +56,11 @@ pub struct UpdateLatencyAction {
|
||||||
pub struct UpdateDisplayNameAction {
|
pub struct UpdateDisplayNameAction {
|
||||||
pub display_name: Option<FormattedText>,
|
pub display_name: Option<FormattedText>,
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct UpdateListOrderAction {
|
||||||
|
#[var]
|
||||||
|
pub list_order: i32,
|
||||||
|
}
|
||||||
|
|
||||||
impl McBufReadable for ClientboundPlayerInfoUpdatePacket {
|
impl McBufReadable for ClientboundPlayerInfoUpdatePacket {
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||||
|
@ -92,6 +98,10 @@ impl McBufReadable for ClientboundPlayerInfoUpdatePacket {
|
||||||
let action = UpdateDisplayNameAction::read_from(buf)?;
|
let action = UpdateDisplayNameAction::read_from(buf)?;
|
||||||
entry.display_name = action.display_name;
|
entry.display_name = action.display_name;
|
||||||
}
|
}
|
||||||
|
if actions.update_list_order {
|
||||||
|
let action = UpdateListOrderAction::read_from(buf)?;
|
||||||
|
entry.list_order = action.list_order;
|
||||||
|
}
|
||||||
|
|
||||||
entries.push(entry);
|
entries.push(entry);
|
||||||
}
|
}
|
||||||
|
@ -159,6 +169,7 @@ pub struct ActionEnumSet {
|
||||||
pub update_listed: bool,
|
pub update_listed: bool,
|
||||||
pub update_latency: bool,
|
pub update_latency: bool,
|
||||||
pub update_display_name: bool,
|
pub update_display_name: bool,
|
||||||
|
pub update_list_order: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl McBufReadable for ActionEnumSet {
|
impl McBufReadable for ActionEnumSet {
|
||||||
|
@ -171,6 +182,7 @@ impl McBufReadable for ActionEnumSet {
|
||||||
update_listed: set.index(3),
|
update_listed: set.index(3),
|
||||||
update_latency: set.index(4),
|
update_latency: set.index(4),
|
||||||
update_display_name: set.index(5),
|
update_display_name: set.index(5),
|
||||||
|
update_list_order: set.index(6),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,6 +226,7 @@ mod tests {
|
||||||
update_listed: false,
|
update_listed: false,
|
||||||
update_latency: true,
|
update_latency: true,
|
||||||
update_display_name: false,
|
update_display_name: false,
|
||||||
|
update_list_order: true,
|
||||||
};
|
};
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
data.write_into(&mut buf).unwrap();
|
data.write_into(&mut buf).unwrap();
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
use std::io::{Cursor, Write};
|
use std::io::{Cursor, Write};
|
||||||
|
|
||||||
use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable};
|
use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable};
|
||||||
use azalea_core::bitset::FixedBitSet;
|
use azalea_core::{bitset::FixedBitSet, position::Vec3};
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundPlayerPositionPacket {
|
pub struct ClientboundPlayerPositionPacket {
|
||||||
pub x: f64,
|
#[var]
|
||||||
pub y: f64,
|
pub id: u32,
|
||||||
pub z: f64,
|
pub pos: Vec3,
|
||||||
|
pub delta_movement: Vec3,
|
||||||
pub y_rot: f32,
|
pub y_rot: f32,
|
||||||
pub x_rot: f32,
|
pub x_rot: f32,
|
||||||
pub relative_arguments: RelativeMovements,
|
pub relative_arguments: RelativeMovements,
|
||||||
#[var]
|
|
||||||
pub id: u32,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
@ -27,7 +26,8 @@ pub struct RelativeMovements {
|
||||||
|
|
||||||
impl McBufReadable for RelativeMovements {
|
impl McBufReadable for RelativeMovements {
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||||
let set = FixedBitSet::<5>::read_from(buf)?;
|
// yes minecraft seriously wastes that many bits, smh
|
||||||
|
let set = FixedBitSet::<32>::read_from(buf)?;
|
||||||
Ok(RelativeMovements {
|
Ok(RelativeMovements {
|
||||||
x: set.index(0),
|
x: set.index(0),
|
||||||
y: set.index(1),
|
y: set.index(1),
|
||||||
|
|
8
azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs
Executable file
8
azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundPlayerRotationPacket {
|
||||||
|
pub y_rot: f32,
|
||||||
|
pub x_rot: f32,
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundProjectilePowerPacket {
|
||||||
|
pub id: u32,
|
||||||
|
pub acceleration_power: f64,
|
||||||
|
}
|
79
azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs
Executable file
79
azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs
Executable file
|
@ -0,0 +1,79 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
use super::clientbound_update_recipes_packet::{Ingredient, SlotDisplayData};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundRecipeBookAddPacket {
|
||||||
|
pub entries: Vec<Entry>,
|
||||||
|
pub replace: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct Entry {
|
||||||
|
pub contents: RecipeDisplayEntry,
|
||||||
|
pub flags: u8,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct RecipeDisplayEntry {
|
||||||
|
#[var]
|
||||||
|
pub id: u32,
|
||||||
|
pub display: RecipeDisplayData,
|
||||||
|
// ByteBufCodecs.OPTIONAL_VAR_INT
|
||||||
|
#[var]
|
||||||
|
pub group: u32,
|
||||||
|
pub category: azalea_registry::RecipeBookCategory,
|
||||||
|
pub crafting_requirements: Option<Vec<Ingredient>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// [`azalea_registry::RecipeDisplay`]
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub enum RecipeDisplayData {
|
||||||
|
Shapeless(ShapelessCraftingRecipeDisplay),
|
||||||
|
Shaped(ShapedCraftingRecipeDisplay),
|
||||||
|
Furnace(FurnaceRecipeDisplay),
|
||||||
|
Stonecutter(StonecutterRecipeDisplay),
|
||||||
|
Smithing(SmithingRecipeDisplay),
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct ShapelessCraftingRecipeDisplay {
|
||||||
|
pub ingredients: Vec<SlotDisplayData>,
|
||||||
|
pub result: SlotDisplayData,
|
||||||
|
pub crafting_station: SlotDisplayData,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct ShapedCraftingRecipeDisplay {
|
||||||
|
#[var]
|
||||||
|
pub width: u32,
|
||||||
|
#[var]
|
||||||
|
pub height: u32,
|
||||||
|
pub ingredients: Vec<SlotDisplayData>,
|
||||||
|
pub result: SlotDisplayData,
|
||||||
|
pub crafting_station: SlotDisplayData,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct FurnaceRecipeDisplay {
|
||||||
|
pub ingredient: SlotDisplayData,
|
||||||
|
pub fuel: SlotDisplayData,
|
||||||
|
pub result: SlotDisplayData,
|
||||||
|
pub crafting_station: SlotDisplayData,
|
||||||
|
#[var]
|
||||||
|
pub duration: u32,
|
||||||
|
pub experience: f32,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct StonecutterRecipeDisplay {
|
||||||
|
pub input: SlotDisplayData,
|
||||||
|
pub result: SlotDisplayData,
|
||||||
|
pub crafting_station: SlotDisplayData,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct SmithingRecipeDisplay {
|
||||||
|
pub template: SlotDisplayData,
|
||||||
|
pub base: SlotDisplayData,
|
||||||
|
pub addition: SlotDisplayData,
|
||||||
|
pub result: SlotDisplayData,
|
||||||
|
pub crafting_station: SlotDisplayData,
|
||||||
|
}
|
15
azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs
Executable file
15
azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
use super::{
|
||||||
|
clientbound_entity_position_sync_packet::PositionMoveRotation,
|
||||||
|
clientbound_player_position_packet::RelativeMovements,
|
||||||
|
};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundRecipeBookRemovePacket {
|
||||||
|
#[var]
|
||||||
|
pub id: u32,
|
||||||
|
pub change: PositionMoveRotation,
|
||||||
|
pub relatives: RelativeMovements,
|
||||||
|
}
|
22
azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs
Executable file
22
azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundRecipeBookSettingsPacket {
|
||||||
|
pub book_settings: RecipeBookSettings,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct RecipeBookSettings {
|
||||||
|
pub gui_open: bool,
|
||||||
|
pub filtering_craftable: bool,
|
||||||
|
|
||||||
|
pub furnace_gui_open: bool,
|
||||||
|
pub furnace_filtering_craftable: bool,
|
||||||
|
|
||||||
|
pub blast_furnace_gui_open: bool,
|
||||||
|
pub blast_furnace_filtering_craftable: bool,
|
||||||
|
|
||||||
|
pub smoker_gui_open: bool,
|
||||||
|
pub smoker_filtering_craftable: bool,
|
||||||
|
}
|
|
@ -1,77 +0,0 @@
|
||||||
use azalea_buf::{
|
|
||||||
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
|
|
||||||
};
|
|
||||||
use azalea_core::resource_location::ResourceLocation;
|
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
|
||||||
use std::io::{Cursor, Write};
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, ClientboundGamePacket)]
|
|
||||||
pub struct ClientboundRecipePacket {
|
|
||||||
pub action: State,
|
|
||||||
pub settings: RecipeBookSettings,
|
|
||||||
pub recipes: Vec<ResourceLocation>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl McBufWritable for ClientboundRecipePacket {
|
|
||||||
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
|
||||||
match self.action {
|
|
||||||
State::Init { .. } => 0,
|
|
||||||
State::Add => 1,
|
|
||||||
State::Remove => 2,
|
|
||||||
}
|
|
||||||
.var_write_into(buf)?;
|
|
||||||
self.settings.write_into(buf)?;
|
|
||||||
self.recipes.write_into(buf)?;
|
|
||||||
if let State::Init { to_highlight } = &self.action {
|
|
||||||
to_highlight.write_into(buf)?;
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl McBufReadable for ClientboundRecipePacket {
|
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, azalea_buf::BufReadError> {
|
|
||||||
let action_id = u32::var_read_from(buf)?;
|
|
||||||
let settings = RecipeBookSettings::read_from(buf)?;
|
|
||||||
let recipes = Vec::<ResourceLocation>::read_from(buf)?;
|
|
||||||
let action = match action_id {
|
|
||||||
0 => State::Init {
|
|
||||||
to_highlight: Vec::<ResourceLocation>::read_from(buf)?,
|
|
||||||
},
|
|
||||||
1 => State::Add,
|
|
||||||
2 => State::Remove,
|
|
||||||
_ => {
|
|
||||||
return Err(BufReadError::UnexpectedEnumVariant {
|
|
||||||
id: action_id as i32,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(ClientboundRecipePacket {
|
|
||||||
action,
|
|
||||||
settings,
|
|
||||||
recipes,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
|
||||||
pub struct RecipeBookSettings {
|
|
||||||
pub gui_open: bool,
|
|
||||||
pub filtering_craftable: bool,
|
|
||||||
|
|
||||||
pub furnace_gui_open: bool,
|
|
||||||
pub furnace_filtering_craftable: bool,
|
|
||||||
|
|
||||||
pub blast_furnace_gui_open: bool,
|
|
||||||
pub blast_furnace_filtering_craftable: bool,
|
|
||||||
|
|
||||||
pub smoker_gui_open: bool,
|
|
||||||
pub smoker_filtering_craftable: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub enum State {
|
|
||||||
Init { to_highlight: Vec<ResourceLocation> },
|
|
||||||
Add,
|
|
||||||
Remove,
|
|
||||||
}
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_chat::FormattedText;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundServerLinksPacket {
|
||||||
|
pub links: Vec<ServerLinkEntry>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub struct ServerLinkEntry {
|
||||||
|
pub kind: ServerLinkKind,
|
||||||
|
pub link: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
pub enum ServerLinkKind {
|
||||||
|
Known(KnownLinkKind),
|
||||||
|
Component(FormattedText),
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy, Debug, McBuf)]
|
||||||
|
pub enum KnownLinkKind {
|
||||||
|
BugReport,
|
||||||
|
CommunityGuidelines,
|
||||||
|
Support,
|
||||||
|
Status,
|
||||||
|
Feedback,
|
||||||
|
Community,
|
||||||
|
Website,
|
||||||
|
Forums,
|
||||||
|
News,
|
||||||
|
Announcements,
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_inventory::ItemSlot;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundSetCursorItemPacket {
|
||||||
|
pub contents: Option<ItemSlot>,
|
||||||
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
use azalea_buf::McBuf;
|
use azalea_buf::McBuf;
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
/// Sent to change the player's slot selection.
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundSetCarriedItemPacket {
|
pub struct ClientboundSetHeldSlotPacket {
|
||||||
pub slot: u8,
|
pub slot: u8,
|
||||||
}
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_inventory::ItemSlot;
|
||||||
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
|
pub struct ClientboundSetPlayerInventoryPacket {
|
||||||
|
#[var]
|
||||||
|
pub slot: i32,
|
||||||
|
pub contents: Option<ItemSlot>,
|
||||||
|
}
|
|
@ -5,4 +5,5 @@ use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
pub struct ClientboundSetTimePacket {
|
pub struct ClientboundSetTimePacket {
|
||||||
pub game_time: u64,
|
pub game_time: u64,
|
||||||
pub day_time: u64,
|
pub day_time: u64,
|
||||||
|
pub tick_day_time: bool,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,239 +1,74 @@
|
||||||
use azalea_buf::{
|
use std::collections::HashMap;
|
||||||
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
|
|
||||||
};
|
use azalea_buf::McBuf;
|
||||||
use azalea_core::resource_location::ResourceLocation;
|
use azalea_core::resource_location::ResourceLocation;
|
||||||
use azalea_inventory::ItemSlot;
|
use azalea_inventory::ItemSlot;
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
use azalea_registry::HolderSet;
|
||||||
|
|
||||||
use std::io::{Cursor, Write};
|
#[derive(Clone, Debug, PartialEq, McBuf, ClientboundGamePacket)]
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, PartialEq, ClientboundGamePacket)]
|
|
||||||
pub struct ClientboundUpdateRecipesPacket {
|
pub struct ClientboundUpdateRecipesPacket {
|
||||||
pub recipes: Vec<RecipeHolder>,
|
pub item_sets: HashMap<ResourceLocation, RecipePropertySet>,
|
||||||
|
pub stonecutter_recipes: Vec<SingleInputEntry>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
pub struct RecipeHolder {
|
pub struct SingleInputEntry {
|
||||||
pub id: ResourceLocation,
|
pub input: Ingredient,
|
||||||
pub data: RecipeData,
|
pub recipe: SelectableRecipe,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
|
pub struct SelectableRecipe {
|
||||||
|
pub option_display: SlotDisplayData,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// [`azalea_registry::SlotDisplay`]
|
||||||
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
|
pub enum SlotDisplayData {
|
||||||
|
Empty,
|
||||||
|
AnyFuel,
|
||||||
|
Item(ItemSlotDisplay),
|
||||||
|
ItemStack(ItemStackSlotDisplay),
|
||||||
|
Tag(ResourceLocation),
|
||||||
|
SmithingTrim(Box<SmithingTrimDemoSlotDisplay>),
|
||||||
|
WithRemainder(Box<WithRemainderSlotDisplay>),
|
||||||
|
Composite(CompositeSlotDisplay),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
pub struct ShapelessRecipe {
|
pub struct ItemSlotDisplay {
|
||||||
/// Used to group similar recipes together in the recipe book.
|
pub item: azalea_registry::Item,
|
||||||
/// Nbt is present in recipe JSON
|
|
||||||
pub group: String,
|
|
||||||
pub category: CraftingBookCategory,
|
|
||||||
pub ingredients: Vec<Ingredient>,
|
|
||||||
pub result: ItemSlot,
|
|
||||||
}
|
}
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
pub struct ShapedRecipe {
|
pub struct ItemStackSlotDisplay {
|
||||||
pub group: String,
|
pub stack: ItemSlot,
|
||||||
pub category: CraftingBookCategory,
|
|
||||||
pub pattern: ShapedRecipePattern,
|
|
||||||
pub result: ItemSlot,
|
|
||||||
pub show_notification: bool,
|
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
pub struct TagSlotDisplay {
|
||||||
pub struct ShapedRecipePattern {
|
pub tag: azalea_registry::Item,
|
||||||
pub width: usize,
|
|
||||||
pub height: usize,
|
|
||||||
pub ingredients: Vec<Ingredient>,
|
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
impl McBufWritable for ShapedRecipePattern {
|
pub struct SmithingTrimDemoSlotDisplay {
|
||||||
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
pub base: SlotDisplayData,
|
||||||
(self.width as u32).var_write_into(buf)?;
|
pub material: SlotDisplayData,
|
||||||
(self.height as u32).var_write_into(buf)?;
|
pub pattern: SlotDisplayData,
|
||||||
debug_assert_eq!(self.width * self.height, self.ingredients.len());
|
|
||||||
for ingredient in &self.ingredients {
|
|
||||||
ingredient.write_into(buf)?;
|
|
||||||
}
|
}
|
||||||
Ok(())
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
|
pub struct WithRemainderSlotDisplay {
|
||||||
|
pub input: SlotDisplayData,
|
||||||
|
pub remainder: SlotDisplayData,
|
||||||
}
|
}
|
||||||
}
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
|
pub struct CompositeSlotDisplay {
|
||||||
impl McBufReadable for ShapedRecipePattern {
|
pub contents: Vec<SlotDisplayData>,
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
|
||||||
let width = u32::var_read_from(buf)? as usize;
|
|
||||||
let height = u32::var_read_from(buf)? as usize;
|
|
||||||
let mut ingredients = Vec::with_capacity(width * height);
|
|
||||||
for _ in 0..width * height {
|
|
||||||
ingredients.push(Ingredient::read_from(buf)?);
|
|
||||||
}
|
|
||||||
Ok(ShapedRecipePattern {
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
ingredients,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Copy, PartialEq, McBuf)]
|
|
||||||
pub enum CraftingBookCategory {
|
|
||||||
Building = 0,
|
|
||||||
Redstone,
|
|
||||||
Equipment,
|
|
||||||
Misc,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
pub struct CookingRecipe {
|
pub struct RecipePropertySet {
|
||||||
pub group: String,
|
pub items: Vec<azalea_registry::Item>,
|
||||||
pub category: CraftingBookCategory,
|
|
||||||
pub ingredient: Ingredient,
|
|
||||||
pub result: ItemSlot,
|
|
||||||
pub experience: f32,
|
|
||||||
#[var]
|
|
||||||
pub cooking_time: u32,
|
|
||||||
}
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
|
||||||
pub struct StoneCutterRecipe {
|
|
||||||
pub group: String,
|
|
||||||
pub ingredient: Ingredient,
|
|
||||||
pub result: ItemSlot,
|
|
||||||
}
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
|
||||||
pub struct SmithingRecipe {
|
|
||||||
pub base: Ingredient,
|
|
||||||
pub addition: Ingredient,
|
|
||||||
pub result: ItemSlot,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
|
||||||
pub struct SimpleRecipe {
|
|
||||||
pub category: CraftingBookCategory,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
|
||||||
pub struct SmithingTransformRecipe {
|
|
||||||
pub template: Ingredient,
|
|
||||||
pub base: Ingredient,
|
|
||||||
pub addition: Ingredient,
|
|
||||||
pub result: ItemSlot,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
|
||||||
pub struct SmithingTrimRecipe {
|
|
||||||
pub template: Ingredient,
|
|
||||||
pub base: Ingredient,
|
|
||||||
pub addition: Ingredient,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
|
||||||
pub enum RecipeData {
|
|
||||||
CraftingShaped(ShapedRecipe),
|
|
||||||
CraftingShapeless(ShapelessRecipe),
|
|
||||||
CraftingSpecialArmorDye(SimpleRecipe),
|
|
||||||
CraftingSpecialBookCloning(SimpleRecipe),
|
|
||||||
CraftingSpecialMapCloning(SimpleRecipe),
|
|
||||||
CraftingSpecialMapExtending(SimpleRecipe),
|
|
||||||
CraftingSpecialFireworkRocket(SimpleRecipe),
|
|
||||||
CraftingSpecialFireworkStar(SimpleRecipe),
|
|
||||||
CraftingSpecialFireworkStarFade(SimpleRecipe),
|
|
||||||
CraftingSpecialRepairItem(SimpleRecipe),
|
|
||||||
CraftingSpecialTippedArrow(SimpleRecipe),
|
|
||||||
CraftingSpecialBannerDuplicate(SimpleRecipe),
|
|
||||||
CraftingSpecialShieldDecoration(SimpleRecipe),
|
|
||||||
CraftingSpecialShulkerBoxColoring(SimpleRecipe),
|
|
||||||
CraftingSpecialSuspiciousStew(SimpleRecipe),
|
|
||||||
Smelting(CookingRecipe),
|
|
||||||
Blasting(CookingRecipe),
|
|
||||||
Smoking(CookingRecipe),
|
|
||||||
CampfireCooking(CookingRecipe),
|
|
||||||
Stonecutting(StoneCutterRecipe),
|
|
||||||
SmithingTransform(SmithingTransformRecipe),
|
|
||||||
SmithingTrim(SmithingTrimRecipe),
|
|
||||||
CraftingDecoratedPot(SimpleRecipe),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, McBuf)]
|
#[derive(Clone, Debug, PartialEq, McBuf)]
|
||||||
pub struct Ingredient {
|
pub struct Ingredient {
|
||||||
pub allowed: Vec<ItemSlot>,
|
pub allowed: HolderSet<azalea_registry::Item, ResourceLocation>,
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_crafting_shaped() {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
let recipe = RecipeHolder {
|
|
||||||
id: ResourceLocation::new("minecraft:crafting_shaped"),
|
|
||||||
data: RecipeData::CraftingShaped(ShapedRecipe {
|
|
||||||
group: String::new(),
|
|
||||||
category: CraftingBookCategory::Building,
|
|
||||||
pattern: ShapedRecipePattern {
|
|
||||||
width: 2,
|
|
||||||
height: 2,
|
|
||||||
ingredients: vec![
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
result: ItemSlot::Empty,
|
|
||||||
show_notification: false,
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
recipe.write_into(&mut buf).unwrap();
|
|
||||||
let decoded_recipe = RecipeHolder::read_from(&mut Cursor::new(&buf[..])).unwrap();
|
|
||||||
assert_eq!(recipe, decoded_recipe);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_crafting_shapeless() {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
let recipe = RecipeHolder {
|
|
||||||
id: ResourceLocation::new("minecraft:crafting_shapeless"),
|
|
||||||
data: RecipeData::CraftingShapeless(ShapelessRecipe {
|
|
||||||
group: String::new(),
|
|
||||||
category: CraftingBookCategory::Building,
|
|
||||||
ingredients: vec![
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
Ingredient {
|
|
||||||
allowed: vec![ItemSlot::Empty],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
result: ItemSlot::Empty,
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
recipe.write_into(&mut buf).unwrap();
|
|
||||||
let decoded_recipe = RecipeHolder::read_from(&mut Cursor::new(&buf[..])).unwrap();
|
|
||||||
assert_eq!(recipe, decoded_recipe);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_crafting_special_armordye() {
|
|
||||||
let mut buf = Vec::new();
|
|
||||||
let recipe = RecipeHolder {
|
|
||||||
id: ResourceLocation::new("minecraft:crafting_special_armordye"),
|
|
||||||
data: RecipeData::CraftingSpecialArmorDye(SimpleRecipe {
|
|
||||||
category: CraftingBookCategory::Building,
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
recipe.write_into(&mut buf).unwrap();
|
|
||||||
let decoded_recipe = RecipeHolder::read_from(&mut Cursor::new(&buf[..])).unwrap();
|
|
||||||
assert_eq!(recipe, decoded_recipe);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,14 @@ pub mod clientbound_cookie_request_packet;
|
||||||
pub mod clientbound_cooldown_packet;
|
pub mod clientbound_cooldown_packet;
|
||||||
pub mod clientbound_custom_chat_completions_packet;
|
pub mod clientbound_custom_chat_completions_packet;
|
||||||
pub mod clientbound_custom_payload_packet;
|
pub mod clientbound_custom_payload_packet;
|
||||||
|
pub mod clientbound_custom_report_details_packet;
|
||||||
pub mod clientbound_damage_event_packet;
|
pub mod clientbound_damage_event_packet;
|
||||||
pub mod clientbound_debug_sample_packet;
|
pub mod clientbound_debug_sample_packet;
|
||||||
pub mod clientbound_delete_chat_packet;
|
pub mod clientbound_delete_chat_packet;
|
||||||
pub mod clientbound_disconnect_packet;
|
pub mod clientbound_disconnect_packet;
|
||||||
pub mod clientbound_disguised_chat_packet;
|
pub mod clientbound_disguised_chat_packet;
|
||||||
pub mod clientbound_entity_event_packet;
|
pub mod clientbound_entity_event_packet;
|
||||||
|
pub mod clientbound_entity_position_sync_packet;
|
||||||
pub mod clientbound_explode_packet;
|
pub mod clientbound_explode_packet;
|
||||||
pub mod clientbound_forget_level_chunk_packet;
|
pub mod clientbound_forget_level_chunk_packet;
|
||||||
pub mod clientbound_game_event_packet;
|
pub mod clientbound_game_event_packet;
|
||||||
|
@ -47,6 +49,7 @@ pub mod clientbound_merchant_offers_packet;
|
||||||
pub mod clientbound_move_entity_pos_packet;
|
pub mod clientbound_move_entity_pos_packet;
|
||||||
pub mod clientbound_move_entity_pos_rot_packet;
|
pub mod clientbound_move_entity_pos_rot_packet;
|
||||||
pub mod clientbound_move_entity_rot_packet;
|
pub mod clientbound_move_entity_rot_packet;
|
||||||
|
pub mod clientbound_move_minecart_packet;
|
||||||
pub mod clientbound_move_vehicle_packet;
|
pub mod clientbound_move_vehicle_packet;
|
||||||
pub mod clientbound_open_book_packet;
|
pub mod clientbound_open_book_packet;
|
||||||
pub mod clientbound_open_screen_packet;
|
pub mod clientbound_open_screen_packet;
|
||||||
|
@ -62,8 +65,12 @@ pub mod clientbound_player_info_remove_packet;
|
||||||
pub mod clientbound_player_info_update_packet;
|
pub mod clientbound_player_info_update_packet;
|
||||||
pub mod clientbound_player_look_at_packet;
|
pub mod clientbound_player_look_at_packet;
|
||||||
pub mod clientbound_player_position_packet;
|
pub mod clientbound_player_position_packet;
|
||||||
|
pub mod clientbound_player_rotation_packet;
|
||||||
pub mod clientbound_pong_response_packet;
|
pub mod clientbound_pong_response_packet;
|
||||||
pub mod clientbound_recipe_packet;
|
pub mod clientbound_projectile_power_packet;
|
||||||
|
pub mod clientbound_recipe_book_add_packet;
|
||||||
|
pub mod clientbound_recipe_book_remove_packet;
|
||||||
|
pub mod clientbound_recipe_book_settings_packet;
|
||||||
pub mod clientbound_remove_entities_packet;
|
pub mod clientbound_remove_entities_packet;
|
||||||
pub mod clientbound_remove_mob_effect_packet;
|
pub mod clientbound_remove_mob_effect_packet;
|
||||||
pub mod clientbound_reset_score_packet;
|
pub mod clientbound_reset_score_packet;
|
||||||
|
@ -74,6 +81,7 @@ pub mod clientbound_rotate_head_packet;
|
||||||
pub mod clientbound_section_blocks_update_packet;
|
pub mod clientbound_section_blocks_update_packet;
|
||||||
pub mod clientbound_select_advancements_tab_packet;
|
pub mod clientbound_select_advancements_tab_packet;
|
||||||
pub mod clientbound_server_data_packet;
|
pub mod clientbound_server_data_packet;
|
||||||
|
pub mod clientbound_server_links_packet;
|
||||||
pub mod clientbound_set_action_bar_text_packet;
|
pub mod clientbound_set_action_bar_text_packet;
|
||||||
pub mod clientbound_set_border_center_packet;
|
pub mod clientbound_set_border_center_packet;
|
||||||
pub mod clientbound_set_border_lerp_size_packet;
|
pub mod clientbound_set_border_lerp_size_packet;
|
||||||
|
@ -81,9 +89,9 @@ pub mod clientbound_set_border_size_packet;
|
||||||
pub mod clientbound_set_border_warning_delay_packet;
|
pub mod clientbound_set_border_warning_delay_packet;
|
||||||
pub mod clientbound_set_border_warning_distance_packet;
|
pub mod clientbound_set_border_warning_distance_packet;
|
||||||
pub mod clientbound_set_camera_packet;
|
pub mod clientbound_set_camera_packet;
|
||||||
pub mod clientbound_set_carried_item_packet;
|
|
||||||
pub mod clientbound_set_chunk_cache_center_packet;
|
pub mod clientbound_set_chunk_cache_center_packet;
|
||||||
pub mod clientbound_set_chunk_cache_radius_packet;
|
pub mod clientbound_set_chunk_cache_radius_packet;
|
||||||
|
pub mod clientbound_set_cursor_item_packet;
|
||||||
pub mod clientbound_set_default_spawn_position_packet;
|
pub mod clientbound_set_default_spawn_position_packet;
|
||||||
pub mod clientbound_set_display_objective_packet;
|
pub mod clientbound_set_display_objective_packet;
|
||||||
pub mod clientbound_set_entity_data_packet;
|
pub mod clientbound_set_entity_data_packet;
|
||||||
|
@ -92,8 +100,10 @@ pub mod clientbound_set_entity_motion_packet;
|
||||||
pub mod clientbound_set_equipment_packet;
|
pub mod clientbound_set_equipment_packet;
|
||||||
pub mod clientbound_set_experience_packet;
|
pub mod clientbound_set_experience_packet;
|
||||||
pub mod clientbound_set_health_packet;
|
pub mod clientbound_set_health_packet;
|
||||||
|
pub mod clientbound_set_held_slot_packet;
|
||||||
pub mod clientbound_set_objective_packet;
|
pub mod clientbound_set_objective_packet;
|
||||||
pub mod clientbound_set_passengers_packet;
|
pub mod clientbound_set_passengers_packet;
|
||||||
|
pub mod clientbound_set_player_inventory_packet;
|
||||||
pub mod clientbound_set_player_team_packet;
|
pub mod clientbound_set_player_team_packet;
|
||||||
pub mod clientbound_set_score_packet;
|
pub mod clientbound_set_score_packet;
|
||||||
pub mod clientbound_set_simulation_distance_packet;
|
pub mod clientbound_set_simulation_distance_packet;
|
||||||
|
@ -130,6 +140,7 @@ pub mod serverbound_chat_session_update_packet;
|
||||||
pub mod serverbound_chunk_batch_received_packet;
|
pub mod serverbound_chunk_batch_received_packet;
|
||||||
pub mod serverbound_client_command_packet;
|
pub mod serverbound_client_command_packet;
|
||||||
pub mod serverbound_client_information_packet;
|
pub mod serverbound_client_information_packet;
|
||||||
|
pub mod serverbound_client_tick_end_packet;
|
||||||
pub mod serverbound_command_suggestion_packet;
|
pub mod serverbound_command_suggestion_packet;
|
||||||
pub mod serverbound_configuration_acknowledged_packet;
|
pub mod serverbound_configuration_acknowledged_packet;
|
||||||
pub mod serverbound_container_button_click_packet;
|
pub mod serverbound_container_button_click_packet;
|
||||||
|
@ -164,6 +175,7 @@ pub mod serverbound_recipe_book_seen_recipe_packet;
|
||||||
pub mod serverbound_rename_item_packet;
|
pub mod serverbound_rename_item_packet;
|
||||||
pub mod serverbound_resource_pack_packet;
|
pub mod serverbound_resource_pack_packet;
|
||||||
pub mod serverbound_seen_advancements_packet;
|
pub mod serverbound_seen_advancements_packet;
|
||||||
|
pub mod serverbound_select_bundle_item_packet;
|
||||||
pub mod serverbound_select_trade_packet;
|
pub mod serverbound_select_trade_packet;
|
||||||
pub mod serverbound_set_beacon_packet;
|
pub mod serverbound_set_beacon_packet;
|
||||||
pub mod serverbound_set_carried_item_packet;
|
pub mod serverbound_set_carried_item_packet;
|
||||||
|
@ -180,67 +192,71 @@ pub mod serverbound_use_item_packet;
|
||||||
|
|
||||||
use azalea_protocol_macros::declare_state_packets;
|
use azalea_protocol_macros::declare_state_packets;
|
||||||
|
|
||||||
|
// see GameProtocols.java in the decompiled vanilla source
|
||||||
|
|
||||||
declare_state_packets!(
|
declare_state_packets!(
|
||||||
GamePacket,
|
GamePacket,
|
||||||
Serverbound => {
|
Serverbound => {
|
||||||
0x00: serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket,
|
0x00: serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket,
|
||||||
0x01: serverbound_block_entity_tag_query_packet::ServerboundBlockEntityTagQueryPacket,
|
0x01: serverbound_block_entity_tag_query_packet::ServerboundBlockEntityTagQueryPacket,
|
||||||
0x02: serverbound_change_difficulty_packet::ServerboundChangeDifficultyPacket,
|
0x02: serverbound_select_bundle_item_packet::ServerboundSelectBundleItemPacket,
|
||||||
0x03: serverbound_chat_ack_packet::ServerboundChatAckPacket,
|
0x03: serverbound_change_difficulty_packet::ServerboundChangeDifficultyPacket,
|
||||||
0x04: serverbound_chat_command_packet::ServerboundChatCommandPacket,
|
0x04: serverbound_chat_ack_packet::ServerboundChatAckPacket,
|
||||||
0x05: serverbound_chat_command_signed_packet::ServerboundChatCommandSignedPacket,
|
0x05: serverbound_chat_command_packet::ServerboundChatCommandPacket,
|
||||||
0x06: serverbound_chat_packet::ServerboundChatPacket,
|
0x06: serverbound_chat_command_signed_packet::ServerboundChatCommandSignedPacket,
|
||||||
0x07: serverbound_chat_session_update_packet::ServerboundChatSessionUpdatePacket,
|
0x07: serverbound_chat_packet::ServerboundChatPacket,
|
||||||
0x08: serverbound_chunk_batch_received_packet::ServerboundChunkBatchReceivedPacket,
|
0x08: serverbound_chat_session_update_packet::ServerboundChatSessionUpdatePacket,
|
||||||
0x09: serverbound_client_command_packet::ServerboundClientCommandPacket,
|
0x09: serverbound_chunk_batch_received_packet::ServerboundChunkBatchReceivedPacket,
|
||||||
0x0a: serverbound_client_information_packet::ServerboundClientInformationPacket,
|
0x0a: serverbound_client_command_packet::ServerboundClientCommandPacket,
|
||||||
0x0b: serverbound_command_suggestion_packet::ServerboundCommandSuggestionPacket,
|
0x0b: serverbound_client_tick_end_packet::ServerboundTickEndPacket,
|
||||||
0x0c: serverbound_configuration_acknowledged_packet::ServerboundConfigurationAcknowledgedPacket,
|
0x0c: serverbound_client_information_packet::ServerboundClientInformationPacket,
|
||||||
0x0d: serverbound_container_button_click_packet::ServerboundContainerButtonClickPacket,
|
0x0d: serverbound_command_suggestion_packet::ServerboundCommandSuggestionPacket,
|
||||||
0x0e: serverbound_container_click_packet::ServerboundContainerClickPacket,
|
0x0e: serverbound_configuration_acknowledged_packet::ServerboundConfigurationAcknowledgedPacket,
|
||||||
0x0f: serverbound_container_close_packet::ServerboundContainerClosePacket,
|
0x0f: serverbound_container_button_click_packet::ServerboundContainerButtonClickPacket,
|
||||||
0x10: serverbound_container_slot_state_changed_packet::ServerboundContainerSlotStateChangedPacket,
|
0x10: serverbound_container_click_packet::ServerboundContainerClickPacket,
|
||||||
0x11: serverbound_cookie_response_packet::ServerboundCookieResponsePacket,
|
0x11: serverbound_container_close_packet::ServerboundContainerClosePacket,
|
||||||
0x12: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket,
|
0x12: serverbound_container_slot_state_changed_packet::ServerboundContainerSlotStateChangedPacket,
|
||||||
0x13: serverbound_debug_sample_subscription::ServerboundDebugSampleSubscription,
|
0x13: serverbound_cookie_response_packet::ServerboundCookieResponsePacket,
|
||||||
0x14: serverbound_edit_book_packet::ServerboundEditBookPacket,
|
0x14: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket,
|
||||||
0x15: serverbound_entity_tag_query_packet::ServerboundEntityTagQueryPacket,
|
0x15: serverbound_debug_sample_subscription::ServerboundDebugSampleSubscription,
|
||||||
0x16: serverbound_interact_packet::ServerboundInteractPacket,
|
0x16: serverbound_edit_book_packet::ServerboundEditBookPacket,
|
||||||
0x17: serverbound_jigsaw_generate_packet::ServerboundJigsawGeneratePacket,
|
0x17: serverbound_entity_tag_query_packet::ServerboundEntityTagQueryPacket,
|
||||||
0x18: serverbound_keep_alive_packet::ServerboundKeepAlivePacket,
|
0x18: serverbound_interact_packet::ServerboundInteractPacket,
|
||||||
0x19: serverbound_lock_difficulty_packet::ServerboundLockDifficultyPacket,
|
0x19: serverbound_jigsaw_generate_packet::ServerboundJigsawGeneratePacket,
|
||||||
0x1a: serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket,
|
0x1a: serverbound_keep_alive_packet::ServerboundKeepAlivePacket,
|
||||||
0x1b: serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket,
|
0x1b: serverbound_lock_difficulty_packet::ServerboundLockDifficultyPacket,
|
||||||
0x1c: serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket,
|
0x1c: serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket,
|
||||||
0x1d: serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket,
|
0x1d: serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket,
|
||||||
0x1e: serverbound_move_vehicle_packet::ServerboundMoveVehiclePacket,
|
0x1e: serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket,
|
||||||
0x1f: serverbound_paddle_boat_packet::ServerboundPaddleBoatPacket,
|
0x1f: serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket,
|
||||||
0x20: serverbound_pick_item_packet::ServerboundPickItemPacket,
|
0x20: serverbound_move_vehicle_packet::ServerboundMoveVehiclePacket,
|
||||||
0x21: serverbound_ping_request_packet::ServerboundPingRequestPacket,
|
0x21: serverbound_paddle_boat_packet::ServerboundPaddleBoatPacket,
|
||||||
0x22: serverbound_place_recipe_packet::ServerboundPlaceRecipePacket,
|
0x22: serverbound_pick_item_packet::ServerboundPickItemPacket,
|
||||||
0x23: serverbound_player_abilities_packet::ServerboundPlayerAbilitiesPacket,
|
0x23: serverbound_ping_request_packet::ServerboundPingRequestPacket,
|
||||||
0x24: serverbound_player_action_packet::ServerboundPlayerActionPacket,
|
0x24: serverbound_place_recipe_packet::ServerboundPlaceRecipePacket,
|
||||||
0x25: serverbound_player_command_packet::ServerboundPlayerCommandPacket,
|
0x25: serverbound_player_abilities_packet::ServerboundPlayerAbilitiesPacket,
|
||||||
0x26: serverbound_player_input_packet::ServerboundPlayerInputPacket,
|
0x26: serverbound_player_action_packet::ServerboundPlayerActionPacket,
|
||||||
0x27: serverbound_pong_packet::ServerboundPongPacket,
|
0x27: serverbound_player_command_packet::ServerboundPlayerCommandPacket,
|
||||||
0x28: serverbound_recipe_book_change_settings_packet::ServerboundRecipeBookChangeSettingsPacket,
|
0x28: serverbound_player_input_packet::ServerboundPlayerInputPacket,
|
||||||
0x29: serverbound_recipe_book_seen_recipe_packet::ServerboundRecipeBookSeenRecipePacket,
|
0x29: serverbound_pong_packet::ServerboundPongPacket,
|
||||||
0x2a: serverbound_rename_item_packet::ServerboundRenameItemPacket,
|
0x2a: serverbound_recipe_book_change_settings_packet::ServerboundRecipeBookChangeSettingsPacket,
|
||||||
0x2b: serverbound_resource_pack_packet::ServerboundResourcePackPacket,
|
0x2b: serverbound_recipe_book_seen_recipe_packet::ServerboundRecipeBookSeenRecipePacket,
|
||||||
0x2c: serverbound_seen_advancements_packet::ServerboundSeenAdvancementsPacket,
|
0x2c: serverbound_rename_item_packet::ServerboundRenameItemPacket,
|
||||||
0x2d: serverbound_select_trade_packet::ServerboundSelectTradePacket,
|
0x2d: serverbound_resource_pack_packet::ServerboundResourcePackPacket,
|
||||||
0x2e: serverbound_set_beacon_packet::ServerboundSetBeaconPacket,
|
0x2e: serverbound_seen_advancements_packet::ServerboundSeenAdvancementsPacket,
|
||||||
0x2f: serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket,
|
0x2f: serverbound_select_trade_packet::ServerboundSelectTradePacket,
|
||||||
0x30: serverbound_set_command_block_packet::ServerboundSetCommandBlockPacket,
|
0x30: serverbound_set_beacon_packet::ServerboundSetBeaconPacket,
|
||||||
0x31: serverbound_set_command_minecart_packet::ServerboundSetCommandMinecartPacket,
|
0x31: serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket,
|
||||||
0x32: serverbound_set_creative_mode_slot_packet::ServerboundSetCreativeModeSlotPacket,
|
0x32: serverbound_set_command_block_packet::ServerboundSetCommandBlockPacket,
|
||||||
0x33: serverbound_set_jigsaw_block_packet::ServerboundSetJigsawBlockPacket,
|
0x33: serverbound_set_command_minecart_packet::ServerboundSetCommandMinecartPacket,
|
||||||
0x34: serverbound_set_structure_block_packet::ServerboundSetStructureBlockPacket,
|
0x34: serverbound_set_creative_mode_slot_packet::ServerboundSetCreativeModeSlotPacket,
|
||||||
0x35: serverbound_sign_update_packet::ServerboundSignUpdatePacket,
|
0x35: serverbound_set_jigsaw_block_packet::ServerboundSetJigsawBlockPacket,
|
||||||
0x36: serverbound_swing_packet::ServerboundSwingPacket,
|
0x36: serverbound_set_structure_block_packet::ServerboundSetStructureBlockPacket,
|
||||||
0x37: serverbound_teleport_to_entity_packet::ServerboundTeleportToEntityPacket,
|
0x37: serverbound_sign_update_packet::ServerboundSignUpdatePacket,
|
||||||
0x38: serverbound_use_item_on_packet::ServerboundUseItemOnPacket,
|
0x38: serverbound_swing_packet::ServerboundSwingPacket,
|
||||||
0x39: serverbound_use_item_packet::ServerboundUseItemPacket,
|
0x39: serverbound_teleport_to_entity_packet::ServerboundTeleportToEntityPacket,
|
||||||
|
0x3a: serverbound_use_item_on_packet::ServerboundUseItemOnPacket,
|
||||||
|
0x3b: serverbound_use_item_packet::ServerboundUseItemPacket,
|
||||||
},
|
},
|
||||||
Clientbound => {
|
Clientbound => {
|
||||||
0x00: clientbound_bundle_packet::ClientboundBundlePacket,
|
0x00: clientbound_bundle_packet::ClientboundBundlePacket,
|
||||||
|
@ -275,94 +291,104 @@ declare_state_packets!(
|
||||||
0x1d: clientbound_disconnect_packet::ClientboundDisconnectPacket,
|
0x1d: clientbound_disconnect_packet::ClientboundDisconnectPacket,
|
||||||
0x1e: clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket,
|
0x1e: clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket,
|
||||||
0x1f: clientbound_entity_event_packet::ClientboundEntityEventPacket,
|
0x1f: clientbound_entity_event_packet::ClientboundEntityEventPacket,
|
||||||
0x20: clientbound_explode_packet::ClientboundExplodePacket,
|
0x20: clientbound_entity_position_sync_packet::ClientboundEntityPositionSyncPacket,
|
||||||
0x21: clientbound_forget_level_chunk_packet::ClientboundForgetLevelChunkPacket,
|
0x21: clientbound_explode_packet::ClientboundExplodePacket,
|
||||||
0x22: clientbound_game_event_packet::ClientboundGameEventPacket,
|
0x22: clientbound_forget_level_chunk_packet::ClientboundForgetLevelChunkPacket,
|
||||||
0x23: clientbound_horse_screen_open_packet::ClientboundHorseScreenOpenPacket,
|
0x23: clientbound_game_event_packet::ClientboundGameEventPacket,
|
||||||
0x24: clientbound_hurt_animation_packet::ClientboundHurtAnimationPacket,
|
0x24: clientbound_horse_screen_open_packet::ClientboundHorseScreenOpenPacket,
|
||||||
0x25: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket,
|
0x25: clientbound_hurt_animation_packet::ClientboundHurtAnimationPacket,
|
||||||
0x26: clientbound_keep_alive_packet::ClientboundKeepAlivePacket,
|
0x26: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket,
|
||||||
0x27: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket,
|
0x27: clientbound_keep_alive_packet::ClientboundKeepAlivePacket,
|
||||||
0x28: clientbound_level_event_packet::ClientboundLevelEventPacket,
|
0x28: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket,
|
||||||
0x29: clientbound_level_particles_packet::ClientboundLevelParticlesPacket,
|
0x29: clientbound_level_event_packet::ClientboundLevelEventPacket,
|
||||||
0x2a: clientbound_light_update_packet::ClientboundLightUpdatePacket,
|
0x2a: clientbound_level_particles_packet::ClientboundLevelParticlesPacket,
|
||||||
0x2b: clientbound_login_packet::ClientboundLoginPacket,
|
0x2b: clientbound_light_update_packet::ClientboundLightUpdatePacket,
|
||||||
0x2c: clientbound_map_item_data_packet::ClientboundMapItemDataPacket,
|
0x2c: clientbound_login_packet::ClientboundLoginPacket,
|
||||||
0x2d: clientbound_merchant_offers_packet::ClientboundMerchantOffersPacket,
|
0x2d: clientbound_map_item_data_packet::ClientboundMapItemDataPacket,
|
||||||
0x2e: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket,
|
0x2e: clientbound_merchant_offers_packet::ClientboundMerchantOffersPacket,
|
||||||
0x2f: clientbound_move_entity_pos_rot_packet::ClientboundMoveEntityPosRotPacket,
|
0x2f: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket,
|
||||||
0x30: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket,
|
0x30: clientbound_move_entity_pos_rot_packet::ClientboundMoveEntityPosRotPacket,
|
||||||
0x31: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket,
|
0x31: clientbound_move_minecart_packet::ClientboundMoveMinecartPacket,
|
||||||
0x32: clientbound_open_book_packet::ClientboundOpenBookPacket,
|
0x32: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket,
|
||||||
0x33: clientbound_open_screen_packet::ClientboundOpenScreenPacket,
|
0x33: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket,
|
||||||
0x34: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket,
|
0x34: clientbound_open_book_packet::ClientboundOpenBookPacket,
|
||||||
0x35: clientbound_ping_packet::ClientboundPingPacket,
|
0x35: clientbound_open_screen_packet::ClientboundOpenScreenPacket,
|
||||||
0x36: clientbound_pong_response_packet::ClientboundPongResponsePacket,
|
0x36: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket,
|
||||||
0x37: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket,
|
0x37: clientbound_ping_packet::ClientboundPingPacket,
|
||||||
0x38: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
|
0x38: clientbound_pong_response_packet::ClientboundPongResponsePacket,
|
||||||
0x39: clientbound_player_chat_packet::ClientboundPlayerChatPacket,
|
0x39: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket,
|
||||||
0x3a: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket,
|
0x3a: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
|
||||||
0x3b: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket,
|
0x3b: clientbound_player_chat_packet::ClientboundPlayerChatPacket,
|
||||||
0x3c: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket,
|
0x3c: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket,
|
||||||
0x3d: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket,
|
0x3d: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket,
|
||||||
0x3e: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket,
|
0x3e: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket,
|
||||||
0x3f: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket,
|
0x3f: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket,
|
||||||
0x40: clientbound_player_position_packet::ClientboundPlayerPositionPacket,
|
0x40: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket,
|
||||||
0x41: clientbound_recipe_packet::ClientboundRecipePacket,
|
0x41: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket,
|
||||||
0x42: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket,
|
0x42: clientbound_player_position_packet::ClientboundPlayerPositionPacket,
|
||||||
0x43: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket,
|
0x43: clientbound_player_rotation_packet::ClientboundPlayerRotationPacket,
|
||||||
0x44: clientbound_reset_score_packet::ClientboundResetScorePacket,
|
0x44: clientbound_recipe_book_add_packet::ClientboundRecipeBookAddPacket,
|
||||||
0x45: clientbound_resource_pack_pop_packet::ClientboundResourcePackPopPacket,
|
0x45: clientbound_recipe_book_remove_packet::ClientboundRecipeBookRemovePacket,
|
||||||
0x46: clientbound_resource_pack_push_packet::ClientboundResourcePackPushPacket,
|
0x46: clientbound_recipe_book_settings_packet::ClientboundRecipeBookSettingsPacket,
|
||||||
0x47: clientbound_respawn_packet::ClientboundRespawnPacket,
|
0x47: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket,
|
||||||
0x48: clientbound_rotate_head_packet::ClientboundRotateHeadPacket,
|
0x48: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket,
|
||||||
0x49: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket,
|
0x49: clientbound_reset_score_packet::ClientboundResetScorePacket,
|
||||||
0x4a: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket,
|
0x4a: clientbound_resource_pack_pop_packet::ClientboundResourcePackPopPacket,
|
||||||
0x4b: clientbound_server_data_packet::ClientboundServerDataPacket,
|
0x4b: clientbound_resource_pack_push_packet::ClientboundResourcePackPushPacket,
|
||||||
0x4c: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket,
|
0x4c: clientbound_respawn_packet::ClientboundRespawnPacket,
|
||||||
0x4d: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket,
|
0x4d: clientbound_rotate_head_packet::ClientboundRotateHeadPacket,
|
||||||
0x4e: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket,
|
0x4e: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket,
|
||||||
0x4f: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket,
|
0x4f: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket,
|
||||||
0x50: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket,
|
0x50: clientbound_server_data_packet::ClientboundServerDataPacket,
|
||||||
0x51: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket,
|
0x51: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket,
|
||||||
0x52: clientbound_set_camera_packet::ClientboundSetCameraPacket,
|
0x52: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket,
|
||||||
0x53: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
|
0x53: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket,
|
||||||
0x54: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket,
|
0x54: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket,
|
||||||
0x55: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket,
|
0x55: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket,
|
||||||
0x56: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket,
|
0x56: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket,
|
||||||
0x57: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket,
|
0x57: clientbound_set_camera_packet::ClientboundSetCameraPacket,
|
||||||
0x58: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket,
|
0x58: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket,
|
||||||
0x59: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket,
|
0x59: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket,
|
||||||
0x5a: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket,
|
0x5a: clientbound_set_cursor_item_packet::ClientboundSetCursorItemPacket,
|
||||||
0x5b: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket,
|
0x5b: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket,
|
||||||
0x5c: clientbound_set_experience_packet::ClientboundSetExperiencePacket,
|
0x5c: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket,
|
||||||
0x5d: clientbound_set_health_packet::ClientboundSetHealthPacket,
|
0x5d: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket,
|
||||||
0x5e: clientbound_set_objective_packet::ClientboundSetObjectivePacket,
|
0x5e: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket,
|
||||||
0x5f: clientbound_set_passengers_packet::ClientboundSetPassengersPacket,
|
0x5f: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket,
|
||||||
0x60: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket,
|
0x60: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket,
|
||||||
0x61: clientbound_set_score_packet::ClientboundSetScorePacket,
|
0x61: clientbound_set_experience_packet::ClientboundSetExperiencePacket,
|
||||||
0x62: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket,
|
0x62: clientbound_set_health_packet::ClientboundSetHealthPacket,
|
||||||
0x63: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket,
|
0x63: clientbound_set_held_slot_packet::ClientboundSetHeldSlotPacket,
|
||||||
0x64: clientbound_set_time_packet::ClientboundSetTimePacket,
|
0x64: clientbound_set_objective_packet::ClientboundSetObjectivePacket,
|
||||||
0x65: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket,
|
0x65: clientbound_set_passengers_packet::ClientboundSetPassengersPacket,
|
||||||
0x66: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket,
|
0x66: clientbound_set_player_inventory_packet::ClientboundSetPlayerInventoryPacket,
|
||||||
0x67: clientbound_sound_entity_packet::ClientboundSoundEntityPacket,
|
0x67: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket,
|
||||||
0x68: clientbound_sound_packet::ClientboundSoundPacket,
|
0x68: clientbound_set_score_packet::ClientboundSetScorePacket,
|
||||||
0x69: clientbound_start_configuration_packet::ClientboundStartConfigurationPacket,
|
0x69: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket,
|
||||||
0x6a: clientbound_stop_sound_packet::ClientboundStopSoundPacket,
|
0x6a: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket,
|
||||||
0x6b: clientbound_store_cookie_packet::ClientboundStoreCookiePacket,
|
0x6b: clientbound_set_time_packet::ClientboundSetTimePacket,
|
||||||
0x6c: clientbound_system_chat_packet::ClientboundSystemChatPacket,
|
0x6c: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket,
|
||||||
0x6d: clientbound_tab_list_packet::ClientboundTabListPacket,
|
0x6d: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket,
|
||||||
0x6e: clientbound_tag_query_packet::ClientboundTagQueryPacket,
|
0x6e: clientbound_sound_entity_packet::ClientboundSoundEntityPacket,
|
||||||
0x6f: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket,
|
0x6f: clientbound_sound_packet::ClientboundSoundPacket,
|
||||||
0x70: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket,
|
0x70: clientbound_start_configuration_packet::ClientboundStartConfigurationPacket,
|
||||||
0x71: clientbound_ticking_state_packet::ClientboundTickingStatePacket,
|
0x71: clientbound_stop_sound_packet::ClientboundStopSoundPacket,
|
||||||
0x72: clientbound_ticking_step_packet::ClientboundTickingStepPacket,
|
0x72: clientbound_store_cookie_packet::ClientboundStoreCookiePacket,
|
||||||
0x73: clientbound_transfer_packet::ClientboundTransferPacket,
|
0x73: clientbound_system_chat_packet::ClientboundSystemChatPacket,
|
||||||
0x74: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket,
|
0x74: clientbound_tab_list_packet::ClientboundTabListPacket,
|
||||||
0x75: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket,
|
0x75: clientbound_tag_query_packet::ClientboundTagQueryPacket,
|
||||||
0x76: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket,
|
0x76: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket,
|
||||||
0x77: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
0x77: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket,
|
||||||
0x78: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
0x78: clientbound_ticking_state_packet::ClientboundTickingStatePacket,
|
||||||
|
0x79: clientbound_ticking_step_packet::ClientboundTickingStepPacket,
|
||||||
|
0x7a: clientbound_transfer_packet::ClientboundTransferPacket,
|
||||||
|
0x7b: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket,
|
||||||
|
0x7c: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket,
|
||||||
|
0x7d: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket,
|
||||||
|
0x7e: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
||||||
|
0x7f: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
||||||
|
0x80: clientbound_projectile_power_packet::ClientboundProjectilePowerPacket,
|
||||||
|
0x81: clientbound_custom_report_details_packet::ClientboundCustomReportDetailsPacket,
|
||||||
|
0x82: clientbound_server_links_packet::ClientboundServerLinksPacket
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ServerboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
|
||||||
|
pub struct ServerboundTickEndPacket {}
|
|
@ -7,37 +7,54 @@ use azalea_protocol_macros::ServerboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, ServerboundGamePacket)]
|
#[derive(Clone, Debug, ServerboundGamePacket)]
|
||||||
pub struct ServerboundPlayerInputPacket {
|
pub struct ServerboundPlayerInputPacket {
|
||||||
pub xxa: f32,
|
pub forward: bool,
|
||||||
pub zza: f32,
|
pub backward: bool,
|
||||||
pub is_jumping: bool,
|
pub left: bool,
|
||||||
pub is_shift_key_down: bool,
|
pub right: bool,
|
||||||
|
pub jump: bool,
|
||||||
|
pub shift: bool,
|
||||||
|
pub sprint: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl McBufReadable for ServerboundPlayerInputPacket {
|
impl McBufReadable for ServerboundPlayerInputPacket {
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||||
let xxa = f32::read_from(buf)?;
|
let set = FixedBitSet::<7>::read_from(buf)?;
|
||||||
let zza = f32::read_from(buf)?;
|
|
||||||
let set = FixedBitSet::<2>::read_from(buf)?;
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
xxa,
|
forward: set.index(0),
|
||||||
zza,
|
backward: set.index(1),
|
||||||
is_jumping: set.index(0),
|
left: set.index(2),
|
||||||
is_shift_key_down: set.index(1),
|
right: set.index(3),
|
||||||
|
jump: set.index(4),
|
||||||
|
shift: set.index(5),
|
||||||
|
sprint: set.index(6),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl McBufWritable for ServerboundPlayerInputPacket {
|
impl McBufWritable for ServerboundPlayerInputPacket {
|
||||||
fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> {
|
fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> {
|
||||||
self.xxa.write_into(buf)?;
|
let mut set = FixedBitSet::<7>::new();
|
||||||
self.zza.write_into(buf)?;
|
if self.forward {
|
||||||
let mut set = FixedBitSet::<2>::new();
|
|
||||||
if self.is_jumping {
|
|
||||||
set.set(0);
|
set.set(0);
|
||||||
}
|
}
|
||||||
if self.is_shift_key_down {
|
if self.backward {
|
||||||
set.set(1);
|
set.set(1);
|
||||||
}
|
}
|
||||||
|
if self.left {
|
||||||
|
set.set(2);
|
||||||
|
}
|
||||||
|
if self.right {
|
||||||
|
set.set(3);
|
||||||
|
}
|
||||||
|
if self.jump {
|
||||||
|
set.set(4);
|
||||||
|
}
|
||||||
|
if self.shift {
|
||||||
|
set.set(5);
|
||||||
|
}
|
||||||
|
if self.sprint {
|
||||||
|
set.set(6);
|
||||||
|
}
|
||||||
set.write_into(buf)
|
set.write_into(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
use azalea_protocol_macros::ServerboundGamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
|
||||||
|
pub struct ServerboundSelectBundleItemPacket {
|
||||||
|
#[var]
|
||||||
|
pub slot_id: i32,
|
||||||
|
#[var]
|
||||||
|
pub selected_item_index: u32,
|
||||||
|
}
|
|
@ -3,7 +3,6 @@ use azalea_buf::McBuf;
|
||||||
use azalea_protocol_macros::ClientboundLoginPacket;
|
use azalea_protocol_macros::ClientboundLoginPacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundLoginPacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundLoginPacket)]
|
||||||
pub struct ClientboundGameProfilePacket {
|
pub struct ClientboundLoginFinishedPacket {
|
||||||
pub game_profile: GameProfile,
|
pub game_profile: GameProfile,
|
||||||
pub strict_error_handling: bool,
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
pub mod clientbound_cookie_request_packet;
|
pub mod clientbound_cookie_request_packet;
|
||||||
pub mod clientbound_custom_query_packet;
|
pub mod clientbound_custom_query_packet;
|
||||||
pub mod clientbound_game_profile_packet;
|
|
||||||
pub mod clientbound_hello_packet;
|
pub mod clientbound_hello_packet;
|
||||||
pub mod clientbound_login_compression_packet;
|
pub mod clientbound_login_compression_packet;
|
||||||
pub mod clientbound_login_disconnect_packet;
|
pub mod clientbound_login_disconnect_packet;
|
||||||
|
pub mod clientbound_login_finished_packet;
|
||||||
pub mod serverbound_cookie_response_packet;
|
pub mod serverbound_cookie_response_packet;
|
||||||
pub mod serverbound_custom_query_answer_packet;
|
pub mod serverbound_custom_query_answer_packet;
|
||||||
pub mod serverbound_hello_packet;
|
pub mod serverbound_hello_packet;
|
||||||
|
@ -24,7 +24,7 @@ declare_state_packets!(
|
||||||
Clientbound => {
|
Clientbound => {
|
||||||
0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket,
|
0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket,
|
||||||
0x01: clientbound_hello_packet::ClientboundHelloPacket,
|
0x01: clientbound_hello_packet::ClientboundHelloPacket,
|
||||||
0x02: clientbound_game_profile_packet::ClientboundGameProfilePacket,
|
0x02: clientbound_login_finished_packet::ClientboundLoginFinishedPacket,
|
||||||
0x03: clientbound_login_compression_packet::ClientboundLoginCompressionPacket,
|
0x03: clientbound_login_compression_packet::ClientboundLoginCompressionPacket,
|
||||||
0x04: clientbound_custom_query_packet::ClientboundCustomQueryPacket,
|
0x04: clientbound_custom_query_packet::ClientboundCustomQueryPacket,
|
||||||
0x05: clientbound_cookie_request_packet::ClientboundCookieRequestPacket,
|
0x05: clientbound_cookie_request_packet::ClientboundCookieRequestPacket,
|
||||||
|
|
|
@ -12,7 +12,7 @@ use std::io::{Cursor, Write};
|
||||||
// TODO: rename the packet files to just like clientbound_add_entity instead of
|
// TODO: rename the packet files to just like clientbound_add_entity instead of
|
||||||
// clientbound_add_entity_packet
|
// clientbound_add_entity_packet
|
||||||
|
|
||||||
pub const PROTOCOL_VERSION: i32 = 767;
|
pub const PROTOCOL_VERSION: i32 = 768;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub enum ConnectionProtocol {
|
pub enum ConnectionProtocol {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
mod extra;
|
mod extra;
|
||||||
pub mod tags;
|
pub mod tags;
|
||||||
|
|
||||||
|
use std::fmt::{self, Debug};
|
||||||
use std::io::{Cursor, Write};
|
use std::io::{Cursor, Write};
|
||||||
|
|
||||||
use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable};
|
use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable};
|
||||||
|
@ -111,7 +112,6 @@ impl<D: Registry, ResourceLocation: McBufReadable + McBufWritable> McBufReadable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<D: Registry, ResourceLocation: McBufReadable + McBufWritable> McBufWritable
|
impl<D: Registry, ResourceLocation: McBufReadable + McBufWritable> McBufWritable
|
||||||
for HolderSet<D, ResourceLocation>
|
for HolderSet<D, ResourceLocation>
|
||||||
{
|
{
|
||||||
|
@ -131,6 +131,20 @@ impl<D: Registry, ResourceLocation: McBufReadable + McBufWritable> McBufWritable
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl<D: Registry + Debug, ResourceLocation: McBufReadable + McBufWritable + Debug> Debug
|
||||||
|
for HolderSet<D, ResourceLocation>
|
||||||
|
{
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
match self {
|
||||||
|
Self::Direct { contents } => f.debug_list().entries(contents).finish(),
|
||||||
|
Self::Named { key, contents } => f
|
||||||
|
.debug_struct("Named")
|
||||||
|
.field("key", key)
|
||||||
|
.field("contents", contents)
|
||||||
|
.finish(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
registry! {
|
registry! {
|
||||||
/// The AI code that's currently being executed for the entity.
|
/// The AI code that's currently being executed for the entity.
|
||||||
|
@ -166,37 +180,38 @@ enum Activity {
|
||||||
|
|
||||||
registry! {
|
registry! {
|
||||||
enum Attribute {
|
enum Attribute {
|
||||||
GenericArmor => "minecraft:generic.armor",
|
Armor => "minecraft:armor",
|
||||||
GenericArmorToughness => "minecraft:generic.armor_toughness",
|
ArmorToughness => "minecraft:armor_toughness",
|
||||||
GenericAttackDamage => "minecraft:generic.attack_damage",
|
AttackDamage => "minecraft:attack_damage",
|
||||||
GenericAttackKnockback => "minecraft:generic.attack_knockback",
|
AttackKnockback => "minecraft:attack_knockback",
|
||||||
GenericAttackSpeed => "minecraft:generic.attack_speed",
|
AttackSpeed => "minecraft:attack_speed",
|
||||||
PlayerBlockBreakSpeed => "minecraft:player.block_break_speed",
|
BlockBreakSpeed => "minecraft:block_break_speed",
|
||||||
PlayerBlockInteractionRange => "minecraft:player.block_interaction_range",
|
BlockInteractionRange => "minecraft:block_interaction_range",
|
||||||
GenericBurningTime => "minecraft:generic.burning_time",
|
BurningTime => "minecraft:burning_time",
|
||||||
GenericExplosionKnockbackResistance => "minecraft:generic.explosion_knockback_resistance",
|
ExplosionKnockbackResistance => "minecraft:explosion_knockback_resistance",
|
||||||
PlayerEntityInteractionRange => "minecraft:player.entity_interaction_range",
|
EntityInteractionRange => "minecraft:entity_interaction_range",
|
||||||
GenericFallDamageMultiplier => "minecraft:generic.fall_damage_multiplier",
|
FallDamageMultiplier => "minecraft:fall_damage_multiplier",
|
||||||
GenericFlyingSpeed => "minecraft:generic.flying_speed",
|
FlyingSpeed => "minecraft:flying_speed",
|
||||||
GenericFollowRange => "minecraft:generic.follow_range",
|
FollowRange => "minecraft:follow_range",
|
||||||
GenericGravity => "minecraft:generic.gravity",
|
Gravity => "minecraft:gravity",
|
||||||
GenericJumpStrength => "minecraft:generic.jump_strength",
|
JumpStrength => "minecraft:jump_strength",
|
||||||
GenericKnockbackResistance => "minecraft:generic.knockback_resistance",
|
KnockbackResistance => "minecraft:knockback_resistance",
|
||||||
GenericLuck => "minecraft:generic.luck",
|
Luck => "minecraft:luck",
|
||||||
GenericMaxAbsorption => "minecraft:generic.max_absorption",
|
MaxAbsorption => "minecraft:max_absorption",
|
||||||
GenericMaxHealth => "minecraft:generic.max_health",
|
MaxHealth => "minecraft:max_health",
|
||||||
PlayerMiningEfficiency => "minecraft:player.mining_efficiency",
|
MiningEfficiency => "minecraft:mining_efficiency",
|
||||||
GenericMovementEfficiency => "minecraft:generic.movement_efficiency",
|
MovementEfficiency => "minecraft:movement_efficiency",
|
||||||
GenericMovementSpeed => "minecraft:generic.movement_speed",
|
MovementSpeed => "minecraft:movement_speed",
|
||||||
GenericOxygenBonus => "minecraft:generic.oxygen_bonus",
|
OxygenBonus => "minecraft:oxygen_bonus",
|
||||||
GenericSafeFallDistance => "minecraft:generic.safe_fall_distance",
|
SafeFallDistance => "minecraft:safe_fall_distance",
|
||||||
GenericScale => "minecraft:generic.scale",
|
Scale => "minecraft:scale",
|
||||||
PlayerSneakingSpeed => "minecraft:player.sneaking_speed",
|
SneakingSpeed => "minecraft:sneaking_speed",
|
||||||
ZombieSpawnReinforcements => "minecraft:zombie.spawn_reinforcements",
|
SpawnReinforcements => "minecraft:spawn_reinforcements",
|
||||||
GenericStepHeight => "minecraft:generic.step_height",
|
StepHeight => "minecraft:step_height",
|
||||||
PlayerSubmergedMiningSpeed => "minecraft:player.submerged_mining_speed",
|
SubmergedMiningSpeed => "minecraft:submerged_mining_speed",
|
||||||
PlayerSweepingDamageRatio => "minecraft:player.sweeping_damage_ratio",
|
SweepingDamageRatio => "minecraft:sweeping_damage_ratio",
|
||||||
GenericWaterMovementEfficiency => "minecraft:generic.water_movement_efficiency",
|
TemptRange => "minecraft:tempt_range",
|
||||||
|
WaterMovementEfficiency => "minecraft:water_movement_efficiency",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +288,8 @@ enum Block {
|
||||||
AcaciaPlanks => "minecraft:acacia_planks",
|
AcaciaPlanks => "minecraft:acacia_planks",
|
||||||
CherryPlanks => "minecraft:cherry_planks",
|
CherryPlanks => "minecraft:cherry_planks",
|
||||||
DarkOakPlanks => "minecraft:dark_oak_planks",
|
DarkOakPlanks => "minecraft:dark_oak_planks",
|
||||||
|
PaleOakWood => "minecraft:pale_oak_wood",
|
||||||
|
PaleOakPlanks => "minecraft:pale_oak_planks",
|
||||||
MangrovePlanks => "minecraft:mangrove_planks",
|
MangrovePlanks => "minecraft:mangrove_planks",
|
||||||
BambooPlanks => "minecraft:bamboo_planks",
|
BambooPlanks => "minecraft:bamboo_planks",
|
||||||
BambooMosaic => "minecraft:bamboo_mosaic",
|
BambooMosaic => "minecraft:bamboo_mosaic",
|
||||||
|
@ -283,6 +300,7 @@ enum Block {
|
||||||
AcaciaSapling => "minecraft:acacia_sapling",
|
AcaciaSapling => "minecraft:acacia_sapling",
|
||||||
CherrySapling => "minecraft:cherry_sapling",
|
CherrySapling => "minecraft:cherry_sapling",
|
||||||
DarkOakSapling => "minecraft:dark_oak_sapling",
|
DarkOakSapling => "minecraft:dark_oak_sapling",
|
||||||
|
PaleOakSapling => "minecraft:pale_oak_sapling",
|
||||||
MangrovePropagule => "minecraft:mangrove_propagule",
|
MangrovePropagule => "minecraft:mangrove_propagule",
|
||||||
Bedrock => "minecraft:bedrock",
|
Bedrock => "minecraft:bedrock",
|
||||||
Water => "minecraft:water",
|
Water => "minecraft:water",
|
||||||
|
@ -306,6 +324,7 @@ enum Block {
|
||||||
AcaciaLog => "minecraft:acacia_log",
|
AcaciaLog => "minecraft:acacia_log",
|
||||||
CherryLog => "minecraft:cherry_log",
|
CherryLog => "minecraft:cherry_log",
|
||||||
DarkOakLog => "minecraft:dark_oak_log",
|
DarkOakLog => "minecraft:dark_oak_log",
|
||||||
|
PaleOakLog => "minecraft:pale_oak_log",
|
||||||
MangroveLog => "minecraft:mangrove_log",
|
MangroveLog => "minecraft:mangrove_log",
|
||||||
MangroveRoots => "minecraft:mangrove_roots",
|
MangroveRoots => "minecraft:mangrove_roots",
|
||||||
MuddyMangroveRoots => "minecraft:muddy_mangrove_roots",
|
MuddyMangroveRoots => "minecraft:muddy_mangrove_roots",
|
||||||
|
@ -316,6 +335,7 @@ enum Block {
|
||||||
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
||||||
StrippedCherryLog => "minecraft:stripped_cherry_log",
|
StrippedCherryLog => "minecraft:stripped_cherry_log",
|
||||||
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
||||||
|
StrippedPaleOakLog => "minecraft:stripped_pale_oak_log",
|
||||||
StrippedOakLog => "minecraft:stripped_oak_log",
|
StrippedOakLog => "minecraft:stripped_oak_log",
|
||||||
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
||||||
StrippedBambooBlock => "minecraft:stripped_bamboo_block",
|
StrippedBambooBlock => "minecraft:stripped_bamboo_block",
|
||||||
|
@ -334,6 +354,7 @@ enum Block {
|
||||||
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
||||||
StrippedCherryWood => "minecraft:stripped_cherry_wood",
|
StrippedCherryWood => "minecraft:stripped_cherry_wood",
|
||||||
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
||||||
|
StrippedPaleOakWood => "minecraft:stripped_pale_oak_wood",
|
||||||
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
||||||
OakLeaves => "minecraft:oak_leaves",
|
OakLeaves => "minecraft:oak_leaves",
|
||||||
SpruceLeaves => "minecraft:spruce_leaves",
|
SpruceLeaves => "minecraft:spruce_leaves",
|
||||||
|
@ -342,6 +363,7 @@ enum Block {
|
||||||
AcaciaLeaves => "minecraft:acacia_leaves",
|
AcaciaLeaves => "minecraft:acacia_leaves",
|
||||||
CherryLeaves => "minecraft:cherry_leaves",
|
CherryLeaves => "minecraft:cherry_leaves",
|
||||||
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
||||||
|
PaleOakLeaves => "minecraft:pale_oak_leaves",
|
||||||
MangroveLeaves => "minecraft:mangrove_leaves",
|
MangroveLeaves => "minecraft:mangrove_leaves",
|
||||||
AzaleaLeaves => "minecraft:azalea_leaves",
|
AzaleaLeaves => "minecraft:azalea_leaves",
|
||||||
FloweringAzaleaLeaves => "minecraft:flowering_azalea_leaves",
|
FloweringAzaleaLeaves => "minecraft:flowering_azalea_leaves",
|
||||||
|
@ -429,6 +451,7 @@ enum Block {
|
||||||
Fire => "minecraft:fire",
|
Fire => "minecraft:fire",
|
||||||
SoulFire => "minecraft:soul_fire",
|
SoulFire => "minecraft:soul_fire",
|
||||||
Spawner => "minecraft:spawner",
|
Spawner => "minecraft:spawner",
|
||||||
|
CreakingHeart => "minecraft:creaking_heart",
|
||||||
OakStairs => "minecraft:oak_stairs",
|
OakStairs => "minecraft:oak_stairs",
|
||||||
Chest => "minecraft:chest",
|
Chest => "minecraft:chest",
|
||||||
RedstoneWire => "minecraft:redstone_wire",
|
RedstoneWire => "minecraft:redstone_wire",
|
||||||
|
@ -446,6 +469,7 @@ enum Block {
|
||||||
CherrySign => "minecraft:cherry_sign",
|
CherrySign => "minecraft:cherry_sign",
|
||||||
JungleSign => "minecraft:jungle_sign",
|
JungleSign => "minecraft:jungle_sign",
|
||||||
DarkOakSign => "minecraft:dark_oak_sign",
|
DarkOakSign => "minecraft:dark_oak_sign",
|
||||||
|
PaleOakSign => "minecraft:pale_oak_sign",
|
||||||
MangroveSign => "minecraft:mangrove_sign",
|
MangroveSign => "minecraft:mangrove_sign",
|
||||||
BambooSign => "minecraft:bamboo_sign",
|
BambooSign => "minecraft:bamboo_sign",
|
||||||
OakDoor => "minecraft:oak_door",
|
OakDoor => "minecraft:oak_door",
|
||||||
|
@ -459,6 +483,7 @@ enum Block {
|
||||||
CherryWallSign => "minecraft:cherry_wall_sign",
|
CherryWallSign => "minecraft:cherry_wall_sign",
|
||||||
JungleWallSign => "minecraft:jungle_wall_sign",
|
JungleWallSign => "minecraft:jungle_wall_sign",
|
||||||
DarkOakWallSign => "minecraft:dark_oak_wall_sign",
|
DarkOakWallSign => "minecraft:dark_oak_wall_sign",
|
||||||
|
PaleOakWallSign => "minecraft:pale_oak_wall_sign",
|
||||||
MangroveWallSign => "minecraft:mangrove_wall_sign",
|
MangroveWallSign => "minecraft:mangrove_wall_sign",
|
||||||
BambooWallSign => "minecraft:bamboo_wall_sign",
|
BambooWallSign => "minecraft:bamboo_wall_sign",
|
||||||
OakHangingSign => "minecraft:oak_hanging_sign",
|
OakHangingSign => "minecraft:oak_hanging_sign",
|
||||||
|
@ -468,6 +493,7 @@ enum Block {
|
||||||
CherryHangingSign => "minecraft:cherry_hanging_sign",
|
CherryHangingSign => "minecraft:cherry_hanging_sign",
|
||||||
JungleHangingSign => "minecraft:jungle_hanging_sign",
|
JungleHangingSign => "minecraft:jungle_hanging_sign",
|
||||||
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
||||||
|
PaleOakHangingSign => "minecraft:pale_oak_hanging_sign",
|
||||||
CrimsonHangingSign => "minecraft:crimson_hanging_sign",
|
CrimsonHangingSign => "minecraft:crimson_hanging_sign",
|
||||||
WarpedHangingSign => "minecraft:warped_hanging_sign",
|
WarpedHangingSign => "minecraft:warped_hanging_sign",
|
||||||
MangroveHangingSign => "minecraft:mangrove_hanging_sign",
|
MangroveHangingSign => "minecraft:mangrove_hanging_sign",
|
||||||
|
@ -479,6 +505,7 @@ enum Block {
|
||||||
CherryWallHangingSign => "minecraft:cherry_wall_hanging_sign",
|
CherryWallHangingSign => "minecraft:cherry_wall_hanging_sign",
|
||||||
JungleWallHangingSign => "minecraft:jungle_wall_hanging_sign",
|
JungleWallHangingSign => "minecraft:jungle_wall_hanging_sign",
|
||||||
DarkOakWallHangingSign => "minecraft:dark_oak_wall_hanging_sign",
|
DarkOakWallHangingSign => "minecraft:dark_oak_wall_hanging_sign",
|
||||||
|
PaleOakWallHangingSign => "minecraft:pale_oak_wall_hanging_sign",
|
||||||
MangroveWallHangingSign => "minecraft:mangrove_wall_hanging_sign",
|
MangroveWallHangingSign => "minecraft:mangrove_wall_hanging_sign",
|
||||||
CrimsonWallHangingSign => "minecraft:crimson_wall_hanging_sign",
|
CrimsonWallHangingSign => "minecraft:crimson_wall_hanging_sign",
|
||||||
WarpedWallHangingSign => "minecraft:warped_wall_hanging_sign",
|
WarpedWallHangingSign => "minecraft:warped_wall_hanging_sign",
|
||||||
|
@ -493,6 +520,7 @@ enum Block {
|
||||||
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
||||||
CherryPressurePlate => "minecraft:cherry_pressure_plate",
|
CherryPressurePlate => "minecraft:cherry_pressure_plate",
|
||||||
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
||||||
|
PaleOakPressurePlate => "minecraft:pale_oak_pressure_plate",
|
||||||
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
||||||
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
||||||
RedstoneOre => "minecraft:redstone_ore",
|
RedstoneOre => "minecraft:redstone_ore",
|
||||||
|
@ -544,6 +572,7 @@ enum Block {
|
||||||
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
||||||
CherryTrapdoor => "minecraft:cherry_trapdoor",
|
CherryTrapdoor => "minecraft:cherry_trapdoor",
|
||||||
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
||||||
|
PaleOakTrapdoor => "minecraft:pale_oak_trapdoor",
|
||||||
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
||||||
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
||||||
StoneBricks => "minecraft:stone_bricks",
|
StoneBricks => "minecraft:stone_bricks",
|
||||||
|
@ -617,6 +646,7 @@ enum Block {
|
||||||
PottedAcaciaSapling => "minecraft:potted_acacia_sapling",
|
PottedAcaciaSapling => "minecraft:potted_acacia_sapling",
|
||||||
PottedCherrySapling => "minecraft:potted_cherry_sapling",
|
PottedCherrySapling => "minecraft:potted_cherry_sapling",
|
||||||
PottedDarkOakSapling => "minecraft:potted_dark_oak_sapling",
|
PottedDarkOakSapling => "minecraft:potted_dark_oak_sapling",
|
||||||
|
PottedPaleOakSapling => "minecraft:potted_pale_oak_sapling",
|
||||||
PottedMangrovePropagule => "minecraft:potted_mangrove_propagule",
|
PottedMangrovePropagule => "minecraft:potted_mangrove_propagule",
|
||||||
PottedFern => "minecraft:potted_fern",
|
PottedFern => "minecraft:potted_fern",
|
||||||
PottedDandelion => "minecraft:potted_dandelion",
|
PottedDandelion => "minecraft:potted_dandelion",
|
||||||
|
@ -645,6 +675,7 @@ enum Block {
|
||||||
AcaciaButton => "minecraft:acacia_button",
|
AcaciaButton => "minecraft:acacia_button",
|
||||||
CherryButton => "minecraft:cherry_button",
|
CherryButton => "minecraft:cherry_button",
|
||||||
DarkOakButton => "minecraft:dark_oak_button",
|
DarkOakButton => "minecraft:dark_oak_button",
|
||||||
|
PaleOakButton => "minecraft:pale_oak_button",
|
||||||
MangroveButton => "minecraft:mangrove_button",
|
MangroveButton => "minecraft:mangrove_button",
|
||||||
BambooButton => "minecraft:bamboo_button",
|
BambooButton => "minecraft:bamboo_button",
|
||||||
SkeletonSkull => "minecraft:skeleton_skull",
|
SkeletonSkull => "minecraft:skeleton_skull",
|
||||||
|
@ -713,6 +744,7 @@ enum Block {
|
||||||
AcaciaStairs => "minecraft:acacia_stairs",
|
AcaciaStairs => "minecraft:acacia_stairs",
|
||||||
CherryStairs => "minecraft:cherry_stairs",
|
CherryStairs => "minecraft:cherry_stairs",
|
||||||
DarkOakStairs => "minecraft:dark_oak_stairs",
|
DarkOakStairs => "minecraft:dark_oak_stairs",
|
||||||
|
PaleOakStairs => "minecraft:pale_oak_stairs",
|
||||||
MangroveStairs => "minecraft:mangrove_stairs",
|
MangroveStairs => "minecraft:mangrove_stairs",
|
||||||
BambooStairs => "minecraft:bamboo_stairs",
|
BambooStairs => "minecraft:bamboo_stairs",
|
||||||
BambooMosaicStairs => "minecraft:bamboo_mosaic_stairs",
|
BambooMosaicStairs => "minecraft:bamboo_mosaic_stairs",
|
||||||
|
@ -799,6 +831,7 @@ enum Block {
|
||||||
AcaciaSlab => "minecraft:acacia_slab",
|
AcaciaSlab => "minecraft:acacia_slab",
|
||||||
CherrySlab => "minecraft:cherry_slab",
|
CherrySlab => "minecraft:cherry_slab",
|
||||||
DarkOakSlab => "minecraft:dark_oak_slab",
|
DarkOakSlab => "minecraft:dark_oak_slab",
|
||||||
|
PaleOakSlab => "minecraft:pale_oak_slab",
|
||||||
MangroveSlab => "minecraft:mangrove_slab",
|
MangroveSlab => "minecraft:mangrove_slab",
|
||||||
BambooSlab => "minecraft:bamboo_slab",
|
BambooSlab => "minecraft:bamboo_slab",
|
||||||
BambooMosaicSlab => "minecraft:bamboo_mosaic_slab",
|
BambooMosaicSlab => "minecraft:bamboo_mosaic_slab",
|
||||||
|
@ -826,6 +859,7 @@ enum Block {
|
||||||
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
||||||
CherryFenceGate => "minecraft:cherry_fence_gate",
|
CherryFenceGate => "minecraft:cherry_fence_gate",
|
||||||
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
||||||
|
PaleOakFenceGate => "minecraft:pale_oak_fence_gate",
|
||||||
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
||||||
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
||||||
SpruceFence => "minecraft:spruce_fence",
|
SpruceFence => "minecraft:spruce_fence",
|
||||||
|
@ -834,6 +868,7 @@ enum Block {
|
||||||
AcaciaFence => "minecraft:acacia_fence",
|
AcaciaFence => "minecraft:acacia_fence",
|
||||||
CherryFence => "minecraft:cherry_fence",
|
CherryFence => "minecraft:cherry_fence",
|
||||||
DarkOakFence => "minecraft:dark_oak_fence",
|
DarkOakFence => "minecraft:dark_oak_fence",
|
||||||
|
PaleOakFence => "minecraft:pale_oak_fence",
|
||||||
MangroveFence => "minecraft:mangrove_fence",
|
MangroveFence => "minecraft:mangrove_fence",
|
||||||
BambooFence => "minecraft:bamboo_fence",
|
BambooFence => "minecraft:bamboo_fence",
|
||||||
SpruceDoor => "minecraft:spruce_door",
|
SpruceDoor => "minecraft:spruce_door",
|
||||||
|
@ -842,6 +877,7 @@ enum Block {
|
||||||
AcaciaDoor => "minecraft:acacia_door",
|
AcaciaDoor => "minecraft:acacia_door",
|
||||||
CherryDoor => "minecraft:cherry_door",
|
CherryDoor => "minecraft:cherry_door",
|
||||||
DarkOakDoor => "minecraft:dark_oak_door",
|
DarkOakDoor => "minecraft:dark_oak_door",
|
||||||
|
PaleOakDoor => "minecraft:pale_oak_door",
|
||||||
MangroveDoor => "minecraft:mangrove_door",
|
MangroveDoor => "minecraft:mangrove_door",
|
||||||
BambooDoor => "minecraft:bamboo_door",
|
BambooDoor => "minecraft:bamboo_door",
|
||||||
EndRod => "minecraft:end_rod",
|
EndRod => "minecraft:end_rod",
|
||||||
|
@ -1313,6 +1349,9 @@ enum Block {
|
||||||
TrialSpawner => "minecraft:trial_spawner",
|
TrialSpawner => "minecraft:trial_spawner",
|
||||||
Vault => "minecraft:vault",
|
Vault => "minecraft:vault",
|
||||||
HeavyCore => "minecraft:heavy_core",
|
HeavyCore => "minecraft:heavy_core",
|
||||||
|
PaleMossBlock => "minecraft:pale_moss_block",
|
||||||
|
PaleMossCarpet => "minecraft:pale_moss_carpet",
|
||||||
|
PaleHangingMoss => "minecraft:pale_hanging_moss",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1331,6 +1370,7 @@ enum BlockEntityKind {
|
||||||
Sign => "minecraft:sign",
|
Sign => "minecraft:sign",
|
||||||
HangingSign => "minecraft:hanging_sign",
|
HangingSign => "minecraft:hanging_sign",
|
||||||
MobSpawner => "minecraft:mob_spawner",
|
MobSpawner => "minecraft:mob_spawner",
|
||||||
|
CreakingHeart => "minecraft:creaking_heart",
|
||||||
Piston => "minecraft:piston",
|
Piston => "minecraft:piston",
|
||||||
BrewingStand => "minecraft:brewing_stand",
|
BrewingStand => "minecraft:brewing_stand",
|
||||||
EnchantingTable => "minecraft:enchanting_table",
|
EnchantingTable => "minecraft:enchanting_table",
|
||||||
|
@ -1608,47 +1648,58 @@ enum Enchantment {
|
||||||
registry! {
|
registry! {
|
||||||
/// An enum that contains every type of entity.
|
/// An enum that contains every type of entity.
|
||||||
enum EntityKind {
|
enum EntityKind {
|
||||||
|
AcaciaBoat => "minecraft:acacia_boat",
|
||||||
|
AcaciaChestBoat => "minecraft:acacia_chest_boat",
|
||||||
Allay => "minecraft:allay",
|
Allay => "minecraft:allay",
|
||||||
AreaEffectCloud => "minecraft:area_effect_cloud",
|
AreaEffectCloud => "minecraft:area_effect_cloud",
|
||||||
Armadillo => "minecraft:armadillo",
|
Armadillo => "minecraft:armadillo",
|
||||||
ArmorStand => "minecraft:armor_stand",
|
ArmorStand => "minecraft:armor_stand",
|
||||||
Arrow => "minecraft:arrow",
|
Arrow => "minecraft:arrow",
|
||||||
Axolotl => "minecraft:axolotl",
|
Axolotl => "minecraft:axolotl",
|
||||||
|
BambooChestRaft => "minecraft:bamboo_chest_raft",
|
||||||
|
BambooRaft => "minecraft:bamboo_raft",
|
||||||
Bat => "minecraft:bat",
|
Bat => "minecraft:bat",
|
||||||
Bee => "minecraft:bee",
|
Bee => "minecraft:bee",
|
||||||
|
BirchBoat => "minecraft:birch_boat",
|
||||||
|
BirchChestBoat => "minecraft:birch_chest_boat",
|
||||||
Blaze => "minecraft:blaze",
|
Blaze => "minecraft:blaze",
|
||||||
BlockDisplay => "minecraft:block_display",
|
BlockDisplay => "minecraft:block_display",
|
||||||
Boat => "minecraft:boat",
|
|
||||||
Bogged => "minecraft:bogged",
|
Bogged => "minecraft:bogged",
|
||||||
Breeze => "minecraft:breeze",
|
Breeze => "minecraft:breeze",
|
||||||
BreezeWindCharge => "minecraft:breeze_wind_charge",
|
BreezeWindCharge => "minecraft:breeze_wind_charge",
|
||||||
Camel => "minecraft:camel",
|
Camel => "minecraft:camel",
|
||||||
Cat => "minecraft:cat",
|
Cat => "minecraft:cat",
|
||||||
CaveSpider => "minecraft:cave_spider",
|
CaveSpider => "minecraft:cave_spider",
|
||||||
ChestBoat => "minecraft:chest_boat",
|
CherryBoat => "minecraft:cherry_boat",
|
||||||
|
CherryChestBoat => "minecraft:cherry_chest_boat",
|
||||||
ChestMinecart => "minecraft:chest_minecart",
|
ChestMinecart => "minecraft:chest_minecart",
|
||||||
Chicken => "minecraft:chicken",
|
Chicken => "minecraft:chicken",
|
||||||
Cod => "minecraft:cod",
|
Cod => "minecraft:cod",
|
||||||
CommandBlockMinecart => "minecraft:command_block_minecart",
|
CommandBlockMinecart => "minecraft:command_block_minecart",
|
||||||
Cow => "minecraft:cow",
|
Cow => "minecraft:cow",
|
||||||
|
Creaking => "minecraft:creaking",
|
||||||
|
CreakingTransient => "minecraft:creaking_transient",
|
||||||
Creeper => "minecraft:creeper",
|
Creeper => "minecraft:creeper",
|
||||||
|
DarkOakBoat => "minecraft:dark_oak_boat",
|
||||||
|
DarkOakChestBoat => "minecraft:dark_oak_chest_boat",
|
||||||
Dolphin => "minecraft:dolphin",
|
Dolphin => "minecraft:dolphin",
|
||||||
Donkey => "minecraft:donkey",
|
Donkey => "minecraft:donkey",
|
||||||
DragonFireball => "minecraft:dragon_fireball",
|
DragonFireball => "minecraft:dragon_fireball",
|
||||||
Drowned => "minecraft:drowned",
|
Drowned => "minecraft:drowned",
|
||||||
Egg => "minecraft:egg",
|
Egg => "minecraft:egg",
|
||||||
ElderGuardian => "minecraft:elder_guardian",
|
ElderGuardian => "minecraft:elder_guardian",
|
||||||
EndCrystal => "minecraft:end_crystal",
|
|
||||||
EnderDragon => "minecraft:ender_dragon",
|
|
||||||
EnderPearl => "minecraft:ender_pearl",
|
|
||||||
Enderman => "minecraft:enderman",
|
Enderman => "minecraft:enderman",
|
||||||
Endermite => "minecraft:endermite",
|
Endermite => "minecraft:endermite",
|
||||||
|
EnderDragon => "minecraft:ender_dragon",
|
||||||
|
EnderPearl => "minecraft:ender_pearl",
|
||||||
|
EndCrystal => "minecraft:end_crystal",
|
||||||
Evoker => "minecraft:evoker",
|
Evoker => "minecraft:evoker",
|
||||||
EvokerFangs => "minecraft:evoker_fangs",
|
EvokerFangs => "minecraft:evoker_fangs",
|
||||||
ExperienceBottle => "minecraft:experience_bottle",
|
ExperienceBottle => "minecraft:experience_bottle",
|
||||||
ExperienceOrb => "minecraft:experience_orb",
|
ExperienceOrb => "minecraft:experience_orb",
|
||||||
EyeOfEnder => "minecraft:eye_of_ender",
|
EyeOfEnder => "minecraft:eye_of_ender",
|
||||||
FallingBlock => "minecraft:falling_block",
|
FallingBlock => "minecraft:falling_block",
|
||||||
|
Fireball => "minecraft:fireball",
|
||||||
FireworkRocket => "minecraft:firework_rocket",
|
FireworkRocket => "minecraft:firework_rocket",
|
||||||
Fox => "minecraft:fox",
|
Fox => "minecraft:fox",
|
||||||
Frog => "minecraft:frog",
|
Frog => "minecraft:frog",
|
||||||
|
@ -1669,19 +1720,26 @@ enum EntityKind {
|
||||||
Item => "minecraft:item",
|
Item => "minecraft:item",
|
||||||
ItemDisplay => "minecraft:item_display",
|
ItemDisplay => "minecraft:item_display",
|
||||||
ItemFrame => "minecraft:item_frame",
|
ItemFrame => "minecraft:item_frame",
|
||||||
OminousItemSpawner => "minecraft:ominous_item_spawner",
|
JungleBoat => "minecraft:jungle_boat",
|
||||||
Fireball => "minecraft:fireball",
|
JungleChestBoat => "minecraft:jungle_chest_boat",
|
||||||
LeashKnot => "minecraft:leash_knot",
|
LeashKnot => "minecraft:leash_knot",
|
||||||
LightningBolt => "minecraft:lightning_bolt",
|
LightningBolt => "minecraft:lightning_bolt",
|
||||||
Llama => "minecraft:llama",
|
Llama => "minecraft:llama",
|
||||||
LlamaSpit => "minecraft:llama_spit",
|
LlamaSpit => "minecraft:llama_spit",
|
||||||
MagmaCube => "minecraft:magma_cube",
|
MagmaCube => "minecraft:magma_cube",
|
||||||
|
MangroveBoat => "minecraft:mangrove_boat",
|
||||||
|
MangroveChestBoat => "minecraft:mangrove_chest_boat",
|
||||||
Marker => "minecraft:marker",
|
Marker => "minecraft:marker",
|
||||||
Minecart => "minecraft:minecart",
|
Minecart => "minecraft:minecart",
|
||||||
Mooshroom => "minecraft:mooshroom",
|
Mooshroom => "minecraft:mooshroom",
|
||||||
Mule => "minecraft:mule",
|
Mule => "minecraft:mule",
|
||||||
|
OakBoat => "minecraft:oak_boat",
|
||||||
|
OakChestBoat => "minecraft:oak_chest_boat",
|
||||||
Ocelot => "minecraft:ocelot",
|
Ocelot => "minecraft:ocelot",
|
||||||
|
OminousItemSpawner => "minecraft:ominous_item_spawner",
|
||||||
Painting => "minecraft:painting",
|
Painting => "minecraft:painting",
|
||||||
|
PaleOakBoat => "minecraft:pale_oak_boat",
|
||||||
|
PaleOakChestBoat => "minecraft:pale_oak_chest_boat",
|
||||||
Panda => "minecraft:panda",
|
Panda => "minecraft:panda",
|
||||||
Parrot => "minecraft:parrot",
|
Parrot => "minecraft:parrot",
|
||||||
Phantom => "minecraft:phantom",
|
Phantom => "minecraft:phantom",
|
||||||
|
@ -1704,11 +1762,13 @@ enum EntityKind {
|
||||||
Slime => "minecraft:slime",
|
Slime => "minecraft:slime",
|
||||||
SmallFireball => "minecraft:small_fireball",
|
SmallFireball => "minecraft:small_fireball",
|
||||||
Sniffer => "minecraft:sniffer",
|
Sniffer => "minecraft:sniffer",
|
||||||
SnowGolem => "minecraft:snow_golem",
|
|
||||||
Snowball => "minecraft:snowball",
|
Snowball => "minecraft:snowball",
|
||||||
|
SnowGolem => "minecraft:snow_golem",
|
||||||
SpawnerMinecart => "minecraft:spawner_minecart",
|
SpawnerMinecart => "minecraft:spawner_minecart",
|
||||||
SpectralArrow => "minecraft:spectral_arrow",
|
SpectralArrow => "minecraft:spectral_arrow",
|
||||||
Spider => "minecraft:spider",
|
Spider => "minecraft:spider",
|
||||||
|
SpruceBoat => "minecraft:spruce_boat",
|
||||||
|
SpruceChestBoat => "minecraft:spruce_chest_boat",
|
||||||
Squid => "minecraft:squid",
|
Squid => "minecraft:squid",
|
||||||
Stray => "minecraft:stray",
|
Stray => "minecraft:stray",
|
||||||
Strider => "minecraft:strider",
|
Strider => "minecraft:strider",
|
||||||
|
@ -1913,6 +1973,7 @@ enum Item {
|
||||||
AcaciaPlanks => "minecraft:acacia_planks",
|
AcaciaPlanks => "minecraft:acacia_planks",
|
||||||
CherryPlanks => "minecraft:cherry_planks",
|
CherryPlanks => "minecraft:cherry_planks",
|
||||||
DarkOakPlanks => "minecraft:dark_oak_planks",
|
DarkOakPlanks => "minecraft:dark_oak_planks",
|
||||||
|
PaleOakPlanks => "minecraft:pale_oak_planks",
|
||||||
MangrovePlanks => "minecraft:mangrove_planks",
|
MangrovePlanks => "minecraft:mangrove_planks",
|
||||||
BambooPlanks => "minecraft:bamboo_planks",
|
BambooPlanks => "minecraft:bamboo_planks",
|
||||||
CrimsonPlanks => "minecraft:crimson_planks",
|
CrimsonPlanks => "minecraft:crimson_planks",
|
||||||
|
@ -1925,6 +1986,7 @@ enum Item {
|
||||||
AcaciaSapling => "minecraft:acacia_sapling",
|
AcaciaSapling => "minecraft:acacia_sapling",
|
||||||
CherrySapling => "minecraft:cherry_sapling",
|
CherrySapling => "minecraft:cherry_sapling",
|
||||||
DarkOakSapling => "minecraft:dark_oak_sapling",
|
DarkOakSapling => "minecraft:dark_oak_sapling",
|
||||||
|
PaleOakSapling => "minecraft:pale_oak_sapling",
|
||||||
MangrovePropagule => "minecraft:mangrove_propagule",
|
MangrovePropagule => "minecraft:mangrove_propagule",
|
||||||
Bedrock => "minecraft:bedrock",
|
Bedrock => "minecraft:bedrock",
|
||||||
Sand => "minecraft:sand",
|
Sand => "minecraft:sand",
|
||||||
|
@ -2008,6 +2070,7 @@ enum Item {
|
||||||
JungleLog => "minecraft:jungle_log",
|
JungleLog => "minecraft:jungle_log",
|
||||||
AcaciaLog => "minecraft:acacia_log",
|
AcaciaLog => "minecraft:acacia_log",
|
||||||
CherryLog => "minecraft:cherry_log",
|
CherryLog => "minecraft:cherry_log",
|
||||||
|
PaleOakLog => "minecraft:pale_oak_log",
|
||||||
DarkOakLog => "minecraft:dark_oak_log",
|
DarkOakLog => "minecraft:dark_oak_log",
|
||||||
MangroveLog => "minecraft:mangrove_log",
|
MangroveLog => "minecraft:mangrove_log",
|
||||||
MangroveRoots => "minecraft:mangrove_roots",
|
MangroveRoots => "minecraft:mangrove_roots",
|
||||||
|
@ -2022,6 +2085,7 @@ enum Item {
|
||||||
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
||||||
StrippedCherryLog => "minecraft:stripped_cherry_log",
|
StrippedCherryLog => "minecraft:stripped_cherry_log",
|
||||||
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
||||||
|
StrippedPaleOakLog => "minecraft:stripped_pale_oak_log",
|
||||||
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
||||||
StrippedCrimsonStem => "minecraft:stripped_crimson_stem",
|
StrippedCrimsonStem => "minecraft:stripped_crimson_stem",
|
||||||
StrippedWarpedStem => "minecraft:stripped_warped_stem",
|
StrippedWarpedStem => "minecraft:stripped_warped_stem",
|
||||||
|
@ -2032,6 +2096,7 @@ enum Item {
|
||||||
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
||||||
StrippedCherryWood => "minecraft:stripped_cherry_wood",
|
StrippedCherryWood => "minecraft:stripped_cherry_wood",
|
||||||
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
||||||
|
StrippedPaleOakWood => "minecraft:stripped_pale_oak_wood",
|
||||||
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
||||||
StrippedCrimsonHyphae => "minecraft:stripped_crimson_hyphae",
|
StrippedCrimsonHyphae => "minecraft:stripped_crimson_hyphae",
|
||||||
StrippedWarpedHyphae => "minecraft:stripped_warped_hyphae",
|
StrippedWarpedHyphae => "minecraft:stripped_warped_hyphae",
|
||||||
|
@ -2042,6 +2107,7 @@ enum Item {
|
||||||
JungleWood => "minecraft:jungle_wood",
|
JungleWood => "minecraft:jungle_wood",
|
||||||
AcaciaWood => "minecraft:acacia_wood",
|
AcaciaWood => "minecraft:acacia_wood",
|
||||||
CherryWood => "minecraft:cherry_wood",
|
CherryWood => "minecraft:cherry_wood",
|
||||||
|
PaleOakWood => "minecraft:pale_oak_wood",
|
||||||
DarkOakWood => "minecraft:dark_oak_wood",
|
DarkOakWood => "minecraft:dark_oak_wood",
|
||||||
MangroveWood => "minecraft:mangrove_wood",
|
MangroveWood => "minecraft:mangrove_wood",
|
||||||
CrimsonHyphae => "minecraft:crimson_hyphae",
|
CrimsonHyphae => "minecraft:crimson_hyphae",
|
||||||
|
@ -2053,6 +2119,7 @@ enum Item {
|
||||||
AcaciaLeaves => "minecraft:acacia_leaves",
|
AcaciaLeaves => "minecraft:acacia_leaves",
|
||||||
CherryLeaves => "minecraft:cherry_leaves",
|
CherryLeaves => "minecraft:cherry_leaves",
|
||||||
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
||||||
|
PaleOakLeaves => "minecraft:pale_oak_leaves",
|
||||||
MangroveLeaves => "minecraft:mangrove_leaves",
|
MangroveLeaves => "minecraft:mangrove_leaves",
|
||||||
AzaleaLeaves => "minecraft:azalea_leaves",
|
AzaleaLeaves => "minecraft:azalea_leaves",
|
||||||
FloweringAzaleaLeaves => "minecraft:flowering_azalea_leaves",
|
FloweringAzaleaLeaves => "minecraft:flowering_azalea_leaves",
|
||||||
|
@ -2115,9 +2182,12 @@ enum Item {
|
||||||
TwistingVines => "minecraft:twisting_vines",
|
TwistingVines => "minecraft:twisting_vines",
|
||||||
SugarCane => "minecraft:sugar_cane",
|
SugarCane => "minecraft:sugar_cane",
|
||||||
Kelp => "minecraft:kelp",
|
Kelp => "minecraft:kelp",
|
||||||
MossCarpet => "minecraft:moss_carpet",
|
|
||||||
PinkPetals => "minecraft:pink_petals",
|
PinkPetals => "minecraft:pink_petals",
|
||||||
|
MossCarpet => "minecraft:moss_carpet",
|
||||||
MossBlock => "minecraft:moss_block",
|
MossBlock => "minecraft:moss_block",
|
||||||
|
PaleMossCarpet => "minecraft:pale_moss_carpet",
|
||||||
|
PaleHangingMoss => "minecraft:pale_hanging_moss",
|
||||||
|
PaleMossBlock => "minecraft:pale_moss_block",
|
||||||
HangingRoots => "minecraft:hanging_roots",
|
HangingRoots => "minecraft:hanging_roots",
|
||||||
BigDripleaf => "minecraft:big_dripleaf",
|
BigDripleaf => "minecraft:big_dripleaf",
|
||||||
SmallDripleaf => "minecraft:small_dripleaf",
|
SmallDripleaf => "minecraft:small_dripleaf",
|
||||||
|
@ -2129,6 +2199,7 @@ enum Item {
|
||||||
AcaciaSlab => "minecraft:acacia_slab",
|
AcaciaSlab => "minecraft:acacia_slab",
|
||||||
CherrySlab => "minecraft:cherry_slab",
|
CherrySlab => "minecraft:cherry_slab",
|
||||||
DarkOakSlab => "minecraft:dark_oak_slab",
|
DarkOakSlab => "minecraft:dark_oak_slab",
|
||||||
|
PaleOakSlab => "minecraft:pale_oak_slab",
|
||||||
MangroveSlab => "minecraft:mangrove_slab",
|
MangroveSlab => "minecraft:mangrove_slab",
|
||||||
BambooSlab => "minecraft:bamboo_slab",
|
BambooSlab => "minecraft:bamboo_slab",
|
||||||
BambooMosaicSlab => "minecraft:bamboo_mosaic_slab",
|
BambooMosaicSlab => "minecraft:bamboo_mosaic_slab",
|
||||||
|
@ -2169,6 +2240,7 @@ enum Item {
|
||||||
PurpurPillar => "minecraft:purpur_pillar",
|
PurpurPillar => "minecraft:purpur_pillar",
|
||||||
PurpurStairs => "minecraft:purpur_stairs",
|
PurpurStairs => "minecraft:purpur_stairs",
|
||||||
Spawner => "minecraft:spawner",
|
Spawner => "minecraft:spawner",
|
||||||
|
CreakingHeart => "minecraft:creaking_heart",
|
||||||
Chest => "minecraft:chest",
|
Chest => "minecraft:chest",
|
||||||
CraftingTable => "minecraft:crafting_table",
|
CraftingTable => "minecraft:crafting_table",
|
||||||
Farmland => "minecraft:farmland",
|
Farmland => "minecraft:farmland",
|
||||||
|
@ -2188,6 +2260,7 @@ enum Item {
|
||||||
AcaciaFence => "minecraft:acacia_fence",
|
AcaciaFence => "minecraft:acacia_fence",
|
||||||
CherryFence => "minecraft:cherry_fence",
|
CherryFence => "minecraft:cherry_fence",
|
||||||
DarkOakFence => "minecraft:dark_oak_fence",
|
DarkOakFence => "minecraft:dark_oak_fence",
|
||||||
|
PaleOakFence => "minecraft:pale_oak_fence",
|
||||||
MangroveFence => "minecraft:mangrove_fence",
|
MangroveFence => "minecraft:mangrove_fence",
|
||||||
BambooFence => "minecraft:bamboo_fence",
|
BambooFence => "minecraft:bamboo_fence",
|
||||||
CrimsonFence => "minecraft:crimson_fence",
|
CrimsonFence => "minecraft:crimson_fence",
|
||||||
|
@ -2260,6 +2333,7 @@ enum Item {
|
||||||
AcaciaStairs => "minecraft:acacia_stairs",
|
AcaciaStairs => "minecraft:acacia_stairs",
|
||||||
CherryStairs => "minecraft:cherry_stairs",
|
CherryStairs => "minecraft:cherry_stairs",
|
||||||
DarkOakStairs => "minecraft:dark_oak_stairs",
|
DarkOakStairs => "minecraft:dark_oak_stairs",
|
||||||
|
PaleOakStairs => "minecraft:pale_oak_stairs",
|
||||||
MangroveStairs => "minecraft:mangrove_stairs",
|
MangroveStairs => "minecraft:mangrove_stairs",
|
||||||
BambooStairs => "minecraft:bamboo_stairs",
|
BambooStairs => "minecraft:bamboo_stairs",
|
||||||
BambooMosaicStairs => "minecraft:bamboo_mosaic_stairs",
|
BambooMosaicStairs => "minecraft:bamboo_mosaic_stairs",
|
||||||
|
@ -2561,6 +2635,7 @@ enum Item {
|
||||||
AcaciaButton => "minecraft:acacia_button",
|
AcaciaButton => "minecraft:acacia_button",
|
||||||
CherryButton => "minecraft:cherry_button",
|
CherryButton => "minecraft:cherry_button",
|
||||||
DarkOakButton => "minecraft:dark_oak_button",
|
DarkOakButton => "minecraft:dark_oak_button",
|
||||||
|
PaleOakButton => "minecraft:pale_oak_button",
|
||||||
MangroveButton => "minecraft:mangrove_button",
|
MangroveButton => "minecraft:mangrove_button",
|
||||||
BambooButton => "minecraft:bamboo_button",
|
BambooButton => "minecraft:bamboo_button",
|
||||||
CrimsonButton => "minecraft:crimson_button",
|
CrimsonButton => "minecraft:crimson_button",
|
||||||
|
@ -2576,6 +2651,7 @@ enum Item {
|
||||||
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
||||||
CherryPressurePlate => "minecraft:cherry_pressure_plate",
|
CherryPressurePlate => "minecraft:cherry_pressure_plate",
|
||||||
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
||||||
|
PaleOakPressurePlate => "minecraft:pale_oak_pressure_plate",
|
||||||
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
||||||
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
||||||
CrimsonPressurePlate => "minecraft:crimson_pressure_plate",
|
CrimsonPressurePlate => "minecraft:crimson_pressure_plate",
|
||||||
|
@ -2588,6 +2664,7 @@ enum Item {
|
||||||
AcaciaDoor => "minecraft:acacia_door",
|
AcaciaDoor => "minecraft:acacia_door",
|
||||||
CherryDoor => "minecraft:cherry_door",
|
CherryDoor => "minecraft:cherry_door",
|
||||||
DarkOakDoor => "minecraft:dark_oak_door",
|
DarkOakDoor => "minecraft:dark_oak_door",
|
||||||
|
PaleOakDoor => "minecraft:pale_oak_door",
|
||||||
MangroveDoor => "minecraft:mangrove_door",
|
MangroveDoor => "minecraft:mangrove_door",
|
||||||
BambooDoor => "minecraft:bamboo_door",
|
BambooDoor => "minecraft:bamboo_door",
|
||||||
CrimsonDoor => "minecraft:crimson_door",
|
CrimsonDoor => "minecraft:crimson_door",
|
||||||
|
@ -2608,6 +2685,7 @@ enum Item {
|
||||||
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
||||||
CherryTrapdoor => "minecraft:cherry_trapdoor",
|
CherryTrapdoor => "minecraft:cherry_trapdoor",
|
||||||
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
||||||
|
PaleOakTrapdoor => "minecraft:pale_oak_trapdoor",
|
||||||
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
||||||
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
||||||
CrimsonTrapdoor => "minecraft:crimson_trapdoor",
|
CrimsonTrapdoor => "minecraft:crimson_trapdoor",
|
||||||
|
@ -2627,6 +2705,7 @@ enum Item {
|
||||||
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
||||||
CherryFenceGate => "minecraft:cherry_fence_gate",
|
CherryFenceGate => "minecraft:cherry_fence_gate",
|
||||||
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
||||||
|
PaleOakFenceGate => "minecraft:pale_oak_fence_gate",
|
||||||
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
||||||
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
||||||
CrimsonFenceGate => "minecraft:crimson_fence_gate",
|
CrimsonFenceGate => "minecraft:crimson_fence_gate",
|
||||||
|
@ -2643,6 +2722,7 @@ enum Item {
|
||||||
HopperMinecart => "minecraft:hopper_minecart",
|
HopperMinecart => "minecraft:hopper_minecart",
|
||||||
CarrotOnAStick => "minecraft:carrot_on_a_stick",
|
CarrotOnAStick => "minecraft:carrot_on_a_stick",
|
||||||
WarpedFungusOnAStick => "minecraft:warped_fungus_on_a_stick",
|
WarpedFungusOnAStick => "minecraft:warped_fungus_on_a_stick",
|
||||||
|
PhantomMembrane => "minecraft:phantom_membrane",
|
||||||
Elytra => "minecraft:elytra",
|
Elytra => "minecraft:elytra",
|
||||||
OakBoat => "minecraft:oak_boat",
|
OakBoat => "minecraft:oak_boat",
|
||||||
OakChestBoat => "minecraft:oak_chest_boat",
|
OakChestBoat => "minecraft:oak_chest_boat",
|
||||||
|
@ -2658,6 +2738,8 @@ enum Item {
|
||||||
CherryChestBoat => "minecraft:cherry_chest_boat",
|
CherryChestBoat => "minecraft:cherry_chest_boat",
|
||||||
DarkOakBoat => "minecraft:dark_oak_boat",
|
DarkOakBoat => "minecraft:dark_oak_boat",
|
||||||
DarkOakChestBoat => "minecraft:dark_oak_chest_boat",
|
DarkOakChestBoat => "minecraft:dark_oak_chest_boat",
|
||||||
|
PaleOakBoat => "minecraft:pale_oak_boat",
|
||||||
|
PaleOakChestBoat => "minecraft:pale_oak_chest_boat",
|
||||||
MangroveBoat => "minecraft:mangrove_boat",
|
MangroveBoat => "minecraft:mangrove_boat",
|
||||||
MangroveChestBoat => "minecraft:mangrove_chest_boat",
|
MangroveChestBoat => "minecraft:mangrove_chest_boat",
|
||||||
BambooRaft => "minecraft:bamboo_raft",
|
BambooRaft => "minecraft:bamboo_raft",
|
||||||
|
@ -2763,6 +2845,7 @@ enum Item {
|
||||||
AcaciaSign => "minecraft:acacia_sign",
|
AcaciaSign => "minecraft:acacia_sign",
|
||||||
CherrySign => "minecraft:cherry_sign",
|
CherrySign => "minecraft:cherry_sign",
|
||||||
DarkOakSign => "minecraft:dark_oak_sign",
|
DarkOakSign => "minecraft:dark_oak_sign",
|
||||||
|
PaleOakSign => "minecraft:pale_oak_sign",
|
||||||
MangroveSign => "minecraft:mangrove_sign",
|
MangroveSign => "minecraft:mangrove_sign",
|
||||||
BambooSign => "minecraft:bamboo_sign",
|
BambooSign => "minecraft:bamboo_sign",
|
||||||
CrimsonSign => "minecraft:crimson_sign",
|
CrimsonSign => "minecraft:crimson_sign",
|
||||||
|
@ -2774,6 +2857,7 @@ enum Item {
|
||||||
AcaciaHangingSign => "minecraft:acacia_hanging_sign",
|
AcaciaHangingSign => "minecraft:acacia_hanging_sign",
|
||||||
CherryHangingSign => "minecraft:cherry_hanging_sign",
|
CherryHangingSign => "minecraft:cherry_hanging_sign",
|
||||||
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
||||||
|
PaleOakHangingSign => "minecraft:pale_oak_hanging_sign",
|
||||||
MangroveHangingSign => "minecraft:mangrove_hanging_sign",
|
MangroveHangingSign => "minecraft:mangrove_hanging_sign",
|
||||||
BambooHangingSign => "minecraft:bamboo_hanging_sign",
|
BambooHangingSign => "minecraft:bamboo_hanging_sign",
|
||||||
CrimsonHangingSign => "minecraft:crimson_hanging_sign",
|
CrimsonHangingSign => "minecraft:crimson_hanging_sign",
|
||||||
|
@ -2801,6 +2885,22 @@ enum Item {
|
||||||
Compass => "minecraft:compass",
|
Compass => "minecraft:compass",
|
||||||
RecoveryCompass => "minecraft:recovery_compass",
|
RecoveryCompass => "minecraft:recovery_compass",
|
||||||
Bundle => "minecraft:bundle",
|
Bundle => "minecraft:bundle",
|
||||||
|
WhiteBundle => "minecraft:white_bundle",
|
||||||
|
OrangeBundle => "minecraft:orange_bundle",
|
||||||
|
MagentaBundle => "minecraft:magenta_bundle",
|
||||||
|
LightBlueBundle => "minecraft:light_blue_bundle",
|
||||||
|
YellowBundle => "minecraft:yellow_bundle",
|
||||||
|
LimeBundle => "minecraft:lime_bundle",
|
||||||
|
PinkBundle => "minecraft:pink_bundle",
|
||||||
|
GrayBundle => "minecraft:gray_bundle",
|
||||||
|
LightGrayBundle => "minecraft:light_gray_bundle",
|
||||||
|
CyanBundle => "minecraft:cyan_bundle",
|
||||||
|
PurpleBundle => "minecraft:purple_bundle",
|
||||||
|
BlueBundle => "minecraft:blue_bundle",
|
||||||
|
BrownBundle => "minecraft:brown_bundle",
|
||||||
|
GreenBundle => "minecraft:green_bundle",
|
||||||
|
RedBundle => "minecraft:red_bundle",
|
||||||
|
BlackBundle => "minecraft:black_bundle",
|
||||||
FishingRod => "minecraft:fishing_rod",
|
FishingRod => "minecraft:fishing_rod",
|
||||||
Clock => "minecraft:clock",
|
Clock => "minecraft:clock",
|
||||||
Spyglass => "minecraft:spyglass",
|
Spyglass => "minecraft:spyglass",
|
||||||
|
@ -2868,8 +2968,8 @@ enum Item {
|
||||||
GhastTear => "minecraft:ghast_tear",
|
GhastTear => "minecraft:ghast_tear",
|
||||||
GoldNugget => "minecraft:gold_nugget",
|
GoldNugget => "minecraft:gold_nugget",
|
||||||
NetherWart => "minecraft:nether_wart",
|
NetherWart => "minecraft:nether_wart",
|
||||||
Potion => "minecraft:potion",
|
|
||||||
GlassBottle => "minecraft:glass_bottle",
|
GlassBottle => "minecraft:glass_bottle",
|
||||||
|
Potion => "minecraft:potion",
|
||||||
SpiderEye => "minecraft:spider_eye",
|
SpiderEye => "minecraft:spider_eye",
|
||||||
FermentedSpiderEye => "minecraft:fermented_spider_eye",
|
FermentedSpiderEye => "minecraft:fermented_spider_eye",
|
||||||
BlazePowder => "minecraft:blaze_powder",
|
BlazePowder => "minecraft:blaze_powder",
|
||||||
|
@ -2954,6 +3054,7 @@ enum Item {
|
||||||
WitherSkeletonSpawnEgg => "minecraft:wither_skeleton_spawn_egg",
|
WitherSkeletonSpawnEgg => "minecraft:wither_skeleton_spawn_egg",
|
||||||
WolfSpawnEgg => "minecraft:wolf_spawn_egg",
|
WolfSpawnEgg => "minecraft:wolf_spawn_egg",
|
||||||
ZoglinSpawnEgg => "minecraft:zoglin_spawn_egg",
|
ZoglinSpawnEgg => "minecraft:zoglin_spawn_egg",
|
||||||
|
CreakingSpawnEgg => "minecraft:creaking_spawn_egg",
|
||||||
ZombieSpawnEgg => "minecraft:zombie_spawn_egg",
|
ZombieSpawnEgg => "minecraft:zombie_spawn_egg",
|
||||||
ZombieHorseSpawnEgg => "minecraft:zombie_horse_spawn_egg",
|
ZombieHorseSpawnEgg => "minecraft:zombie_horse_spawn_egg",
|
||||||
ZombieVillagerSpawnEgg => "minecraft:zombie_villager_spawn_egg",
|
ZombieVillagerSpawnEgg => "minecraft:zombie_villager_spawn_egg",
|
||||||
|
@ -2963,6 +3064,7 @@ enum Item {
|
||||||
WindCharge => "minecraft:wind_charge",
|
WindCharge => "minecraft:wind_charge",
|
||||||
WritableBook => "minecraft:writable_book",
|
WritableBook => "minecraft:writable_book",
|
||||||
WrittenBook => "minecraft:written_book",
|
WrittenBook => "minecraft:written_book",
|
||||||
|
BreezeRod => "minecraft:breeze_rod",
|
||||||
Mace => "minecraft:mace",
|
Mace => "minecraft:mace",
|
||||||
ItemFrame => "minecraft:item_frame",
|
ItemFrame => "minecraft:item_frame",
|
||||||
GlowItemFrame => "minecraft:glow_item_frame",
|
GlowItemFrame => "minecraft:glow_item_frame",
|
||||||
|
@ -3059,7 +3161,6 @@ enum Item {
|
||||||
MusicDiscPrecipice => "minecraft:music_disc_precipice",
|
MusicDiscPrecipice => "minecraft:music_disc_precipice",
|
||||||
DiscFragment5 => "minecraft:disc_fragment_5",
|
DiscFragment5 => "minecraft:disc_fragment_5",
|
||||||
Trident => "minecraft:trident",
|
Trident => "minecraft:trident",
|
||||||
PhantomMembrane => "minecraft:phantom_membrane",
|
|
||||||
NautilusShell => "minecraft:nautilus_shell",
|
NautilusShell => "minecraft:nautilus_shell",
|
||||||
HeartOfTheSea => "minecraft:heart_of_the_sea",
|
HeartOfTheSea => "minecraft:heart_of_the_sea",
|
||||||
Crossbow => "minecraft:crossbow",
|
Crossbow => "minecraft:crossbow",
|
||||||
|
@ -3073,6 +3174,8 @@ enum Item {
|
||||||
PiglinBannerPattern => "minecraft:piglin_banner_pattern",
|
PiglinBannerPattern => "minecraft:piglin_banner_pattern",
|
||||||
FlowBannerPattern => "minecraft:flow_banner_pattern",
|
FlowBannerPattern => "minecraft:flow_banner_pattern",
|
||||||
GusterBannerPattern => "minecraft:guster_banner_pattern",
|
GusterBannerPattern => "minecraft:guster_banner_pattern",
|
||||||
|
FieldMasonedBannerPattern => "minecraft:field_masoned_banner_pattern",
|
||||||
|
BordureIndentedBannerPattern => "minecraft:bordure_indented_banner_pattern",
|
||||||
GoatHorn => "minecraft:goat_horn",
|
GoatHorn => "minecraft:goat_horn",
|
||||||
Composter => "minecraft:composter",
|
Composter => "minecraft:composter",
|
||||||
Barrel => "minecraft:barrel",
|
Barrel => "minecraft:barrel",
|
||||||
|
@ -3202,7 +3305,6 @@ enum Item {
|
||||||
OminousTrialKey => "minecraft:ominous_trial_key",
|
OminousTrialKey => "minecraft:ominous_trial_key",
|
||||||
Vault => "minecraft:vault",
|
Vault => "minecraft:vault",
|
||||||
OminousBottle => "minecraft:ominous_bottle",
|
OminousBottle => "minecraft:ominous_bottle",
|
||||||
BreezeRod => "minecraft:breeze_rod",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3580,6 +3682,7 @@ enum ParticleKind {
|
||||||
InstantEffect => "minecraft:instant_effect",
|
InstantEffect => "minecraft:instant_effect",
|
||||||
Item => "minecraft:item",
|
Item => "minecraft:item",
|
||||||
Vibration => "minecraft:vibration",
|
Vibration => "minecraft:vibration",
|
||||||
|
Trail => "minecraft:trail",
|
||||||
ItemSlime => "minecraft:item_slime",
|
ItemSlime => "minecraft:item_slime",
|
||||||
ItemCobweb => "minecraft:item_cobweb",
|
ItemCobweb => "minecraft:item_cobweb",
|
||||||
ItemSnowball => "minecraft:item_snowball",
|
ItemSnowball => "minecraft:item_snowball",
|
||||||
|
@ -3643,6 +3746,7 @@ enum ParticleKind {
|
||||||
OminousSpawning => "minecraft:ominous_spawning",
|
OminousSpawning => "minecraft:ominous_spawning",
|
||||||
RaidOmen => "minecraft:raid_omen",
|
RaidOmen => "minecraft:raid_omen",
|
||||||
TrialOmen => "minecraft:trial_omen",
|
TrialOmen => "minecraft:trial_omen",
|
||||||
|
BlockCrumble => "minecraft:block_crumble",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3751,8 +3855,7 @@ enum RecipeSerializer {
|
||||||
CraftingSpecialTippedarrow => "minecraft:crafting_special_tippedarrow",
|
CraftingSpecialTippedarrow => "minecraft:crafting_special_tippedarrow",
|
||||||
CraftingSpecialBannerduplicate => "minecraft:crafting_special_bannerduplicate",
|
CraftingSpecialBannerduplicate => "minecraft:crafting_special_bannerduplicate",
|
||||||
CraftingSpecialShielddecoration => "minecraft:crafting_special_shielddecoration",
|
CraftingSpecialShielddecoration => "minecraft:crafting_special_shielddecoration",
|
||||||
CraftingSpecialShulkerboxcoloring => "minecraft:crafting_special_shulkerboxcoloring",
|
CraftingTransmute => "minecraft:crafting_transmute",
|
||||||
CraftingSpecialSuspiciousstew => "minecraft:crafting_special_suspiciousstew",
|
|
||||||
CraftingSpecialRepairitem => "minecraft:crafting_special_repairitem",
|
CraftingSpecialRepairitem => "minecraft:crafting_special_repairitem",
|
||||||
Smelting => "minecraft:smelting",
|
Smelting => "minecraft:smelting",
|
||||||
Blasting => "minecraft:blasting",
|
Blasting => "minecraft:blasting",
|
||||||
|
@ -4040,6 +4143,7 @@ enum SoundEvent {
|
||||||
BlockBubbleColumnUpwardsInside => "minecraft:block.bubble_column.upwards_inside",
|
BlockBubbleColumnUpwardsInside => "minecraft:block.bubble_column.upwards_inside",
|
||||||
BlockBubbleColumnWhirlpoolAmbient => "minecraft:block.bubble_column.whirlpool_ambient",
|
BlockBubbleColumnWhirlpoolAmbient => "minecraft:block.bubble_column.whirlpool_ambient",
|
||||||
BlockBubbleColumnWhirlpoolInside => "minecraft:block.bubble_column.whirlpool_inside",
|
BlockBubbleColumnWhirlpoolInside => "minecraft:block.bubble_column.whirlpool_inside",
|
||||||
|
UiHudBubblePop => "minecraft:ui.hud.bubble_pop",
|
||||||
ItemBucketEmpty => "minecraft:item.bucket.empty",
|
ItemBucketEmpty => "minecraft:item.bucket.empty",
|
||||||
ItemBucketEmptyAxolotl => "minecraft:item.bucket.empty_axolotl",
|
ItemBucketEmptyAxolotl => "minecraft:item.bucket.empty_axolotl",
|
||||||
ItemBucketEmptyFish => "minecraft:item.bucket.empty_fish",
|
ItemBucketEmptyFish => "minecraft:item.bucket.empty_fish",
|
||||||
|
@ -4054,6 +4158,7 @@ enum SoundEvent {
|
||||||
ItemBucketFillTadpole => "minecraft:item.bucket.fill_tadpole",
|
ItemBucketFillTadpole => "minecraft:item.bucket.fill_tadpole",
|
||||||
ItemBundleDropContents => "minecraft:item.bundle.drop_contents",
|
ItemBundleDropContents => "minecraft:item.bundle.drop_contents",
|
||||||
ItemBundleInsert => "minecraft:item.bundle.insert",
|
ItemBundleInsert => "minecraft:item.bundle.insert",
|
||||||
|
ItemBundleInsertFail => "minecraft:item.bundle.insert_fail",
|
||||||
ItemBundleRemoveOne => "minecraft:item.bundle.remove_one",
|
ItemBundleRemoveOne => "minecraft:item.bundle.remove_one",
|
||||||
BlockCakeAddCandle => "minecraft:block.cake.add_candle",
|
BlockCakeAddCandle => "minecraft:block.cake.add_candle",
|
||||||
BlockCalciteBreak => "minecraft:block.calcite.break",
|
BlockCalciteBreak => "minecraft:block.calcite.break",
|
||||||
|
@ -4202,6 +4307,24 @@ enum SoundEvent {
|
||||||
EntityCowStep => "minecraft:entity.cow.step",
|
EntityCowStep => "minecraft:entity.cow.step",
|
||||||
BlockCrafterCraft => "minecraft:block.crafter.craft",
|
BlockCrafterCraft => "minecraft:block.crafter.craft",
|
||||||
BlockCrafterFail => "minecraft:block.crafter.fail",
|
BlockCrafterFail => "minecraft:block.crafter.fail",
|
||||||
|
EntityCreakingAmbient => "minecraft:entity.creaking.ambient",
|
||||||
|
EntityCreakingActivate => "minecraft:entity.creaking.activate",
|
||||||
|
EntityCreakingDeactivate => "minecraft:entity.creaking.deactivate",
|
||||||
|
EntityCreakingAttack => "minecraft:entity.creaking.attack",
|
||||||
|
EntityCreakingDeath => "minecraft:entity.creaking.death",
|
||||||
|
EntityCreakingStep => "minecraft:entity.creaking.step",
|
||||||
|
EntityCreakingFreeze => "minecraft:entity.creaking.freeze",
|
||||||
|
EntityCreakingUnfreeze => "minecraft:entity.creaking.unfreeze",
|
||||||
|
EntityCreakingSpawn => "minecraft:entity.creaking.spawn",
|
||||||
|
EntityCreakingSway => "minecraft:entity.creaking.sway",
|
||||||
|
BlockCreakingHeartBreak => "minecraft:block.creaking_heart.break",
|
||||||
|
BlockCreakingHeartFall => "minecraft:block.creaking_heart.fall",
|
||||||
|
BlockCreakingHeartHit => "minecraft:block.creaking_heart.hit",
|
||||||
|
BlockCreakingHeartHurt => "minecraft:block.creaking_heart.hurt",
|
||||||
|
BlockCreakingHeartPlace => "minecraft:block.creaking_heart.place",
|
||||||
|
BlockCreakingHeartStep => "minecraft:block.creaking_heart.step",
|
||||||
|
BlockCreakingHeartIdle => "minecraft:block.creaking_heart.idle",
|
||||||
|
BlockCreakingHeartSpawn => "minecraft:block.creaking_heart.spawn",
|
||||||
EntityCreeperDeath => "minecraft:entity.creeper.death",
|
EntityCreeperDeath => "minecraft:entity.creeper.death",
|
||||||
EntityCreeperHurt => "minecraft:entity.creeper.hurt",
|
EntityCreeperHurt => "minecraft:entity.creeper.hurt",
|
||||||
EntityCreeperPrimed => "minecraft:entity.creeper.primed",
|
EntityCreeperPrimed => "minecraft:entity.creeper.primed",
|
||||||
|
@ -4447,7 +4570,6 @@ enum SoundEvent {
|
||||||
EntityGoatPrepareRam => "minecraft:entity.goat.prepare_ram",
|
EntityGoatPrepareRam => "minecraft:entity.goat.prepare_ram",
|
||||||
EntityGoatRamImpact => "minecraft:entity.goat.ram_impact",
|
EntityGoatRamImpact => "minecraft:entity.goat.ram_impact",
|
||||||
EntityGoatHornBreak => "minecraft:entity.goat.horn_break",
|
EntityGoatHornBreak => "minecraft:entity.goat.horn_break",
|
||||||
ItemGoatHornPlay => "minecraft:item.goat_horn.play",
|
|
||||||
EntityGoatScreamingAmbient => "minecraft:entity.goat.screaming.ambient",
|
EntityGoatScreamingAmbient => "minecraft:entity.goat.screaming.ambient",
|
||||||
EntityGoatScreamingDeath => "minecraft:entity.goat.screaming.death",
|
EntityGoatScreamingDeath => "minecraft:entity.goat.screaming.death",
|
||||||
EntityGoatScreamingEat => "minecraft:entity.goat.screaming.eat",
|
EntityGoatScreamingEat => "minecraft:entity.goat.screaming.eat",
|
||||||
|
@ -4456,7 +4578,6 @@ enum SoundEvent {
|
||||||
EntityGoatScreamingMilk => "minecraft:entity.goat.screaming.milk",
|
EntityGoatScreamingMilk => "minecraft:entity.goat.screaming.milk",
|
||||||
EntityGoatScreamingPrepareRam => "minecraft:entity.goat.screaming.prepare_ram",
|
EntityGoatScreamingPrepareRam => "minecraft:entity.goat.screaming.prepare_ram",
|
||||||
EntityGoatScreamingRamImpact => "minecraft:entity.goat.screaming.ram_impact",
|
EntityGoatScreamingRamImpact => "minecraft:entity.goat.screaming.ram_impact",
|
||||||
EntityGoatScreamingHornBreak => "minecraft:entity.goat.screaming.horn_break",
|
|
||||||
EntityGoatStep => "minecraft:entity.goat.step",
|
EntityGoatStep => "minecraft:entity.goat.step",
|
||||||
BlockGrassBreak => "minecraft:block.grass.break",
|
BlockGrassBreak => "minecraft:block.grass.break",
|
||||||
BlockGrassFall => "minecraft:block.grass.fall",
|
BlockGrassFall => "minecraft:block.grass.fall",
|
||||||
|
@ -4844,6 +4965,7 @@ enum SoundEvent {
|
||||||
ItemOminousBottleDispose => "minecraft:item.ominous_bottle.dispose",
|
ItemOminousBottleDispose => "minecraft:item.ominous_bottle.dispose",
|
||||||
EntityPaintingBreak => "minecraft:entity.painting.break",
|
EntityPaintingBreak => "minecraft:entity.painting.break",
|
||||||
EntityPaintingPlace => "minecraft:entity.painting.place",
|
EntityPaintingPlace => "minecraft:entity.painting.place",
|
||||||
|
BlockPaleHangingMossIdle => "minecraft:block.pale_hanging_moss.idle",
|
||||||
EntityPandaPreSneeze => "minecraft:entity.panda.pre_sneeze",
|
EntityPandaPreSneeze => "minecraft:entity.panda.pre_sneeze",
|
||||||
EntityPandaSneeze => "minecraft:entity.panda.sneeze",
|
EntityPandaSneeze => "minecraft:entity.panda.sneeze",
|
||||||
EntityPandaAmbient => "minecraft:entity.panda.ambient",
|
EntityPandaAmbient => "minecraft:entity.panda.ambient",
|
||||||
|
@ -4863,6 +4985,7 @@ enum SoundEvent {
|
||||||
EntityParrotImitateBlaze => "minecraft:entity.parrot.imitate.blaze",
|
EntityParrotImitateBlaze => "minecraft:entity.parrot.imitate.blaze",
|
||||||
EntityParrotImitateBogged => "minecraft:entity.parrot.imitate.bogged",
|
EntityParrotImitateBogged => "minecraft:entity.parrot.imitate.bogged",
|
||||||
EntityParrotImitateBreeze => "minecraft:entity.parrot.imitate.breeze",
|
EntityParrotImitateBreeze => "minecraft:entity.parrot.imitate.breeze",
|
||||||
|
EntityParrotImitateCreaking => "minecraft:entity.parrot.imitate.creaking",
|
||||||
EntityParrotImitateCreeper => "minecraft:entity.parrot.imitate.creeper",
|
EntityParrotImitateCreeper => "minecraft:entity.parrot.imitate.creeper",
|
||||||
EntityParrotImitateDrowned => "minecraft:entity.parrot.imitate.drowned",
|
EntityParrotImitateDrowned => "minecraft:entity.parrot.imitate.drowned",
|
||||||
EntityParrotImitateElderGuardian => "minecraft:entity.parrot.imitate.elder_guardian",
|
EntityParrotImitateElderGuardian => "minecraft:entity.parrot.imitate.elder_guardian",
|
||||||
|
@ -5127,6 +5250,11 @@ enum SoundEvent {
|
||||||
BlockSoulSoilHit => "minecraft:block.soul_soil.hit",
|
BlockSoulSoilHit => "minecraft:block.soul_soil.hit",
|
||||||
BlockSoulSoilFall => "minecraft:block.soul_soil.fall",
|
BlockSoulSoilFall => "minecraft:block.soul_soil.fall",
|
||||||
ParticleSoulEscape => "minecraft:particle.soul_escape",
|
ParticleSoulEscape => "minecraft:particle.soul_escape",
|
||||||
|
BlockSpawnerBreak => "minecraft:block.spawner.break",
|
||||||
|
BlockSpawnerFall => "minecraft:block.spawner.fall",
|
||||||
|
BlockSpawnerHit => "minecraft:block.spawner.hit",
|
||||||
|
BlockSpawnerPlace => "minecraft:block.spawner.place",
|
||||||
|
BlockSpawnerStep => "minecraft:block.spawner.step",
|
||||||
BlockSporeBlossomBreak => "minecraft:block.spore_blossom.break",
|
BlockSporeBlossomBreak => "minecraft:block.spore_blossom.break",
|
||||||
BlockSporeBlossomFall => "minecraft:block.spore_blossom.fall",
|
BlockSporeBlossomFall => "minecraft:block.spore_blossom.fall",
|
||||||
BlockSporeBlossomHit => "minecraft:block.spore_blossom.hit",
|
BlockSporeBlossomHit => "minecraft:block.spore_blossom.hit",
|
||||||
|
@ -5695,7 +5823,6 @@ enum WorldgenPlacementModifierKind {
|
||||||
HeightRange => "minecraft:height_range",
|
HeightRange => "minecraft:height_range",
|
||||||
InSquare => "minecraft:in_square",
|
InSquare => "minecraft:in_square",
|
||||||
RandomOffset => "minecraft:random_offset",
|
RandomOffset => "minecraft:random_offset",
|
||||||
CarvingMask => "minecraft:carving_mask",
|
|
||||||
FixedPlacement => "minecraft:fixed_placement",
|
FixedPlacement => "minecraft:fixed_placement",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5825,6 +5952,8 @@ registry! {
|
||||||
enum WorldgenTreeDecoratorKind {
|
enum WorldgenTreeDecoratorKind {
|
||||||
TrunkVine => "minecraft:trunk_vine",
|
TrunkVine => "minecraft:trunk_vine",
|
||||||
LeaveVine => "minecraft:leave_vine",
|
LeaveVine => "minecraft:leave_vine",
|
||||||
|
PaleMoss => "minecraft:pale_moss",
|
||||||
|
CreakingHeart => "minecraft:creaking_heart",
|
||||||
Cocoa => "minecraft:cocoa",
|
Cocoa => "minecraft:cocoa",
|
||||||
Beehive => "minecraft:beehive",
|
Beehive => "minecraft:beehive",
|
||||||
AlterGround => "minecraft:alter_ground",
|
AlterGround => "minecraft:alter_ground",
|
||||||
|
@ -5973,7 +6102,6 @@ enum BlockKind {
|
||||||
Carpet => "minecraft:carpet",
|
Carpet => "minecraft:carpet",
|
||||||
Carrot => "minecraft:carrot",
|
Carrot => "minecraft:carrot",
|
||||||
CartographyTable => "minecraft:cartography_table",
|
CartographyTable => "minecraft:cartography_table",
|
||||||
CarvedPumpkin => "minecraft:carved_pumpkin",
|
|
||||||
Cauldron => "minecraft:cauldron",
|
Cauldron => "minecraft:cauldron",
|
||||||
CaveVines => "minecraft:cave_vines",
|
CaveVines => "minecraft:cave_vines",
|
||||||
CaveVinesPlant => "minecraft:cave_vines_plant",
|
CaveVinesPlant => "minecraft:cave_vines_plant",
|
||||||
|
@ -6018,6 +6146,7 @@ enum BlockKind {
|
||||||
EndPortalFrame => "minecraft:end_portal_frame",
|
EndPortalFrame => "minecraft:end_portal_frame",
|
||||||
EndRod => "minecraft:end_rod",
|
EndRod => "minecraft:end_rod",
|
||||||
Farm => "minecraft:farm",
|
Farm => "minecraft:farm",
|
||||||
|
BonemealableFeaturePlacer => "minecraft:bonemealable_feature_placer",
|
||||||
Fence => "minecraft:fence",
|
Fence => "minecraft:fence",
|
||||||
FenceGate => "minecraft:fence_gate",
|
FenceGate => "minecraft:fence_gate",
|
||||||
Fire => "minecraft:fire",
|
Fire => "minecraft:fire",
|
||||||
|
@ -6033,6 +6162,7 @@ enum BlockKind {
|
||||||
Grass => "minecraft:grass",
|
Grass => "minecraft:grass",
|
||||||
Grindstone => "minecraft:grindstone",
|
Grindstone => "minecraft:grindstone",
|
||||||
HalfTransparent => "minecraft:half_transparent",
|
HalfTransparent => "minecraft:half_transparent",
|
||||||
|
HangingMoss => "minecraft:hanging_moss",
|
||||||
HangingRoots => "minecraft:hanging_roots",
|
HangingRoots => "minecraft:hanging_roots",
|
||||||
Hay => "minecraft:hay",
|
Hay => "minecraft:hay",
|
||||||
HeavyCore => "minecraft:heavy_core",
|
HeavyCore => "minecraft:heavy_core",
|
||||||
|
@ -6063,7 +6193,7 @@ enum BlockKind {
|
||||||
MangroveLeaves => "minecraft:mangrove_leaves",
|
MangroveLeaves => "minecraft:mangrove_leaves",
|
||||||
MangrovePropagule => "minecraft:mangrove_propagule",
|
MangrovePropagule => "minecraft:mangrove_propagule",
|
||||||
MangroveRoots => "minecraft:mangrove_roots",
|
MangroveRoots => "minecraft:mangrove_roots",
|
||||||
Moss => "minecraft:moss",
|
MossyCarpet => "minecraft:mossy_carpet",
|
||||||
MovingPiston => "minecraft:moving_piston",
|
MovingPiston => "minecraft:moving_piston",
|
||||||
Mud => "minecraft:mud",
|
Mud => "minecraft:mud",
|
||||||
Mushroom => "minecraft:mushroom",
|
Mushroom => "minecraft:mushroom",
|
||||||
|
@ -6122,6 +6252,7 @@ enum BlockKind {
|
||||||
SoulFire => "minecraft:soul_fire",
|
SoulFire => "minecraft:soul_fire",
|
||||||
SoulSand => "minecraft:soul_sand",
|
SoulSand => "minecraft:soul_sand",
|
||||||
Spawner => "minecraft:spawner",
|
Spawner => "minecraft:spawner",
|
||||||
|
CreakingHeart => "minecraft:creaking_heart",
|
||||||
Sponge => "minecraft:sponge",
|
Sponge => "minecraft:sponge",
|
||||||
SporeBlossom => "minecraft:spore_blossom",
|
SporeBlossom => "minecraft:spore_blossom",
|
||||||
StainedGlassPane => "minecraft:stained_glass_pane",
|
StainedGlassPane => "minecraft:stained_glass_pane",
|
||||||
|
@ -6222,7 +6353,7 @@ enum TriggerKind {
|
||||||
FishingRodHooked => "minecraft:fishing_rod_hooked",
|
FishingRodHooked => "minecraft:fishing_rod_hooked",
|
||||||
ChanneledLightning => "minecraft:channeled_lightning",
|
ChanneledLightning => "minecraft:channeled_lightning",
|
||||||
ShotCrossbow => "minecraft:shot_crossbow",
|
ShotCrossbow => "minecraft:shot_crossbow",
|
||||||
KilledByCrossbow => "minecraft:killed_by_crossbow",
|
KilledByArrow => "minecraft:killed_by_arrow",
|
||||||
HeroOfTheVillage => "minecraft:hero_of_the_village",
|
HeroOfTheVillage => "minecraft:hero_of_the_village",
|
||||||
VoluntaryExile => "minecraft:voluntary_exile",
|
VoluntaryExile => "minecraft:voluntary_exile",
|
||||||
SlideDownBlock => "minecraft:slide_down_block",
|
SlideDownBlock => "minecraft:slide_down_block",
|
||||||
|
@ -6279,6 +6410,7 @@ enum DataComponentKind {
|
||||||
Unbreakable => "minecraft:unbreakable",
|
Unbreakable => "minecraft:unbreakable",
|
||||||
CustomName => "minecraft:custom_name",
|
CustomName => "minecraft:custom_name",
|
||||||
ItemName => "minecraft:item_name",
|
ItemName => "minecraft:item_name",
|
||||||
|
ItemModel => "minecraft:item_model",
|
||||||
Lore => "minecraft:lore",
|
Lore => "minecraft:lore",
|
||||||
Rarity => "minecraft:rarity",
|
Rarity => "minecraft:rarity",
|
||||||
Enchantments => "minecraft:enchantments",
|
Enchantments => "minecraft:enchantments",
|
||||||
|
@ -6293,8 +6425,17 @@ enum DataComponentKind {
|
||||||
EnchantmentGlintOverride => "minecraft:enchantment_glint_override",
|
EnchantmentGlintOverride => "minecraft:enchantment_glint_override",
|
||||||
IntangibleProjectile => "minecraft:intangible_projectile",
|
IntangibleProjectile => "minecraft:intangible_projectile",
|
||||||
Food => "minecraft:food",
|
Food => "minecraft:food",
|
||||||
FireResistant => "minecraft:fire_resistant",
|
Consumable => "minecraft:consumable",
|
||||||
|
UseRemainder => "minecraft:use_remainder",
|
||||||
|
UseCooldown => "minecraft:use_cooldown",
|
||||||
|
DamageResistant => "minecraft:damage_resistant",
|
||||||
Tool => "minecraft:tool",
|
Tool => "minecraft:tool",
|
||||||
|
Enchantable => "minecraft:enchantable",
|
||||||
|
Equippable => "minecraft:equippable",
|
||||||
|
Repairable => "minecraft:repairable",
|
||||||
|
Glider => "minecraft:glider",
|
||||||
|
TooltipStyle => "minecraft:tooltip_style",
|
||||||
|
DeathProtection => "minecraft:death_protection",
|
||||||
StoredEnchantments => "minecraft:stored_enchantments",
|
StoredEnchantments => "minecraft:stored_enchantments",
|
||||||
DyedColor => "minecraft:dyed_color",
|
DyedColor => "minecraft:dyed_color",
|
||||||
MapColor => "minecraft:map_color",
|
MapColor => "minecraft:map_color",
|
||||||
|
@ -6339,8 +6480,8 @@ enum EntitySubPredicateKind {
|
||||||
Player => "minecraft:player",
|
Player => "minecraft:player",
|
||||||
Slime => "minecraft:slime",
|
Slime => "minecraft:slime",
|
||||||
Raider => "minecraft:raider",
|
Raider => "minecraft:raider",
|
||||||
|
Sheep => "minecraft:sheep",
|
||||||
Axolotl => "minecraft:axolotl",
|
Axolotl => "minecraft:axolotl",
|
||||||
Boat => "minecraft:boat",
|
|
||||||
Fox => "minecraft:fox",
|
Fox => "minecraft:fox",
|
||||||
Mooshroom => "minecraft:mooshroom",
|
Mooshroom => "minecraft:mooshroom",
|
||||||
Rabbit => "minecraft:rabbit",
|
Rabbit => "minecraft:rabbit",
|
||||||
|
@ -6348,6 +6489,7 @@ enum EntitySubPredicateKind {
|
||||||
Llama => "minecraft:llama",
|
Llama => "minecraft:llama",
|
||||||
Villager => "minecraft:villager",
|
Villager => "minecraft:villager",
|
||||||
Parrot => "minecraft:parrot",
|
Parrot => "minecraft:parrot",
|
||||||
|
Salmon => "minecraft:salmon",
|
||||||
TropicalFish => "minecraft:tropical_fish",
|
TropicalFish => "minecraft:tropical_fish",
|
||||||
Painting => "minecraft:painting",
|
Painting => "minecraft:painting",
|
||||||
Cat => "minecraft:cat",
|
Cat => "minecraft:cat",
|
||||||
|
@ -6454,8 +6596,8 @@ registry! {
|
||||||
enum EnchantmentEntityEffectKind {
|
enum EnchantmentEntityEffectKind {
|
||||||
AllOf => "minecraft:all_of",
|
AllOf => "minecraft:all_of",
|
||||||
ApplyMobEffect => "minecraft:apply_mob_effect",
|
ApplyMobEffect => "minecraft:apply_mob_effect",
|
||||||
|
ChangeItemDamage => "minecraft:change_item_damage",
|
||||||
DamageEntity => "minecraft:damage_entity",
|
DamageEntity => "minecraft:damage_entity",
|
||||||
DamageItem => "minecraft:damage_item",
|
|
||||||
Explode => "minecraft:explode",
|
Explode => "minecraft:explode",
|
||||||
Ignite => "minecraft:ignite",
|
Ignite => "minecraft:ignite",
|
||||||
PlaySound => "minecraft:play_sound",
|
PlaySound => "minecraft:play_sound",
|
||||||
|
@ -6483,8 +6625,8 @@ enum EnchantmentLocationBasedEffectKind {
|
||||||
AllOf => "minecraft:all_of",
|
AllOf => "minecraft:all_of",
|
||||||
ApplyMobEffect => "minecraft:apply_mob_effect",
|
ApplyMobEffect => "minecraft:apply_mob_effect",
|
||||||
Attribute => "minecraft:attribute",
|
Attribute => "minecraft:attribute",
|
||||||
|
ChangeItemDamage => "minecraft:change_item_damage",
|
||||||
DamageEntity => "minecraft:damage_entity",
|
DamageEntity => "minecraft:damage_entity",
|
||||||
DamageItem => "minecraft:damage_item",
|
|
||||||
Explode => "minecraft:explode",
|
Explode => "minecraft:explode",
|
||||||
Ignite => "minecraft:ignite",
|
Ignite => "minecraft:ignite",
|
||||||
PlaySound => "minecraft:play_sound",
|
PlaySound => "minecraft:play_sound",
|
||||||
|
@ -6543,3 +6685,54 @@ enum DecoratedPotPattern {
|
||||||
Blank => "minecraft:blank",
|
Blank => "minecraft:blank",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registry! {
|
||||||
|
enum ConsumeEffectKind {
|
||||||
|
ApplyEffects => "minecraft:apply_effects",
|
||||||
|
RemoveEffects => "minecraft:remove_effects",
|
||||||
|
ClearAllEffects => "minecraft:clear_all_effects",
|
||||||
|
TeleportRandomly => "minecraft:teleport_randomly",
|
||||||
|
PlaySound => "minecraft:play_sound",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
registry! {
|
||||||
|
enum RecipeBookCategory {
|
||||||
|
CraftingBuildingBlocks => "minecraft:crafting_building_blocks",
|
||||||
|
CraftingRedstone => "minecraft:crafting_redstone",
|
||||||
|
CraftingEquipment => "minecraft:crafting_equipment",
|
||||||
|
CraftingMisc => "minecraft:crafting_misc",
|
||||||
|
FurnaceFood => "minecraft:furnace_food",
|
||||||
|
FurnaceBlocks => "minecraft:furnace_blocks",
|
||||||
|
FurnaceMisc => "minecraft:furnace_misc",
|
||||||
|
BlastFurnaceBlocks => "minecraft:blast_furnace_blocks",
|
||||||
|
BlastFurnaceMisc => "minecraft:blast_furnace_misc",
|
||||||
|
SmokerFood => "minecraft:smoker_food",
|
||||||
|
Stonecutter => "minecraft:stonecutter",
|
||||||
|
Smithing => "minecraft:smithing",
|
||||||
|
Campfire => "minecraft:campfire",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
registry! {
|
||||||
|
enum RecipeDisplay {
|
||||||
|
CraftingShapeless => "minecraft:crafting_shapeless",
|
||||||
|
CraftingShaped => "minecraft:crafting_shaped",
|
||||||
|
Furnace => "minecraft:furnace",
|
||||||
|
Stonecutter => "minecraft:stonecutter",
|
||||||
|
Smithing => "minecraft:smithing",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
registry! {
|
||||||
|
enum SlotDisplay {
|
||||||
|
Empty => "minecraft:empty",
|
||||||
|
AnyFuel => "minecraft:any_fuel",
|
||||||
|
Item => "minecraft:item",
|
||||||
|
ItemStack => "minecraft:item_stack",
|
||||||
|
Tag => "minecraft:tag",
|
||||||
|
SmithingTrim => "minecraft:smithing_trim",
|
||||||
|
WithRemainder => "minecraft:with_remainder",
|
||||||
|
Composite => "minecraft:composite",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -286,6 +286,16 @@ pub static BASE_STONE_OVERWORLD: Lazy<HashSet<Block>> = Lazy::new(|| {
|
||||||
Block::Deepslate,
|
Block::Deepslate,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static BATS_SPAWNABLE_ON: Lazy<HashSet<Block>> = Lazy::new(|| {
|
||||||
|
HashSet::from_iter(vec![
|
||||||
|
Block::Stone,
|
||||||
|
Block::Granite,
|
||||||
|
Block::Diorite,
|
||||||
|
Block::Andesite,
|
||||||
|
Block::Tuff,
|
||||||
|
Block::Deepslate,
|
||||||
|
])
|
||||||
|
});
|
||||||
pub static BEACON_BASE_BLOCKS: Lazy<HashSet<Block>> = Lazy::new(|| {
|
pub static BEACON_BASE_BLOCKS: Lazy<HashSet<Block>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Block::NetheriteBlock,
|
Block::NetheriteBlock,
|
||||||
|
|
|
@ -188,6 +188,29 @@ pub static BREAKS_DECORATED_POTS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::IronHoe,
|
Item::IronHoe,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static BREWING_FUEL: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::BlazePowder]));
|
||||||
|
pub static BUNDLES: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
|
HashSet::from_iter(vec![
|
||||||
|
Item::Bundle,
|
||||||
|
Item::BlackBundle,
|
||||||
|
Item::BlueBundle,
|
||||||
|
Item::BrownBundle,
|
||||||
|
Item::CyanBundle,
|
||||||
|
Item::GrayBundle,
|
||||||
|
Item::GreenBundle,
|
||||||
|
Item::LightBlueBundle,
|
||||||
|
Item::LightGrayBundle,
|
||||||
|
Item::LimeBundle,
|
||||||
|
Item::MagentaBundle,
|
||||||
|
Item::OrangeBundle,
|
||||||
|
Item::PinkBundle,
|
||||||
|
Item::PurpleBundle,
|
||||||
|
Item::RedBundle,
|
||||||
|
Item::YellowBundle,
|
||||||
|
Item::WhiteBundle,
|
||||||
|
])
|
||||||
|
});
|
||||||
pub static BUTTONS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static BUTTONS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::OakButton,
|
Item::OakButton,
|
||||||
|
@ -472,6 +495,8 @@ pub static DECORATED_POT_SHERDS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
});
|
});
|
||||||
pub static DIAMOND_ORES: Lazy<HashSet<Item>> =
|
pub static DIAMOND_ORES: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::DiamondOre, Item::DeepslateDiamondOre]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::DiamondOre, Item::DeepslateDiamondOre]));
|
||||||
|
pub static DIAMOND_TOOL_MATERIALS: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::Diamond]));
|
||||||
pub static DIRT: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static DIRT: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::Dirt,
|
Item::Dirt,
|
||||||
|
@ -509,6 +534,8 @@ pub static DOORS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::CherryDoor,
|
Item::CherryDoor,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static DUPLICATES_ALLAYS: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::AmethystShard]));
|
||||||
pub static DYEABLE: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static DYEABLE: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::LeatherHelmet,
|
Item::LeatherHelmet,
|
||||||
|
@ -993,6 +1020,10 @@ pub static FREEZE_IMMUNE_WEARABLES: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
pub static FROG_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| HashSet::from_iter(vec![Item::SlimeBall]));
|
pub static FROG_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| HashSet::from_iter(vec![Item::SlimeBall]));
|
||||||
|
pub static FURNACE_MINECART_FUEL: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::Coal, Item::Charcoal]));
|
||||||
|
pub static GAZE_DISGUISE_EQUIPMENT: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::CarvedPumpkin]));
|
||||||
pub static GOAT_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| HashSet::from_iter(vec![Item::Wheat]));
|
pub static GOAT_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| HashSet::from_iter(vec![Item::Wheat]));
|
||||||
pub static GOLD_ORES: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static GOLD_ORES: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
|
@ -1001,6 +1032,8 @@ pub static GOLD_ORES: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::DeepslateGoldOre,
|
Item::DeepslateGoldOre,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static GOLD_TOOL_MATERIALS: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::GoldIngot]));
|
||||||
pub static HANGING_SIGNS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static HANGING_SIGNS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::OakHangingSign,
|
Item::OakHangingSign,
|
||||||
|
@ -1061,6 +1094,8 @@ pub static IGNORED_BY_PIGLIN_BABIES: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::Leather]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::Leather]));
|
||||||
pub static IRON_ORES: Lazy<HashSet<Item>> =
|
pub static IRON_ORES: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::IronOre, Item::DeepslateIronOre]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::IronOre, Item::DeepslateIronOre]));
|
||||||
|
pub static IRON_TOOL_MATERIALS: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::IronIngot]));
|
||||||
pub static JUNGLE_LOGS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static JUNGLE_LOGS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::JungleLog,
|
Item::JungleLog,
|
||||||
|
@ -1189,6 +1224,8 @@ pub static MANGROVE_LOGS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::StrippedMangroveWood,
|
Item::StrippedMangroveWood,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static MAP_INVISIBILITY_EQUIPMENT: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::CarvedPumpkin]));
|
||||||
pub static MEAT: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static MEAT: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::Beef,
|
Item::Beef,
|
||||||
|
@ -1204,6 +1241,8 @@ pub static MEAT: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::RottenFlesh,
|
Item::RottenFlesh,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static NETHERITE_TOOL_MATERIALS: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::NetheriteIngot]));
|
||||||
pub static NON_FLAMMABLE_WOOD: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static NON_FLAMMABLE_WOOD: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::WarpedStem,
|
Item::WarpedStem,
|
||||||
|
@ -1259,6 +1298,8 @@ pub static OAK_LOGS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
});
|
});
|
||||||
pub static OCELOT_FOOD: Lazy<HashSet<Item>> =
|
pub static OCELOT_FOOD: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::Cod, Item::Salmon]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::Cod, Item::Salmon]));
|
||||||
|
pub static PANDA_EATS_FROM_GROUND: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::Cake, Item::Bamboo]));
|
||||||
pub static PANDA_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| HashSet::from_iter(vec![Item::Bamboo]));
|
pub static PANDA_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| HashSet::from_iter(vec![Item::Bamboo]));
|
||||||
pub static PARROT_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static PARROT_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
|
@ -1317,6 +1358,14 @@ pub static PIGLIN_LOVED: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
});
|
});
|
||||||
pub static PIGLIN_REPELLENTS: Lazy<HashSet<Item>> =
|
pub static PIGLIN_REPELLENTS: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::SoulTorch, Item::SoulLantern, Item::SoulCampfire]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::SoulTorch, Item::SoulLantern, Item::SoulCampfire]));
|
||||||
|
pub static PIGLIN_SAFE_ARMOR: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
|
HashSet::from_iter(vec![
|
||||||
|
Item::GoldenHelmet,
|
||||||
|
Item::GoldenChestplate,
|
||||||
|
Item::GoldenLeggings,
|
||||||
|
Item::GoldenBoots,
|
||||||
|
])
|
||||||
|
});
|
||||||
pub static PLANKS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static PLANKS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::OakPlanks,
|
Item::OakPlanks,
|
||||||
|
@ -1344,6 +1393,22 @@ pub static RAILS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
});
|
});
|
||||||
pub static REDSTONE_ORES: Lazy<HashSet<Item>> =
|
pub static REDSTONE_ORES: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::RedstoneOre, Item::DeepslateRedstoneOre]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::RedstoneOre, Item::DeepslateRedstoneOre]));
|
||||||
|
pub static REPAIRS_CHAIN_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::IronIngot]));
|
||||||
|
pub static REPAIRS_DIAMOND_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::Diamond]));
|
||||||
|
pub static REPAIRS_GOLD_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::GoldIngot]));
|
||||||
|
pub static REPAIRS_IRON_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::IronIngot]));
|
||||||
|
pub static REPAIRS_LEATHER_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::Leather]));
|
||||||
|
pub static REPAIRS_NETHERITE_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::NetheriteIngot]));
|
||||||
|
pub static REPAIRS_TURTLE_HELMET: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::TurtleScute]));
|
||||||
|
pub static REPAIRS_WOLF_ARMOR: Lazy<HashSet<Item>> =
|
||||||
|
Lazy::new(|| HashSet::from_iter(vec![Item::ArmadilloScute]));
|
||||||
pub static SAND: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static SAND: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::Sand,
|
Item::Sand,
|
||||||
|
@ -1377,6 +1442,27 @@ pub static SHOVELS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::IronShovel,
|
Item::IronShovel,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static SHULKER_BOXES: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
|
HashSet::from_iter(vec![
|
||||||
|
Item::ShulkerBox,
|
||||||
|
Item::BlackShulkerBox,
|
||||||
|
Item::BlueShulkerBox,
|
||||||
|
Item::BrownShulkerBox,
|
||||||
|
Item::CyanShulkerBox,
|
||||||
|
Item::GrayShulkerBox,
|
||||||
|
Item::GreenShulkerBox,
|
||||||
|
Item::LightBlueShulkerBox,
|
||||||
|
Item::LightGrayShulkerBox,
|
||||||
|
Item::LimeShulkerBox,
|
||||||
|
Item::MagentaShulkerBox,
|
||||||
|
Item::OrangeShulkerBox,
|
||||||
|
Item::PinkShulkerBox,
|
||||||
|
Item::PurpleShulkerBox,
|
||||||
|
Item::RedShulkerBox,
|
||||||
|
Item::WhiteShulkerBox,
|
||||||
|
Item::YellowShulkerBox,
|
||||||
|
])
|
||||||
|
});
|
||||||
pub static SIGNS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static SIGNS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::OakSign,
|
Item::OakSign,
|
||||||
|
@ -1718,6 +1804,19 @@ pub static TRIMMABLE_ARMOR: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
});
|
});
|
||||||
pub static TURTLE_FOOD: Lazy<HashSet<Item>> =
|
pub static TURTLE_FOOD: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::Seagrass]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::Seagrass]));
|
||||||
|
pub static VILLAGER_PICKS_UP: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
|
HashSet::from_iter(vec![
|
||||||
|
Item::Bread,
|
||||||
|
Item::Wheat,
|
||||||
|
Item::Beetroot,
|
||||||
|
Item::WheatSeeds,
|
||||||
|
Item::Potato,
|
||||||
|
Item::Carrot,
|
||||||
|
Item::BeetrootSeeds,
|
||||||
|
Item::TorchflowerSeeds,
|
||||||
|
Item::PitcherPod,
|
||||||
|
])
|
||||||
|
});
|
||||||
pub static VILLAGER_PLANTABLE_SEEDS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static VILLAGER_PLANTABLE_SEEDS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::WheatSeeds,
|
Item::WheatSeeds,
|
||||||
|
@ -1769,6 +1868,13 @@ pub static WART_BLOCKS: Lazy<HashSet<Item>> =
|
||||||
Lazy::new(|| HashSet::from_iter(vec![Item::NetherWartBlock, Item::WarpedWartBlock]));
|
Lazy::new(|| HashSet::from_iter(vec![Item::NetherWartBlock, Item::WarpedWartBlock]));
|
||||||
pub static WOLF_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static WOLF_FOOD: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
|
Item::Cod,
|
||||||
|
Item::CookedCod,
|
||||||
|
Item::Salmon,
|
||||||
|
Item::CookedSalmon,
|
||||||
|
Item::TropicalFish,
|
||||||
|
Item::Pufferfish,
|
||||||
|
Item::RabbitStew,
|
||||||
Item::Beef,
|
Item::Beef,
|
||||||
Item::Chicken,
|
Item::Chicken,
|
||||||
Item::CookedBeef,
|
Item::CookedBeef,
|
||||||
|
@ -1872,6 +1978,21 @@ pub static WOODEN_STAIRS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
Item::CherryStairs,
|
Item::CherryStairs,
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
|
pub static WOODEN_TOOL_MATERIALS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
|
HashSet::from_iter(vec![
|
||||||
|
Item::OakPlanks,
|
||||||
|
Item::SprucePlanks,
|
||||||
|
Item::BirchPlanks,
|
||||||
|
Item::JunglePlanks,
|
||||||
|
Item::AcaciaPlanks,
|
||||||
|
Item::DarkOakPlanks,
|
||||||
|
Item::CrimsonPlanks,
|
||||||
|
Item::WarpedPlanks,
|
||||||
|
Item::MangrovePlanks,
|
||||||
|
Item::BambooPlanks,
|
||||||
|
Item::CherryPlanks,
|
||||||
|
])
|
||||||
|
});
|
||||||
pub static WOODEN_TRAPDOORS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
pub static WOODEN_TRAPDOORS: Lazy<HashSet<Item>> = Lazy::new(|| {
|
||||||
HashSet::from_iter(vec![
|
HashSet::from_iter(vec![
|
||||||
Item::AcaciaTrapdoor,
|
Item::AcaciaTrapdoor,
|
||||||
|
|
|
@ -129,7 +129,7 @@ where
|
||||||
position: &'a Position,
|
position: &'a Position,
|
||||||
instance_name: &'a InstanceName,
|
instance_name: &'a InstanceName,
|
||||||
max_distance: f64,
|
max_distance: f64,
|
||||||
) -> impl Iterator<Item = (Entity, f64)> + '_ {
|
) -> impl Iterator<Item = (Entity, f64)> + 'a {
|
||||||
self.filtered_entities
|
self.filtered_entities
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(move |(target_entity, e_instance, e_pos)| {
|
.filter_map(move |(target_entity, e_instance, e_pos)| {
|
||||||
|
@ -156,7 +156,7 @@ where
|
||||||
&'a self,
|
&'a self,
|
||||||
entity: Entity,
|
entity: Entity,
|
||||||
max_distance: f64,
|
max_distance: f64,
|
||||||
) -> impl Iterator<Item = (Entity, f64)> + '_ {
|
) -> impl Iterator<Item = (Entity, f64)> + 'a {
|
||||||
let position;
|
let position;
|
||||||
let instance_name;
|
let instance_name;
|
||||||
if let Ok((pos, instance)) = self.all_entities.get(entity) {
|
if let Ok((pos, instance)) = self.all_entities.get(entity) {
|
||||||
|
|
165
codegen/genitemcomponents.py
Normal file
165
codegen/genitemcomponents.py
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
import lib.code.inventory
|
||||||
|
import lib.code.registry
|
||||||
|
import lib.code.version
|
||||||
|
import lib.code.packet
|
||||||
|
import lib.code.utils
|
||||||
|
import lib.code.tags
|
||||||
|
import lib.download
|
||||||
|
import lib.extract
|
||||||
|
import lib.utils
|
||||||
|
|
||||||
|
ITEM_COMPONENTS_DIR = 'azalea-inventory/src/components.rs'
|
||||||
|
|
||||||
|
def generate(version_id: str):
|
||||||
|
expected_variants = get_expected_variants(version_id)
|
||||||
|
actual_variants = get_actual_variants()
|
||||||
|
|
||||||
|
new_variants = []
|
||||||
|
removed_variants = []
|
||||||
|
|
||||||
|
for variant in expected_variants:
|
||||||
|
if variant not in actual_variants:
|
||||||
|
new_variants.append(variant)
|
||||||
|
for variant in actual_variants:
|
||||||
|
if variant not in expected_variants:
|
||||||
|
removed_variants.append(variant)
|
||||||
|
|
||||||
|
print('New variants:')
|
||||||
|
for variant in new_variants:
|
||||||
|
print('-', variant)
|
||||||
|
print()
|
||||||
|
print('Removed variants:')
|
||||||
|
for variant in removed_variants:
|
||||||
|
print('-', variant)
|
||||||
|
print()
|
||||||
|
|
||||||
|
for variant in removed_variants:
|
||||||
|
print(f'Removing {variant}...')
|
||||||
|
remove_variant(variant)
|
||||||
|
for variant in new_variants:
|
||||||
|
print(f'Adding {variant}...')
|
||||||
|
add_variant(variant)
|
||||||
|
|
||||||
|
lib.code.utils.fmt()
|
||||||
|
|
||||||
|
print('Done!')
|
||||||
|
|
||||||
|
def get_expected_variants(version_id: str):
|
||||||
|
expected_variants = []
|
||||||
|
registries = lib.extract.get_registries_report(version_id)
|
||||||
|
|
||||||
|
registry = registries['minecraft:data_component_type']
|
||||||
|
registry_entries = sorted(
|
||||||
|
registry['entries'].items(), key=lambda x: x[1]['protocol_id'])
|
||||||
|
for variant_name, _variant in registry_entries:
|
||||||
|
variant_struct_name = lib.utils.to_camel_case(variant_name.split(':')[-1])
|
||||||
|
expected_variants.append(variant_struct_name)
|
||||||
|
|
||||||
|
return expected_variants
|
||||||
|
|
||||||
|
def get_actual_variants():
|
||||||
|
actual_variants = []
|
||||||
|
with open(ITEM_COMPONENTS_DIR, 'r') as f:
|
||||||
|
code = f.read().split('\n')
|
||||||
|
|
||||||
|
in_match = False
|
||||||
|
for line in code:
|
||||||
|
if in_match:
|
||||||
|
if line == ' })':
|
||||||
|
break
|
||||||
|
variant_line_prefix = ' DataComponentKind::'
|
||||||
|
if line.startswith(variant_line_prefix):
|
||||||
|
variant = line[len(variant_line_prefix):].split(' ', 1)[0]
|
||||||
|
actual_variants.append(variant)
|
||||||
|
elif line == ' Ok(match kind {':
|
||||||
|
in_match = True
|
||||||
|
|
||||||
|
return actual_variants
|
||||||
|
|
||||||
|
def remove_variant(variant: str):
|
||||||
|
with open(ITEM_COMPONENTS_DIR, 'r') as f:
|
||||||
|
code = f.read().split('\n')
|
||||||
|
|
||||||
|
first_line_with_variant = None
|
||||||
|
line_after_variant = None
|
||||||
|
|
||||||
|
in_match = False
|
||||||
|
for i, line in enumerate(list(code)):
|
||||||
|
if in_match:
|
||||||
|
if line == ' })':
|
||||||
|
line_after_variant = i
|
||||||
|
break
|
||||||
|
variant_line_prefix = ' DataComponentKind::'
|
||||||
|
if line.startswith(variant_line_prefix):
|
||||||
|
if first_line_with_variant is not None:
|
||||||
|
line_after_variant = i
|
||||||
|
break
|
||||||
|
variant_name = line[len(variant_line_prefix):].split(' ', 1)[0]
|
||||||
|
if variant_name == variant:
|
||||||
|
first_line_with_variant = i
|
||||||
|
elif line == ' Ok(match kind {':
|
||||||
|
in_match = True
|
||||||
|
|
||||||
|
if first_line_with_variant is None:
|
||||||
|
raise ValueError(f'Variant {variant} not found')
|
||||||
|
if line_after_variant is None:
|
||||||
|
raise ValueError(f'Couldn\'t find end of variant {variant}')
|
||||||
|
|
||||||
|
code = code[:first_line_with_variant] + code[line_after_variant:]
|
||||||
|
|
||||||
|
# now remove the struct
|
||||||
|
line_before_struct = None # this is the #[derive] line
|
||||||
|
line_after_struct = None # impl DataComponent for ... {}
|
||||||
|
for i, line in enumerate(list(code)):
|
||||||
|
if line == f'pub struct {variant} {{' or line == f'pub struct {variant};':
|
||||||
|
line_before_struct = i - 1
|
||||||
|
elif line == f'impl DataComponent for {variant} {{}}':
|
||||||
|
line_after_struct = i + 1
|
||||||
|
break
|
||||||
|
if line_before_struct is None:
|
||||||
|
raise ValueError(f'Couldn\'t find struct {variant}')
|
||||||
|
if line_after_struct is None:
|
||||||
|
raise ValueError(f'Couldn\'t find impl DataComponent for {variant}')
|
||||||
|
|
||||||
|
code = code[:line_before_struct] + code[line_after_struct:]
|
||||||
|
|
||||||
|
with open(ITEM_COMPONENTS_DIR, 'w') as f:
|
||||||
|
f.write('\n'.join(code))
|
||||||
|
|
||||||
|
def add_variant(variant: str):
|
||||||
|
with open(ITEM_COMPONENTS_DIR, 'r') as f:
|
||||||
|
code = f.read().split('\n')
|
||||||
|
|
||||||
|
in_match = False
|
||||||
|
last_line_in_match = None
|
||||||
|
for i, line in enumerate(list(code)):
|
||||||
|
if in_match:
|
||||||
|
if line == ' })':
|
||||||
|
last_line_in_match = i
|
||||||
|
break
|
||||||
|
elif line == ' Ok(match kind {':
|
||||||
|
in_match = True
|
||||||
|
|
||||||
|
if last_line_in_match is None:
|
||||||
|
raise ValueError('Couldn\'t find end of match')
|
||||||
|
|
||||||
|
code = code[:last_line_in_match] + [
|
||||||
|
f' DataComponentKind::{variant} => Box::new({variant}::read_from(buf)?),',
|
||||||
|
] + code[last_line_in_match:]
|
||||||
|
|
||||||
|
# now insert the struct
|
||||||
|
code.append('')
|
||||||
|
code.append('#[derive(Clone, PartialEq, McBuf)]')
|
||||||
|
code.append(f'pub struct {variant} {{')
|
||||||
|
code.append(' pub todo: todo!(), // see DataComponents.java')
|
||||||
|
code.append('}')
|
||||||
|
code.append(f'impl DataComponent for {variant} {{}}')
|
||||||
|
|
||||||
|
with open(ITEM_COMPONENTS_DIR, 'w') as f:
|
||||||
|
f.write('\n'.join(code))
|
||||||
|
|
||||||
|
lib.code.utils.fmt()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
version_id = lib.code.version.get_version_id()
|
||||||
|
generate(version_id)
|
|
@ -5,7 +5,6 @@ import re
|
||||||
|
|
||||||
REGISTRIES_DIR = get_dir_location('../azalea-registry/src/lib.rs')
|
REGISTRIES_DIR = get_dir_location('../azalea-registry/src/lib.rs')
|
||||||
|
|
||||||
|
|
||||||
def generate_registries(registries: dict):
|
def generate_registries(registries: dict):
|
||||||
with open(REGISTRIES_DIR, 'r') as f:
|
with open(REGISTRIES_DIR, 'r') as f:
|
||||||
code = f.read().split('\n')
|
code = f.read().split('\n')
|
||||||
|
@ -17,23 +16,14 @@ def generate_registries(registries: dict):
|
||||||
# });
|
# });
|
||||||
|
|
||||||
registry_name = registry_name.split(':')[1]
|
registry_name = registry_name.split(':')[1]
|
||||||
|
registry_enum_name = registry_name_to_enum_name(registry_name)
|
||||||
if registry_name.endswith('_type'):
|
|
||||||
# change _type to _kind because that's Rustier (and because _type
|
|
||||||
# is a reserved keyword)
|
|
||||||
registry_name = registry_name[:-5] + '_kind'
|
|
||||||
elif registry_name in {'menu'}:
|
|
||||||
registry_name += '_kind'
|
|
||||||
|
|
||||||
registry_struct_name = to_camel_case(registry_name)
|
|
||||||
|
|
||||||
registry_code = []
|
registry_code = []
|
||||||
registry_code.append(f'enum {registry_struct_name} {{')
|
registry_code.append(f'enum {registry_enum_name} {{')
|
||||||
registry_entries = sorted(
|
registry_entries = sorted(
|
||||||
registry['entries'].items(), key=lambda x: x[1]['protocol_id'])
|
registry['entries'].items(), key=lambda x: x[1]['protocol_id'])
|
||||||
for variant_name, _variant in registry_entries:
|
for variant_name, _variant in registry_entries:
|
||||||
variant_struct_name = to_camel_case(
|
variant_struct_name = to_camel_case(variant_name.split(':')[-1])
|
||||||
variant_name.split(':')[1])
|
|
||||||
registry_code.append(f'\t{variant_struct_name} => "{variant_name}",')
|
registry_code.append(f'\t{variant_struct_name} => "{variant_name}",')
|
||||||
registry_code.append('}')
|
registry_code.append('}')
|
||||||
|
|
||||||
|
@ -59,3 +49,15 @@ def generate_registries(registries: dict):
|
||||||
|
|
||||||
with open(REGISTRIES_DIR, 'w') as f:
|
with open(REGISTRIES_DIR, 'w') as f:
|
||||||
f.write('\n'.join(code))
|
f.write('\n'.join(code))
|
||||||
|
|
||||||
|
def registry_name_to_enum_name(registry_name: str) -> str:
|
||||||
|
registry_name = registry_name.split(':')[-1]
|
||||||
|
|
||||||
|
if registry_name.endswith('_type'):
|
||||||
|
# change _type to _kind because that's Rustier (and because _type
|
||||||
|
# is a reserved keyword)
|
||||||
|
registry_name = registry_name[:-5] + '_kind'
|
||||||
|
elif registry_name in {'menu'}:
|
||||||
|
registry_name += '_kind'
|
||||||
|
|
||||||
|
return to_camel_case(registry_name)
|
||||||
|
|
|
@ -111,24 +111,24 @@ lib.code.version.set_protocol_version(
|
||||||
# print('Updated protocol!')
|
# print('Updated protocol!')
|
||||||
|
|
||||||
|
|
||||||
old_ordered_blocks = lib.extract.get_ordered_blocks_burger(old_version_id)
|
# old_ordered_blocks = lib.extract.get_ordered_blocks_burger(old_version_id)
|
||||||
new_ordered_blocks = lib.extract.get_ordered_blocks_burger(new_version_id)
|
# new_ordered_blocks = lib.extract.get_ordered_blocks_burger(new_version_id)
|
||||||
if old_ordered_blocks != new_ordered_blocks:
|
# if old_ordered_blocks != new_ordered_blocks:
|
||||||
print('Blocks changed, updating...')
|
# print('Blocks changed, updating...')
|
||||||
|
|
||||||
block_states_burger = lib.extract.get_block_states_burger(new_version_id)
|
# block_states_burger = lib.extract.get_block_states_burger(new_version_id)
|
||||||
block_states_report = lib.extract.get_block_states_report(new_version_id)
|
# block_states_report = lib.extract.get_block_states_report(new_version_id)
|
||||||
|
|
||||||
# TODO: pixlyzer is currently broken so uhhhh
|
# # TODO: pixlyzer is currently broken so uhhhh
|
||||||
shape_datas = lib.extract.get_pixlyzer_data(
|
# shape_datas = lib.extract.get_pixlyzer_data(
|
||||||
'1.20.3-pre4', 'shapes')
|
# '1.20.3-pre4', 'shapes')
|
||||||
pixlyzer_block_datas = lib.extract.get_pixlyzer_data(
|
# pixlyzer_block_datas = lib.extract.get_pixlyzer_data(
|
||||||
'1.20.3-pre4', 'blocks')
|
# '1.20.3-pre4', 'blocks')
|
||||||
|
|
||||||
lib.code.blocks.generate_blocks(
|
# lib.code.blocks.generate_blocks(
|
||||||
block_states_burger, block_states_report, pixlyzer_block_datas, new_ordered_blocks, new_mappings)
|
# block_states_burger, block_states_report, pixlyzer_block_datas, new_ordered_blocks, new_mappings)
|
||||||
lib.code.shapes.generate_block_shapes(
|
# lib.code.shapes.generate_block_shapes(
|
||||||
pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, block_states_burger, new_mappings)
|
# pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, block_states_burger, new_mappings)
|
||||||
|
|
||||||
print('Getting en_us.json...')
|
print('Getting en_us.json...')
|
||||||
language = lib.extract.get_en_us_lang(new_version_id)
|
language = lib.extract.get_en_us_lang(new_version_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue