├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── feature-request.md │ └── missing-documentation.md ├── pull_request_template.md └── workflows │ ├── main.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .rustfmt.toml ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE.md ├── README.md ├── assets ├── dimension.nbt └── dimension_codec.nbt ├── docs └── architecture.md ├── feather ├── base │ ├── Cargo.toml │ └── src │ │ ├── anvil.rs │ │ ├── anvil │ │ ├── block_entity.rs │ │ ├── entity.rs │ │ ├── level.dat │ │ ├── level.rs │ │ ├── player.dat │ │ ├── player.rs │ │ ├── region.rs │ │ └── serialization_helper.rs │ │ ├── block.rs │ │ ├── chunk.rs │ │ ├── chunk │ │ ├── biome_store.rs │ │ ├── blocks.rs │ │ ├── heightmap.rs │ │ ├── light.rs │ │ ├── packed_array.rs │ │ └── palette.rs │ │ ├── chunk_lock.rs │ │ ├── inventory.rs │ │ ├── lib.rs │ │ └── metadata.rs ├── blocks │ ├── Cargo.toml │ ├── generator │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── load.rs │ │ │ └── main.rs │ └── src │ │ ├── categories.rs │ │ ├── directions.rs │ │ ├── generated │ │ ├── block_fns.rs │ │ ├── mod.rs │ │ ├── properties.rs │ │ ├── table.dat │ │ ├── table.rs │ │ └── vanilla_ids.dat │ │ ├── lib.rs │ │ └── wall_blocks.rs ├── common │ ├── Cargo.toml │ └── src │ │ ├── chat.rs │ │ ├── chunk │ │ ├── cache.rs │ │ ├── entities.rs │ │ ├── loading.rs │ │ ├── mod.rs │ │ └── worker.rs │ │ ├── entities.rs │ │ ├── entities │ │ ├── area_effect_cloud.rs │ │ ├── armor_stand.rs │ │ ├── arrow.rs │ │ ├── bat.rs │ │ ├── bee.rs │ │ ├── blaze.rs │ │ ├── boat.rs │ │ ├── cat.rs │ │ ├── cave_spider.rs │ │ ├── chest_minecart.rs │ │ ├── chicken.rs │ │ ├── cod.rs │ │ ├── command_block_minecart.rs │ │ ├── cow.rs │ │ ├── creeper.rs │ │ ├── dolphin.rs │ │ ├── donkey.rs │ │ ├── dragon_fireball.rs │ │ ├── drowned.rs │ │ ├── egg.rs │ │ ├── elder_guardian.rs │ │ ├── end_crystal.rs │ │ ├── ender_dragon.rs │ │ ├── ender_pearl.rs │ │ ├── enderman.rs │ │ ├── endermite.rs │ │ ├── evoker.rs │ │ ├── evoker_fangs.rs │ │ ├── experience_bottle.rs │ │ ├── experience_orb.rs │ │ ├── eye_of_ender.rs │ │ ├── falling_block.rs │ │ ├── fireball.rs │ │ ├── firework_rocket.rs │ │ ├── fishing_bobber.rs │ │ ├── fox.rs │ │ ├── furnace_minecart.rs │ │ ├── ghast.rs │ │ ├── giant.rs │ │ ├── guardian.rs │ │ ├── hoglin.rs │ │ ├── hopper_minecart.rs │ │ ├── horse.rs │ │ ├── husk.rs │ │ ├── illusioner.rs │ │ ├── iron_golem.rs │ │ ├── item.rs │ │ ├── item_frame.rs │ │ ├── leash_knot.rs │ │ ├── lightning_bolt.rs │ │ ├── llama.rs │ │ ├── llama_spit.rs │ │ ├── magma_cube.rs │ │ ├── minecart.rs │ │ ├── mooshroom.rs │ │ ├── mule.rs │ │ ├── ocelot.rs │ │ ├── painting.rs │ │ ├── panda.rs │ │ ├── parrot.rs │ │ ├── phantom.rs │ │ ├── pig.rs │ │ ├── piglin.rs │ │ ├── piglin_brute.rs │ │ ├── pillager.rs │ │ ├── player.rs │ │ ├── polar_bear.rs │ │ ├── potion.rs │ │ ├── pufferfish.rs │ │ ├── rabbit.rs │ │ ├── ravager.rs │ │ ├── salmon.rs │ │ ├── sheep.rs │ │ ├── shulker.rs │ │ ├── shulker_bullet.rs │ │ ├── silverfish.rs │ │ ├── skeleton.rs │ │ ├── skeleton_horse.rs │ │ ├── slime.rs │ │ ├── small_fireball.rs │ │ ├── snow_golem.rs │ │ ├── snowball.rs │ │ ├── spawner_minecart.rs │ │ ├── spectral_arrow.rs │ │ ├── spider.rs │ │ ├── squid.rs │ │ ├── stray.rs │ │ ├── strider.rs │ │ ├── tnt.rs │ │ ├── tnt_minecart.rs │ │ ├── trader_llama.rs │ │ ├── trident.rs │ │ ├── tropical_fish.rs │ │ ├── turtle.rs │ │ ├── vex.rs │ │ ├── villager.rs │ │ ├── vindicator.rs │ │ ├── wandering_trader.rs │ │ ├── witch.rs │ │ ├── wither.rs │ │ ├── wither_skeleton.rs │ │ ├── wither_skull.rs │ │ ├── wolf.rs │ │ ├── zoglin.rs │ │ ├── zombie.rs │ │ ├── zombie_horse.rs │ │ ├── zombie_villager.rs │ │ └── zombified_piglin.rs │ │ ├── entity │ │ └── player.rs │ │ ├── events.rs │ │ ├── events │ │ ├── block_change.rs │ │ └── plugin_message.rs │ │ ├── game.rs │ │ ├── interactable.rs │ │ ├── lib.rs │ │ ├── region_worker.rs │ │ ├── tick_loop.rs │ │ ├── view.rs │ │ ├── window.rs │ │ └── world.rs ├── datapacks │ ├── Cargo.toml │ └── src │ │ ├── id.rs │ │ ├── lib.rs │ │ └── vanilla.rs ├── ecs │ ├── Cargo.toml │ ├── src │ │ ├── change.rs │ │ ├── event.rs │ │ ├── lib.rs │ │ ├── resources.rs │ │ └── system.rs │ └── tests │ │ ├── events.rs │ │ ├── random_access.rs │ │ └── systems.rs ├── old │ ├── README.md │ ├── core │ │ ├── Cargo.toml │ │ ├── biomes │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── game_rules │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── inventory │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── window.rs │ │ ├── item_block │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── mappings.rs │ │ ├── items │ │ │ ├── Cargo.toml │ │ │ ├── data │ │ │ │ └── 1.13.2.dat │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── loot │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ ├── model │ │ │ │ ├── Cargo.toml │ │ │ │ └── src │ │ │ │ │ └── lib.rs │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── misc │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── network │ │ │ └── src │ │ │ │ ├── mctypes.rs │ │ │ │ ├── packet.rs │ │ │ │ └── packets.rs │ │ ├── src │ │ │ └── lib.rs │ │ └── util │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── math_types.rs │ │ │ └── positions.rs │ ├── data │ │ ├── Cargo.toml │ │ ├── build.rs │ │ ├── lock │ │ ├── macro │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── src │ │ │ └── lib.rs │ ├── definitions │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── data │ │ │ ├── generated │ │ │ │ ├── block.ron │ │ │ │ └── item.ron │ │ │ └── tool.ron │ │ ├── generator │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── backend.rs │ │ │ │ ├── frontend.rs │ │ │ │ ├── generated.rs │ │ │ │ ├── main.rs │ │ │ │ └── model.rs │ │ ├── rebuild.sh │ │ └── src │ │ │ ├── generated │ │ │ ├── block.rs │ │ │ ├── item.rs │ │ │ ├── mod.rs │ │ │ └── tool.rs │ │ │ └── lib.rs │ └── server │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── block │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── chest.rs │ │ │ ├── init.rs │ │ │ └── lib.rs │ │ ├── chat │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── chunk │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── chunk_manager.rs │ │ │ ├── chunk_worker.rs │ │ │ ├── lib.rs │ │ │ └── save.rs │ │ ├── commands │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── arguments.rs │ │ │ ├── impls.rs │ │ │ └── lib.rs │ │ ├── config │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── entity │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── broadcasters.rs │ │ │ ├── broadcasters │ │ │ ├── entity_creation.rs │ │ │ ├── entity_deletion.rs │ │ │ ├── inventory.rs │ │ │ ├── item_collect.rs │ │ │ ├── metadata.rs │ │ │ └── movement.rs │ │ │ ├── drops.rs │ │ │ ├── fall_damage.rs │ │ │ ├── inventory.rs │ │ │ ├── lib.rs │ │ │ ├── mob.rs │ │ │ ├── mob │ │ │ ├── boss.rs │ │ │ ├── boss │ │ │ │ ├── ender_dragon.rs │ │ │ │ └── wither.rs │ │ │ ├── defensive.rs │ │ │ ├── defensive │ │ │ │ └── pufferfish.rs │ │ │ ├── hostile.rs │ │ │ ├── hostile │ │ │ │ ├── blaze.rs │ │ │ │ ├── creeper.rs │ │ │ │ ├── drowned.rs │ │ │ │ ├── elder_guardian.rs │ │ │ │ ├── endermite.rs │ │ │ │ ├── evoker.rs │ │ │ │ ├── ghast.rs │ │ │ │ ├── guardian.rs │ │ │ │ ├── husk.rs │ │ │ │ ├── magma_cube.rs │ │ │ │ ├── phantom.rs │ │ │ │ ├── shulker.rs │ │ │ │ ├── silverfish.rs │ │ │ │ ├── skeleton.rs │ │ │ │ ├── slime.rs │ │ │ │ ├── stray.rs │ │ │ │ ├── vex.rs │ │ │ │ ├── vindicator.rs │ │ │ │ ├── witch.rs │ │ │ │ ├── wither_skeleton.rs │ │ │ │ ├── zombie.rs │ │ │ │ └── zombie_villager.rs │ │ │ ├── neutral.rs │ │ │ ├── neutral │ │ │ │ ├── cave_spider.rs │ │ │ │ ├── dolphin.rs │ │ │ │ ├── enderman.rs │ │ │ │ ├── iron_golem.rs │ │ │ │ ├── llama.rs │ │ │ │ ├── polar_bear.rs │ │ │ │ ├── spider.rs │ │ │ │ ├── wolf.rs │ │ │ │ └── zombie_pigman.rs │ │ │ ├── passive.rs │ │ │ └── passive │ │ │ │ ├── bat.rs │ │ │ │ ├── cat.rs │ │ │ │ ├── chicken.rs │ │ │ │ ├── cod.rs │ │ │ │ ├── cow.rs │ │ │ │ ├── donkey.rs │ │ │ │ ├── horse.rs │ │ │ │ ├── mooshroom.rs │ │ │ │ ├── mule.rs │ │ │ │ ├── ocelot.rs │ │ │ │ ├── parrot.rs │ │ │ │ ├── pig.rs │ │ │ │ ├── rabbit.rs │ │ │ │ ├── salmon.rs │ │ │ │ ├── sheep.rs │ │ │ │ ├── skeleton_horse.rs │ │ │ │ ├── snow_golem.rs │ │ │ │ ├── squid.rs │ │ │ │ ├── tropical_fish.rs │ │ │ │ ├── turtle.rs │ │ │ │ └── villager.rs │ │ │ ├── object.rs │ │ │ ├── object │ │ │ ├── arrow.rs │ │ │ ├── falling_block.rs │ │ │ ├── item.rs │ │ │ └── supported_blocks.rs │ │ │ └── particle.rs │ │ ├── lighting │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── network │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── initial_handler.rs │ │ │ ├── lib.rs │ │ │ ├── listener.rs │ │ │ └── worker.rs │ │ ├── packet_buffer │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── physics │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── block_bboxes.rs │ │ │ ├── entity.rs │ │ │ ├── lib.rs │ │ │ └── math.rs │ │ ├── player │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── broadcasters.rs │ │ │ ├── broadcasters │ │ │ ├── animation.rs │ │ │ ├── block.rs │ │ │ ├── chat.rs │ │ │ ├── gamemode.rs │ │ │ ├── health.rs │ │ │ ├── keepalive.rs │ │ │ └── teleport.rs │ │ │ ├── chat.rs │ │ │ ├── death.rs │ │ │ ├── join.rs │ │ │ ├── lib.rs │ │ │ ├── packet_handlers.rs │ │ │ ├── packet_handlers │ │ │ ├── animation.rs │ │ │ ├── chat.rs │ │ │ ├── client_status.rs │ │ │ ├── digging.rs │ │ │ ├── inventory.rs │ │ │ ├── movement.rs │ │ │ ├── placement.rs │ │ │ ├── use_item.rs │ │ │ └── window.rs │ │ │ └── view.rs │ │ ├── src │ │ ├── event_handlers.rs │ │ ├── init.rs │ │ ├── lib.rs │ │ ├── main.rs │ │ ├── shutdown.rs │ │ └── systems.rs │ │ ├── template │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── test │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ └── unit.rs │ │ ├── types │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── components.rs │ │ │ ├── components │ │ │ ├── marker.rs │ │ │ ├── network.rs │ │ │ ├── physics.rs │ │ │ └── serialize.rs │ │ │ ├── events.rs │ │ │ ├── game.rs │ │ │ ├── lib.rs │ │ │ ├── misc.rs │ │ │ ├── resources.rs │ │ │ └── task.rs │ │ ├── util │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── block.rs │ │ │ ├── chunk_entities.rs │ │ │ ├── lib.rs │ │ │ ├── load.rs │ │ │ └── time.rs │ │ └── weather │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── plugin-host │ ├── Cargo.toml │ ├── macros │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ └── src │ │ ├── context.rs │ │ ├── context │ │ ├── native.rs │ │ ├── wasm.rs │ │ └── wasm │ │ │ └── bump.rs │ │ ├── env.rs │ │ ├── host_calls.rs │ │ ├── host_calls │ │ ├── block.rs │ │ ├── component.rs │ │ ├── entity.rs │ │ ├── entity_builder.rs │ │ ├── event.rs │ │ ├── plugin_message.rs │ │ ├── query.rs │ │ └── system.rs │ │ ├── host_function.rs │ │ ├── lib.rs │ │ ├── plugin.rs │ │ ├── plugin │ │ ├── native.rs │ │ └── wasm.rs │ │ ├── thread_pinned.rs │ │ └── wasm_ptr_ext.rs ├── protocol │ ├── Cargo.toml │ └── src │ │ ├── codec.rs │ │ ├── io.rs │ │ ├── lib.rs │ │ ├── packets.rs │ │ └── packets │ │ ├── client.rs │ │ ├── client │ │ ├── handshake.rs │ │ ├── login.rs │ │ ├── play.rs │ │ └── status.rs │ │ ├── server.rs │ │ └── server │ │ ├── login.rs │ │ ├── play.rs │ │ ├── play │ │ ├── chunk_data.rs │ │ └── update_light.rs │ │ └── status.rs ├── server │ ├── Cargo.toml │ ├── config.toml │ └── src │ │ ├── chunk_subscriptions.rs │ │ ├── client.rs │ │ ├── config.rs │ │ ├── connection_worker.rs │ │ ├── entities.rs │ │ ├── favicon.rs │ │ ├── initial_handler.rs │ │ ├── initial_handler │ │ ├── proxy.rs │ │ └── proxy │ │ │ ├── bungeecord.rs │ │ │ └── velocity.rs │ │ ├── lib.rs │ │ ├── listener.rs │ │ ├── logging.rs │ │ ├── main.rs │ │ ├── network_id_registry.rs │ │ ├── options.rs │ │ ├── packet_handlers.rs │ │ ├── packet_handlers │ │ ├── entity_action.rs │ │ ├── interaction.rs │ │ ├── inventory.rs │ │ └── movement.rs │ │ ├── player_count.rs │ │ ├── systems.rs │ │ └── systems │ │ ├── block.rs │ │ ├── chat.rs │ │ ├── entity.rs │ │ ├── entity │ │ └── spawn_packet.rs │ │ ├── gamemode.rs │ │ ├── particle.rs │ │ ├── player_join.rs │ │ ├── player_leave.rs │ │ ├── plugin_message.rs │ │ ├── tablist.rs │ │ └── view.rs ├── utils │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── worldgen │ ├── Cargo.toml │ └── src │ ├── biomes │ ├── distorted_voronoi.rs │ ├── mod.rs │ └── two_level.rs │ ├── composition.rs │ ├── density_map │ ├── density.rs │ ├── height.rs │ └── mod.rs │ ├── finishers │ ├── clumped.rs │ ├── mod.rs │ ├── single.rs │ └── snow.rs │ ├── lib.rs │ ├── noise.rs │ ├── superflat.rs │ ├── util.rs │ └── voronoi.rs ├── libcraft ├── LICENSE.md ├── README.md ├── blocks │ ├── Cargo.toml │ ├── assets │ │ ├── raw_block_properties.bc.gz │ │ └── raw_block_states.bc.gz │ ├── src │ │ ├── block.rs │ │ ├── block_data.rs │ │ ├── data.rs │ │ ├── lib.rs │ │ ├── registry.rs │ │ └── simplified_block.rs │ └── tests │ │ └── blocks.rs ├── core │ ├── Cargo.toml │ └── src │ │ ├── biome.rs │ │ ├── block.rs │ │ ├── consts.rs │ │ ├── dimension.rs │ │ ├── entity.rs │ │ ├── gamemode.rs │ │ ├── gamerules.rs │ │ ├── interaction.rs │ │ ├── lib.rs │ │ ├── particle.rs │ │ ├── player.rs │ │ └── positions.rs ├── generators │ ├── Cargo.toml │ ├── README.md │ ├── generate.ps1 │ ├── generate.sh │ ├── libcraft-data │ │ ├── entity_metadata.json │ │ ├── inventory.json │ │ └── simplified_block.json │ ├── python │ │ ├── .pep8 │ │ ├── biome.py │ │ ├── block.py │ │ ├── common.py │ │ ├── entity.py │ │ ├── inventory.py │ │ ├── item.py │ │ ├── particle.py │ │ └── simplified_block.py │ └── src │ │ ├── common.rs │ │ ├── generators.rs │ │ └── main.rs ├── inventory │ ├── Cargo.toml │ └── src │ │ ├── inventory.rs │ │ └── lib.rs ├── items │ ├── Cargo.toml │ └── src │ │ ├── enchantment.rs │ │ ├── inventory_slot.rs │ │ ├── item.rs │ │ ├── item_stack.rs │ │ └── lib.rs ├── macros │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── particles │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── particle.rs └── text │ ├── Cargo.toml │ └── src │ ├── lib.rs │ ├── text.rs │ ├── text │ ├── markdown.rs │ └── markdown │ │ ├── lexer.rs │ │ ├── parser.rs │ │ ├── parser │ │ └── events.rs │ │ └── translator.rs │ └── title.rs ├── proxy ├── Cargo.toml ├── README.md └── src │ └── main.rs └── quill ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── api ├── Cargo.toml ├── plugin-macro │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── src │ ├── entities.rs │ ├── entity.rs │ ├── entity_builder.rs │ ├── game.rs │ ├── lib.rs │ ├── query.rs │ └── setup.rs ├── cargo-quill ├── Cargo.toml └── src │ └── main.rs ├── common ├── Cargo.toml └── src │ ├── block.rs │ ├── component.rs │ ├── components.rs │ ├── entities.rs │ ├── entities │ ├── area_effect_cloud.rs │ ├── armor_stand.rs │ ├── arrow.rs │ ├── bat.rs │ ├── bee.rs │ ├── blaze.rs │ ├── boat.rs │ ├── cat.rs │ ├── cave_spider.rs │ ├── chest_minecart.rs │ ├── chicken.rs │ ├── cod.rs │ ├── command_block_minecart.rs │ ├── cow.rs │ ├── creeper.rs │ ├── dolphin.rs │ ├── donkey.rs │ ├── dragon_fireball.rs │ ├── drowned.rs │ ├── egg.rs │ ├── elder_guardian.rs │ ├── end_crystal.rs │ ├── ender_dragon.rs │ ├── ender_pearl.rs │ ├── enderman.rs │ ├── endermite.rs │ ├── evoker.rs │ ├── evoker_fangs.rs │ ├── experience_bottle.rs │ ├── experience_orb.rs │ ├── eye_of_ender.rs │ ├── falling_block.rs │ ├── fireball.rs │ ├── firework_rocket.rs │ ├── fishing_bobber.rs │ ├── fox.rs │ ├── furnace_minecart.rs │ ├── ghast.rs │ ├── giant.rs │ ├── guardian.rs │ ├── hoglin.rs │ ├── hopper_minecart.rs │ ├── horse.rs │ ├── husk.rs │ ├── illusioner.rs │ ├── iron_golem.rs │ ├── item.rs │ ├── item_frame.rs │ ├── leash_knot.rs │ ├── lightning_bolt.rs │ ├── llama.rs │ ├── llama_spit.rs │ ├── magma_cube.rs │ ├── minecart.rs │ ├── mooshroom.rs │ ├── mule.rs │ ├── ocelot.rs │ ├── painting.rs │ ├── panda.rs │ ├── parrot.rs │ ├── phantom.rs │ ├── pig.rs │ ├── piglin.rs │ ├── piglin_brute.rs │ ├── pillager.rs │ ├── player.rs │ ├── polar_bear.rs │ ├── potion.rs │ ├── pufferfish.rs │ ├── rabbit.rs │ ├── ravager.rs │ ├── salmon.rs │ ├── sheep.rs │ ├── shulker.rs │ ├── shulker_bullet.rs │ ├── silverfish.rs │ ├── skeleton.rs │ ├── skeleton_horse.rs │ ├── slime.rs │ ├── small_fireball.rs │ ├── snow_golem.rs │ ├── snowball.rs │ ├── spawner_minecart.rs │ ├── spectral_arrow.rs │ ├── spider.rs │ ├── squid.rs │ ├── stray.rs │ ├── strider.rs │ ├── tnt.rs │ ├── tnt_minecart.rs │ ├── trader_llama.rs │ ├── trident.rs │ ├── tropical_fish.rs │ ├── turtle.rs │ ├── vex.rs │ ├── villager.rs │ ├── vindicator.rs │ ├── wandering_trader.rs │ ├── witch.rs │ ├── wither.rs │ ├── wither_skeleton.rs │ ├── wither_skull.rs │ ├── wolf.rs │ ├── zoglin.rs │ ├── zombie.rs │ ├── zombie_horse.rs │ ├── zombie_villager.rs │ └── zombified_piglin.rs │ ├── entity.rs │ ├── entity_init.rs │ ├── events.rs │ ├── events │ ├── block_interact.rs │ ├── change.rs │ ├── entity.rs │ └── interact_entity.rs │ ├── lib.rs │ └── utils.rs ├── docs └── components.md ├── example-plugins ├── block-access │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── block-place │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── observe-creativemode-flight-event │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── particle-example │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── plugin-message │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── query-entities │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── simple │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── titles │ ├── Cargo.toml │ └── src │ └── lib.rs ├── plugin-format ├── Cargo.toml └── src │ ├── lib.rs │ └── metadata.rs ├── sys-macros ├── Cargo.toml └── src │ └── lib.rs └── sys ├── Cargo.toml └── src └── lib.rs /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # TITLE - Replace 2 | 3 | ## Status 4 | 5 | - [ ] Ready 6 | - [x] Development 7 | - [ ] Hold 8 | 9 | ## Description 10 | 11 | _Short description what you did and/or fixed_ 12 | 13 | ## Related issues 14 | 15 | _Leave empty if none_ 16 | 17 | ## Checklist 18 | 19 | - [ ] Ran `cargo fmt`, `cargo clippy --all-targets`, `cargo build --release` and `cargo test` and fixed any generated errors! 20 | - [ ] Removed unnecessary commented out code 21 | - [ ] Used specific traces (if you trace actions please specify the cause i.e. the player) 22 | 23 | Note: if you locally don't get any errors, but GitHub Actions fails (especially at `clippy`) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/target 2 | **/*.rs.bk 3 | **/.idea 4 | **/.vscode 5 | 6 | # Cargo build configuration 7 | .cargo 8 | 9 | world/ 10 | /config.toml 11 | plugins/ 12 | 13 | # Python cache files (libcraft) 14 | **/__pycache__/ 15 | 16 | # macOS desktop files 17 | **/.DS_STORE 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "minecraft-data"] 2 | path = minecraft-data 3 | url = https://github.com/PrismarineJS/minecraft-data 4 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | # We use rustfmt, and formatting is checked in CI. 2 | # Please run `cargo fmt` before committing 3 | 4 | # Empty config: default settings! 5 | -------------------------------------------------------------------------------- /assets/dimension.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/assets/dimension.nbt -------------------------------------------------------------------------------- /assets/dimension_codec.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/assets/dimension_codec.nbt -------------------------------------------------------------------------------- /feather/base/src/anvil.rs: -------------------------------------------------------------------------------- 1 | //! Loading and saving to/from 2 | //! world saves. Currently includes region file loading, 3 | //! player data loading, and level data loading. 4 | 5 | pub mod block_entity; 6 | pub mod entity; 7 | pub mod level; 8 | pub mod player; 9 | pub mod region; 10 | -------------------------------------------------------------------------------- /feather/base/src/anvil/level.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/feather/base/src/anvil/level.dat -------------------------------------------------------------------------------- /feather/base/src/anvil/player.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/feather/base/src/anvil/player.dat -------------------------------------------------------------------------------- /feather/blocks/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-blocks" 3 | version = "0.1.0" 4 | authors = [ "caelunshun " ] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | anyhow = "1" 9 | bincode = "1" 10 | num-traits = "0.2" 11 | once_cell = { version = "1" } 12 | serde = { version = "1", features = [ "derive" ] } 13 | thiserror = "1" 14 | vek = "0.14" 15 | libcraft-blocks = { path = "../../libcraft/blocks" } 16 | -------------------------------------------------------------------------------- /feather/blocks/generator/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-blocks-generator" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [lib] 8 | name = "feather_blocks_generator" 9 | path = "src/lib.rs" 10 | 11 | [[bin]] 12 | name = "feather-blocks-generator" 13 | path = "src/main.rs" 14 | 15 | [dependencies] 16 | serde = { version = "1", features = ["derive"] } 17 | serde_json = "1" 18 | anyhow = "1" 19 | indexmap = { version = "1", features = ["serde-1"] } 20 | quote = "1" 21 | syn = "1" 22 | proc-macro2 = "1" 23 | heck = "0.3" 24 | once_cell = "1" 25 | maplit = "1" 26 | bincode = "1" 27 | -------------------------------------------------------------------------------- /feather/blocks/src/generated/mod.rs: -------------------------------------------------------------------------------- 1 | mod block_fns; 2 | mod properties; 3 | pub mod table; 4 | -------------------------------------------------------------------------------- /feather/blocks/src/generated/table.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/feather/blocks/src/generated/table.dat -------------------------------------------------------------------------------- /feather/blocks/src/generated/vanilla_ids.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/feather/blocks/src/generated/vanilla_ids.dat -------------------------------------------------------------------------------- /feather/common/src/chunk/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod cache; 2 | pub mod entities; 3 | pub mod loading; 4 | pub mod worker; 5 | -------------------------------------------------------------------------------- /feather/common/src/entities/area_effect_cloud.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::AreaEffectCloud; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(AreaEffectCloud) 9 | .add(EntityKind::AreaEffectCloud); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entities/armor_stand.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ArmorStand; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ArmorStand).add(EntityKind::ArmorStand); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/arrow.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Arrow; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Arrow).add(EntityKind::Arrow); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/bat.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Bat; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Bat).add(EntityKind::Bat); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/bee.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Bee; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Bee).add(EntityKind::Bee); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/blaze.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Blaze; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Blaze).add(EntityKind::Blaze); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/boat.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Boat; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Boat).add(EntityKind::Boat); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/cat.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Cat; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Cat).add(EntityKind::Cat); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/cave_spider.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::CaveSpider; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(CaveSpider).add(EntityKind::CaveSpider); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/chest_minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ChestMinecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ChestMinecart).add(EntityKind::ChestMinecart); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/chicken.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Chicken; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Chicken).add(EntityKind::Chicken); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/cod.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Cod; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Cod).add(EntityKind::Cod); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/command_block_minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::CommandBlockMinecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(CommandBlockMinecart) 9 | .add(EntityKind::CommandBlockMinecart); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entities/cow.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Cow; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Cow).add(EntityKind::Cow); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/creeper.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Creeper; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Creeper).add(EntityKind::Creeper); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/dolphin.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Dolphin; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Dolphin).add(EntityKind::Dolphin); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/donkey.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Donkey; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Donkey).add(EntityKind::Donkey); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/dragon_fireball.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::DragonFireball; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(DragonFireball).add(EntityKind::DragonFireball); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/drowned.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Drowned; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Drowned).add(EntityKind::Drowned); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/egg.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Egg; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Egg).add(EntityKind::Egg); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/elder_guardian.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ElderGuardian; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ElderGuardian).add(EntityKind::ElderGuardian); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/end_crystal.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::EndCrystal; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(EndCrystal).add(EntityKind::EndCrystal); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/ender_dragon.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::EnderDragon; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(EnderDragon).add(EntityKind::EnderDragon); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/ender_pearl.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::EnderPearl; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(EnderPearl).add(EntityKind::EnderPearl); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/enderman.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Enderman; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Enderman).add(EntityKind::Enderman); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/endermite.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Endermite; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Endermite).add(EntityKind::Endermite); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/evoker.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Evoker; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Evoker).add(EntityKind::Evoker); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/evoker_fangs.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::EvokerFangs; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(EvokerFangs).add(EntityKind::EvokerFangs); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/experience_bottle.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ExperienceBottle; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(ExperienceBottle) 9 | .add(EntityKind::ExperienceBottle); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entities/experience_orb.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ExperienceOrb; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ExperienceOrb).add(EntityKind::ExperienceOrb); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/eye_of_ender.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::EyeOfEnder; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(EyeOfEnder).add(EntityKind::EyeOfEnder); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/falling_block.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::FallingBlock; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(FallingBlock).add(EntityKind::FallingBlock); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/fireball.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Fireball; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Fireball).add(EntityKind::Fireball); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/firework_rocket.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::FireworkRocket; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(FireworkRocket).add(EntityKind::FireworkRocket); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/fishing_bobber.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::FishingBobber; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(FishingBobber).add(EntityKind::FishingBobber); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/fox.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Fox; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Fox).add(EntityKind::Fox); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/furnace_minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::FurnaceMinecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(FurnaceMinecart) 9 | .add(EntityKind::FurnaceMinecart); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entities/ghast.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Ghast; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Ghast).add(EntityKind::Ghast); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/giant.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Giant; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Giant).add(EntityKind::Giant); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/guardian.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Guardian; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Guardian).add(EntityKind::Guardian); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/hoglin.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Hoglin; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Hoglin).add(EntityKind::Hoglin); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/hopper_minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::HopperMinecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(HopperMinecart).add(EntityKind::HopperMinecart); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/horse.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Horse; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Horse).add(EntityKind::Horse); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/husk.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Husk; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Husk).add(EntityKind::Husk); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/illusioner.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Illusioner; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Illusioner).add(EntityKind::Illusioner); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/iron_golem.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::IronGolem; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(IronGolem).add(EntityKind::IronGolem); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/item.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Item; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Item).add(EntityKind::Item); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/item_frame.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ItemFrame; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ItemFrame).add(EntityKind::ItemFrame); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/leash_knot.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::LeashKnot; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(LeashKnot).add(EntityKind::LeashKnot); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/lightning_bolt.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::LightningBolt; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(LightningBolt).add(EntityKind::LightningBolt); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/llama.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Llama; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Llama).add(EntityKind::Llama); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/llama_spit.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::LlamaSpit; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(LlamaSpit).add(EntityKind::LlamaSpit); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/magma_cube.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::MagmaCube; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(MagmaCube).add(EntityKind::MagmaCube); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Minecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Minecart).add(EntityKind::Minecart); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/mooshroom.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Mooshroom; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Mooshroom).add(EntityKind::Mooshroom); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/mule.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Mule; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Mule).add(EntityKind::Mule); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/ocelot.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Ocelot; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Ocelot).add(EntityKind::Ocelot); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/painting.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Painting; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Painting).add(EntityKind::Painting); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/panda.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Panda; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Panda).add(EntityKind::Panda); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/parrot.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Parrot; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Parrot).add(EntityKind::Parrot); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/phantom.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Phantom; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Phantom).add(EntityKind::Phantom); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/pig.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Pig; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Pig).add(EntityKind::Pig); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/piglin.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Piglin; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Piglin).add(EntityKind::Piglin); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/piglin_brute.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::PiglinBrute; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(PiglinBrute).add(EntityKind::PiglinBrute); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/pillager.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Pillager; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Pillager).add(EntityKind::Pillager); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/polar_bear.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::PolarBear; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(PolarBear).add(EntityKind::PolarBear); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/potion.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Potion; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Potion).add(EntityKind::Potion); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/pufferfish.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Pufferfish; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Pufferfish).add(EntityKind::Pufferfish); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/rabbit.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Rabbit; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Rabbit).add(EntityKind::Rabbit); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/ravager.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Ravager; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Ravager).add(EntityKind::Ravager); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/salmon.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Salmon; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Salmon).add(EntityKind::Salmon); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/sheep.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Sheep; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Sheep).add(EntityKind::Sheep); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/shulker.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Shulker; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Shulker).add(EntityKind::Shulker); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/shulker_bullet.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ShulkerBullet; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ShulkerBullet).add(EntityKind::ShulkerBullet); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/silverfish.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Silverfish; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Silverfish).add(EntityKind::Silverfish); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/skeleton.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Skeleton; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Skeleton).add(EntityKind::Skeleton); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/skeleton_horse.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::SkeletonHorse; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(SkeletonHorse).add(EntityKind::SkeletonHorse); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/slime.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Slime; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Slime).add(EntityKind::Slime); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/small_fireball.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::SmallFireball; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(SmallFireball).add(EntityKind::SmallFireball); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/snow_golem.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::SnowGolem; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(SnowGolem).add(EntityKind::SnowGolem); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/snowball.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Snowball; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Snowball).add(EntityKind::Snowball); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/spawner_minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::SpawnerMinecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(SpawnerMinecart) 9 | .add(EntityKind::SpawnerMinecart); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entities/spectral_arrow.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::SpectralArrow; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(SpectralArrow).add(EntityKind::SpectralArrow); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/spider.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Spider; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Spider).add(EntityKind::Spider); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/squid.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Squid; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Squid).add(EntityKind::Squid); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/stray.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Stray; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Stray).add(EntityKind::Stray); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/strider.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Strider; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Strider).add(EntityKind::Strider); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/tnt.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Tnt; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Tnt).add(EntityKind::Tnt); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/tnt_minecart.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::TntMinecart; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(TntMinecart).add(EntityKind::TntMinecart); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/trader_llama.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::TraderLlama; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(TraderLlama).add(EntityKind::TraderLlama); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/trident.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Trident; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Trident).add(EntityKind::Trident); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/tropical_fish.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::TropicalFish; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(TropicalFish).add(EntityKind::TropicalFish); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/turtle.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Turtle; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Turtle).add(EntityKind::Turtle); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/vex.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Vex; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Vex).add(EntityKind::Vex); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/villager.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Villager; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Villager).add(EntityKind::Villager); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/vindicator.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Vindicator; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Vindicator).add(EntityKind::Vindicator); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/wandering_trader.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::WanderingTrader; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(WanderingTrader) 9 | .add(EntityKind::WanderingTrader); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entities/witch.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Witch; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Witch).add(EntityKind::Witch); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/wither.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Wither; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Wither).add(EntityKind::Wither); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/wither_skeleton.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::WitherSkeleton; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(WitherSkeleton).add(EntityKind::WitherSkeleton); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/wither_skull.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::WitherSkull; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(WitherSkull).add(EntityKind::WitherSkull); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/wolf.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Wolf; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Wolf).add(EntityKind::Wolf); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/zoglin.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Zoglin; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Zoglin).add(EntityKind::Zoglin); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/zombie.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::Zombie; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(Zombie).add(EntityKind::Zombie); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/zombie_horse.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ZombieHorse; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ZombieHorse).add(EntityKind::ZombieHorse); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/zombie_villager.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ZombieVillager; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder.add(ZombieVillager).add(EntityKind::ZombieVillager); 8 | } 9 | -------------------------------------------------------------------------------- /feather/common/src/entities/zombified_piglin.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | use quill_common::entities::ZombifiedPiglin; 4 | 5 | pub fn build_default(builder: &mut EntityBuilder) { 6 | super::build_default(builder); 7 | builder 8 | .add(ZombifiedPiglin) 9 | .add(EntityKind::ZombifiedPiglin); 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/entity/player.rs: -------------------------------------------------------------------------------- 1 | use base::EntityKind; 2 | use ecs::EntityBuilder; 3 | 4 | /// Marker component. Indicates that an entity is a player. 5 | pub struct Player; 6 | 7 | /// Fills an `EntityBuilder` with components for a player. 8 | pub fn build(builder: &mut EntityBuilder) -> &mut EntityBuilder { 9 | builder.add(Player).add(EntityKind::Player) 10 | } 11 | -------------------------------------------------------------------------------- /feather/common/src/events/plugin_message.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug)] 2 | pub struct PluginMessageEvent { 3 | pub channel: String, 4 | pub data: Vec, 5 | } 6 | -------------------------------------------------------------------------------- /feather/datapacks/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-datapacks" 3 | version = "0.1.0" 4 | authors = [ "caelunshun " ] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | ahash = "0.4" 9 | anyhow = "1" 10 | log = "0.4" 11 | serde = { version = "1", features = [ "derive" ] } 12 | serde_json = "1" 13 | smartstring = { version = "0.2", features = [ "serde" ] } 14 | thiserror = "1" 15 | ureq = { version = "2", default-features = false, features = [ "tls" ] } 16 | zip = { version = "0.5", default-features = false, features = [ "deflate", "bzip2" ] } 17 | -------------------------------------------------------------------------------- /feather/ecs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-ecs" 3 | version = "0.1.0" 4 | authors = [ "caelunshun " ] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | ahash = "0.7" 9 | anyhow = "1" 10 | hecs = { git = "https://github.com/feather-rs/feather-hecs" } 11 | log = "0.4" 12 | thiserror = "1" 13 | utils = { path = "../utils", package = "feather-utils" } 14 | 15 | -------------------------------------------------------------------------------- /feather/old/README.md: -------------------------------------------------------------------------------- 1 | ### Code archive 2 | 3 | This directory contains code from before the [1.16 refactor/rewrite](https://github.com/feather-rs/feather/pull/307). 4 | 5 | It may be useful to salvage some of this code to reimplement features that were lost in the rewrite. 6 | -------------------------------------------------------------------------------- /feather/old/core/biomes/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-biomes" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | strum = "0.18" 9 | strum_macros = "0.18" 10 | num-traits = "0.2" 11 | num-derive = "0.3" 12 | -------------------------------------------------------------------------------- /feather/old/core/game_rules/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-game-rules" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] -------------------------------------------------------------------------------- /feather/old/core/inventory/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-inventory" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-items = { path = "../items" } 9 | 10 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 11 | legion = { git = "https://github.com/TomGillen/legion", rev = "bd441f4811e7a9e877a0f479a674bbdbf4e4cda3" } 12 | thiserror = "1.0" 13 | parking_lot = "0.10" 14 | maplit = "1.0" 15 | smallvec = "1.4" 16 | once_cell = "1.3" 17 | -------------------------------------------------------------------------------- /feather/old/core/item_block/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-item-block" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-blocks = { path = "../blocks" } 9 | feather-items = { path = "../items" } 10 | -------------------------------------------------------------------------------- /feather/old/core/items/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-items" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-definitions = { path = "../../definitions" } 9 | -------------------------------------------------------------------------------- /feather/old/core/items/data/1.13.2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/feather/old/core/items/data/1.13.2.dat -------------------------------------------------------------------------------- /feather/old/core/loot/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-loot" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-loot-model = { path = "model" } 9 | feather-items = { path = "../items" } 10 | 11 | serde_json = "1.0" 12 | once_cell = "1.4" 13 | rand = "0.7" 14 | smallvec = "1.4" 15 | thiserror = "1.0" 16 | ahash = "0.3" 17 | inlinable_string = "0.1" 18 | itertools = "0.9" 19 | 20 | [build-dependencies] 21 | feather-data = { path = "../../data" } 22 | 23 | feather-loot-model = { path = "model" } 24 | serde_json = "1.0" 25 | walkdir = "2.3" 26 | anyhow = "1.0" 27 | -------------------------------------------------------------------------------- /feather/old/core/loot/model/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-loot-model" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde = { version = "1.0", features = ["derive"] } 9 | smallvec = { version = "1.4", features = ["serde"] } 10 | inlinable_string = { version = "0.1", features = ["serde"] } 11 | ahash = "0.3" 12 | rand = "0.7" 13 | -------------------------------------------------------------------------------- /feather/old/core/misc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-misc" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-blocks = { path = "../blocks" } 9 | feather-items = { path = "../items" } 10 | ordinalizer = "0.1" 11 | -------------------------------------------------------------------------------- /feather/old/core/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub extern crate feather_anvil as anvil; 2 | pub extern crate feather_biomes as biomes; 3 | pub extern crate feather_blocks as blocks; 4 | pub extern crate feather_chunk as chunk; 5 | pub extern crate feather_chunk_map as chunk_map; 6 | pub extern crate feather_entity_metadata as entitymeta; 7 | pub extern crate feather_game_rules as game_rules; 8 | pub extern crate feather_inventory as inventory; 9 | pub extern crate feather_item_block as item_block; 10 | pub extern crate feather_items as items; 11 | pub extern crate feather_loot as loot; 12 | pub extern crate feather_misc as misc; 13 | pub extern crate feather_text as text; 14 | pub extern crate feather_util as util; 15 | 16 | pub use util::position; 17 | -------------------------------------------------------------------------------- /feather/old/core/util/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-util" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde = { version = "1.0", features = ["derive"] } 9 | vek = "0.10" 10 | nalgebra-glm = "0.6" 11 | num-traits = "0.2" 12 | num-derive = "0.3" 13 | hash32 = "0.1" 14 | hash32-derive = "0.1" 15 | -------------------------------------------------------------------------------- /feather/old/data/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-data" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | publish = false 7 | 8 | build = "build.rs" 9 | 10 | [dependencies] 11 | feather-data-macro = { path = "macro" } 12 | 13 | [build-dependencies] 14 | reqwest = { version = "0.10", features = ["blocking"] } 15 | anyhow = "1.0" 16 | zip = "0.5.8" -------------------------------------------------------------------------------- /feather/old/data/lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/feather/old/data/lock -------------------------------------------------------------------------------- /feather/old/data/macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-data-macro" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | publish = false 7 | 8 | [lib] 9 | proc-macro = true 10 | 11 | [dependencies] 12 | quote = "= 1.0.1" 13 | syn = "1.0" 14 | proc-macro2 = "1.0" 15 | -------------------------------------------------------------------------------- /feather/old/definitions/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-definitions" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | num-traits = "0.2" 9 | num-derive = "0.3" 10 | -------------------------------------------------------------------------------- /feather/old/definitions/README.md: -------------------------------------------------------------------------------- 1 | `feather-definitions` provides a clean 2 | way to define gameplay information, such 3 | as block tags, item tags, and block/item associated 4 | values. -------------------------------------------------------------------------------- /feather/old/definitions/generator/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-definitions-generator" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-data = { path = "../../data" } 9 | 10 | serde = { version = "1.0", features = ["derive"] } 11 | serde_json = "1.0" 12 | ron = { git = "https://github.com/ron-rs/ron", rev = "0a7d83da66a4009f169967c5d2ac382a446bb76e" } 13 | anyhow = "1.0" 14 | walkdir = "2.3" 15 | heck = "0.3" 16 | itertools = "0.9" 17 | regex = "1.3" 18 | once_cell = "1.3" 19 | indexmap = { version = "1.3", features = ["serde-1"] } 20 | 21 | syn = "1.0" 22 | proc-macro2 = "1.0" 23 | quote = "1.0" 24 | -------------------------------------------------------------------------------- /feather/old/definitions/rebuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cargo run --bin feather-definitions-generator -------------------------------------------------------------------------------- /feather/old/definitions/src/generated/mod.rs: -------------------------------------------------------------------------------- 1 | // This file is @generated 2 | mod block; 3 | pub use block::*; 4 | mod item; 5 | pub use item::*; 6 | mod tool; 7 | pub use tool::*; 8 | -------------------------------------------------------------------------------- /feather/old/definitions/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate num_derive; 3 | 4 | #[allow(warnings)] 5 | mod generated; 6 | 7 | pub use generated::*; 8 | 9 | impl Default for BlockKind { 10 | fn default() -> Self { 11 | BlockKind::Air 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /feather/old/server/block/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-block" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | feather-server-entity = { path = "../entity" } 12 | 13 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 14 | once_cell = "1.4" 15 | ahash = "0.3" 16 | num-traits = "0.2" 17 | inventory = "0.1" 18 | log = "0.4" 19 | anyhow = "1.0" 20 | arrayvec = "0.5" 21 | 22 | [dev-dependencies] 23 | feather-test-framework = { path = "../test" } 24 | -------------------------------------------------------------------------------- /feather/old/server/chat/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-chat" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | -------------------------------------------------------------------------------- /feather/old/server/chat/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | -------------------------------------------------------------------------------- /feather/old/server/chunk/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-chunk" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | feather-server-worldgen = { path = "../worldgen" } 12 | 13 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 14 | parking_lot = "0.10" 15 | ahash = "0.3" 16 | rayon = "1.3" 17 | crossbeam = "0.7" 18 | log = "0.4" 19 | smallvec = "1.4" 20 | anyhow = "1.0" 21 | -------------------------------------------------------------------------------- /feather/old/server/chunk/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | 3 | mod chunk_manager; 4 | pub mod chunk_worker; 5 | mod save; 6 | 7 | pub use chunk_manager::*; 8 | pub use save::*; 9 | -------------------------------------------------------------------------------- /feather/old/server/commands/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-commands" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | feather-definitions = { path = "../../definitions" } 12 | 13 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 14 | lieutenant = { git = "https://github.com/feather-rs/lieutenant", branch = "master" } 15 | smallvec = "1.4" 16 | anyhow = "1.0" 17 | thiserror = "1.0" 18 | rand = "0.7" 19 | vek = "0.10" 20 | uuid = { version = "0.8", features = ["v3"] } 21 | tokio = { version = "0.2", features = ["full"] } 22 | -------------------------------------------------------------------------------- /feather/old/server/config/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-config" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-util = { path = "../../core/util" } 9 | 10 | tokio = { version = "0.2", features = ["full"] } 11 | anyhow = "1.0" 12 | serde = { version = "1.0", features = ["derive"] } 13 | humantime-serde = "1.0" 14 | toml = "0.5" 15 | -------------------------------------------------------------------------------- /feather/old/server/entity/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-entity" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | 12 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 13 | nalgebra-glm = "0.6" 14 | inventory = "0.1" 15 | parking_lot = "0.10" 16 | rand = "0.7" 17 | anyhow = "1.0" 18 | num-traits = "0.2" 19 | num-derive = "0.3" 20 | log = "0.4" 21 | smallvec = "1.4" 22 | 23 | [dev-dependencies] 24 | feather-test-framework = { path = "../test" } 25 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/broadcasters.rs: -------------------------------------------------------------------------------- 1 | mod entity_creation; 2 | mod entity_deletion; 3 | mod inventory; 4 | mod item_collect; 5 | mod metadata; 6 | mod movement; 7 | 8 | pub use self::inventory::*; 9 | pub use entity_creation::*; 10 | pub use entity_deletion::*; 11 | pub use item_collect::*; 12 | pub use metadata::*; 13 | pub use movement::*; 14 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/boss.rs: -------------------------------------------------------------------------------- 1 | pub mod ender_dragon; 2 | pub mod wither; 3 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/boss/ender_dragon.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct EnderDragon; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::EnderDragon).with(EnderDragon) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/boss/wither.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Wither; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Wither).with(Wither) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/defensive.rs: -------------------------------------------------------------------------------- 1 | pub mod pufferfish; 2 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/defensive/pufferfish.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Pufferfish; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Pufferfish).with(Pufferfish) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile.rs: -------------------------------------------------------------------------------- 1 | pub mod blaze; 2 | pub mod creeper; 3 | pub mod drowned; 4 | pub mod elder_guardian; 5 | pub mod endermite; 6 | pub mod evoker; 7 | pub mod ghast; 8 | pub mod guardian; 9 | pub mod husk; 10 | pub mod magma_cube; 11 | pub mod phantom; 12 | pub mod shulker; 13 | pub mod silverfish; 14 | pub mod skeleton; 15 | pub mod slime; 16 | pub mod stray; 17 | pub mod vex; 18 | pub mod vindicator; 19 | pub mod witch; 20 | pub mod wither_skeleton; 21 | pub mod zombie; 22 | pub mod zombie_villager; 23 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/blaze.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Blaze; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Blaze).with(Blaze) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/creeper.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Creeper; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Creeper).with(Creeper) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/drowned.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Drowned; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Drowned).with(Drowned) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/elder_guardian.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct ElderGuardian; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::ElderGuardian).with(ElderGuardian) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/endermite.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Endermite; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Endermite).with(Endermite) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/evoker.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Evoker; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::EvocationIllager).with(Evoker) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/ghast.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Ghast; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Ghast).with(Ghast) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/guardian.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Guardian; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Guardian).with(Guardian) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/husk.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Husk; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Husk).with(Husk) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/magma_cube.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct MagmaCube; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::MagmaCube).with(MagmaCube) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/phantom.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Phantom; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Phantom).with(Phantom) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/shulker.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Shulker; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Shulker).with(Shulker) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/silverfish.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Silverfish; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Silverfish).with(Silverfish) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/skeleton.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Skeleton; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Skeleton).with(Skeleton) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/slime.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Slime; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Slime).with(Slime) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/stray.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Stray; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Stray).with(Stray) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/vex.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Vex; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Vex).with(Vex) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/vindicator.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Vindicator; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::VindicationIllager).with(Vindicator) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/witch.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Witch; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Witch).with(Witch) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/wither_skeleton.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct WitherSkeleton; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::WitherSkeleton).with(WitherSkeleton) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/zombie.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Zombie; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Zombie).with(Zombie) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/hostile/zombie_villager.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct ZombieVillager; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::ZombieVillager).with(ZombieVillager) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral.rs: -------------------------------------------------------------------------------- 1 | pub mod cave_spider; 2 | pub mod dolphin; 3 | pub mod enderman; 4 | pub mod iron_golem; 5 | pub mod llama; 6 | pub mod polar_bear; 7 | pub mod spider; 8 | pub mod wolf; 9 | pub mod zombie_pigman; 10 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/cave_spider.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct CaveSpider; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::CaveSpider).with(CaveSpider) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/dolphin.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Dolphin; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Dolphin).with(Dolphin) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/enderman.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Enderman; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Enderman).with(Enderman) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/iron_golem.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct IronGolem; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::IronGolem).with(IronGolem) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/llama.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Llama; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Llama).with(Llama) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/polar_bear.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct PolarBear; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::PolarBear).with(PolarBear) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/spider.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Spider; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Spider).with(Spider) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/wolf.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Wolf; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Wolf).with(Wolf) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/neutral/zombie_pigman.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct ZombiePigman; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::PigZombie).with(ZombiePigman) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive.rs: -------------------------------------------------------------------------------- 1 | pub mod bat; 2 | pub mod cat; 3 | pub mod chicken; 4 | pub mod cod; 5 | pub mod cow; 6 | pub mod donkey; 7 | pub mod horse; 8 | pub mod mooshroom; 9 | pub mod mule; 10 | pub mod ocelot; 11 | pub mod parrot; 12 | pub mod pig; 13 | pub mod rabbit; 14 | pub mod salmon; 15 | pub mod sheep; 16 | pub mod skeleton_horse; 17 | pub mod snow_golem; 18 | pub mod squid; 19 | pub mod tropical_fish; 20 | pub mod turtle; 21 | pub mod villager; 22 | 23 | // Base components for all passive mobs. 24 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/bat.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Bat; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Bat).with(Bat) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/cat.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Cat; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Ocelot).with(Cat) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/chicken.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Chicken; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Chicken).with(Chicken) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/cod.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Cod; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Cod).with(Cod) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/cow.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Cow; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Cow).with(Cow) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/donkey.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Donkey; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Donkey).with(Donkey) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/horse.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Horse; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Horse).with(Horse) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/mooshroom.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Mooshroom; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::MushroomCow).with(Mooshroom) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/mule.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Mule; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Mule).with(Mule) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/ocelot.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Ocelot; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Ocelot).with(Ocelot) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/parrot.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Parrot; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Parrot).with(Parrot) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/pig.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Pig; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Pig).with(Pig) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/rabbit.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Rabbit; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Rabbit).with(Rabbit) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/salmon.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Salmon; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Salmon).with(Salmon) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/sheep.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Sheep; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Sheep).with(Sheep) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/skeleton_horse.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct SkeletonHorse; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Horse).with(SkeletonHorse) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/snow_golem.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct SnowGolem; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::SnowGolem).with(SnowGolem) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/squid.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Squid; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Squid).with(Squid) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/tropical_fish.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct TropicalFish; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::TropicalFish).with(TropicalFish) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/turtle.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Turtle; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Turtle).with(Turtle) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/mob/passive/villager.rs: -------------------------------------------------------------------------------- 1 | use crate::{mob, MobKind}; 2 | use fecs::EntityBuilder; 3 | 4 | pub struct Villager; 5 | 6 | pub fn create() -> EntityBuilder { 7 | mob::base(MobKind::Villager).with(Villager) 8 | } 9 | -------------------------------------------------------------------------------- /feather/old/server/entity/src/object.rs: -------------------------------------------------------------------------------- 1 | pub mod arrow; 2 | pub mod falling_block; 3 | pub mod item; 4 | pub mod supported_blocks; 5 | -------------------------------------------------------------------------------- /feather/old/server/lighting/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-lighting" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-physics = { path = "../physics" } 10 | feather-server-types = { path = "../types" } 11 | feather-server-util = { path = "../util" } 12 | 13 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 14 | arrayvec = "0.5" 15 | smallvec = "1.4" 16 | ahash = "0.3" 17 | crossbeam = "0.7" 18 | parking_lot = "0.10" 19 | log = "0.4" 20 | nalgebra-glm = "0.6" 21 | -------------------------------------------------------------------------------- /feather/old/server/packet_buffer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-packet-buffer" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | 10 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 11 | smallvec = "1.4" 12 | parking_lot = "0.10" 13 | strum = "0.18" 14 | num-traits = "0.2" 15 | ahash = "0.3" 16 | once_cell = "1.3" 17 | indexmap = "1.3" 18 | crossbeam = "0.7" 19 | -------------------------------------------------------------------------------- /feather/old/server/physics/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-physics" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | 11 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 12 | nalgebra = "0.20" 13 | nalgebra-glm = "0.6" 14 | ncollide3d = "0.22" 15 | heapless = "0.5" 16 | smallvec = "1.4" 17 | bitflags = "1.2" 18 | parking_lot = "0.10" 19 | -------------------------------------------------------------------------------- /feather/old/server/physics/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Module for calculating physics interactions. 2 | 3 | extern crate nalgebra_glm as glm; 4 | 5 | mod block_bboxes; 6 | mod entity; 7 | mod math; 8 | 9 | pub use entity::entity_physics; 10 | pub use math::*; 11 | -------------------------------------------------------------------------------- /feather/old/server/player/src/broadcasters.rs: -------------------------------------------------------------------------------- 1 | mod animation; 2 | mod block; 3 | mod chat; 4 | mod gamemode; 5 | mod health; 6 | mod keepalive; 7 | mod teleport; 8 | 9 | pub use animation::on_player_animation_broadcast_animation; 10 | pub use block::*; 11 | pub use chat::{flush_player_message_receiver, on_chat_broadcast}; 12 | pub use gamemode::*; 13 | pub use health::on_health_update_send; 14 | pub use keepalive::broadcast_keepalive; 15 | pub use teleport::send_teleported; 16 | -------------------------------------------------------------------------------- /feather/old/server/player/src/broadcasters/animation.rs: -------------------------------------------------------------------------------- 1 | use feather_core::network::packets::AnimationClientbound; 2 | use feather_server_types::{Game, NetworkId, PlayerAnimationEvent}; 3 | use fecs::World; 4 | 5 | /// Broadcasts animations. 6 | #[fecs::event_handler] 7 | pub fn on_player_animation_broadcast_animation( 8 | event: &PlayerAnimationEvent, 9 | game: &mut Game, 10 | world: &mut World, 11 | ) { 12 | let packet = AnimationClientbound { 13 | entity_id: world.get::(event.player).0, 14 | animation: event.animation, 15 | }; 16 | game.broadcast_entity_update(world, packet, event.player, Some(event.player)); 17 | } 18 | -------------------------------------------------------------------------------- /feather/old/server/player/src/broadcasters/health.rs: -------------------------------------------------------------------------------- 1 | use feather_core::network::packets::UpdateHealth; 2 | use feather_server_types::{HealthUpdateEvent, Network}; 3 | use fecs::World; 4 | 5 | /// When a player's health is updated, updates it on the client. 6 | #[fecs::event_handler] 7 | pub fn on_health_update_send(event: &HealthUpdateEvent, world: &mut World) { 8 | if let Some(network) = world.try_get::(event.entity) { 9 | let packet = UpdateHealth { 10 | health: event.new as f32, 11 | food: 20, // todo 12 | saturation: 5.0, // todo 13 | }; 14 | network.send(packet); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /feather/old/server/player/src/broadcasters/keepalive.rs: -------------------------------------------------------------------------------- 1 | use feather_core::network::packets::KeepAliveClientbound; 2 | use feather_server_types::{Game, TPS}; 3 | use fecs::World; 4 | 5 | /// Broadcasts keepalives every second. 6 | #[fecs::system] 7 | pub fn broadcast_keepalive(game: &Game, world: &mut World) { 8 | if game.tick_count % TPS == 0 { 9 | let packet = KeepAliveClientbound { 10 | keep_alive_id: game.tick_count, 11 | }; 12 | game.broadcast_global(world, packet, None); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /feather/old/server/player/src/chat.rs: -------------------------------------------------------------------------------- 1 | use feather_core::text::{Color, TextRoot, Translate}; 2 | use feather_server_types::{ChatEvent, ChatPosition, Game, Name, PlayerJoinEvent}; 3 | use fecs::World; 4 | 5 | #[fecs::event_handler] 6 | pub fn on_player_join_broadcast_join_message( 7 | event: &PlayerJoinEvent, 8 | game: &mut Game, 9 | world: &mut World, 10 | ) { 11 | let message: String = { 12 | let name = world.get::(event.player); 13 | TextRoot::from( 14 | Translate::MultiplayerPlayerJoined * vec![name.0.to_string()] * Color::Yellow, 15 | ) 16 | .into() 17 | }; 18 | 19 | game.handle( 20 | world, 21 | ChatEvent { 22 | message, 23 | position: ChatPosition::Chat, 24 | }, 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /feather/old/server/src/main.rs: -------------------------------------------------------------------------------- 1 | use tokio::runtime; 2 | 3 | fn main() { 4 | // Start Tokio runtime, then call lib::main(). 5 | let mut runtime = runtime::Builder::new() 6 | .threaded_scheduler() 7 | .enable_all() 8 | .build() 9 | .expect("failed to start Tokio runtime"); 10 | 11 | let handle = runtime.handle().clone(); 12 | 13 | runtime.block_on(async move { 14 | feather_server::main(handle).await; 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /feather/old/server/template/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-template" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | 12 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 13 | -------------------------------------------------------------------------------- /feather/old/server/template/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | -------------------------------------------------------------------------------- /feather/old/server/test/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-test-framework" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | feather-server-chunk = { path = "../chunk" } 12 | feather-server-player = { path = "../player" } 13 | feather-server-network = { path = "../network" } 14 | 15 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 16 | crossbeam = "0.7" 17 | flume = "0.7" 18 | tokio = { version = "0.2", features = ["full"] } 19 | -------------------------------------------------------------------------------- /feather/old/server/test/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! A testing framework for `feather-server`. Provides 2 | //! functions for both unit and integration testing. 3 | 4 | #![forbid(unsafe_code)] 5 | 6 | mod unit; 7 | 8 | pub use unit::Test; 9 | -------------------------------------------------------------------------------- /feather/old/server/types/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Defines components and resources so that subcrates can interact 2 | //! in some ways without depending on each other. 3 | 4 | extern crate nalgebra_glm as glm; 5 | 6 | mod components; 7 | mod events; 8 | mod game; 9 | mod misc; 10 | mod resources; 11 | pub mod task; 12 | 13 | pub use components::*; 14 | pub use events::*; 15 | pub use misc::*; 16 | pub use resources::*; 17 | 18 | // Constants 19 | /// The number of ticks executed per second. 20 | pub const TPS: u64 = 20; 21 | /// The number of milliseconds per tick. 22 | pub const TICK_LENGTH: u64 = 1000 / TPS; 23 | 24 | /// Height from a player's position where the camera lies. 25 | pub const PLAYER_EYE_HEIGHT: f64 = 1.62; 26 | -------------------------------------------------------------------------------- /feather/old/server/types/src/resources.rs: -------------------------------------------------------------------------------- 1 | use std::sync::{Arc, RwLock}; 2 | 3 | pub use crate::game::*; 4 | pub use crate::task::*; 5 | pub use feather_server_config::{Ban, BanInfo, Config, ProxyMode}; 6 | pub type WrappedBanInfo = Arc>; 7 | 8 | pub use feather_server_packet_buffer::{PacketBuffer, PacketBuffers}; 9 | -------------------------------------------------------------------------------- /feather/old/server/util/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-util" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | 11 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 12 | nalgebra-glm = "0.6" 13 | arrayvec = "0.5" 14 | smallvec = "1.4" 15 | rand = "0.7" 16 | rand_distr = "0.2" 17 | itertools = "0.9" 18 | ahash = "0.3" 19 | inventory = "0.1" 20 | anyhow = "1.0" 21 | uuid = { version = "0.8", features = ["v3"] } 22 | md5 = "0.7" 23 | reqwest = { version = "^0.10", features = ["json"] } 24 | serde = { version = "1.0", features = ["derive"] } 25 | -------------------------------------------------------------------------------- /feather/old/server/weather/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-server-weather" 3 | version = "0.6.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | feather-core = { path = "../../core" } 9 | feather-server-types = { path = "../types" } 10 | feather-server-util = { path = "../util" } 11 | 12 | fecs = { git = "https://github.com/feather-rs/fecs", rev = "0c4838d65b41ca059012b6e9147eabf0c275a731" } 13 | rand = "0.7" 14 | -------------------------------------------------------------------------------- /feather/plugin-host/macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-plugin-host-macros" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [lib] 8 | proc-macro = true 9 | 10 | [dependencies] 11 | syn = { version = "1", features = ["full"] } 12 | quote = "1" 13 | proc-macro2 = "1" 14 | 15 | [dev-dependencies] 16 | anyhow = "1" 17 | -------------------------------------------------------------------------------- /feather/plugin-host/src/env.rs: -------------------------------------------------------------------------------- 1 | use std::sync::Arc; 2 | 3 | use wasmer::{ExportError, HostEnvInitError, Instance, WasmerEnv}; 4 | 5 | use crate::context::PluginContext; 6 | 7 | /// The [`WasmerEnv`] passed to host calls. 8 | #[derive(Clone)] 9 | pub struct PluginEnv { 10 | pub context: Arc, 11 | } 12 | 13 | impl WasmerEnv for PluginEnv { 14 | fn init_with_instance(&mut self, instance: &Instance) -> Result<(), HostEnvInitError> { 15 | self.context 16 | .init_with_instance(instance) 17 | .map_err(|e| wasmer::HostEnvInitError::Export(ExportError::Missing(e.to_string())))?; 18 | Ok(()) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /feather/plugin-host/src/wasm_ptr_ext.rs: -------------------------------------------------------------------------------- 1 | use wasmer::{Array, WasmPtr}; 2 | 3 | pub trait WasmPtrExt { 4 | fn add(self, offset: usize) -> Self; 5 | } 6 | 7 | impl WasmPtrExt for WasmPtr 8 | where 9 | T: Copy, 10 | { 11 | fn add(self, offset: usize) -> Self { 12 | WasmPtr::new(self.offset() + offset as u32) 13 | } 14 | } 15 | 16 | pub trait WasmPtrIntoArray { 17 | fn array(self) -> WasmPtr 18 | where 19 | T: Copy; 20 | } 21 | 22 | impl WasmPtrIntoArray for WasmPtr 23 | where 24 | T: Copy, 25 | { 26 | fn array(self) -> WasmPtr { 27 | WasmPtr::new(self.offset()) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /feather/protocol/src/packets/client/handshake.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | def_enum! { 4 | HandshakeState (VarInt) { 5 | 1 = Status, 6 | 2 = Login, 7 | } 8 | } 9 | 10 | packets! { 11 | Handshake { 12 | protocol_version VarInt; 13 | server_address String; 14 | server_port u16; 15 | next_state HandshakeState; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /feather/protocol/src/packets/client/login.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | packets! { 4 | LoginStart { 5 | name String; 6 | } 7 | 8 | EncryptionResponse { 9 | shared_secret VarIntPrefixedVec; 10 | verify_token VarIntPrefixedVec; 11 | } 12 | 13 | LoginPluginResponse { 14 | message_id VarInt; 15 | successful bool; 16 | data LengthInferredVecU8; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /feather/protocol/src/packets/client/status.rs: -------------------------------------------------------------------------------- 1 | packets! { 2 | Request {} 3 | 4 | Ping { 5 | payload i64; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /feather/protocol/src/packets/server/login.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | packets! { 4 | DisconnectLogin { 5 | reason String; 6 | } 7 | 8 | EncryptionRequest { 9 | server_id String; 10 | public_key VarIntPrefixedVec; 11 | verify_token VarIntPrefixedVec; 12 | } 13 | 14 | LoginSuccess { 15 | uuid Uuid; 16 | username String; 17 | } 18 | 19 | SetCompression { 20 | threshold VarInt; 21 | } 22 | 23 | LoginPluginRequest { 24 | message_id VarInt; 25 | channel String; 26 | data LengthInferredVecU8; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /feather/protocol/src/packets/server/status.rs: -------------------------------------------------------------------------------- 1 | packets! { 2 | Response { 3 | response String; 4 | } 5 | 6 | Pong { 7 | payload i64; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /feather/server/src/network_id_registry.rs: -------------------------------------------------------------------------------- 1 | use std::sync::atomic::{AtomicI32, Ordering}; 2 | 3 | /// An entity's ID used by the protocol 4 | /// in `entity_id` fields. 5 | #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] 6 | pub struct NetworkId(pub i32); 7 | 8 | impl NetworkId { 9 | /// Creates a new, unique network ID. 10 | pub(crate) fn new() -> Self { 11 | static NEXT: AtomicI32 = AtomicI32::new(0); 12 | // In theory, this can overflow if the server 13 | // creates 4 billion entities. The hope is that 14 | // old entities will have died out at that point. 15 | Self(NEXT.fetch_add(1, Ordering::SeqCst)) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /feather/server/src/systems/plugin_message.rs: -------------------------------------------------------------------------------- 1 | use crate::{ClientId, Server}; 2 | use common::{events::PluginMessageEvent, Game}; 3 | use ecs::{SysResult, SystemExecutor}; 4 | 5 | pub fn register(systems: &mut SystemExecutor) { 6 | systems 7 | .group::() 8 | .add_system(send_plugin_message_packets); 9 | } 10 | 11 | fn send_plugin_message_packets(game: &mut Game, server: &mut Server) -> SysResult { 12 | for (_, (&client_id, event)) in game.ecs.query::<(&ClientId, &PluginMessageEvent)>().iter() { 13 | if let Some(client) = server.clients.get(client_id) { 14 | client.send_plugin_message(event.channel.clone(), event.data.clone()); 15 | } 16 | } 17 | 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /feather/utils/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-utils" 3 | version = "0.1.0" 4 | authors = [ "caelunshun " ] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | 9 | [dev-dependencies] 10 | -------------------------------------------------------------------------------- /feather/utils/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Assorted utilities not directly related to Minecraft/Feather. 2 | 3 | /// Swap-removes an item from a vector by equality. 4 | pub fn vec_remove_item(vec: &mut Vec, item: &T) { 5 | let index = vec.iter().position(|x| x == item); 6 | if let Some(index) = index { 7 | vec.swap_remove(index); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /feather/worldgen/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "feather-worldgen" 3 | version = "0.6.0" 4 | authors = [ "caelunshun " ] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | base = { path = "../base", package = "feather-base" } 9 | bitvec = "0.21" 10 | log = "0.4" 11 | num-traits = "0.2" 12 | once_cell = "1" 13 | rand = "0.7" 14 | rand_xorshift = "0.2" 15 | simdnoise = { git = "https://github.com/jackmott/rust-simd-noise", rev = "3a4f3e6" } # needed for https://github.com/jackmott/rust-simd-noise/pull/31 and https://github.com/jackmott/rust-simd-noise/pull/36 16 | smallvec = "1" 17 | strum = "0.21" 18 | 19 | [dev-dependencies] 20 | approx = "0.3" 21 | -------------------------------------------------------------------------------- /feather/worldgen/src/biomes/mod.rs: -------------------------------------------------------------------------------- 1 | //! Biome grid creation. 2 | 3 | mod distorted_voronoi; 4 | mod two_level; 5 | 6 | pub use distorted_voronoi::DistortedVoronoiBiomeGenerator; 7 | pub use two_level::TwoLevelBiomeGenerator; 8 | -------------------------------------------------------------------------------- /feather/worldgen/src/density_map/mod.rs: -------------------------------------------------------------------------------- 1 | mod density; 2 | mod height; 3 | 4 | pub use density::DensityMapGeneratorImpl; 5 | pub use height::HeightMapGenerator; 6 | -------------------------------------------------------------------------------- /feather/worldgen/src/finishers/mod.rs: -------------------------------------------------------------------------------- 1 | //! Various finishers for world generation, such as grass, snow, and trees. 2 | 3 | mod clumped; 4 | mod single; 5 | mod snow; 6 | 7 | pub use clumped::ClumpedFoliageFinisher; 8 | pub use single::SingleFoliageFinisher; 9 | pub use snow::SnowFinisher; 10 | -------------------------------------------------------------------------------- /feather/worldgen/src/util.rs: -------------------------------------------------------------------------------- 1 | //! Utilities for world generation. 2 | 3 | use base::ChunkPosition; 4 | 5 | /// Deterministically a seed for the given chunk. This allows 6 | /// different seeds to be used for different chunk. 7 | pub fn shuffle_seed_for_chunk(seed: u64, chunk: ChunkPosition) -> u64 { 8 | seed.wrapping_mul((chunk.x as u64).wrapping_add(1)) 9 | .wrapping_add((chunk.z as u64).wrapping_add(1)) 10 | } 11 | 12 | /// Deterministically shuffles a seed for the given chunk and chunk column. 13 | pub fn shuffle_seed_for_column(seed: u64, chunk: ChunkPosition, col_x: usize, col_z: usize) -> u64 { 14 | shuffle_seed_for_chunk(seed, chunk) 15 | .wrapping_add(2) 16 | .wrapping_mul(((col_x as u64) << 4) + 4) 17 | .wrapping_mul(col_z as u64 + 4) 18 | } 19 | -------------------------------------------------------------------------------- /libcraft/blocks/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-blocks" 3 | version = "0.1.0" 4 | authors = ["Caelum van Ispelen "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | libcraft-core = { path = "../core" } 9 | libcraft-items = { path = "../items" } 10 | libcraft-macros = { path = "../macros" } 11 | 12 | ahash = "0.7" 13 | bincode = "1" 14 | bytemuck = { version = "1", features = ["derive"] } 15 | flate2 = "1" 16 | once_cell = "1" 17 | serde = { version = "1", features = ["derive"] } 18 | thiserror = "1" 19 | num-traits = "0.2" 20 | num-derive = "0.3" 21 | -------------------------------------------------------------------------------- /libcraft/blocks/assets/raw_block_properties.bc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/libcraft/blocks/assets/raw_block_properties.bc.gz -------------------------------------------------------------------------------- /libcraft/blocks/assets/raw_block_states.bc.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feather-rs/feather/4b152224ca8308c331a00e70dea97e98f6cab9bd/libcraft/blocks/assets/raw_block_states.bc.gz -------------------------------------------------------------------------------- /libcraft/blocks/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod block; 2 | mod block_data; 3 | pub mod data; 4 | mod registry; 5 | mod simplified_block; 6 | 7 | pub use block::BlockKind; 8 | pub use block_data::*; 9 | pub use registry::BlockState; 10 | pub use simplified_block::SimplifiedBlockKind; 11 | -------------------------------------------------------------------------------- /libcraft/core/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-core" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | bytemuck = { version = "1", features = ["derive"] } 9 | num-derive = "0.3" 10 | num-traits = "0.2" 11 | serde = { version = "1", features = ["derive"] } 12 | strum = "0.21" 13 | strum_macros = "0.21" 14 | vek = "0.14" -------------------------------------------------------------------------------- /libcraft/core/src/consts.rs: -------------------------------------------------------------------------------- 1 | /// Width, in blocks, of a chunk. 2 | pub const CHUNK_WIDTH: usize = 16; 3 | /// Height, in blocks, of a chunk. 4 | pub const CHUNK_HEIGHT: usize = 256; 5 | -------------------------------------------------------------------------------- /libcraft/core/src/interaction.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Serialize, Deserialize, Clone)] 4 | pub enum InteractionType { 5 | Interact, 6 | Attack, 7 | InteractAt, 8 | } 9 | -------------------------------------------------------------------------------- /libcraft/core/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Foundational types and constants for Minecraft. 2 | 3 | mod biome; 4 | pub mod block; 5 | mod consts; 6 | mod dimension; 7 | mod entity; 8 | mod gamemode; 9 | mod gamerules; 10 | mod interaction; 11 | mod player; 12 | mod positions; 13 | 14 | pub use biome::Biome; 15 | pub use consts::*; 16 | pub use dimension::Dimension; 17 | pub use entity::EntityKind; 18 | pub use gamemode::Gamemode; 19 | pub use gamerules::GameRules; 20 | pub use interaction::InteractionType; 21 | pub use player::Hand; 22 | pub use positions::{ 23 | vec3, Aabb, BlockFace, BlockPosition, ChunkPosition, Mat4f, Position, Vec2d, Vec2f, Vec2i, 24 | Vec3d, Vec3f, Vec3i, Vec4d, Vec4f, Vec4i, 25 | }; 26 | -------------------------------------------------------------------------------- /libcraft/core/src/player.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Serialize, Deserialize, Clone)] 4 | pub enum Hand { 5 | Main, 6 | Offhand, 7 | } 8 | -------------------------------------------------------------------------------- /libcraft/generators/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-generators" 3 | version = "0.1.0" 4 | authors = ["Kalle Kankaanpää"] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | libcraft-blocks = { path = "../blocks" } 9 | 10 | anyhow = "1" 11 | bincode = "1" 12 | flate2 = "1" 13 | serde_json = "1" 14 | serde = "1" -------------------------------------------------------------------------------- /libcraft/generators/generate.ps1: -------------------------------------------------------------------------------- 1 | $generators = Get-ChildItem "python" -Filter *.py 2 | 3 | Write-Host "Running python generators" 4 | foreach ($generator in $generators) { 5 | python python/$generator 6 | } 7 | 8 | Write-Host "Running rust generators" 9 | cargo run --package libcraft-generators --bin libcraft-generators 10 | 11 | cargo fmt -------------------------------------------------------------------------------- /libcraft/generators/generate.sh: -------------------------------------------------------------------------------- 1 | generators=$(find python/ -type f -name "*.py") 2 | 3 | echo "Running python generators" 4 | for generator in ${generators[@]}; do 5 | echo "Running $generator" 6 | python3 $generator 7 | done 8 | 9 | echo "Running rust generators" 10 | cargo run --package libcraft-generators --bin libcraft-generators 11 | 12 | cargo fmt -------------------------------------------------------------------------------- /libcraft/generators/python/.pep8: -------------------------------------------------------------------------------- 1 | [pycodestyle] 2 | max_line_length = 120 -------------------------------------------------------------------------------- /libcraft/generators/src/main.rs: -------------------------------------------------------------------------------- 1 | mod common; 2 | mod generators; 3 | 4 | use common::load_block_report; 5 | use generators::{generate_block_properties, generate_block_states}; 6 | 7 | fn main() -> anyhow::Result<()> { 8 | let block_report = load_block_report("blocks.json")?; 9 | println!("Generating raw block states"); 10 | generate_block_states(&block_report, "crates/blocks/assets/raw_block_states.bc.gz")?; 11 | println!("Generating raw block properties"); 12 | generate_block_properties( 13 | &block_report, 14 | "crates/blocks/assets/raw_block_properties.bc.gz", 15 | )?; 16 | 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /libcraft/inventory/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-inventory" 3 | version = "0.1.0" 4 | authors = ["Tracreed "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | libcraft-items = { path = "../items" } 11 | parking_lot = "0.11" 12 | -------------------------------------------------------------------------------- /libcraft/items/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-items" 3 | version = "0.1.0" 4 | authors = ["Kalle Kankaanpää", "Pau Machetti "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde = { version = "1", features = ["derive"] } 9 | -------------------------------------------------------------------------------- /libcraft/items/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | #![deny(warnings)] 3 | #![warn(clippy::pedantic)] 4 | #![allow(clippy::module_name_repetitions)] 5 | 6 | //! Libcraft crate for item manipulation. 7 | 8 | mod enchantment; 9 | mod inventory_slot; 10 | mod item; 11 | mod item_stack; 12 | 13 | pub use enchantment::{Enchantment, EnchantmentKind}; 14 | pub use inventory_slot::InventorySlot; 15 | pub use item::*; 16 | pub use item_stack::{ItemStack, ItemStackBuilder, ItemStackError, ItemStackMeta}; 17 | -------------------------------------------------------------------------------- /libcraft/macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-macros" 3 | version = "0.1.0" 4 | authors = ["Kalle Kankaanpää"] 5 | edition = "2018" 6 | 7 | [lib] 8 | proc-macro = true 9 | 10 | [dependencies] 11 | syn = "1.0" 12 | quote = "1.0" 13 | proc-macro2 = "1.0" 14 | -------------------------------------------------------------------------------- /libcraft/particles/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-particles" 3 | version = "0.1.0" 4 | authors = ["Gijs de Jong "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | 9 | libcraft-blocks = { path = "../blocks"} 10 | libcraft-items = { path = "../items" } 11 | ordinalizer = "0.1.0" 12 | bytemuck = { version = "1", features = ["derive"] } 13 | num-derive = "0.3" 14 | num-traits = "0.2" 15 | serde = { version = "1", features = ["derive"] } -------------------------------------------------------------------------------- /libcraft/particles/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod particle; 2 | 3 | pub use particle::{Particle, ParticleKind}; 4 | -------------------------------------------------------------------------------- /libcraft/text/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libcraft-text" 3 | version = "0.1.0" 4 | authors = ["Gijs de Jong ", "caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt" } 9 | nom = "5" 10 | nom_locate = "2" 11 | serde = { version = "1", features = [ "derive" ] } 12 | serde_json = "1" 13 | serde_with = "1" 14 | uuid = { version = "0.8", features = [ "serde" ] } 15 | thiserror = "1" 16 | -------------------------------------------------------------------------------- /libcraft/text/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod text; 2 | pub mod title; 3 | 4 | pub use text::*; 5 | pub use title::Title; 6 | -------------------------------------------------------------------------------- /libcraft/text/src/text/markdown.rs: -------------------------------------------------------------------------------- 1 | mod lexer; 2 | mod parser; 3 | pub mod translator; 4 | 5 | pub(crate) use self::lexer::{lex_input, LexToken, LexTokenType, Span, Tokens}; 6 | pub(crate) use self::parser::{events, parse_tokens, Token, TokenType}; 7 | -------------------------------------------------------------------------------- /libcraft/text/src/title.rs: -------------------------------------------------------------------------------- 1 | use crate::Text; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | // Based on https://wiki.vg/index.php?title=Protocol&oldid=16459#Title 5 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)] 6 | pub struct Title { 7 | pub title: Option, 8 | pub sub_title: Option, 9 | pub fade_in: u32, 10 | pub stay: u32, 11 | pub fade_out: u32, 12 | } 13 | 14 | impl Title { 15 | pub const HIDE: Title = Title { 16 | title: None, 17 | sub_title: None, 18 | fade_in: 0, 19 | stay: 0, 20 | fade_out: 0, 21 | }; 22 | 23 | pub const RESET: Title = Title { 24 | title: None, 25 | sub_title: None, 26 | fade_in: 0, 27 | stay: 0, 28 | fade_out: 0, 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /proxy/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "proxy" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | feather-protocol = { path = "../feather/protocol" } 8 | clap = { version = "3.0.5", features = ["derive"] } 9 | pretty-hex = "0.2.1" 10 | log = "0.4.14" 11 | fern = "0.6.0" 12 | anyhow = "1.0.52" 13 | colored = "2.0.0" 14 | time = { version = "0.3", features = ["local-offset", "formatting", "macros"] } 15 | -------------------------------------------------------------------------------- /quill/README.md: -------------------------------------------------------------------------------- 1 | # quill 2 | [![Discord](https://img.shields.io/discord/619316022800809995)](https://discordapp.com/invite/4eYmK69) 3 | 4 | A WebAssembly-based plugin API for Minecraft servers. Currently in development. 5 | 6 | Plugins written for [Feather](https://github.com/feather-rs/feather) servers use `quill`. 7 | 8 | ## For Feather developers 9 | See [`docs`](./docs) for information on Quill internals. 10 | 11 | ## __**Important Notice For Plugin Developers**__ 12 | There is currently a miscompilation issue with the latest versions of rustc! 13 | 14 | __**1.51.0 IS CONFIRMED STABLE, PLEASE USE IT IF YOU ARE COMPILING PLUGINS**__ 15 | -------------------------------------------------------------------------------- /quill/api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "quill" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | plugin-macro = { path = "./plugin-macro" } 9 | libcraft-core = { path = "../../libcraft/core" } 10 | libcraft-particles = { path = "../../libcraft/particles" } 11 | libcraft-blocks = { path = "../../libcraft/blocks" } 12 | libcraft-text = { path = "../../libcraft/text" } 13 | bincode = "1" 14 | bytemuck = "1" 15 | quill-sys = { path = "../sys" } 16 | quill-common = { path = "../common" } 17 | thiserror = "1" 18 | uuid = "0.8" 19 | itertools = "0.10.0" 20 | serde_json = "1" 21 | 22 | -------------------------------------------------------------------------------- /quill/api/plugin-macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "plugin-macro" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | proc-macro = true 8 | 9 | [dependencies] 10 | syn = { version = "1.0.86", features = ["full"] } 11 | quote = "1.0.14" -------------------------------------------------------------------------------- /quill/api/src/entities.rs: -------------------------------------------------------------------------------- 1 | //! Defines components for all Minecraft entities. 2 | //! 3 | //! # Marker components 4 | //! Each entity has a "marker component": 5 | //! just a struct (often with no fields) 6 | //! that signifies the type of an entity. 7 | //! 8 | //! For example, all horse entities have the [`Horse`] 9 | //! marker component. 10 | //! 11 | //! For certain entities, these components also 12 | //! contain data. For example, the [`Item`] marker 13 | //! component (for item entities) has an `ItemStack` 14 | //! field that indicates the type of the item. 15 | 16 | #[doc(inline)] 17 | pub use quill_common::entities::*; 18 | -------------------------------------------------------------------------------- /quill/cargo-quill/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "cargo-quill" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | quill-plugin-format = { path = "../plugin-format" } 9 | cargo_metadata = "0.12" 10 | anyhow = "1" 11 | argh = "0.1" 12 | heck = "0.3" 13 | -------------------------------------------------------------------------------- /quill/common/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "quill-common" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | bincode = "1" 9 | bytemuck = { version = "1", features = ["derive"] } 10 | derive_more = "0.99.16" 11 | libcraft-core = { path = "../../libcraft/core" } 12 | libcraft-particles = { path = "../../libcraft/particles" } 13 | libcraft-text = { path = "../../libcraft/text" } 14 | serde = { version = "1", features = ["derive"] } 15 | smartstring = { version = "0.2", features = ["serde"] } 16 | uuid = { version = "0.8", features = ["serde"] } 17 | 18 | [dev-dependencies] 19 | quill = { path = "../api" } 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/area_effect_cloud.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for area effect cloud entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all area effect clouds: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::AreaEffectCloud}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &AreaEffectCloud)>() { 11 | /// println!("Found a area effect cloud with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct AreaEffectCloud; 18 | 19 | pod_component_impl!(AreaEffectCloud); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/armor_stand.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for armor stand entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all armor stands: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ArmorStand}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ArmorStand)>() { 11 | /// println!("Found a armor stand with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ArmorStand; 18 | 19 | pod_component_impl!(ArmorStand); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/arrow.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for arrow entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all arrows: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Arrow}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Arrow)>() { 11 | /// println!("Found a arrow with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Arrow; 18 | 19 | pod_component_impl!(Arrow); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/bat.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for bat entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all bats: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Bat}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Bat)>() { 11 | /// println!("Found a bat with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Bat; 18 | 19 | pod_component_impl!(Bat); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/bee.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for bee entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all bees: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Bee}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Bee)>() { 11 | /// println!("Found a bee with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Bee; 18 | 19 | pod_component_impl!(Bee); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/blaze.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for blaze entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all blazes: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Blaze}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Blaze)>() { 11 | /// println!("Found a blaze with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Blaze; 18 | 19 | pod_component_impl!(Blaze); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/boat.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for boat entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all boats: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Boat}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Boat)>() { 11 | /// println!("Found a boat with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Boat; 18 | 19 | pod_component_impl!(Boat); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/cat.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for cat entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all cats: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Cat}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Cat)>() { 11 | /// println!("Found a cat with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Cat; 18 | 19 | pod_component_impl!(Cat); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/cave_spider.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for cave spider entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all cave spiders: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::CaveSpider}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &CaveSpider)>() { 11 | /// println!("Found a cave spider with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct CaveSpider; 18 | 19 | pod_component_impl!(CaveSpider); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/chest_minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for chest minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all chest minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ChestMinecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ChestMinecart)>() { 11 | /// println!("Found a chest minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ChestMinecart; 18 | 19 | pod_component_impl!(ChestMinecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/chicken.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for chicken entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all chickens: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Chicken}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Chicken)>() { 11 | /// println!("Found a chicken with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Chicken; 18 | 19 | pod_component_impl!(Chicken); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/cod.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for cod entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all cods: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Cod}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Cod)>() { 11 | /// println!("Found a cod with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Cod; 18 | 19 | pod_component_impl!(Cod); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/command_block_minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for command block minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all command block minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::CommandBlockMinecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &CommandBlockMinecart)>() { 11 | /// println!("Found a command block minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct CommandBlockMinecart; 18 | 19 | pod_component_impl!(CommandBlockMinecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/cow.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for cow entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all cows: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Cow}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Cow)>() { 11 | /// println!("Found a cow with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Cow; 18 | 19 | pod_component_impl!(Cow); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/creeper.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for creeper entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all creepers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Creeper}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Creeper)>() { 11 | /// println!("Found a creeper with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Creeper; 18 | 19 | pod_component_impl!(Creeper); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/dolphin.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for dolphin entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all dolphins: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Dolphin}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Dolphin)>() { 11 | /// println!("Found a dolphin with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Dolphin; 18 | 19 | pod_component_impl!(Dolphin); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/donkey.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for donkey entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all donkeys: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Donkey}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Donkey)>() { 11 | /// println!("Found a donkey with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Donkey; 18 | 19 | pod_component_impl!(Donkey); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/dragon_fireball.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for dragon fireball entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all dragon fireballs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::DragonFireball}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &DragonFireball)>() { 11 | /// println!("Found a dragon fireball with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct DragonFireball; 18 | 19 | pod_component_impl!(DragonFireball); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/drowned.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for drowned entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all drowneds: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Drowned}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Drowned)>() { 11 | /// println!("Found a drowned with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Drowned; 18 | 19 | pod_component_impl!(Drowned); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/egg.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for egg entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all eggs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Egg}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Egg)>() { 11 | /// println!("Found a egg with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Egg; 18 | 19 | pod_component_impl!(Egg); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/elder_guardian.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for elder guardian entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all elder guardians: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ElderGuardian}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ElderGuardian)>() { 11 | /// println!("Found a elder guardian with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ElderGuardian; 18 | 19 | pod_component_impl!(ElderGuardian); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/end_crystal.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for end crystal entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all end crystals: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::EndCrystal}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &EndCrystal)>() { 11 | /// println!("Found a end crystal with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct EndCrystal; 18 | 19 | pod_component_impl!(EndCrystal); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/ender_dragon.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for ender dragon entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all ender dragons: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::EnderDragon}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &EnderDragon)>() { 11 | /// println!("Found a ender dragon with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct EnderDragon; 18 | 19 | pod_component_impl!(EnderDragon); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/ender_pearl.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for ender pearl entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all ender pearls: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::EnderPearl}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &EnderPearl)>() { 11 | /// println!("Found a ender pearl with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct EnderPearl; 18 | 19 | pod_component_impl!(EnderPearl); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/enderman.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for enderman entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all endermans: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Enderman}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Enderman)>() { 11 | /// println!("Found a enderman with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Enderman; 18 | 19 | pod_component_impl!(Enderman); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/endermite.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for endermite entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all endermites: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Endermite}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Endermite)>() { 11 | /// println!("Found a endermite with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Endermite; 18 | 19 | pod_component_impl!(Endermite); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/evoker.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for evoker entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all evokers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Evoker}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Evoker)>() { 11 | /// println!("Found a evoker with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Evoker; 18 | 19 | pod_component_impl!(Evoker); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/evoker_fangs.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for evoker fangs entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all evoker fangss: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::EvokerFangs}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &EvokerFangs)>() { 11 | /// println!("Found a evoker fangs with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct EvokerFangs; 18 | 19 | pod_component_impl!(EvokerFangs); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/experience_bottle.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for experience bottle entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all experience bottles: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ExperienceBottle}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ExperienceBottle)>() { 11 | /// println!("Found a experience bottle with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ExperienceBottle; 18 | 19 | pod_component_impl!(ExperienceBottle); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/experience_orb.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for experience orb entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all experience orbs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ExperienceOrb}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ExperienceOrb)>() { 11 | /// println!("Found a experience orb with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ExperienceOrb; 18 | 19 | pod_component_impl!(ExperienceOrb); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/eye_of_ender.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for eye of ender entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all eye of enders: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::EyeOfEnder}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &EyeOfEnder)>() { 11 | /// println!("Found a eye of ender with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct EyeOfEnder; 18 | 19 | pod_component_impl!(EyeOfEnder); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/falling_block.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for falling block entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all falling blocks: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::FallingBlock}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &FallingBlock)>() { 11 | /// println!("Found a falling block with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct FallingBlock; 18 | 19 | pod_component_impl!(FallingBlock); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/fireball.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for fireball entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all fireballs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Fireball}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Fireball)>() { 11 | /// println!("Found a fireball with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Fireball; 18 | 19 | pod_component_impl!(Fireball); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/firework_rocket.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for firework rocket entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all firework rockets: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::FireworkRocket}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &FireworkRocket)>() { 11 | /// println!("Found a firework rocket with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct FireworkRocket; 18 | 19 | pod_component_impl!(FireworkRocket); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/fishing_bobber.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for fishing bobber entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all fishing bobbers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::FishingBobber}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &FishingBobber)>() { 11 | /// println!("Found a fishing bobber with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct FishingBobber; 18 | 19 | pod_component_impl!(FishingBobber); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/fox.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for fox entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all foxs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Fox}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Fox)>() { 11 | /// println!("Found a fox with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Fox; 18 | 19 | pod_component_impl!(Fox); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/furnace_minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for furnace minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all furnace minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::FurnaceMinecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &FurnaceMinecart)>() { 11 | /// println!("Found a furnace minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct FurnaceMinecart; 18 | 19 | pod_component_impl!(FurnaceMinecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/ghast.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for ghast entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all ghasts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Ghast}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Ghast)>() { 11 | /// println!("Found a ghast with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Ghast; 18 | 19 | pod_component_impl!(Ghast); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/giant.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for giant entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all giants: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Giant}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Giant)>() { 11 | /// println!("Found a giant with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Giant; 18 | 19 | pod_component_impl!(Giant); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/guardian.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for guardian entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all guardians: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Guardian}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Guardian)>() { 11 | /// println!("Found a guardian with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Guardian; 18 | 19 | pod_component_impl!(Guardian); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/hoglin.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for hoglin entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all hoglins: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Hoglin}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Hoglin)>() { 11 | /// println!("Found a hoglin with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Hoglin; 18 | 19 | pod_component_impl!(Hoglin); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/hopper_minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for hopper minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all hopper minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::HopperMinecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &HopperMinecart)>() { 11 | /// println!("Found a hopper minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct HopperMinecart; 18 | 19 | pod_component_impl!(HopperMinecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/horse.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for horse entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all horses: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Horse}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Horse)>() { 11 | /// println!("Found a horse with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Horse; 18 | 19 | pod_component_impl!(Horse); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/husk.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for husk entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all husks: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Husk}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Husk)>() { 11 | /// println!("Found a husk with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Husk; 18 | 19 | pod_component_impl!(Husk); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/illusioner.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for illusioner entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all illusioners: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Illusioner}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Illusioner)>() { 11 | /// println!("Found a illusioner with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Illusioner; 18 | 19 | pod_component_impl!(Illusioner); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/iron_golem.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for iron golem entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all iron golems: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::IronGolem}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &IronGolem)>() { 11 | /// println!("Found a iron golem with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct IronGolem; 18 | 19 | pod_component_impl!(IronGolem); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/item.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for item entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all items: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Item}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Item)>() { 11 | /// println!("Found a item with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Item; 18 | 19 | pod_component_impl!(Item); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/item_frame.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for item frame entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all item frames: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ItemFrame}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ItemFrame)>() { 11 | /// println!("Found a item frame with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ItemFrame; 18 | 19 | pod_component_impl!(ItemFrame); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/leash_knot.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for leash knot entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all leash knots: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::LeashKnot}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &LeashKnot)>() { 11 | /// println!("Found a leash knot with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct LeashKnot; 18 | 19 | pod_component_impl!(LeashKnot); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/lightning_bolt.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for lightning bolt entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all lightning bolts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::LightningBolt}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &LightningBolt)>() { 11 | /// println!("Found a lightning bolt with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct LightningBolt; 18 | 19 | pod_component_impl!(LightningBolt); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/llama.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for llama entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all llamas: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Llama}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Llama)>() { 11 | /// println!("Found a llama with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Llama; 18 | 19 | pod_component_impl!(Llama); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/llama_spit.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for llama spit entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all llama spits: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::LlamaSpit}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &LlamaSpit)>() { 11 | /// println!("Found a llama spit with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct LlamaSpit; 18 | 19 | pod_component_impl!(LlamaSpit); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/magma_cube.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for magma cube entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all magma cubes: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::MagmaCube}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &MagmaCube)>() { 11 | /// println!("Found a magma cube with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct MagmaCube; 18 | 19 | pod_component_impl!(MagmaCube); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Minecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Minecart)>() { 11 | /// println!("Found a minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Minecart; 18 | 19 | pod_component_impl!(Minecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/mooshroom.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for mooshroom entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all mooshrooms: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Mooshroom}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Mooshroom)>() { 11 | /// println!("Found a mooshroom with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Mooshroom; 18 | 19 | pod_component_impl!(Mooshroom); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/mule.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for mule entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all mules: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Mule}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Mule)>() { 11 | /// println!("Found a mule with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Mule; 18 | 19 | pod_component_impl!(Mule); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/ocelot.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for ocelot entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all ocelots: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Ocelot}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Ocelot)>() { 11 | /// println!("Found a ocelot with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Ocelot; 18 | 19 | pod_component_impl!(Ocelot); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/painting.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for painting entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all paintings: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Painting}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Painting)>() { 11 | /// println!("Found a painting with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Painting; 18 | 19 | pod_component_impl!(Painting); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/panda.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for panda entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all pandas: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Panda}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Panda)>() { 11 | /// println!("Found a panda with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Panda; 18 | 19 | pod_component_impl!(Panda); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/parrot.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for parrot entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all parrots: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Parrot}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Parrot)>() { 11 | /// println!("Found a parrot with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Parrot; 18 | 19 | pod_component_impl!(Parrot); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/phantom.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for phantom entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all phantoms: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Phantom}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Phantom)>() { 11 | /// println!("Found a phantom with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Phantom; 18 | 19 | pod_component_impl!(Phantom); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/pig.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for pig entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all pigs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Pig}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Pig)>() { 11 | /// println!("Found a pig with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Pig; 18 | 19 | pod_component_impl!(Pig); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/piglin.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for piglin entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all piglins: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Piglin}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Piglin)>() { 11 | /// println!("Found a piglin with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Piglin; 18 | 19 | pod_component_impl!(Piglin); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/piglin_brute.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for piglin brute entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all piglin brutes: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::PiglinBrute}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &PiglinBrute)>() { 11 | /// println!("Found a piglin brute with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct PiglinBrute; 18 | 19 | pod_component_impl!(PiglinBrute); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/pillager.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for pillager entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all pillagers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Pillager}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Pillager)>() { 11 | /// println!("Found a pillager with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Pillager; 18 | 19 | pod_component_impl!(Pillager); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/player.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for player entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all players: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Player}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Player)>() { 11 | /// println!("Found a player with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Player; 18 | 19 | pod_component_impl!(Player); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/polar_bear.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for polar bear entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all polar bears: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::PolarBear}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &PolarBear)>() { 11 | /// println!("Found a polar bear with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct PolarBear; 18 | 19 | pod_component_impl!(PolarBear); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/potion.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for potion entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all potions: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Potion}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Potion)>() { 11 | /// println!("Found a potion with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Potion; 18 | 19 | pod_component_impl!(Potion); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/pufferfish.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for pufferfish entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all pufferfishs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Pufferfish}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Pufferfish)>() { 11 | /// println!("Found a pufferfish with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Pufferfish; 18 | 19 | pod_component_impl!(Pufferfish); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/rabbit.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for rabbit entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all rabbits: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Rabbit}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Rabbit)>() { 11 | /// println!("Found a rabbit with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Rabbit; 18 | 19 | pod_component_impl!(Rabbit); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/ravager.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for ravager entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all ravagers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Ravager}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Ravager)>() { 11 | /// println!("Found a ravager with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Ravager; 18 | 19 | pod_component_impl!(Ravager); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/salmon.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for salmon entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all salmons: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Salmon}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Salmon)>() { 11 | /// println!("Found a salmon with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Salmon; 18 | 19 | pod_component_impl!(Salmon); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/sheep.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for sheep entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all sheeps: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Sheep}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Sheep)>() { 11 | /// println!("Found a sheep with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Sheep; 18 | 19 | pod_component_impl!(Sheep); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/shulker.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for shulker entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all shulkers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Shulker}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Shulker)>() { 11 | /// println!("Found a shulker with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Shulker; 18 | 19 | pod_component_impl!(Shulker); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/shulker_bullet.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for shulker bullet entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all shulker bullets: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ShulkerBullet}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ShulkerBullet)>() { 11 | /// println!("Found a shulker bullet with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ShulkerBullet; 18 | 19 | pod_component_impl!(ShulkerBullet); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/silverfish.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for silverfish entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all silverfishs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Silverfish}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Silverfish)>() { 11 | /// println!("Found a silverfish with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Silverfish; 18 | 19 | pod_component_impl!(Silverfish); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/skeleton.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for skeleton entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all skeletons: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Skeleton}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Skeleton)>() { 11 | /// println!("Found a skeleton with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Skeleton; 18 | 19 | pod_component_impl!(Skeleton); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/skeleton_horse.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for skeleton horse entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all skeleton horses: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::SkeletonHorse}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &SkeletonHorse)>() { 11 | /// println!("Found a skeleton horse with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct SkeletonHorse; 18 | 19 | pod_component_impl!(SkeletonHorse); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/slime.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for slime entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all slimes: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Slime}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Slime)>() { 11 | /// println!("Found a slime with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Slime; 18 | 19 | pod_component_impl!(Slime); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/small_fireball.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for small fireball entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all small fireballs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::SmallFireball}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &SmallFireball)>() { 11 | /// println!("Found a small fireball with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct SmallFireball; 18 | 19 | pod_component_impl!(SmallFireball); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/snow_golem.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for snow golem entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all snow golems: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::SnowGolem}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &SnowGolem)>() { 11 | /// println!("Found a snow golem with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct SnowGolem; 18 | 19 | pod_component_impl!(SnowGolem); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/snowball.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for snowball entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all snowballs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Snowball}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Snowball)>() { 11 | /// println!("Found a snowball with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Snowball; 18 | 19 | pod_component_impl!(Snowball); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/spawner_minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for spawner minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all spawner minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::SpawnerMinecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &SpawnerMinecart)>() { 11 | /// println!("Found a spawner minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct SpawnerMinecart; 18 | 19 | pod_component_impl!(SpawnerMinecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/spectral_arrow.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for spectral arrow entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all spectral arrows: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::SpectralArrow}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &SpectralArrow)>() { 11 | /// println!("Found a spectral arrow with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct SpectralArrow; 18 | 19 | pod_component_impl!(SpectralArrow); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/spider.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for spider entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all spiders: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Spider}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Spider)>() { 11 | /// println!("Found a spider with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Spider; 18 | 19 | pod_component_impl!(Spider); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/squid.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for squid entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all squids: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Squid}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Squid)>() { 11 | /// println!("Found a squid with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Squid; 18 | 19 | pod_component_impl!(Squid); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/stray.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for stray entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all strays: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Stray}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Stray)>() { 11 | /// println!("Found a stray with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Stray; 18 | 19 | pod_component_impl!(Stray); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/strider.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for strider entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all striders: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Strider}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Strider)>() { 11 | /// println!("Found a strider with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Strider; 18 | 19 | pod_component_impl!(Strider); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/tnt.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for tnt entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all tnts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Tnt}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Tnt)>() { 11 | /// println!("Found a tnt with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Tnt; 18 | 19 | pod_component_impl!(Tnt); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/tnt_minecart.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for tnt minecart entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all tnt minecarts: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::TntMinecart}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &TntMinecart)>() { 11 | /// println!("Found a tnt minecart with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct TntMinecart; 18 | 19 | pod_component_impl!(TntMinecart); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/trader_llama.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for trader llama entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all trader llamas: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::TraderLlama}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &TraderLlama)>() { 11 | /// println!("Found a trader llama with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct TraderLlama; 18 | 19 | pod_component_impl!(TraderLlama); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/trident.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for trident entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all tridents: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Trident}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Trident)>() { 11 | /// println!("Found a trident with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Trident; 18 | 19 | pod_component_impl!(Trident); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/tropical_fish.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for tropical fish entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all tropical fishs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::TropicalFish}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &TropicalFish)>() { 11 | /// println!("Found a tropical fish with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct TropicalFish; 18 | 19 | pod_component_impl!(TropicalFish); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/turtle.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for turtle entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all turtles: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Turtle}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Turtle)>() { 11 | /// println!("Found a turtle with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Turtle; 18 | 19 | pod_component_impl!(Turtle); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/vex.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for vex entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all vexs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Vex}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Vex)>() { 11 | /// println!("Found a vex with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Vex; 18 | 19 | pod_component_impl!(Vex); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/villager.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for villager entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all villagers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Villager}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Villager)>() { 11 | /// println!("Found a villager with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Villager; 18 | 19 | pod_component_impl!(Villager); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/vindicator.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for vindicator entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all vindicators: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Vindicator}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Vindicator)>() { 11 | /// println!("Found a vindicator with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Vindicator; 18 | 19 | pod_component_impl!(Vindicator); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/wandering_trader.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for wandering trader entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all wandering traders: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::WanderingTrader}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &WanderingTrader)>() { 11 | /// println!("Found a wandering trader with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct WanderingTrader; 18 | 19 | pod_component_impl!(WanderingTrader); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/witch.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for witch entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all witchs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Witch}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Witch)>() { 11 | /// println!("Found a witch with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Witch; 18 | 19 | pod_component_impl!(Witch); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/wither.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for wither entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all withers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Wither}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Wither)>() { 11 | /// println!("Found a wither with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Wither; 18 | 19 | pod_component_impl!(Wither); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/wither_skeleton.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for wither skeleton entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all wither skeletons: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::WitherSkeleton}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &WitherSkeleton)>() { 11 | /// println!("Found a wither skeleton with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct WitherSkeleton; 18 | 19 | pod_component_impl!(WitherSkeleton); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/wither_skull.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for wither skull entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all wither skulls: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::WitherSkull}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &WitherSkull)>() { 11 | /// println!("Found a wither skull with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct WitherSkull; 18 | 19 | pod_component_impl!(WitherSkull); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/wolf.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for wolf entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all wolfs: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Wolf}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Wolf)>() { 11 | /// println!("Found a wolf with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Wolf; 18 | 19 | pod_component_impl!(Wolf); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/zoglin.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for zoglin entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all zoglins: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Zoglin}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Zoglin)>() { 11 | /// println!("Found a zoglin with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Zoglin; 18 | 19 | pod_component_impl!(Zoglin); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/zombie.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for zombie entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all zombies: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::Zombie}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &Zombie)>() { 11 | /// println!("Found a zombie with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct Zombie; 18 | 19 | pod_component_impl!(Zombie); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/zombie_horse.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for zombie horse entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all zombie horses: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ZombieHorse}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ZombieHorse)>() { 11 | /// println!("Found a zombie horse with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ZombieHorse; 18 | 19 | pod_component_impl!(ZombieHorse); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/zombie_villager.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for zombie villager entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all zombie villagers: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ZombieVillager}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ZombieVillager)>() { 11 | /// println!("Found a zombie villager with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ZombieVillager; 18 | 19 | pod_component_impl!(ZombieVillager); 20 | -------------------------------------------------------------------------------- /quill/common/src/entities/zombified_piglin.rs: -------------------------------------------------------------------------------- 1 | use bytemuck::{Pod, Zeroable}; 2 | /// Marker component for zombified piglin entities. 3 | /// 4 | /// # Example 5 | /// A system that queries for all zombified piglins: 6 | /// ```no_run 7 | /// use quill::{Game, Position, entities::ZombifiedPiglin}; 8 | /// # struct MyPlugin; 9 | /// fn print_entities_system(_plugin: &mut MyPlugin, game: &mut Game) { 10 | /// for (entity, (position, _)) in game.query::<(&Position, &ZombifiedPiglin)>() { 11 | /// println!("Found a zombified piglin with position {:?}", position); 12 | /// } 13 | /// } 14 | /// ``` 15 | #[derive(Debug, Copy, Clone, Zeroable, Pod)] 16 | #[repr(C)] 17 | pub struct ZombifiedPiglin; 18 | 19 | pod_component_impl!(ZombifiedPiglin); 20 | -------------------------------------------------------------------------------- /quill/common/src/events.rs: -------------------------------------------------------------------------------- 1 | pub use block_interact::{BlockInteractEvent, BlockPlacementEvent}; 2 | pub use change::{ 3 | BuildingAbilityEvent, CreativeFlyingEvent, FlyingAbilityEvent, GamemodeEvent, InstabreakEvent, 4 | InvulnerabilityEvent, SneakEvent, SprintEvent, 5 | }; 6 | pub use entity::{EntityCreateEvent, EntityRemoveEvent, PlayerJoinEvent}; 7 | pub use interact_entity::InteractEntityEvent; 8 | 9 | mod block_interact; 10 | mod change; 11 | mod entity; 12 | mod interact_entity; 13 | -------------------------------------------------------------------------------- /quill/common/src/events/entity.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Triggered when a player joins the `Game`. 4 | #[derive(Debug, Serialize, Deserialize, Clone)] 5 | pub struct PlayerJoinEvent; 6 | 7 | /// Triggered when an entity is removed from the world. 8 | /// 9 | /// The entity will remain alive for one tick after it is 10 | /// destroyed to allow systems to observe this event. 11 | #[derive(Debug, Serialize, Deserialize, Clone)] 12 | pub struct EntityRemoveEvent; 13 | 14 | /// Triggered when an entity is added into the world. 15 | #[derive(Debug, Serialize, Deserialize, Clone)] 16 | pub struct EntityCreateEvent; 17 | -------------------------------------------------------------------------------- /quill/common/src/events/interact_entity.rs: -------------------------------------------------------------------------------- 1 | use crate::EntityId; 2 | use libcraft_core::{Hand, InteractionType, Vec3f}; 3 | use serde::{Deserialize, Serialize}; 4 | 5 | #[derive(Debug, Serialize, Deserialize, Clone)] 6 | pub struct InteractEntityEvent { 7 | pub target: EntityId, 8 | pub ty: InteractionType, 9 | pub target_pos: Option, 10 | pub hand: Option, 11 | pub sneaking: bool, 12 | } 13 | -------------------------------------------------------------------------------- /quill/docs/components.md: -------------------------------------------------------------------------------- 1 | # Components and Queries in Quill 2 | 3 | There are two types of components accessed by a plugin: 4 | * "Plain-old-data" components, typically implementing `Copy`. To transfer these to a plugin, 5 | the raw struct bytes are copied into the plugin's memory, and the plugin gets a pointer to that data. 6 | * Opaque components, i.e., those not implementing `Copy`. These typically hold more data. Examples: `Inventory` of , `Window`. 7 | A plugin accesses these components via host calls without ever getting a copy of the component itself. For example, 8 | to get an item from an inventory, a plugin calls `quill_entity_get_inventory_item`. (The high-level `quill` API wraps 9 | this raw call with an `Inventory` struct, but the struct doesn't actually hold the inventory. It's just a marker.) 10 | -------------------------------------------------------------------------------- /quill/example-plugins/block-access/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "block-access" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | -------------------------------------------------------------------------------- /quill/example-plugins/block-place/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "block-place" 3 | version = "0.1.0" 4 | authors = ["Amber Kowalski "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | -------------------------------------------------------------------------------- /quill/example-plugins/block-place/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Allows the user to place blocks. 2 | 3 | use quill::{events::BlockPlacementEvent, Game, Plugin}; 4 | 5 | #[quill::plugin] 6 | pub struct BlockPlace; 7 | 8 | impl Plugin for BlockPlace { 9 | fn enable(_game: &mut quill::Game, setup: &mut quill::Setup) -> Self { 10 | setup.add_system(system); 11 | Self 12 | } 13 | 14 | fn disable(self, _game: &mut quill::Game) {} 15 | } 16 | 17 | fn system(_plugin: &mut BlockPlace, game: &mut Game) { 18 | for (_entity, _event) in game.query::<&BlockPlacementEvent>() { 19 | println!("A client has placed a block!"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /quill/example-plugins/observe-creativemode-flight-event/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "observe-creativemode-flight-event" 3 | version = "0.1.0" 4 | authors = ["Miro Andrin "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | -------------------------------------------------------------------------------- /quill/example-plugins/particle-example/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "particle-example" 3 | version = "0.1.0" 4 | authors = ["Gijs de Jong "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | -------------------------------------------------------------------------------- /quill/example-plugins/plugin-message/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "plugin-message" 3 | version = "0.1.0" 4 | authors = ["Derek Lee "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | -------------------------------------------------------------------------------- /quill/example-plugins/query-entities/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "query-entities" 3 | version = "0.1.0" 4 | authors = ["Caelum van Ispelen "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | rand = "0.8" 13 | -------------------------------------------------------------------------------- /quill/example-plugins/simple/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple-plugin" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | rand = "0.8" 13 | -------------------------------------------------------------------------------- /quill/example-plugins/titles/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "titles" 3 | version = "0.1.0" 4 | authors = ["Gijs de Jong "] 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib"] 9 | 10 | [dependencies] 11 | quill = { path = "../../api" } 12 | -------------------------------------------------------------------------------- /quill/plugin-format/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "quill-plugin-format" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | anyhow = "1" 9 | tar = "0.4" 10 | flate2 = "1" 11 | serde = { version = "1", features = ["derive"] } 12 | serde_json = "1" 13 | serde_with = "1" 14 | target-lexicon = "0.11" 15 | -------------------------------------------------------------------------------- /quill/sys-macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "quill-sys-macros" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [lib] 8 | proc-macro = true 9 | 10 | [dependencies] 11 | proc-macro2 = "1" 12 | syn = { version = "1", features = ["full"] } 13 | quote = "1" 14 | -------------------------------------------------------------------------------- /quill/sys/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "quill-sys" 3 | version = "0.1.0" 4 | authors = ["caelunshun "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | quill-common = { path = "../common" } 9 | quill-sys-macros = { path = "../sys-macros" } 10 | --------------------------------------------------------------------------------