Documentation icon indicating copy to clipboard operation
Documentation copied to clipboard

Inaccuracy in screen.md

Open tmvkrpxl0 opened this issue 1 year ago • 2 comments

In sub-section Textuers, it says this:

Textures are drawn through blitting, hence the method name #blit, which, for this purpose, copies the bits of an image and draws them directly to the screen. These are drawn through a position texture shader. While there are many different #blit overloads, we will only discuss two static #blits. The first static #blit takes in six integers and assumes the texture being rendered is on a 256 x 256 PNG file. It takes in the left x and top y screen coordinate, the left x and top y coordinate within the PNG, and the width and height of the image to render.

There isn't static method in GuiScreen. and method it refers to seems to have this signature now: public void blit(ResourceLocation pAtlasLocation, int pX, int pY, int pUOffset, int pVOffset, int pUWidth, int pVHeight) Because it is the only method with 256 constant

tmvkrpxl0 avatar Nov 14 '23 03:11 tmvkrpxl0

Pretty sure that was a 20.1-20.2 change iirc.

ChampionAsh5357 avatar Nov 14 '23 18:11 ChampionAsh5357

Also https://github.com/neoforged/Documentation/blob/main/docs/gui/screens.md?plain=1#L19C202-L19C202

These fall into five categories: colored rectangles, strings, and textures, items, and tooltips.

It has 2 ands

tmvkrpxl0 avatar Nov 17 '23 00:11 tmvkrpxl0