Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.
Rust differential-testinggame-enginegamedevlinuxminecraftminecraft-javareimplementationrustvoxelvulkanwgpu
// @generated by cargo run -p xtask -- mod-api; do not edit.
use horizon_client::mod_api::*;
use std::path::PathBuf;
use std::sync::Arc;
impl Host for super::Game<'_> {
fn draw_quad(
&self,
draw: &mut BlockEntityDraw,
sprite: &str,
corners: [[f32; 3]; 4],
uv: [f32; 4],
tint: u32,
) -> bool {
self.native_draw_quad(draw, sprite, corners, uv, tint)
}
fn draw_cube(
&self,
draw: &mut BlockEntityDraw,
from: [f32; 3],
to: [f32; 3],
faces: [Option<CubeFace<'_>>; 6],
tint: u32,
) -> bool {
self.native_draw_cube(draw, from, to, faces, tint)
}
fn draw_block(
&self,
draw: &mut BlockEntityDraw,
block: &str,
properties: &[(&str, &str)],
) -> bool {
self.native_draw_block(draw, block, properties)
}
fn draw_item(
&self,
draw: &mut BlockEntityDraw,
stack: &ItemStack,
display: DisplayContext,
owner_yaw: Option<f32>,
seed: i32,
) -> bool {
self.native_draw_item(draw, stack, display, owner_yaw, seed)
}
fn attachments(&mut self, holder: Holder) -> AttachmentResult<&mut Attachments> {
self.native_attachments(holder)
}
fn teleport_mob(&mut self, dimension: &str, id: u32, pos: [f64; 3]) -> bool {
self.native_teleport_mob(dimension, id, pos)
}
fn push_mob(&mut self, dimension: &str, id: u32, velocity: [f64; 3]) -> bool {
self.native_push_mob(dimension, id, velocity)
}
fn set_mob_health(&mut self, dimension: &str, id: u32, health: f32) -> bool {
self.native_set_mob_health(dimension, id, health)
}
fn kill_mob(&mut self, dimension: &str, id: u32) -> bool {
self.native_kill_mob(dimension, id)
}
fn remove_mob(&mut self, dimension: &str, id: u32) -> bool {
self.native_remove_mob(dimension, id)
}
fn summon(&mut self, dimension: &str, kind: &str, pos: [f64; 3], nbt: Compound) -> Option<u32> {
self.native_summon(dimension, kind, pos, nbt)
}
fn move_entity(
&mut self,
dimension: &str,
id: u32,
pos: [f64; 3],
yaw: f32,
pitch: f32,
) -> bool {
self.native_move_entity(dimension, id, pos, yaw, pitch)
}
fn remove_entity(&mut self, dimension: &str, id: u32) -> bool {
self.native_remove_entity(dimension, id)
}
fn server_players(&self) -> Vec<NativeServerPlayer> {
self.native_server_players()
}
fn tell(&mut self, uuid: u128, line: Text) -> bool {
self.native_tell(uuid, line)
}
fn action_bar(&mut self, uuid: u128, line: Text) -> bool {
self.native_action_bar(uuid, line)
}
fn tab_list(&mut self, uuid: u128, header: &Text, footer: &Text) -> bool {
self.native_tab_list(uuid, header, footer)
}
fn tick_stats(&self) -> (f32, f64) {
self.native_tick_stats()
}
fn sleep_ignored(&mut self, uuid: u128, ignored: bool) -> bool {
self.native_sleep_ignored(uuid, ignored)
}
fn set_nickname(&mut self, uuid: u128, nickname: Option<&str>) -> bool {
self.native_set_nickname(uuid, nickname)
}
fn text_allowed(&self, text: &str) -> Option<bool> {
self.native_text_allowed(text)
}
fn broadcast(&self, line: Text) {
self.native_broadcast(line)
}
fn feedback(&mut self, line: Text) {
self.native_feedback(line)
}
fn acting_player(&self) -> Option<NativeServerPlayer> {
self.native_acting_player()
}
fn run_command(&mut self, line: &str) -> bool {
self.native_run_command(line)
}
fn world_dir(&self) -> Option<PathBuf> {
self.native_world_dir()
}
fn held(&self) -> Option<(String, u32, bool)> {
self.native_held()
}
fn count_items(&mut self, item: &str) -> u32 {
self.native_count_items(item)
}
fn carried_items(&self) -> Vec<(String, u32)> {
self.native_carried_items()
}
fn take_items(&mut self, item: &str, count: u32) -> u32 {
self.native_take_items(item, count)
}
fn room_for(&mut self, item: &str) -> u32 {
self.native_room_for(item)
}
fn give_items(&mut self, item: &str, count: u32) -> u32 {
self.native_give_items(item, count)
}
fn give_stack(&mut self, uuid: u128, stack: ItemStack) -> Option<ItemStack> {
self.native_give_stack(uuid, stack)
}
fn give_experience(&mut self, uuid: u128, points: u32) -> bool {
self.native_give_experience(uuid, points)
}
fn give_levels(&mut self, uuid: u128, levels: i32) -> bool {
self.native_give_levels(uuid, levels)
}
fn lit_block_name(&self, pos: [i32; 3]) -> Option<&str> {
self.native_lit_block_name(pos)
}
fn flame_particle(&mut self, at: [f64; 3], soul: bool) {
self.native_flame_particle(at, soul)
}
fn carried_stack(&mut self, slot: i32) -> Option<&mut ItemStack> {
self.native_carried_stack(slot)
}
fn set_block(
&mut self,
dimension: &str,
pos: [i32; 3],
state: BlockStateId,
flags: i32,
) -> bool {
self.native_set_block(dimension, pos, state, flags)
}
fn set_item_entity(&mut self, dimension: &str, id: u32, stack: ItemStack) -> bool {
self.native_set_item_entity(dimension, id, stack)
}
fn update_output_neighbors(&mut self, dimension: &str, pos: [i32; 3]) -> bool {
self.native_update_output_neighbors(dimension, pos)
}
fn update_signal_neighbors(&mut self, dimension: &str, pos: [i32; 3]) -> bool {
self.native_update_signal_neighbors(dimension, pos)
}
fn block_entity_sync(&mut self, pos: [i32; 3]) {
self.native_block_entity_sync(pos)
}
fn play_local_sound(
&mut self,
sound: &str,
at: [f64; 3],
volume: f32,
pitch: f32,
delay: i32,
) -> bool {
self.native_play_local_sound(sound, at, volume, pitch, delay)
}
fn fill(&self, batch: &mut HudBatch, rect: [f32; 4], argb: u32) {
self.native_fill(batch, rect, argb)
}
fn sprite(&self, batch: &mut HudBatch, name: &str, src: [f32; 4], dst: [f32; 4]) -> bool {
self.native_sprite(batch, name, src, dst)
}
fn item(&self, batch: &mut HudBatch, item: &str, at: [f32; 2], size: f32) -> bool {
self.native_item(batch, item, at, size)
}
fn screen_title(&self) -> Option<String> {
self.native_screen_title()
}
fn data(&self, path: &str) -> Option<Vec<u8>> {
self.native_data(path)
}
fn block(&self, pos: [i32; 3]) -> String {
self.native_block(pos)
}
fn block_property(&self, pos: [i32; 3], key: &str) -> Option<String> {
self.native_block_property(pos, key)
}
fn insert_item(
&mut self,
pos: [i32; 3],
face: Direction,
stack: ItemStack,
) -> Option<ItemStack> {
self.native_insert_item(pos, face, stack)
}
fn cursor(&self) -> [f32; 2] {
self.native_cursor()
}
fn text(&self, batch: &mut HudBatch, text: &str, at: [f32; 2], rgb: u32, shadow: bool) {
self.native_text(batch, text, at, rgb, shadow)
}
fn built_data(&self, mod_id: &str) -> Option<PathBuf> {
self.native_built_data(mod_id)
}
fn panel_items(&mut self, mod_id: &str, items: Vec<NativeStack>) {
self.native_panel_items(mod_id, items)
}
fn recipes_of_type(&self, kind: &str) -> &[CustomRecipe] {
self.native_recipes_of_type(kind)
}
fn recipe_ingredient(&self, json: &serde_json::Value) -> Option<Ingredient> {
self.native_recipe_ingredient(json)
}
fn recipe_result(&self, json: &serde_json::Value) -> Option<ItemStack> {
self.native_recipe_result(json)
}
fn known_recipes(&mut self) -> Arc<[i32]> {
self.native_known_recipes()
}
fn place_recipe(&mut self, book_id: i32, all: bool) -> Result<(), String> {
self.native_place_recipe(book_id, all)
}
fn give(&mut self, item: &str, count: u32) -> Result<(), String> {
self.native_give(item, count)
}
fn push_player(&mut self, kick: [f32; 3]) {
self.native_push_player(kick)
}
fn set_flying_speed(&mut self, player: u128, speed: Option<f32>) -> bool {
self.native_set_flying_speed(player, speed)
}
fn net_send_to_player(
&mut self,
player: u128,
channel: &str,
data: &[u8],
) -> Result<(), String> {
self.native_net_send_to_player(player, channel, data)
}
fn net_send_to_server(&mut self, channel: &str, data: &[u8]) -> Result<(), String> {
self.native_net_send_to_server(channel, data)
}
fn dispense_default(
&mut self,
dimension: &str,
pos: [i32; 3],
facing: Direction,
stack: ItemStack,
) -> Option<ItemStack> {
self.native_dispense_default(dimension, pos, facing, stack)
}
fn open_menu(
&mut self,
uuid: u128,
rows: u8,
title: Text,
items: Vec<Option<ItemStack>>,
) -> Option<i32> {
self.native_open_menu(uuid, rows, title, items)
}
fn set_menu_items(&mut self, uuid: u128, items: Vec<Option<ItemStack>>) {
self.native_set_menu_items(uuid, items)
}
fn close_menu(&mut self, uuid: u128) {
self.native_close_menu(uuid)
}
fn player_stacks(&self, uuid: u128) -> Option<Vec<Option<ItemStack>>> {
self.native_player_stacks(uuid)
}
fn exchange_items(
&mut self,
a: u128,
a_offer: &[(usize, ItemStack)],
b: u128,
b_offer: &[(usize, ItemStack)],
) -> Result<(), String> {
self.native_exchange_items(a, a_offer, b, b_offer)
}
fn fluid_insert(&mut self, pos: [i32; 3], face: Direction, fluid: &str, amount: i32) -> i32 {
self.native_fluid_insert(pos, face, fluid, amount)
}
fn fluid_extract(
&mut self,
dimension: &str,
pos: [i32; 3],
face: Direction,
amount: i32,
) -> Option<(String, i32)> {
self.native_fluid_extract(dimension, pos, face, amount)
}
fn move_fluids(
&mut self,
dimension: &str,
from: [i32; 3],
from_face: Direction,
to: [i32; 3],
to_face: Direction,
max: i32,
) -> Option<(String, i32)> {
self.native_move_fluids(dimension, from, from_face, to, to_face, max)
}
fn dimension(&self) -> &'static str {
self.native_dimension()
}
fn extract_item(
&mut self,
dimension: &str,
pos: [i32; 3],
face: Direction,
slot: usize,
count: u32,
) -> Option<ItemStack> {
self.native_extract_item(dimension, pos, face, slot, count)
}
fn move_items(
&mut self,
dimension: &str,
from: [i32; 3],
from_face: Direction,
to: [i32; 3],
to_face: Direction,
item: Option<&str>,
max: u32,
) -> u32 {
self.native_move_items(dimension, from, from_face, to, to_face, item, max)
}
}