diff --git a/unpick-definitions/colors.unpick b/unpick-definitions/colors.unpick new file mode 100644 index 0000000000..cd987f87fc --- /dev/null +++ b/unpick-definitions/colors.unpick @@ -0,0 +1,104 @@ +v2 + +constant argb_color net/minecraft/util/Colors WHITE +constant argb_color net/minecraft/util/Colors BLACK +constant argb_color net/minecraft/util/Colors GRAY +constant argb_color net/minecraft/util/Colors LIGHT_GRAY +constant argb_color net/minecraft/util/Colors RED +constant argb_color net/minecraft/util/Colors LIGHT_RED +constant argb_color net/minecraft/util/Colors YELLOW +constant argb_color net/minecraft/util/Colors LIGHT_YELLOW + +target_method net/minecraft/util/math/ColorHelper$Argb getAlpha (I)I + param 0 argb_color +target_method net/minecraft/util/math/ColorHelper$Argb getRed (I)I + param 0 argb_color +target_method net/minecraft/util/math/ColorHelper$Argb getGreen (I)I + param 0 argb_color +target_method net/minecraft/util/math/ColorHelper$Argb getBlue (I)I + param 0 argb_color + +# These accept ARGB (TextRenderer) + +target_method net/minecraft/client/font/TextRenderer draw (Ljava/lang/String;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I + param 3 argb_color +target_method net/minecraft/client/font/TextRenderer draw (Ljava/lang/String;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;IIZ)I + param 3 argb_color +target_method net/minecraft/client/font/TextRenderer draw (Lnet/minecraft/text/Text;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I + param 3 argb_color +target_method net/minecraft/client/font/TextRenderer draw (Lnet/minecraft/text/OrderedText;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I + param 3 argb_color +target_method net/minecraft/client/font/TextRenderer drawWithOutline (Lnet/minecraft/text/OrderedText;FFIILorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;I)V + param 3 argb_color + param 4 argb_color + +target_method net/minecraft/client/render/debug/DebugRenderer drawString (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Ljava/lang/String;IIII)V + param 6 argb_color +target_method net/minecraft/client/render/debug/DebugRenderer drawString (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Ljava/lang/String;DDDI)V + param 6 argb_color +target_method net/minecraft/client/render/debug/DebugRenderer drawString (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Ljava/lang/String;DDDIF)V + param 6 argb_color +target_method net/minecraft/client/render/debug/DebugRenderer drawString (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Ljava/lang/String;DDDIFZFZ)V + param 6 argb_color + +target_method net/minecraft/client/gui/DrawContext drawCenteredTextWithShadow (Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;III)V + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawCenteredTextWithShadow (Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;III)V + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawCenteredTextWithShadow (Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/OrderedText;III)V + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawTextWithShadow (Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;III)I + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawText (Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;IIIZ)I + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawTextWithShadow (Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;III)I + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawText (Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;IIIZ)I + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawTextWrapped (Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/StringVisitable;IIII)V + param 5 argb_color + +target_method net/minecraft/client/gui/widget/AbstractTextWidget setTextColor (I)Lnet/minecraft/client/gui/widget/AbstractTextWidget; + param 0 argb_color + +# Accepts ARGB (non-TextRenderer) +target_method net/minecraft/client/gui/DrawContext drawHorizontalLine (IIII)V + param 3 argb_color +target_method net/minecraft/client/gui/DrawContext drawHorizontalLine (Lnet/minecraft/client/render/RenderLayer;IIII)V + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext drawVerticalLine (IIII)V + param 3 argb_color +target_method net/minecraft/client/gui/DrawContext drawVerticalLine (Lnet/minecraft/client/render/RenderLayer;IIII)V + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext fill (IIIII)V + param 4 argb_color +target_method net/minecraft/client/gui/DrawContext fill (IIIIII)V + param 5 argb_color +target_method net/minecraft/client/gui/DrawContext fill (Lnet/minecraft/client/render/RenderLayer;IIIII)V + param 5 argb_color +target_method net/minecraft/client/gui/DrawContext fill (Lnet/minecraft/client/render/RenderLayer;IIIIII)V + param 6 argb_color +target_method net/minecraft/client/gui/DrawContext fillGradient (IIIIII)V + param 4 argb_color + param 5 argb_color +target_method net/minecraft/client/gui/DrawContext fillGradient (IIIIIII)V + param 5 argb_color + param 6 argb_color +target_method net/minecraft/client/gui/DrawContext fillGradient (Lnet/minecraft/client/render/RenderLayer;IIIIIII)V + param 5 argb_color + param 6 argb_color +target_method net/minecraft/client/gui/DrawContext drawBorder (IIIII)V + param 4 argb_color + +target_method net/minecraft/client/render/VertexConsumer color (I)Lnet/minecraft/client/render/VertexConsumer; + param 0 argb_color + +# These technically accept RGB colors, not ARGB; +# however, it ignores the alpha part, so there is no problem passing ARGB. + +target_method net/minecraft/text/TextColor fromRgb (I)Lnet/minecraft/text/TextColor; + param 0 argb_color +target_method net/minecraft/text/Style withColor (I)Lnet/minecraft/text/Style; + param 0 argb_color +target_method net/minecraft/text/MutableText withColor (I)Lnet/minecraft/text/MutableText; + param 0 argb_color diff --git a/unpick-definitions/entity_flags.unpick b/unpick-definitions/entity_flags.unpick index d4ecba1d44..539b3013db 100644 --- a/unpick-definitions/entity_flags.unpick +++ b/unpick-definitions/entity_flags.unpick @@ -81,6 +81,20 @@ target_method net/minecraft/entity/decoration/ArmorStandEntity setBitField (BIZ) param 1 armor_stand_flags # todo unpick cannot handle the read in method bodies yet +flag text_display_flags net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity SHADOW_FLAG +flag text_display_flags net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity SEE_THROUGH_FLAG +flag text_display_flags net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity DEFAULT_BACKGROUND_FLAG +flag text_display_flags net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity LEFT_ALIGNMENT_FLAG +flag text_display_flags net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity RIGHT_ALIGNMENT_FLAG + +target_method net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity readFlag (BLnet/minecraft/nbt/NbtCompound;Ljava/lang/String;B)B + param 3 text_display_flags +target_method net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity writeFlag (BLnet/minecraft/nbt/NbtCompound;Ljava/lang/String;B)V + param 3 text_display_flags +target_method net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity getAlignment (B)Lnet/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity$TextAlignment; + param 0 text_display_flags +target_method net/minecraft/entity/decoration/DisplayEntity$TextDisplayEntity$Data flags ()B + return text_display_flags constant entity_flag_index net/minecraft/entity/Entity ON_FIRE_FLAG_INDEX constant entity_flag_index net/minecraft/entity/Entity SNEAKING_FLAG_INDEX diff --git a/unpick-definitions/key_bindings.unpick b/unpick-definitions/key_bindings.unpick index 59f290b0df..057eb4fb33 100644 --- a/unpick-definitions/key_bindings.unpick +++ b/unpick-definitions/key_bindings.unpick @@ -108,9 +108,11 @@ constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_TAB constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_LEFT_ALT constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_LEFT_CONTROL constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_LEFT_SHIFT +constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_LEFT_SUPER constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_RIGHT_ALT constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_RIGHT_CONTROL constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_RIGHT_SHIFT +constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_RIGHT_SUPER constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_ENTER constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_ESCAPE constant key_codes org/lwjgl/glfw/GLFW GLFW_KEY_BACKSPACE diff --git a/unpick-definitions/network.unpick b/unpick-definitions/network.unpick index 0a64f35e57..2b3543b570 100644 --- a/unpick-definitions/network.unpick +++ b/unpick-definitions/network.unpick @@ -4,8 +4,8 @@ v2 constant max_string_length net/minecraft/network/PacketByteBuf DEFAULT_MAX_STRING_LENGTH 32767 I constant max_string_length net/minecraft/network/PacketByteBuf MAX_TEXT_LENGTH #constant max_nbt_size net/minecraft/network/PacketByteBuf MAX_READ_NBT_SIZE 2097152 J -constant max_var_int_length net/minecraft/network/PacketByteBuf MAX_VAR_INT_LENGTH -constant max_var_long_length net/minecraft/network/PacketByteBuf MAX_VAR_LONG_LENGTH +constant max_var_int_length net/minecraft/network/encoding/VarInts MAX_BYTES +constant max_var_long_length net/minecraft/network/encoding/VarLongs MAX_BYTES target_method net/minecraft/network/PacketByteBuf readString (I)Ljava/lang/String; param 0 max_string_length @@ -14,9 +14,9 @@ target_method net/minecraft/network/PacketByteBuf writeString (Ljava/lang/String # somehow does not work #target_method net/minecraft/nbt/NbtTagSizeTracker (J)V # param 0 max_nbt_size -target_method net/minecraft/network/PacketByteBuf getVarIntLength (I)I +target_method net/minecraft/network/encoding/VarInts getSizeInBytes (I)I return max_var_int_length -target_method net/minecraft/network/PacketByteBuf getVarLongLength (J)I +target_method net/minecraft/network/encoding/VarLongs getSizeInBytes (J)I return max_var_long_length # var int/long length also used in readVarXx method body, but unpick cannot replace them diff --git a/unpick-definitions/network_packets.unpick b/unpick-definitions/network_packets.unpick index e58df199c8..06b674ac3d 100644 --- a/unpick-definitions/network_packets.unpick +++ b/unpick-definitions/network_packets.unpick @@ -23,6 +23,17 @@ target_method net/minecraft/network/packet/s2c/play/GameStateChangeS2CPacket (Lnet/minecraft/network/packet/s2c/play/CommonPlayerSpawnInfo;B)V + param 1 s2c_player_respawn_flag +target_method net/minecraft/network/packet/s2c/play/PlayerRespawnS2CPacket flag ()B + return s2c_player_respawn_flag +target_method net/minecraft/network/packet/s2c/play/PlayerRespawnS2CPacket hasFlag (B)Z + param 0 s2c_player_respawn_flag + constant s2c_scoreboard_objective_update_mode net/minecraft/network/packet/s2c/play/ScoreboardObjectiveUpdateS2CPacket ADD_MODE constant s2c_scoreboard_objective_update_mode net/minecraft/network/packet/s2c/play/ScoreboardObjectiveUpdateS2CPacket REMOVE_MODE constant s2c_scoreboard_objective_update_mode net/minecraft/network/packet/s2c/play/ScoreboardObjectiveUpdateS2CPacket UPDATE_MODE