Skip to content

Commit

Permalink
25w02a
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Jan 8, 2025
1 parent 615d8f9 commit 9b4e5a4
Show file tree
Hide file tree
Showing 20 changed files with 1,375 additions and 1,209 deletions.
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resolver = "2"
# --- Workspace Settings ---

[workspace.package]
version = "0.11.0+mc1.21.4"
version = "0.11.0+mc25w02a"
edition = "2021"
license = "MIT"
repository = "https://github.com/azalea-rs/azalea"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->

_Currently supported Minecraft version: `1.21.4`._
_Currently supported Minecraft version: `25w02a`._

> [!WARNING]
> Azalea is still very unfinished, though most crates are in a somewhat useable state
Expand Down
28 changes: 26 additions & 2 deletions azalea-block/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ make_block_states! {
"south" => South(bool),
"up" => Up(bool),
"west" => West(bool),
"active" => Active(bool),
"creaking_heart_state" => CreakingHeartState {
Uprooted,
Dormant,
Awake,
},
"natural" => Natural(bool),
"half" => TopBottom {
Top,
Expand Down Expand Up @@ -1958,6 +1962,18 @@ make_block_states! {
_3,
_4,
},
"flower_amount" => WildflowersFlowerAmount {
_1,
_2,
_3,
_4,
},
"segment_amount" => LeafLitterSegmentAmount {
_1,
_2,
_3,
_4,
},
"tilt" => Tilt {
None,
Unstable,
Expand Down Expand Up @@ -2438,8 +2454,8 @@ make_block_states! {
soul_fire => BlockBehavior::new(), {},
spawner => BlockBehavior::new().requires_correct_tool_for_drops().strength(5.0, 5.0), {},
creaking_heart => BlockBehavior::new(), {
"active": Active(false),
"axis": Axis::Y,
"creaking_heart_state": CreakingHeartState::Uprooted,
"natural": Natural(false),
},
oak_stairs => BlockBehavior::new().strength(2.0, 3.0), {
Expand Down Expand Up @@ -5419,6 +5435,14 @@ make_block_states! {
"facing": FacingCardinal::North,
"flower_amount": PinkPetalsFlowerAmount::_1,
},
wildflowers => BlockBehavior::new(), {
"facing": FacingCardinal::North,
"flower_amount": WildflowersFlowerAmount::_1,
},
leaf_litter => BlockBehavior::new(), {
"facing": FacingCardinal::North,
"segment_amount": LeafLitterSegmentAmount::_1,
},
moss_block => BlockBehavior::new().strength(0.1, 0.1), {},
big_dripleaf => BlockBehavior::new().strength(0.1, 0.1), {
"facing": FacingCardinal::North,
Expand Down
1 change: 0 additions & 1 deletion azalea-client/src/packet_handling/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@ pub fn process_packet_events(ecs: &mut World) {
ClientboundGamePacket::UpdateMobEffect(p) => {
debug!("Got update mob effect packet {p:?}");
}
ClientboundGamePacket::AddExperienceOrb(_) => {}
ClientboundGamePacket::AwardStats(_) => {}
ClientboundGamePacket::BlockChangedAck(_) => {}
ClientboundGamePacket::BlockDestruction(_) => {}
Expand Down
3 changes: 2 additions & 1 deletion azalea-entity/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub enum EntityDataValue {
BlockPos(BlockPos),
OptionalBlockPos(Option<BlockPos>),
Direction(Direction),
OptionalUuid(Option<Uuid>),
OptionalLivingEntityReference(Option<Uuid>),
BlockState(azalea_block::BlockState),
/// If this is air, that means it's absent,
OptionalBlockState(azalea_block::BlockState),
Expand All @@ -84,6 +84,7 @@ pub enum EntityDataValue {
CatVariant(azalea_registry::CatVariant),
WolfVariant(azalea_registry::WolfVariant),
FrogVariant(azalea_registry::FrogVariant),
PigVariant(azalea_registry::PigVariant),
OptionalGlobalPos(Option<GlobalPos>),
PaintingVariant(azalea_registry::PaintingVariant),
SnifferState(SnifferStateKind),
Expand Down
13 changes: 10 additions & 3 deletions azalea-entity/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3821,10 +3821,10 @@ impl Fox {
entity.insert(FoxInterested(bitfield & 0x8 != 0));
}
19 => {
entity.insert(TrustedId0(d.value.into_optional_uuid()?));
entity.insert(TrustedId0(d.value.into_optional_living_entity_reference()?));
}
20 => {
entity.insert(TrustedId1(d.value.into_optional_uuid()?));
entity.insert(TrustedId1(d.value.into_optional_living_entity_reference()?));
}
_ => {}
}
Expand Down Expand Up @@ -6680,6 +6680,8 @@ impl Default for PhantomMetadataBundle {
pub struct PigSaddle(pub bool);
#[derive(Component, Deref, DerefMut, Clone)]
pub struct PigBoostTime(pub i32);
#[derive(Component, Deref, DerefMut, Clone)]
pub struct PigVariant(pub azalea_registry::PigVariant);
#[derive(Component)]
pub struct Pig;
impl Pig {
Expand All @@ -6695,6 +6697,9 @@ impl Pig {
18 => {
entity.insert(PigBoostTime(d.value.into_int()?));
}
19 => {
entity.insert(PigVariant(d.value.into_pig_variant()?));
}
_ => {}
}
Ok(())
Expand All @@ -6707,6 +6712,7 @@ pub struct PigMetadataBundle {
parent: AbstractAnimalMetadataBundle,
pig_saddle: PigSaddle,
pig_boost_time: PigBoostTime,
pig_variant: PigVariant,
}
impl Default for PigMetadataBundle {
fn default() -> Self {
Expand Down Expand Up @@ -6758,6 +6764,7 @@ impl Default for PigMetadataBundle {
},
pig_saddle: PigSaddle(false),
pig_boost_time: PigBoostTime(0),
pig_variant: PigVariant(Default::default()),
}
}
}
Expand Down Expand Up @@ -11977,7 +11984,7 @@ impl AbstractTameable {
entity.insert(InSittingPose(bitfield & 0x1 != 0));
}
18 => {
entity.insert(Owneruuid(d.value.into_optional_uuid()?));
entity.insert(Owneruuid(d.value.into_optional_living_entity_reference()?));
}
_ => {}
}
Expand Down
2 changes: 2 additions & 0 deletions azalea-entity/src/particle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub enum Particle {
Infested,
CherryLeaves,
PaleOakLeaves,
TintedLeaves,
SculkSoul,
SculkCharge(SculkChargeParticle),
SculkChargePop,
Expand Down Expand Up @@ -165,6 +166,7 @@ impl From<ParticleKind> for Particle {
ParticleKind::Flame => Self::Flame,
ParticleKind::CherryLeaves => Self::CherryLeaves,
ParticleKind::PaleOakLeaves => Self::PaleOakLeaves,
ParticleKind::TintedLeaves => Self::TintedLeaves,
ParticleKind::SculkSoul => Self::SculkSoul,
ParticleKind::SculkCharge => Self::SculkCharge(SculkChargeParticle::default()),
ParticleKind::SculkChargePop => Self::SculkChargePop,
Expand Down
20 changes: 20 additions & 0 deletions azalea-inventory/src/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ pub fn from_kind(
DataComponentKind::Glider => Box::new(Glider::azalea_read(buf)?),
DataComponentKind::TooltipStyle => Box::new(TooltipStyle::azalea_read(buf)?),
DataComponentKind::DeathProtection => Box::new(DeathProtection::azalea_read(buf)?),
DataComponentKind::Weapon => Box::new(Weapon::azalea_read(buf)?),
DataComponentKind::PotionDurationScale => Box::new(PotionDurationScale::azalea_read(buf)?),
})
}

Expand Down Expand Up @@ -918,3 +920,21 @@ pub struct DeathProtection {
impl DataComponent for DeathProtection {
const KIND: DataComponentKind = DataComponentKind::DeathProtection;
}

#[derive(Clone, PartialEq, AzBuf)]
pub struct Weapon {
#[var]
pub damage_per_attack: i32,
pub can_disable_blocking: bool,
}
impl DataComponent for Weapon {
const KIND: DataComponentKind = DataComponentKind::Weapon;
}

#[derive(Clone, PartialEq, AzBuf)]
pub struct PotionDurationScale {
pub value: f32,
}
impl DataComponent for PotionDurationScale {
const KIND: DataComponentKind = DataComponentKind::PotionDurationScale;
}
Loading

0 comments on commit 9b4e5a4

Please sign in to comment.