Lea-fish / Leafish

A minecraft-like multi version client implemented in Rust.
Apache License 2.0
824 stars 46 forks source link

render furnace smelting and some improvements #276

Closed cooltexture1 closed 1 year ago

cooltexture1 commented 1 year ago

This makes the furnace (and smoker and blast furnace) render the fire and the arrow symbol to show the smelting progress. It also fixes a bug i created in my last PR in server/mod.rs. Where we would get a crash if the server send a WindowProperty packet after the Inventory had already been closed. These packets are now ignored if the associated inventory is not open.

The texture_coords of all ui elements are expected to be divided by 256 by the renderer, which led to some boilerplate whenever the texture_coords were set or modified, so i made the function do the division internally to remove a lot of "/ 256.0" Along the way i also simplified some of the int to float Conversion in renderer/hud.rs by making the texture_offset variable a float.

cooltexture1 commented 1 year ago

I think this can be merged, i have another PR ready that depends on this one.

terrarier2111 commented 1 year ago

Oh, yea sry for the delay

terrarier2111 commented 1 year ago

Thx for your work!