Book using (#2198)

* Book using

Fixes #2181

Signed-off-by: liach <liach@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: YanisBft <doublecraft.official@gmail.com>

Co-authored-by: liach <liach@users.noreply.github.com>
Co-authored-by: YanisBft <doublecraft.official@gmail.com>
This commit is contained in:
liach 2021-03-28 03:10:22 +07:00 committed by GitHub
parent f170a90509
commit c0c97b852e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 1 deletions

View File

@ -182,9 +182,24 @@ CLASS net/minecraft/class_1657 net/minecraft/entity/player/PlayerEntity
METHOD method_7311 openEditSignScreen (Lnet/minecraft/class_2625;)V
ARG 1 sign
METHOD method_7313 updateCapeAngles ()V
METHOD method_7315 openEditBookScreen (Lnet/minecraft/class_1799;Lnet/minecraft/class_1268;)V
METHOD method_7315 useBook (Lnet/minecraft/class_1799;Lnet/minecraft/class_1268;)V
COMMENT Called when the player uses (defaults to right click) a writable or written
COMMENT book item.
COMMENT
COMMENT <p>This can be called either on the client or the server player. Check {@code
COMMENT book} for whether this is a written or a writable book.
COMMENT
COMMENT @implNote The writing of a writable book in vanilla is totally controlled by
COMMENT the client; the server cannot make the client open a book edit screen by
COMMENT making a server player use a writable book. Only when the client finishes
COMMENT writing a book it will send a {@linkplain net.minecraft.network.packet.c2s.play.BookUpdateC2SPacket book update C2S packet}.
COMMENT
COMMENT <p>Meanwhile, the reading of a written book is totally controlled and initiated
COMMENT by the server.
ARG 1 book
COMMENT the book
ARG 2 hand
COMMENT the hand holding the book
METHOD method_7316 addExperienceLevels (I)V
ARG 1 levels
METHOD method_7317 canFoodHeal ()Z