diff --git a/server/world/level/item/banner_patterns.go b/server/world/level/item/banner_patterns.go index 5f005dd..f5e415e 100644 --- a/server/world/level/item/banner_patterns.go +++ b/server/world/level/item/banner_patterns.go @@ -2,5 +2,5 @@ package item type BannerPattern struct { Color string `nbt:"color"` - Pattern string `nbt:"pattern"` + Pattern any `nbt:"pattern"` } diff --git a/server/world/level/item/block_entity_data.go b/server/world/level/item/block_entity_data.go deleted file mode 100644 index d72df78..0000000 --- a/server/world/level/item/block_entity_data.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type BlockEntityData struct { - Data int32 `nbt:"block_entity_data"` -} diff --git a/server/world/level/item/block_state.go b/server/world/level/item/block_state.go deleted file mode 100644 index 6ff1ea9..0000000 --- a/server/world/level/item/block_state.go +++ /dev/null @@ -1,6 +0,0 @@ -package item - -type BlockState struct { - Name string `nbt:"name"` - Value string `nbt:"value"` // ???????? -} diff --git a/server/world/level/item/bucket_entity_data.go b/server/world/level/item/bucket_entity_data.go index ecdda4a..614fe6c 100644 --- a/server/world/level/item/bucket_entity_data.go +++ b/server/world/level/item/bucket_entity_data.go @@ -8,7 +8,7 @@ type BucketEntityData struct { Invulnerable bool `nbt:"Invulnerable"` Health float32 `nbt:"Health"` Age int32 `nbt:"Age"` - Variant string `nbt:"Variant"` - HuntingCooldown int32 `nbt:"HuntingCooldown"` + Variant int32 `nbt:"Variant"` + HuntingCooldown int64 `nbt:"HuntingCooldown"` BucketVariantTag int32 `nbt:"BucketVariantTag"` } diff --git a/server/world/level/item/bundle_contents.go b/server/world/level/item/bundle_contents.go deleted file mode 100644 index e608235..0000000 --- a/server/world/level/item/bundle_contents.go +++ /dev/null @@ -1,7 +0,0 @@ -package item - -type BundleContent *struct { - ID string `nbt:"id"` - Count int32 `nbt:"count"` - Components int32 `nbt:"components"` // optional map of data components -} diff --git a/server/world/level/item/can_break.go b/server/world/level/item/can_break.go deleted file mode 100644 index b4f3688..0000000 --- a/server/world/level/item/can_break.go +++ /dev/null @@ -1,18 +0,0 @@ -package item - -type CanBreak struct { - ShowInTooltip bool `nbt:"show_in_tooltip"` - Blocks *int32 `nbt:"blocks"` - NBT *int32 `nbt:"nbt"` -} - -type Predicate []struct { - Blocks *string `nbt:"blocks"` - NBT int32 `nbt:"nbt"` - State int32 `nbt:"state"` -} - -type State struct { - Name string `nbt:"name"` - Value string `nbt:"value"` // ???????? -} diff --git a/server/world/level/item/can_do.go b/server/world/level/item/can_do.go new file mode 100644 index 0000000..bd1d075 --- /dev/null +++ b/server/world/level/item/can_do.go @@ -0,0 +1,16 @@ +package item + +// Both CanBreak and CanPlace have the same contents so im using the same class +type CanDo struct { + ShowInTooltip bool `nbt:"show_in_tooltip"` + State any `nbt:"state"` // Have to put any cause theres an infinite amount of key value pairs there could be + Blocks any `nbt:"blocks"` //Can be string, or list + NBT string `nbt:"nbt"` + Predicates []Predicates `nbt:"predicates"` +} + +type Predicates struct { + State any `nbt:"state"` + Blocks any `nbt:"blocks"` + NBT string `nbt:"nbt"` +} diff --git a/server/world/level/item/charged_projectiles.go b/server/world/level/item/charged_projectiles.go deleted file mode 100644 index 11645f8..0000000 --- a/server/world/level/item/charged_projectiles.go +++ /dev/null @@ -1,7 +0,0 @@ -package item - -type ChargedProjectile struct { - ID string `nbt:"id"` - Count int32 `nbt:"count"` - // Components TAG???? -} diff --git a/server/world/level/item/container.go b/server/world/level/item/container.go deleted file mode 100644 index 5454e08..0000000 --- a/server/world/level/item/container.go +++ /dev/null @@ -1,11 +0,0 @@ -package item - -type Container *struct { - Slot int32 `nbt:"slot"` -} - -type item struct { - ID string `nbt:"id"` - Count int32 `nbt:"count"` - // components TAG???? -} diff --git a/server/world/level/item/container_loot.go b/server/world/level/item/container_loot.go index 47c0a1f..a7dc920 100644 --- a/server/world/level/item/container_loot.go +++ b/server/world/level/item/container_loot.go @@ -2,5 +2,5 @@ package item type ContainerLoot struct { LootTable string `nbt:"loot_table"` - Seed int32 `nbt:"seed"` + Seed int64 `nbt:"seed"` } diff --git a/server/world/level/item/custom_data.go b/server/world/level/item/custom_data.go deleted file mode 100644 index c316b0e..0000000 --- a/server/world/level/item/custom_data.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type CustomData struct { - NBT int32 `nbt:"nbt"` -} diff --git a/server/world/level/item/custom_model_data.go b/server/world/level/item/custom_model_data.go deleted file mode 100644 index 5032be7..0000000 --- a/server/world/level/item/custom_model_data.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type CustomModelData struct { - CustomModelData int32 `nbt:"custom_model_data"` -} diff --git a/server/world/level/item/custom_name.go b/server/world/level/item/custom_name.go deleted file mode 100644 index 401f2ef..0000000 --- a/server/world/level/item/custom_name.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type CustomName struct { - CustomName string `nbt:"custom_name"` -} diff --git a/server/world/level/item/damage.go b/server/world/level/item/damage.go deleted file mode 100644 index 18ab394..0000000 --- a/server/world/level/item/damage.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type Damage struct { - Damage int32 `nbt:"damage"` -} diff --git a/server/world/level/item/debug_stick_state.go b/server/world/level/item/debug_stick_state.go deleted file mode 100644 index e2bee80..0000000 --- a/server/world/level/item/debug_stick_state.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type DebugStickState struct { - BlockID string `nbt:"block_id"` // ???? -} diff --git a/server/world/level/item/dyed_color.go b/server/world/level/item/dyed_color.go deleted file mode 100644 index 7781990..0000000 --- a/server/world/level/item/dyed_color.go +++ /dev/null @@ -1,6 +0,0 @@ -package item - -type DyedColor struct { - RGB int32 `nbt:"rgb"` - ShowInTooltip bool `nbt:"show_in_tooltip"` -} diff --git a/server/world/level/item/enchantment_glint_override.go b/server/world/level/item/enchantment_glint_override.go deleted file mode 100644 index 0988c86..0000000 --- a/server/world/level/item/enchantment_glint_override.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type EnchantmentGlintOverride struct { - EnchantmentGlintOverride bool `nbt:"enchantment_glint_override"` -} diff --git a/server/world/level/item/enchantments.go b/server/world/level/item/enchantments.go index dd4948c..c242da0 100644 --- a/server/world/level/item/enchantments.go +++ b/server/world/level/item/enchantments.go @@ -2,8 +2,5 @@ package item type Enchantments struct { ShowInTooltip bool `nbt:"show_in_tooltip"` -} - -type Levels struct { - EnchantmentID int32 `nbt:"enchantment_id"` // ???????? + Levels any `nbt:"levels"` } diff --git a/server/world/level/item/entity_data.go b/server/world/level/item/entity_data.go index 763d672..03fd28f 100644 --- a/server/world/level/item/entity_data.go +++ b/server/world/level/item/entity_data.go @@ -1,5 +1,7 @@ package item +import "github.com/zeppelinmc/zeppelin/server/entity" + type EntityData struct { - Data int32 `nbt:"entity_data"` // NBT + EntityData entity.LevelEntity `nbt:"minecraft:entity_data"` // NBT } diff --git a/server/world/level/item/fireworks.go b/server/world/level/item/fireworks.go index 15145a9..9f037a2 100644 --- a/server/world/level/item/fireworks.go +++ b/server/world/level/item/fireworks.go @@ -1,10 +1,11 @@ package item type Fireworks struct { - FlightDuration byte `nbt:"flight_duration"` + FlightDuration int8 `nbt:"flight_duration"` + Explosions []Explosion `nbt:"explosions"` } -type Explosions *struct { +type Explosion struct { Shape string `nbt:"shape"` Colors []int32 `nbt:"colors"` FadeColors []int32 `nbt:"fade_colors"` diff --git a/server/world/level/item/food.go b/server/world/level/item/food.go index bc8de60..f661b36 100644 --- a/server/world/level/item/food.go +++ b/server/world/level/item/food.go @@ -1,23 +1,24 @@ package item type Food struct { - Nutrition int32 `nbt:"nutrition"` - Saturation float32 `nbt:"saturation"` - CanAlwaysEat bool `nbt:"can_always_eat"` - EatSeconds float32 `nbt:"eat_seconds"` + Nutrition int32 `nbt:"nutrition"` + Saturation float32 `nbt:"saturation"` + CanAlwaysEat bool `nbt:"can_always_eat"` + EatSeconds float32 `nbt:"eat_seconds"` + UsingConvertsTo Item `nbt:"using_converts_to"` + Effects []Effect `nbt:"effects"` } -type UsingConvertsTo struct { - ID string `nbt:"id"` - // components TAG ???? +type Effects struct { + Effect Effect `nbt:"effect"` + Probability float32 `nbt:"probability"` } -type Effect *struct { - ID string `nbt:"id"` - Amplifier byte `nbt:"amplifier"` - Duration int32 `nbt:"duration"` - Ambient bool `nbt:"ambient"` - ShowParticles bool `nbt:"show_particles"` - ShowIcon bool `nbt:"show_icon"` - Probability float32 `nbt:"probability"` +type Effect struct { + ID string `nbt:"id"` + Amplifier int8 `nbt:"amplifier"` + Duration int32 `nbt:"duration"` + Ambient bool `nbt:"ambient"` + ShowParticles bool `nbt:"show_particles"` + ShowIcon bool `nbt:"show_icon"` } diff --git a/server/world/level/item/instrument.go b/server/world/level/item/instrument.go deleted file mode 100644 index ddad0f2..0000000 --- a/server/world/level/item/instrument.go +++ /dev/null @@ -1,12 +0,0 @@ -package item - -type Instrument struct { - SoundEvent SoundEvent `nbt:"sound_event"` - UseDuration int32 `nbt:"use_duration"` - Range float32 `nbt:"range"` -} - -type SoundEvent struct { - SoundID string `nbt:"sound_id"` - Range float32 `nbt:"range"` -} diff --git a/server/world/level/item/item.go b/server/world/level/item/item.go index e36635d..13c7509 100644 --- a/server/world/level/item/item.go +++ b/server/world/level/item/item.go @@ -61,53 +61,54 @@ type Item struct { Id string `nbt:"id"` // Components of this item (https://minecraft.wiki/w/Data_component_format#List_of_components) Components struct{} `nbt:"components"` /*struct { - AttributeModifiers AttributeModifiers `nbt:"minecraft:attribute_modifiers"` + AttributeModifiers any `nbt:"minecraft:attribute_modifiers"` BannerPatterns []BannerPattern `nbt:"minecraft:banner_patterns"` BaseColor string `nbt:"minecraft:base_color"` Bees []Bee `nbt:"minecraft:bees"` - BlockEntityData BlockEntityData `nbt:"minecraft:block_entity_data"` - BlockState BlockState `nbt:"minecraft:block_state"` + BlockEntityData any `nbt:"minecraft:block_entity_data"` + BlockState any `nbt:"minecraft:block_state"` BucketEntityData BucketEntityData `nbt:"minecraft:bucket_entity_data"` - BundleContents []BundleContent `nbt:"minecraft_bundle_contents"` - CanBreak CanBreak `nbt:"minecraft:can_break"` - ChargedProjectiles []ChargedProjectile `nbt:"minecraft:charged_projectiles"` - Container []Container `nbt:"minecraft:container"` + BundleContents []Item `nbt:"minecraft_bundle_contents"` + CanBreak CanDo `nbt:"minecraft:can_break"` + CanPlaceOn CanDo `nbt:"minecraft:can_place_on"` + ChargedProjectiles []Item `nbt:"minecraft:charged_projectiles"` + Container []Item `nbt:"minecraft:container"` ContainerLoot ContainerLoot `nbt:"minecraft_container_loot"` - CustomData CustomData `nbt:"minecraft:custom_data"` - CustomModelData CustomModelData `nbt:"minecraft:custom_model_data"` - CustomName CustomName `nbt:"minecraft:custom_name"` - Damage Damage `nbt:"minecraft:damage"` - DebugStickState DebugStickState `nbt:"minecraft:debug_stick_state"` - DyedColor DyedColor `nbt:"minecraft:dyed_color"` - EnchantmentGlintOverride EnchantmentGlintOverride `nbt:"minecraft:enchantment_glint_override"` + CustomData any `nbt:"minecraft:custom_data"` + CustomModelData int32 `nbt:"minecraft:custom_model_data"` + CustomName string `nbt:"minecraft:custom_name"` + Damage int32 `nbt:"minecraft:damage"` + DebugStickState any `nbt:"minecraft:debug_stick_state"` + DyedColor any `nbt:"minecraft:dyed_color"` + EnchantmentGlintOverride bool `nbt:"minecraft:enchantment_glint_override"` Enchantments Enchantments `nbt:"minecraft:enchantments"` - EntityData EntityData `nbt:"minecraft:entity_data"` + EntityData entity.LevelEntity `nbt:"minecraft:entity_data"` FireResistant FireResistant `nbt:"minecraft:fire_resistant"` FireworkExplosion FireworkExplosion `nbt:"minecraft:firework_explosion"` Fireworks Fireworks `nbt:"minecraft:fireworks"` Food Food `nbt:"minecraft:food"` HideAdditionalTooltip HideAdditionalTooltip `nbt:"minecraft:hide_additional_tooltip"` HideTooltip HideTooltip `nbt:"minecraft:hide_tooltip"` - Instrument Instrument `nbt:"minecraft:instrument"` + Instrument any `nbt:"minecraft:instrument"` IntangibleProjectile IntangibleProjectile `nbt:"minecraft:intangible_projectile"` - ItemName ItemName `nbt:"minecraft:item_name"` + ItemName string `nbt:"minecraft:item_name"` JukeboxPlayable JukeboxPlayable `nbt:"minecraft:jukebox_playable"` - Lock Lock `nbt:"minecraft:lock"` + Lock string `nbt:"minecraft:lock"` LodestoneTracker LodestoneTracker `nbt:"minecraft:lodestone_tracker"` - Lore []Lore `nbt:"minecraft:lore"` - MapColor MapColor `nbt:"minecraft:map_color"` - MapDecorations MapDecorations `nbt:"minecraft:map_decorations"` - MapID MapID `nbt:"minecraft:map_id"` - MaxDamage MaxDamage `nbt:"minecraft:max_damage"` - MaxStackSize MaxStackSize `nbt:"minecraft:max_stack_size"` - NoteBlockSound NoteBlockSound `nbt:"minecraft:note_block_sound"` - OminousBottleAmplifier OminousBottleAmplifier `nbt:"minecraft:ominous_bottle_amplifier"` - PotDecorations []PotDecoration `nbt:"minecraft:pot_decorations"` - PotionContents PotionContents `nbt:"minecraft:potion_contents"` - Profile Profile `nbt:"minecraft:profile"` - Rarity Rarity `nbt:"minecraft:rarity"` - Recipes []Recipe `nbt:"minecraft:recipes"` - RepairCost RepairCost `nbt:"minecraft:repair_cost"` + Lore []string `nbt:"minecraft:lore"` + MapColor int32 `nbt:"minecraft:map_color"` + MapDecorations any `nbt:"minecraft:map_decorations"` + MapID int32 `nbt:"minecraft:map_id"` + MaxDamage int32 `nbt:"minecraft:max_damage"` + MaxStackSize int32 `nbt:"minecraft:max_stack_size"` + NoteBlockSound string `nbt:"minecraft:note_block_sound"` + OminousBottleAmplifier int32 `nbt:"minecraft:ominous_bottle_amplifier"` + PotDecorations []string `nbt:"minecraft:pot_decorations"` + PotionContents any `nbt:"minecraft:potion_contents"` + Profile any `nbt:"minecraft:profile"` + Rarity string `nbt:"minecraft:rarity"` + Recipes []string `nbt:"minecraft:recipes"` + RepairCost int32 `nbt:"minecraft:repair_cost"` StoredEnchantments StoredEnchantments `nbt:"minecraft:stored_enchantments"` SuspiciousStewEffects []SuspiciousStewEffect `nbt:"minecraft:suspicious_stew_effects"` Tool Tool `nbt:"minecraft:tool"` @@ -116,7 +117,7 @@ type Item struct { WritableBookContent WritableBookContent `nbt:"minecraft:writable_book_content"` WrittenBookContent WrittenBookContent `nbt:"minecraft:written_book_content"` CreativeSlotLock CreativeSlotLock `nbt:"minecraft:creative_slot_lock"` - MapPostProcessing MapPostProcessing `nbt:"minecraft:map_post_processing"` + MapPostProcessing int32 `nbt:"minecraft:map_post_processing"` } `nbt:"components"`*/ } diff --git a/server/world/level/item/item_name.go b/server/world/level/item/item_name.go deleted file mode 100644 index b0d2889..0000000 --- a/server/world/level/item/item_name.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type ItemName struct { - ItemName string `nbt:"item_name"` -} diff --git a/server/world/level/item/lock.go b/server/world/level/item/lock.go deleted file mode 100644 index a2a5373..0000000 --- a/server/world/level/item/lock.go +++ /dev/null @@ -1,7 +0,0 @@ -package item - -// This is for passwords to chests. -// You would assign items ('keys') a password tag which would unlock a container item with the same lock key. -type Lock struct { - Lock string `nbt:"lock"` -} diff --git a/server/world/level/item/lore.go b/server/world/level/item/lore.go deleted file mode 100644 index 7b80f12..0000000 --- a/server/world/level/item/lore.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type Lore *struct { - Lore string `nbt:"lore"` -} diff --git a/server/world/level/item/map_color.go b/server/world/level/item/map_color.go deleted file mode 100644 index f665289..0000000 --- a/server/world/level/item/map_color.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type MapColor struct { - MapColor int32 `nbt:"map_color"` -} diff --git a/server/world/level/item/map_decorations.go b/server/world/level/item/map_decorations.go deleted file mode 100644 index 2dde466..0000000 --- a/server/world/level/item/map_decorations.go +++ /dev/null @@ -1,8 +0,0 @@ -package item - -type MapDecorations struct { // I'm a little confused on this one. It goes for the head tag?? - Type string `nbt:"type"` - X float32 `nbt:"x"` - Z float32 `nbt:"z"` - Rotation float32 `nbt:"rotation"` -} diff --git a/server/world/level/item/map_id.go b/server/world/level/item/map_id.go deleted file mode 100644 index 09f3bcf..0000000 --- a/server/world/level/item/map_id.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type MapID struct { - MapID int32 `nbt:"map_id"` -} diff --git a/server/world/level/item/max_damage.go b/server/world/level/item/max_damage.go deleted file mode 100644 index c38af4b..0000000 --- a/server/world/level/item/max_damage.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type MaxDamage struct { - MaxDamage int32 `nbt:"max_damage"` -} diff --git a/server/world/level/item/max_stack_size.go b/server/world/level/item/max_stack_size.go deleted file mode 100644 index cf49806..0000000 --- a/server/world/level/item/max_stack_size.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type MaxStackSize struct { - MaxStackSize int32 `nbt:"max_stack_size"` -} diff --git a/server/world/level/item/note_block_sound.go b/server/world/level/item/note_block_sound.go deleted file mode 100644 index 0ca7f59..0000000 --- a/server/world/level/item/note_block_sound.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type NoteBlockSound struct { - NoteBlockSound string `nbt:"note_block_sound"` -} diff --git a/server/world/level/item/ominous_bottle_amplifier.go b/server/world/level/item/ominous_bottle_amplifier.go deleted file mode 100644 index f83a953..0000000 --- a/server/world/level/item/ominous_bottle_amplifier.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type OminousBottleAmplifier struct { - OminousBottleAmplifier int32 `nbt:"ominous_bottle_amplifier"` -} diff --git a/server/world/level/item/pot_decorations.go b/server/world/level/item/pot_decorations.go deleted file mode 100644 index 4ccfac2..0000000 --- a/server/world/level/item/pot_decorations.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type PotDecoration *struct { - ID string `nbt:"id"` -} diff --git a/server/world/level/item/potion_contents.go b/server/world/level/item/potion_contents.go deleted file mode 100644 index 895439b..0000000 --- a/server/world/level/item/potion_contents.go +++ /dev/null @@ -1,16 +0,0 @@ -package item - -type PotionContents struct { - Portion string `nbt:"potion"` - CustomColor int32 `nbt:"custom_color"` - CustomEffects []CustomEffects `nbt:"custom_effects"` -} - -type CustomEffects *struct { - ID string `nbt:"id"` - Amplifier byte `nbt:"byte"` - Duration int32 `nbt:"duration"` - Ambient bool `nbt:"ambient"` - ShowParticles bool `nbt:"show_particles"` - ShowIcon bool `nbt:"show_icon"` -} diff --git a/server/world/level/item/profile.go b/server/world/level/item/profile.go deleted file mode 100644 index a7bf27d..0000000 --- a/server/world/level/item/profile.go +++ /dev/null @@ -1,13 +0,0 @@ -package item - -type Profile struct { - Name string `nbt:"name"` - ID []int32 `nbt:"id"` - Properties []Properties `nbt:"properties"` -} - -type Properties struct { - Name string `nbt:"name"` - Value string `nbt:"value"` - Signature string `nbt:"signature"` // optional -} diff --git a/server/world/level/item/rarity.go b/server/world/level/item/rarity.go deleted file mode 100644 index c8875d9..0000000 --- a/server/world/level/item/rarity.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type Rarity struct { - Rarity string `nbt:"rarity"` -} diff --git a/server/world/level/item/recipes.go b/server/world/level/item/recipes.go deleted file mode 100644 index 23aed05..0000000 --- a/server/world/level/item/recipes.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type Recipe *struct { - ID string `nbt:"id"` -} diff --git a/server/world/level/item/repair_cost.go b/server/world/level/item/repair_cost.go deleted file mode 100644 index 7bf9d19..0000000 --- a/server/world/level/item/repair_cost.go +++ /dev/null @@ -1,5 +0,0 @@ -package item - -type RepairCost struct { - RepairCost int32 `nbt:"repair_cost"` -} diff --git a/server/world/level/item/stored_enchantments.go b/server/world/level/item/stored_enchantments.go index f4bbbde..c43072d 100644 --- a/server/world/level/item/stored_enchantments.go +++ b/server/world/level/item/stored_enchantments.go @@ -1,10 +1,6 @@ package item type StoredEnchantments struct { - Levels Level `nbt:"levels"` - ShowInTooltip bool `nbt:"show_in_tooltip"` -} - -type Level struct { - EnchantmentID int32 `nbt:"enchantment_id"` // ??? + Levels any `nbt:"levels"` + ShowInTooltip bool `nbt:"show_in_tooltip"` } diff --git a/server/world/level/item/tool.go b/server/world/level/item/tool.go index 8a52db6..6f5e839 100644 --- a/server/world/level/item/tool.go +++ b/server/world/level/item/tool.go @@ -6,12 +6,8 @@ type Tool struct { Rules []Rule `nbt:"rules"` } -type Rule *struct { - Blocks []Block `nbt:"blocks"` +type Rule struct { + Blocks any `nbt:"blocks"` Speed float32 `nbt:"speed"` CorrectForDrops bool `nbt:"correct_for_drops"` } - -type Block *struct { - ID string `nbt:"block"` // can be a block ID, block tag (with a #), or a list of block IDs -} diff --git a/server/world/level/item/writable_book_content.go b/server/world/level/item/writable_book_content.go index c162795..b19d536 100644 --- a/server/world/level/item/writable_book_content.go +++ b/server/world/level/item/writable_book_content.go @@ -1,11 +1,5 @@ package item type WritableBookContent struct { - Pages []BookPage `nbt:"pages"` -} - -type BookPage *struct { // ?????? - Raw string `nbt:"raw"` - Filtered string `nbt:"filtered"` - PlainTextContent string `nbt:"plain_text_content"` // ??? + Pages any `nbt:"pages"` } diff --git a/server/world/level/item/written_book_content.go b/server/world/level/item/written_book_content.go index 80d6f17..b33ab24 100644 --- a/server/world/level/item/written_book_content.go +++ b/server/world/level/item/written_book_content.go @@ -1,19 +1,13 @@ package item type WrittenBookContent struct { - Pages []Page `nbt:"pages"` + Pages any `nbt:"pages"` Title Title `nbt:"title"` Author string `nbt:"author"` Generation int32 `nbt:"generation"` Resolved bool `nbt:"resolved"` } -type Page *struct { // ?????? - Raw string `nbt:"raw"` - Filtered string `nbt:"filtered"` - PlainTextContent string `nbt:"plain_text_content"` // ??? -} - type Title struct { Raw string `nbt:"raw"` Filtered string `nbt:"filtered"`