mirror of https://github.com/FabricMC/yarn.git
Bundle tutorial (#2011)
* Bundle tutorial Signed-off-by: liach <liach@users.noreply.github.com> * Fixed bad names and add some docs Signed-off-by: liach <liach@users.noreply.github.com> * Update mappings/net/minecraft/client/tutorial/TutorialManager.mapping * Update mappings/net/minecraft/entity/player/PlayerEntity.mapping Co-authored-by: liach <liach@users.noreply.github.com>
This commit is contained in:
parent
d80319f717
commit
df3da30394
|
@ -157,6 +157,7 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
|
|||
FIELD field_25671 videoWarningManager Lnet/minecraft/class_5407;
|
||||
FIELD field_26841 SOCIAL_INTERACTIONS_NOT_AVAILABLE Lnet/minecraft/class_2561;
|
||||
FIELD field_26842 socialInteractionsManager Lnet/minecraft/class_5520;
|
||||
FIELD field_26843 socialInteractionsToast Lnet/minecraft/class_372;
|
||||
FIELD field_26902 socialInteractionsService Lcom/mojang/authlib/minecraft/SocialInteractionsService;
|
||||
FIELD field_27387 entityModelLoader Lnet/minecraft/class_5599;
|
||||
FIELD field_27388 blockEntityRenderDispatcher Lnet/minecraft/class_824;
|
||||
|
|
|
@ -108,6 +108,7 @@ CLASS net/minecraft/class_315 net/minecraft/client/option/GameOptions
|
|||
FIELD field_26844 joinedFirstServer Z
|
||||
FIELD field_26845 keySocialInteractions Lnet/minecraft/class_304;
|
||||
FIELD field_26926 hideMatchedNames Z
|
||||
FIELD field_28777 hideBundleTutorial Z
|
||||
METHOD <init> (Lnet/minecraft/class_310;Ljava/io/File;)V
|
||||
ARG 1 client
|
||||
ARG 2 optionsFile
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
CLASS net/minecraft/class_5829 net/minecraft/client/tutorial/BundleTutorial
|
||||
FIELD field_28798 manager Lnet/minecraft/class_1156;
|
||||
FIELD field_28799 options Lnet/minecraft/class_315;
|
||||
FIELD field_28800 toast Lnet/minecraft/class_372;
|
||||
METHOD <init> (Lnet/minecraft/class_1156;Lnet/minecraft/class_315;)V
|
||||
ARG 1 manager
|
||||
ARG 2 options
|
||||
METHOD method_33701 start ()V
|
||||
METHOD method_33702 onPickupSlotClick (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;)V
|
||||
COMMENT A callback for starting the bundle tutorial.
|
||||
COMMENT
|
||||
COMMENT @see TutorialManager#onPickupSlotClick(ItemStack, ItemStack, ClickType)
|
||||
ARG 1 cursorStack
|
||||
ARG 2 slotStack
|
||||
ARG 3 clickType
|
||||
METHOD method_33703 end ()V
|
|
@ -1,5 +1,6 @@
|
|||
CLASS net/minecraft/class_1153 net/minecraft/client/tutorial/PunchTreeTutorialStepHandler
|
||||
FIELD field_5634 manager Lnet/minecraft/class_1156;
|
||||
FIELD field_5635 punches I
|
||||
FIELD field_5636 ticks I
|
||||
FIELD field_5637 toast Lnet/minecraft/class_372;
|
||||
FIELD field_5638 TITLE Lnet/minecraft/class_2561;
|
||||
|
|
|
@ -1,16 +1,44 @@
|
|||
CLASS net/minecraft/class_1156 net/minecraft/client/tutorial/TutorialManager
|
||||
FIELD field_26893 entries Ljava/util/List;
|
||||
FIELD field_28801 bundleTutorial Lnet/minecraft/class_5829;
|
||||
FIELD field_5645 client Lnet/minecraft/class_310;
|
||||
FIELD field_5646 currentHandler Lnet/minecraft/class_1155;
|
||||
METHOD <init> (Lnet/minecraft/class_310;Lnet/minecraft/class_315;)V
|
||||
ARG 1 client
|
||||
ARG 2 options
|
||||
METHOD method_31364 remove (Lnet/minecraft/class_372;)V
|
||||
COMMENT Removes an active tutorial from this manager if it's present and hides
|
||||
COMMENT the toast.
|
||||
ARG 1 toast
|
||||
COMMENT the tutorial toast
|
||||
METHOD method_31365 add (Lnet/minecraft/class_372;I)V
|
||||
COMMENT Adds an active tutorial entry to this manager and the corresponding toast
|
||||
COMMENT to the client's toast manager.
|
||||
ARG 1 toast
|
||||
COMMENT the tutorial toast
|
||||
ARG 2 ticks
|
||||
COMMENT the time the toast will last, in client ticks
|
||||
METHOD method_31366 (Lnet/minecraft/class_372;Lnet/minecraft/class_1156$class_5524;)Z
|
||||
ARG 1 entry
|
||||
METHOD method_31367 (Ljava/lang/Object;)Z
|
||||
ARG 0 entry
|
||||
METHOD method_33704 onPickupSlotClick (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;)V
|
||||
COMMENT Called when a player performs a {@link net.minecraft.screen.slot.SlotActionType#PICKUP
|
||||
COMMENT pickup slot action} in a screen handler. Used to trigger the bundle tutorial.
|
||||
COMMENT
|
||||
COMMENT @see net.minecraft.client.network.ClientPlayerEntity#onPickupSlotClick(ItemStack, ItemStack, ClickType)
|
||||
ARG 1 cursorStack
|
||||
ARG 2 slotStack
|
||||
ARG 3 clickType
|
||||
METHOD method_4905 isInSurvival ()Z
|
||||
COMMENT Returns whether the current game mode of the client is {@linkplain net.minecraft.world.GameMode#SURVIVAL survival}.
|
||||
METHOD method_4906 onSlotUpdate (Lnet/minecraft/class_1799;)V
|
||||
ARG 1 stack
|
||||
METHOD method_4907 onBlockAttacked (Lnet/minecraft/class_638;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;F)V
|
||||
METHOD method_4907 onBlockBreaking (Lnet/minecraft/class_638;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;F)V
|
||||
ARG 1 world
|
||||
ARG 2 pos
|
||||
ARG 3 state
|
||||
ARG 4 progress
|
||||
METHOD method_4908 onUpdateMouse (DD)V
|
||||
ARG 1 deltaX
|
||||
ARG 3 deltaY
|
||||
|
@ -22,8 +50,20 @@ CLASS net/minecraft/class_1156 net/minecraft/client/tutorial/TutorialManager
|
|||
ARG 1 world
|
||||
ARG 2 hitResult
|
||||
METHOD method_4912 onInventoryOpened ()V
|
||||
METHOD method_4913 getKeybindName (Ljava/lang/String;)Lnet/minecraft/class_2561;
|
||||
METHOD method_4913 keyToText (Ljava/lang/String;)Lnet/minecraft/class_2561;
|
||||
ARG 0 name
|
||||
METHOD method_4914 getClient ()Lnet/minecraft/class_310;
|
||||
METHOD method_4915 destroyHandler ()V
|
||||
METHOD method_4916 createHandler ()V
|
||||
METHOD method_4917 tick ()V
|
||||
CLASS class_5524 Entry
|
||||
FIELD field_26894 toast Lnet/minecraft/class_372;
|
||||
FIELD field_26895 expiry I
|
||||
FIELD field_26896 age I
|
||||
METHOD <init> (Lnet/minecraft/class_372;I)V
|
||||
ARG 1 toast
|
||||
ARG 2 expiry
|
||||
METHOD method_31368 tick ()Z
|
||||
COMMENT Ticks this entry on a client tick.
|
||||
COMMENT
|
||||
COMMENT @return {@code true} if this entry should no longer tick
|
||||
|
|
|
@ -5,10 +5,11 @@ CLASS net/minecraft/class_1155 net/minecraft/client/tutorial/TutorialStepHandler
|
|||
ARG 1 world
|
||||
ARG 2 hitResult
|
||||
METHOD method_4899 tick ()V
|
||||
METHOD method_4900 onBlockAttacked (Lnet/minecraft/class_638;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;F)V
|
||||
METHOD method_4900 onBlockBreaking (Lnet/minecraft/class_638;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;F)V
|
||||
ARG 1 client
|
||||
ARG 2 pos
|
||||
ARG 3 state
|
||||
ARG 4 progress
|
||||
METHOD method_4901 onMouseUpdate (DD)V
|
||||
ARG 1 deltaX
|
||||
ARG 3 deltaY
|
||||
|
|
|
@ -76,6 +76,17 @@ CLASS net/minecraft/class_1657 net/minecraft/entity/player/PlayerEntity
|
|||
METHOD method_31548 getInventory ()Lnet/minecraft/class_1661;
|
||||
METHOD method_31549 getAbilities ()Lnet/minecraft/class_1656;
|
||||
METHOD method_31550 isUsingSpyglass ()Z
|
||||
METHOD method_33592 onPickupSlotClick (Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_5536;)V
|
||||
COMMENT Called when a player performs a {@link net.minecraft.screen.slot.SlotActionType#PICKUP
|
||||
COMMENT pickup slot action} in a screen handler.
|
||||
COMMENT
|
||||
COMMENT @implNote This is used by the client player to trigger bundle tutorials.
|
||||
ARG 1 cursorStack
|
||||
COMMENT the item stack on the player's cursor
|
||||
ARG 2 slotStack
|
||||
COMMENT the item stack in the clicked slot
|
||||
ARG 3 clickType
|
||||
COMMENT the click type (mouse button used)
|
||||
METHOD method_7254 unlockRecipes (Ljava/util/Collection;)I
|
||||
ARG 1 recipes
|
||||
METHOD method_7255 addExperience (I)V
|
||||
|
|
|
@ -37,7 +37,10 @@ CLASS net/minecraft/class_1703 net/minecraft/screen/ScreenHandler
|
|||
METHOD method_17696 (Lnet/minecraft/class_2248;Lnet/minecraft/class_1657;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Ljava/lang/Boolean;
|
||||
ARG 2 world
|
||||
ARG 3 pos
|
||||
METHOD method_30010 removeStack (IILnet/minecraft/class_1713;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1799;
|
||||
METHOD method_30010 internalOnSlotClick (IILnet/minecraft/class_1713;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1799;
|
||||
COMMENT The actual logic that handles a slot click. Called by {@link #onSlotClick
|
||||
COMMENT (int, int, SlotActionType, PlayerEntity)} in a try-catch block that wraps
|
||||
COMMENT exceptions from this method into a crash report.
|
||||
ARG 1 slotIndex
|
||||
ARG 2 clickData
|
||||
ARG 3 actionType
|
||||
|
|
Loading…
Reference in New Issue