diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6410562a..b0878bf7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/*.versions.toml') }} restore-keys: | ${{ runner.os }}-gradle- diff --git a/.github/workflows/javadocs.yml b/.github/workflows/javadocs.yml index c579d069..326b10ae 100644 --- a/.github/workflows/javadocs.yml +++ b/.github/workflows/javadocs.yml @@ -25,7 +25,7 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/*.versions.toml') }} restore-keys: | ${{ runner.os }}-gradle- diff --git a/api/ctjs.api b/api/ctjs.api index 364c37e6..3e0077d2 100644 --- a/api/ctjs.api +++ b/api/ctjs.api @@ -333,30 +333,19 @@ public final class com/chattriggers/ctjs/api/client/Settings$ChatVisibility : ja public static final field HIDDEN Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; public static final field SYSTEM Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; - @1.20.4-fabric public static final fun fromMC (Lnet/minecraft/network/message/ChatVisibility;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; - @1.19.4-fabric - public static final fun fromMC (Lnet/minecraft/client/option/ChatVisibility;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; - @1.20.4-fabric public fun getMcValue ()Lnet/minecraft/network/message/ChatVisibility; - @1.19.4-fabric - public fun getMcValue ()Lnet/minecraft/client/option/ChatVisibility; public synthetic fun toMC ()Ljava/lang/Object; - @1.20.4-fabric public fun toMC ()Lnet/minecraft/network/message/ChatVisibility; - @1.19.4-fabric - public fun toMC ()Lnet/minecraft/client/option/ChatVisibility; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; public static fun values ()[Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; } public final class com/chattriggers/ctjs/api/client/Settings$ChatVisibility$Companion { public final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; - @1.20.4-fabric public final fun fromMC (Lnet/minecraft/network/message/ChatVisibility;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; - @1.19.4-fabric - public final fun fromMC (Lnet/minecraft/client/option/ChatVisibility;)Lcom/chattriggers/ctjs/api/client/Settings$ChatVisibility; } public final class com/chattriggers/ctjs/api/client/Settings$ChatWrapper { @@ -390,6 +379,7 @@ public final class com/chattriggers/ctjs/api/client/Settings$CloudRenderMode : j public static final field OFF Lcom/chattriggers/ctjs/api/client/Settings$CloudRenderMode; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/client/Settings$CloudRenderMode; public static final fun fromMC (Lnet/minecraft/client/option/CloudRenderMode;)Lcom/chattriggers/ctjs/api/client/Settings$CloudRenderMode; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/client/option/CloudRenderMode; public synthetic fun toMC ()Ljava/lang/Object; @@ -410,6 +400,7 @@ public final class com/chattriggers/ctjs/api/client/Settings$Difficulty : java/l public static final field NORMAL Lcom/chattriggers/ctjs/api/client/Settings$Difficulty; public static final field PEACEFUL Lcom/chattriggers/ctjs/api/client/Settings$Difficulty; public static final fun fromMC (Lnet/minecraft/world/Difficulty;)Lcom/chattriggers/ctjs/api/client/Settings$Difficulty; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/world/Difficulty; public synthetic fun toMC ()Ljava/lang/Object; @@ -428,6 +419,7 @@ public final class com/chattriggers/ctjs/api/client/Settings$GraphicsMode : java public static final field FANCY Lcom/chattriggers/ctjs/api/client/Settings$GraphicsMode; public static final field FAST Lcom/chattriggers/ctjs/api/client/Settings$GraphicsMode; public static final fun fromMC (Lnet/minecraft/client/option/GraphicsMode;)Lcom/chattriggers/ctjs/api/client/Settings$GraphicsMode; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/client/option/GraphicsMode; public synthetic fun toMC ()Ljava/lang/Object; @@ -447,6 +439,7 @@ public final class com/chattriggers/ctjs/api/client/Settings$ParticlesMode : jav public static final field MINIMAL Lcom/chattriggers/ctjs/api/client/Settings$ParticlesMode; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/client/Settings$ParticlesMode; public static final fun fromMC (Lnet/minecraft/client/option/ParticlesMode;)Lcom/chattriggers/ctjs/api/client/Settings$ParticlesMode; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/client/option/ParticlesMode; public synthetic fun toMC ()Ljava/lang/Object; @@ -531,7 +524,6 @@ public final class com/chattriggers/ctjs/api/client/Settings$VideoWrapper { } public final class com/chattriggers/ctjs/api/client/Sound { - public static final field Companion Lcom/chattriggers/ctjs/api/client/Sound$Companion; public fun (Lorg/mozilla/javascript/NativeObject;)V public final fun destroy ()V public final fun getAttenuation ()I @@ -570,6 +562,7 @@ public final class com/chattriggers/ctjs/api/client/Sound$AttenuationType : java public static final field NONE Lcom/chattriggers/ctjs/api/client/Sound$AttenuationType; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/client/Sound$AttenuationType; public static final fun fromMC (Lnet/minecraft/client/sound/SoundInstance$AttenuationType;)Lcom/chattriggers/ctjs/api/client/Sound$AttenuationType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/client/sound/SoundInstance$AttenuationType; public synthetic fun toMC ()Ljava/lang/Object; @@ -597,6 +590,7 @@ public final class com/chattriggers/ctjs/api/client/Sound$Category : java/lang/E public static final field WEATHER Lcom/chattriggers/ctjs/api/client/Sound$Category; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/client/Sound$Category; public static final fun fromMC (Lnet/minecraft/sound/SoundCategory;)Lcom/chattriggers/ctjs/api/client/Sound$Category; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/sound/SoundCategory; public synthetic fun toMC ()Ljava/lang/Object; @@ -610,9 +604,6 @@ public final class com/chattriggers/ctjs/api/client/Sound$Category$Companion { public final fun fromMC (Lnet/minecraft/sound/SoundCategory;)Lcom/chattriggers/ctjs/api/client/Sound$Category; } -public final class com/chattriggers/ctjs/api/client/Sound$Companion { -} - public final class com/chattriggers/ctjs/api/commands/DynamicCommands : com/chattriggers/ctjs/internal/commands/CommandCollection { public static final field INSTANCE Lcom/chattriggers/ctjs/api/commands/DynamicCommands; public static final fun angle ()Lcom/mojang/brigadier/arguments/ArgumentType; @@ -890,6 +881,7 @@ public final class com/chattriggers/ctjs/api/entity/Entity$DimensionType : java/ public static final field NETHER Lcom/chattriggers/ctjs/api/entity/Entity$DimensionType; public static final field OVERWORLD Lcom/chattriggers/ctjs/api/entity/Entity$DimensionType; public static final field OVERWORLD_CAVES Lcom/chattriggers/ctjs/api/entity/Entity$DimensionType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/registry/RegistryKey; public synthetic fun toMC ()Ljava/lang/Object; @@ -917,6 +909,10 @@ public class com/chattriggers/ctjs/api/entity/LivingEntity : com/chattriggers/ct public final fun isPotionActive (Lcom/chattriggers/ctjs/api/world/PotionEffectType;)Z } +public synthetic class com/chattriggers/ctjs/api/entity/LivingEntity$EntriesMappings { + public static final synthetic field entries$0 Lkotlin/enums/EnumEntries; +} + public final class com/chattriggers/ctjs/api/entity/Particle : com/chattriggers/ctjs/api/CTWrapper { public fun (Lnet/minecraft/client/particle/Particle;)V public final fun getAge ()I @@ -1044,6 +1040,7 @@ public final class com/chattriggers/ctjs/api/entity/Team$Visibility : java/lang/ public static final field HIDE_FOR_OWN_TEAM Lcom/chattriggers/ctjs/api/entity/Team$Visibility; public static final field NEVER Lcom/chattriggers/ctjs/api/entity/Team$Visibility; public static final fun fromMC (Lnet/minecraft/scoreboard/AbstractTeam$VisibilityRule;)Lcom/chattriggers/ctjs/api/entity/Team$Visibility; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/scoreboard/AbstractTeam$VisibilityRule; public synthetic fun toMC ()Ljava/lang/Object; @@ -1188,6 +1185,7 @@ public final class com/chattriggers/ctjs/api/inventory/action/Action$Type : java public static final field DRAG Lcom/chattriggers/ctjs/api/inventory/action/Action$Type; public static final field DROP Lcom/chattriggers/ctjs/api/inventory/action/Action$Type; public static final field KEY Lcom/chattriggers/ctjs/api/inventory/action/Action$Type; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/inventory/action/Action$Type; public static fun values ()[Lcom/chattriggers/ctjs/api/inventory/action/Action$Type; } @@ -1210,6 +1208,7 @@ public final class com/chattriggers/ctjs/api/inventory/action/ClickAction$ClickT public static final field MIDDLE Lcom/chattriggers/ctjs/api/inventory/action/ClickAction$ClickType; public static final field RIGHT Lcom/chattriggers/ctjs/api/inventory/action/ClickAction$ClickType; public final fun getButton ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/inventory/action/ClickAction$ClickType; public static fun values ()[Lcom/chattriggers/ctjs/api/inventory/action/ClickAction$ClickType; } @@ -1229,6 +1228,7 @@ public final class com/chattriggers/ctjs/api/inventory/action/DragAction$ClickTy public static final field MIDDLE Lcom/chattriggers/ctjs/api/inventory/action/DragAction$ClickType; public static final field RIGHT Lcom/chattriggers/ctjs/api/inventory/action/DragAction$ClickType; public final fun getButton ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/inventory/action/DragAction$ClickType; public static fun values ()[Lcom/chattriggers/ctjs/api/inventory/action/DragAction$ClickType; } @@ -1237,6 +1237,7 @@ public final class com/chattriggers/ctjs/api/inventory/action/DragAction$Stage : public static final field BEGIN Lcom/chattriggers/ctjs/api/inventory/action/DragAction$Stage; public static final field END Lcom/chattriggers/ctjs/api/inventory/action/DragAction$Stage; public static final field SLOT Lcom/chattriggers/ctjs/api/inventory/action/DragAction$Stage; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getStage ()I public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/inventory/action/DragAction$Stage; public static fun values ()[Lcom/chattriggers/ctjs/api/inventory/action/DragAction$Stage; @@ -1342,6 +1343,7 @@ public final class com/chattriggers/ctjs/api/inventory/nbt/NBTTagCompound$NBTDat public static final field SHORT Lcom/chattriggers/ctjs/api/inventory/nbt/NBTTagCompound$NBTDataType; public static final field STRING Lcom/chattriggers/ctjs/api/inventory/nbt/NBTTagCompound$NBTDataType; public static final field TAG_LIST Lcom/chattriggers/ctjs/api/inventory/nbt/NBTTagCompound$NBTDataType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/inventory/nbt/NBTTagCompound$NBTDataType; public static fun values ()[Lcom/chattriggers/ctjs/api/inventory/nbt/NBTTagCompound$NBTDataType; } @@ -1409,7 +1411,6 @@ public final class com/chattriggers/ctjs/api/message/ChatLib { } public final class com/chattriggers/ctjs/api/message/TextComponent : java/lang/Iterable, kotlin/jvm/internal/markers/KMappedMarker, net/minecraft/text/Text { - public static final field Companion Lcom/chattriggers/ctjs/api/message/TextComponent$Companion; public fun ()V public fun ([Ljava/lang/Object;)V public final fun actionBar ()Lcom/chattriggers/ctjs/api/message/TextComponent; @@ -1445,7 +1446,8 @@ public final class com/chattriggers/ctjs/api/message/TextComponent : java/lang/I public final fun withoutTextAt (I)Lcom/chattriggers/ctjs/api/message/TextComponent; } -public final class com/chattriggers/ctjs/api/message/TextComponent$Companion { +public synthetic class com/chattriggers/ctjs/api/message/TextComponent$EntriesMappings { + public static final synthetic field entries$0 Lkotlin/enums/EnumEntries; } public final class com/chattriggers/ctjs/api/render/Book { @@ -1500,6 +1502,7 @@ public final class com/chattriggers/ctjs/api/render/Display$Background : java/la public static final field FULL Lcom/chattriggers/ctjs/api/render/Display$Background; public static final field NONE Lcom/chattriggers/ctjs/api/render/Display$Background; public static final field PER_LINE Lcom/chattriggers/ctjs/api/render/Display$Background; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/render/Display$Background; public static fun values ()[Lcom/chattriggers/ctjs/api/render/Display$Background; } @@ -1507,12 +1510,12 @@ public final class com/chattriggers/ctjs/api/render/Display$Background : java/la public final class com/chattriggers/ctjs/api/render/Display$Order : java/lang/Enum { public static final field NORMAL Lcom/chattriggers/ctjs/api/render/Display$Order; public static final field REVERSED Lcom/chattriggers/ctjs/api/render/Display$Order; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/render/Display$Order; public static fun values ()[Lcom/chattriggers/ctjs/api/render/Display$Order; } public final class com/chattriggers/ctjs/api/render/Gui : gg/essential/universal/UScreen { - public static final field Companion Lcom/chattriggers/ctjs/api/render/Gui$Companion; public fun ()V public fun (Lcom/chattriggers/ctjs/api/message/TextComponent;)V public synthetic fun (Lcom/chattriggers/ctjs/api/message/TextComponent;ILkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -1574,9 +1577,6 @@ public final class com/chattriggers/ctjs/api/render/Gui : gg/essential/universal public final fun unregisterScrolled ()Lcom/chattriggers/ctjs/api/render/Gui; } -public final class com/chattriggers/ctjs/api/render/Gui$Companion { -} - public final class com/chattriggers/ctjs/api/render/Image { public static final field Companion Lcom/chattriggers/ctjs/api/render/Image$Companion; public fun (Ljava/awt/image/BufferedImage;)V @@ -1757,6 +1757,7 @@ public final class com/chattriggers/ctjs/api/render/Renderer$DrawMode : java/lan public static final field TRIANGLE_FAN Lcom/chattriggers/ctjs/api/render/Renderer$DrawMode; public static final field TRIANGLE_STRIP Lcom/chattriggers/ctjs/api/render/Renderer$DrawMode; public static final fun fromUC (Lgg/essential/universal/UGraphics$DrawMode;)Lcom/chattriggers/ctjs/api/render/Renderer$DrawMode; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun toUC ()Lgg/essential/universal/UGraphics$DrawMode; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/render/Renderer$DrawMode; public static fun values ()[Lcom/chattriggers/ctjs/api/render/Renderer$DrawMode; @@ -1785,6 +1786,7 @@ public final class com/chattriggers/ctjs/api/render/Renderer$VertexFormat : java public static final field POSITION_TEXTURE_COLOR_NORMAL Lcom/chattriggers/ctjs/api/render/Renderer$VertexFormat; public static final field POSITION_TEXTURE_LIGHT_COLOR Lcom/chattriggers/ctjs/api/render/Renderer$VertexFormat; public static final fun fromMC (Lnet/minecraft/client/render/VertexFormat;)Lcom/chattriggers/ctjs/api/render/Renderer$VertexFormat; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun toMC ()Lnet/minecraft/client/render/VertexFormat; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/render/Renderer$VertexFormat; public static fun values ()[Lcom/chattriggers/ctjs/api/render/Renderer$VertexFormat; @@ -1889,17 +1891,14 @@ public final class com/chattriggers/ctjs/api/render/Text$Align : java/lang/Enum public static final field CENTER Lcom/chattriggers/ctjs/api/render/Text$Align; public static final field LEFT Lcom/chattriggers/ctjs/api/render/Text$Align; public static final field RIGHT Lcom/chattriggers/ctjs/api/render/Text$Align; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/render/Text$Align; public static fun values ()[Lcom/chattriggers/ctjs/api/render/Text$Align; } public final class com/chattriggers/ctjs/api/render/Toast : net/minecraft/client/toast/Toast { - public static final field Companion Lcom/chattriggers/ctjs/api/render/Toast$Companion; public fun (Lorg/mozilla/javascript/NativeObject;)V - @1.20.4-fabric public fun draw (Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/toast/ToastManager;J)Lnet/minecraft/client/toast/Toast$Visibility; - @1.19.4-fabric - public fun draw (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/toast/ToastManager;J)Lnet/minecraft/client/toast/Toast$Visibility; public final fun getBackground ()Ljava/lang/Object; public final fun getDescription ()Ljava/lang/Object; public final fun getDisplayTime ()J @@ -1915,9 +1914,6 @@ public final class com/chattriggers/ctjs/api/render/Toast : net/minecraft/client public final fun show ()Lcom/chattriggers/ctjs/api/render/Toast; } -public final class com/chattriggers/ctjs/api/render/Toast$Companion { -} - public class com/chattriggers/ctjs/api/triggers/CancellableEvent { public fun ()V public final fun isCancelable ()Z @@ -2053,6 +2049,7 @@ public final class com/chattriggers/ctjs/api/triggers/Trigger$Priority : java/la public static final field LOW Lcom/chattriggers/ctjs/api/triggers/Trigger$Priority; public static final field LOWEST Lcom/chattriggers/ctjs/api/triggers/Trigger$Priority; public static final field NORMAL Lcom/chattriggers/ctjs/api/triggers/Trigger$Priority; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/triggers/Trigger$Priority; public static fun values ()[Lcom/chattriggers/ctjs/api/triggers/Trigger$Priority; } @@ -2098,6 +2095,7 @@ public final class com/chattriggers/ctjs/api/triggers/TriggerType : java/lang/En public static final field TICK Lcom/chattriggers/ctjs/api/triggers/TriggerType; public static final field WORLD_LOAD Lcom/chattriggers/ctjs/api/triggers/TriggerType; public static final field WORLD_UNLOAD Lcom/chattriggers/ctjs/api/triggers/TriggerType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getName ()Ljava/lang/String; public fun triggerAll ([Ljava/lang/Object;)V public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/api/triggers/TriggerType; @@ -2234,6 +2232,7 @@ public final class com/chattriggers/ctjs/api/world/BossBars$Color : java/lang/En public static final field YELLOW Lcom/chattriggers/ctjs/api/world/BossBars$Color; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/world/BossBars$Color; public static final fun fromMC (Lnet/minecraft/entity/boss/BossBar$Color;)Lcom/chattriggers/ctjs/api/world/BossBars$Color; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/entity/boss/BossBar$Color; public synthetic fun toMC ()Ljava/lang/Object; @@ -2256,6 +2255,7 @@ public final class com/chattriggers/ctjs/api/world/BossBars$Style : java/lang/En public static final field TWENTY Lcom/chattriggers/ctjs/api/world/BossBars$Style; public static final fun from (Ljava/lang/Object;)Lcom/chattriggers/ctjs/api/world/BossBars$Style; public static final fun fromMC (Lnet/minecraft/entity/boss/BossBar$Style;)Lcom/chattriggers/ctjs/api/world/BossBars$Style; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/entity/boss/BossBar$Style; public final fun getSections ()I @@ -2336,16 +2336,10 @@ public final class com/chattriggers/ctjs/api/world/Scoreboard { } public final class com/chattriggers/ctjs/api/world/Scoreboard$Score { - @1.20.4-fabric public fun (Lnet/minecraft/scoreboard/ScoreboardEntry;)V - @1.19.4-fabric - public fun (Lnet/minecraft/scoreboard/ScoreboardPlayerScore;)V public final fun getName ()Lcom/chattriggers/ctjs/api/message/TextComponent; public final fun getPoints ()I - @1.20.4-fabric public final fun toMC ()Lnet/minecraft/scoreboard/ScoreboardEntry; - @1.19.4-fabric - public final fun toMC ()Lnet/minecraft/scoreboard/ScoreboardPlayerScore; public fun toString ()Ljava/lang/String; } @@ -2468,6 +2462,7 @@ public final class com/chattriggers/ctjs/api/world/block/BlockFace : java/lang/E public final fun getAxis ()Lcom/chattriggers/ctjs/api/world/block/BlockFace$Axis; public final fun getAxisDirection ()Lcom/chattriggers/ctjs/api/world/block/BlockFace$AxisDirection; public final fun getDirectionVec ()Lcom/chattriggers/ctjs/api/vec/Vec3i; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/util/math/Direction; public final fun getOffsetX ()I @@ -2491,6 +2486,7 @@ public final class com/chattriggers/ctjs/api/world/block/BlockFace$Axis : java/l public static final field Z Lcom/chattriggers/ctjs/api/world/block/BlockFace$Axis; public fun asString ()Ljava/lang/String; public static final fun fromMC (Lnet/minecraft/util/math/Direction$Axis;)Lcom/chattriggers/ctjs/api/world/block/BlockFace$Axis; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/util/math/Direction$Axis; public final fun getPlane ()Lcom/chattriggers/ctjs/api/world/block/BlockFace$Plane; @@ -2513,6 +2509,7 @@ public final class com/chattriggers/ctjs/api/world/block/BlockFace$AxisDirection public static final field NEGATIVE Lcom/chattriggers/ctjs/api/world/block/BlockFace$AxisDirection; public static final field POSITIVE Lcom/chattriggers/ctjs/api/world/block/BlockFace$AxisDirection; public static final fun fromMC (Lnet/minecraft/util/math/Direction$AxisDirection;)Lcom/chattriggers/ctjs/api/world/block/BlockFace$AxisDirection; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public synthetic fun getMcValue ()Ljava/lang/Object; public fun getMcValue ()Lnet/minecraft/util/math/Direction$AxisDirection; public final fun getOffset ()I @@ -2534,6 +2531,7 @@ public final class com/chattriggers/ctjs/api/world/block/BlockFace$Plane : java/ public static final field HORIZONTAL Lcom/chattriggers/ctjs/api/world/block/BlockFace$Plane; public static final field VERTICAL Lcom/chattriggers/ctjs/api/world/block/BlockFace$Plane; public final fun facings ()[Lcom/chattriggers/ctjs/api/world/block/BlockFace; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public fun iterator ()Ljava/util/Iterator; public fun test (Lcom/chattriggers/ctjs/api/world/block/BlockFace;)Z public synthetic fun test (Ljava/lang/Object;)Z @@ -2636,6 +2634,7 @@ public final class com/chattriggers/ctjs/engine/LogType : java/lang/Enum { public static final field ERROR Lcom/chattriggers/ctjs/engine/LogType; public static final field INFO Lcom/chattriggers/ctjs/engine/LogType; public static final field WARN Lcom/chattriggers/ctjs/engine/LogType; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lcom/chattriggers/ctjs/engine/LogType; public static fun values ()[Lcom/chattriggers/ctjs/engine/LogType; } diff --git a/build.gradle.kts b/build.gradle.kts index aca8d3bb..85b7744e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,76 +7,46 @@ import java.io.ByteArrayOutputStream buildscript { dependencies { - classpath("org.jetbrains.dokka:versioning-plugin:1.8.20") + classpath(libs.versioning) } } plugins { - kotlin("jvm") version "1.8.21" - kotlin("plugin.serialization") version "1.8.21" - id("gg.essential.multi-version") - - // Apply defaults individually since "gg.essential.defaults" includes - // mixin-extras which requires Essential - id("gg.essential.defaults.java") - id("gg.essential.defaults.loom") - id("gg.essential.defaults.repo") - - id("io.github.juuxel.loom-quiltflower") version "1.10.0" - id("org.jetbrains.dokka") version "1.8.20" + alias(libs.plugins.kotlin) + alias(libs.plugins.serialization) + alias(libs.plugins.loom) + alias(libs.plugins.dokka) + alias(libs.plugins.validator) } -val modVersion = property("mod_version")!!.toString() -val mcVersion = platform.toString() - -version = "${modVersion}_$mcVersion" -group = property("mod_group")!! -val yarnMappings = property("yarn_mappings")!! +version = property("mod_version").toString() repositories { maven("https://jitpack.io") maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1") maven("https://maven.terraformersmc.com/releases") + maven("https://repo.essential.gg/repository/maven-public") } dependencies { - include(modImplementation("net.fabricmc:fabric-loader:${property("loader_version")}")!!) - include(modImplementation("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")!!) - - include(modImplementation("net.fabricmc:fabric-language-kotlin:1.9.4+kotlin.1.8.21")!!) - include(modImplementation("net.fabricmc:mapping-io:0.5.1")!!) - include(modImplementation("com.github.ChatTriggers:rhino:739c70599b")!!) - include(modImplementation("com.fasterxml.jackson.core:jackson-core:2.13.2")!!) - include(modImplementation("com.fifesoft:rsyntaxtextarea:3.2.0")!!) - include(modImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")!!) - include(modImplementation("com.github.ChatTriggers:Koffee:315bc11234")!!) - - include(implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:0.2.0")!!)!!) - - // 1.18 versions are good enough for Elementa and Vigilance, but not UC, so we - // need to exclude this version - configurations.modImplementation { exclude("gg.essential", "universalcraft-1.18.1-fabric") } - - include(modImplementation("gg.essential:vigilance-1.18.1-fabric:295")!!) - val ucArtifact = if (mcVersion == "1.19.4-fabric") mcVersion else "1.20.3-fabric" - include(modImplementation("gg.essential:universalcraft-$ucArtifact:320")!!) - include(modImplementation("gg.essential:elementa-1.18.1-fabric:610")!!) - - val modMenuVersion = when (mcVersion) { - "1.20.4-fabric" -> "9.0.0" - "1.19.4-fabric" -> "6.3.1" - else -> throw Exception("Minecraft version $mcVersion is not supported") + // To change the versions see the gradle/libs.versions.toml + minecraft(libs.minecraft) + mappings(variantOf(libs.yarn) { classifier("v2") }) + modImplementation(libs.bundles.fabric) + + modImplementation(libs.bundles.included) { include(this) } + modImplementation(libs.bundles.essential) { + exclude("gg.essential", "universalcraft-1.18.1-fabric") + include(this) } - modApi("com.terraformersmc:modmenu:$modMenuVersion") - - modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.1.2") - - dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.8.20") + modApi(libs.modmenu) + modRuntimeOnly(libs.devauth) + dokkaPlugin(libs.versioning) } loom { - accessWidenerPath.set(rootProject.file("src/main/resources/chattriggers.accesswidener")) + accessWidenerPath.set(file("src/main/resources/chattriggers.accesswidener")) } base { @@ -90,13 +60,31 @@ java { targetCompatibility = JavaVersion.VERSION_17 } +apiValidation { + ignoredPackages.add("com.chattriggers.ctjs.internal") +} + tasks { processResources { - inputs.property("yarn_mappings", yarnMappings) + val flkVersion = libs.versions.fabric.kotlin.get() + val yarnVersion = libs.versions.yarn.get() + val fapiVersion = libs.versions.fabric.api.get() + val loaderVersion = libs.versions.loader.get() + inputs.property("version", project.version) + inputs.property("yarn_mappings", yarnVersion) + inputs.property("fabric_kotlin_version", flkVersion) + inputs.property("fabric_api_version", fapiVersion) + inputs.property("loader_version", loaderVersion) filesMatching("fabric.mod.json") { - expand("version" to project.version, "yarn_mappings" to yarnMappings) + expand( + "version" to project.version, + "yarn_mappings" to yarnVersion, + "fabric_kotlin_version" to flkVersion, + "fabric_api_version" to fapiVersion, + "loader_version" to loaderVersion + ) } } @@ -117,99 +105,90 @@ tasks { } } - build { - doLast { - allprojects { - copy { - from("build/libs") - into(rootProject.file("build")) - } - } - } - } -} + dokkaHtml { + // Just use the module name here since the MC version doesn't affect CT's API + // across the same mod version + moduleVersion.set(project.version.toString()) + moduleName.set("ctjs") -tasks.dokkaHtml { - // Just use the module name here since the MC version doesn't affect CT's API - // across the same mod version - moduleVersion.set(modVersion) - moduleName.set("ctjs") + val docVersionsDir = projectDir.resolve("build/javadocs") + val currentVersion = project.version.toString() + val currentDocsDir = docVersionsDir.resolve(currentVersion) + outputs.upToDateWhen { docVersionsDir.exists() } - val docVersionsDir = projectDir.resolve("build/javadocs") - val currentVersion = project.version.toString() - val currentDocsDir = docVersionsDir.resolve(currentVersion) - outputs.upToDateWhen { docVersionsDir.exists() } + outputDirectory.set(file(currentDocsDir)) - outputDirectory.set(file(currentDocsDir)) + pluginConfiguration { + version = project.version.toString() + olderVersionsDir = docVersionsDir + renderVersionsNavigationOnAllPages = true + } - pluginConfiguration { - version = modVersion - olderVersionsDir = docVersionsDir - renderVersionsNavigationOnAllPages = true - } + suppressObviousFunctions.set(true) + suppressInheritedMembers.set(true) - suppressObviousFunctions.set(true) - suppressInheritedMembers.set(true) + val branch = getBranch() + dokkaSourceSets { + configureEach { + jdkVersion.set(17) - val branch = getBranch() - dokkaSourceSets { - configureEach { - jdkVersion.set(17) + perPackageOption { + matchingRegex.set("com\\.chattriggers\\.ctjs\\.internal(\$|\\.).*") + suppress.set(true) + } - perPackageOption { - matchingRegex.set("com\\.chattriggers\\.ctjs\\.internal(\$|\\.).*") - suppress.set(true) - } + sourceLink { + localDirectory.set(file("src/main/kotlin")) + remoteUrl.set(URL("https://github.com/ChatTriggers/ctjs/blob/$branch/src/main/kotlin")) + remoteLineSuffix.set("#L") + } - sourceLink { - localDirectory.set(file("src/main/kotlin")) - remoteUrl.set(URL("https://github.com/ChatTriggers/ctjs/blob/$branch/src/main/kotlin")) - remoteLineSuffix.set("#L") - } + externalDocumentationLink { + val yarnVersion = libs.versions.yarn.get() - externalDocumentationLink { - url.set(URL("https://maven.fabricmc.net/docs/yarn-$yarnMappings/")) - packageListUrl.set(URL("https://maven.fabricmc.net/docs/yarn-$yarnMappings/element-list")) + url.set(URL("https://maven.fabricmc.net/docs/yarn-$yarnVersion/")) + packageListUrl.set(URL("https://maven.fabricmc.net/docs/yarn-$yarnVersion/element-list")) + } } } - } - - doFirst { - val archiveBase = "https://www.chattriggers.com/javadocs-archive/" - val versions = String(downloadFile(archiveBase + "versions")).lines().map(String::trim) - val tmpFile = File(temporaryDir, "oldVersionsZip.zip") - versions.filter(String::isNotEmpty).map(String::trim).forEach { version -> - val zipBytes = downloadFile("$archiveBase$version.zip") - tmpFile.writeBytes(zipBytes) - unzipTo(docVersionsDir, tmpFile) - } + doFirst { + val archiveBase = "https://www.chattriggers.com/javadocs-archive/" + val versions = String(downloadFile(archiveBase + "versions")).lines().map(String::trim) + val tmpFile = File(temporaryDir, "oldVersionsZip.zip") - tmpFile.delete() - } + versions.filter(String::isNotEmpty).map(String::trim).forEach { version -> + val zipBytes = downloadFile("$archiveBase$version.zip") + tmpFile.writeBytes(zipBytes) + unzipTo(docVersionsDir, tmpFile) + } - doLast { - // At this point we have a structure that looks something like this: - // javadocs - // \-- 2.2.0-1.8.9 - // \-- 3.0.0 - // \-- older - // - // The "older" directory contains all old versions, so we want to - // delete the top-level older versions and move everything inside the - // latest directory to the top level so the GitHub actions workflow - // doesn't need to figure out the correct version name - - docVersionsDir.listFiles()?.forEach { - if (it.name != version) - it.deleteRecursively() + tmpFile.delete() } - val latestVersionDir = docVersionsDir.listFiles()!!.single() - latestVersionDir.listFiles()!!.forEach { - it.renameTo(File(it.parentFile.parentFile, it.name)) + doLast { + // At this point we have a structure that looks something like this: + // javadocs + // \-- 2.2.0-1.8.9 + // \-- 3.0.0 + // \-- older + // + // The "older" directory contains all old versions, so we want to + // delete the top-level older versions and move everything inside the + // latest directory to the top level so the GitHub actions workflow + // doesn't need to figure out the correct version name + + docVersionsDir.listFiles()?.forEach { + if (it.name != version) + it.deleteRecursively() + } + + val latestVersionDir = docVersionsDir.listFiles()!!.single() + latestVersionDir.listFiles()!!.forEach { + it.renameTo(File(it.parentFile.parentFile, it.name)) + } + latestVersionDir.deleteRecursively() } - latestVersionDir.deleteRecursively() } } diff --git a/gradle.properties b/gradle.properties index 507248b9..2732bee3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,7 @@ +# Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx4G org.gradle.parallel=true +# Mod Properties mod_version = 3.0.0-beta -mod_group = com.chattriggers archives_base_name = ctjs -supportedMcVersions=1.19.4-fabric,1.20.4-fabric - -loader_version=0.15.3 - -essential.defaults.loom=1 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..c3742793 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,63 @@ +[versions] +# Library versions +minecraft = "1.20.4" +yarn = "1.20.4+build.3" + +loader = "0.15.3" +fabric-api = "0.92.1+1.20.4" +fabric-kotlin = "1.10.16+kotlin.1.9.21" + +mapping-io = "0.5.1" +rhino = "96d0c07966" +jackson-core = "2.13.2" +textarea = "3.2.0" +serialization = "1.5.1" +koffee = "315bc11234" + +universalcraft = "323" +elementa = "619" +vigilance = "295" + +modmenu = "9.0.0" +devauth = "1.2.0" +dokka = "1.9.10" + +# Plugin Versions +kotlin = "1.9.21" +loom = "1.5-SNAPSHOT" +validator = "0.13.2" + +[libraries] +minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } +yarn = { module = "net.fabricmc:yarn", version.ref = "yarn" } + +fabric-loader = { module = "net.fabricmc:fabric-loader", version.ref = "loader" } +fabric-api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric-api" } +fabric-kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric-kotlin" } + +mapping-io = { module = "net.fabricmc:mapping-io", version.ref = "mapping-io" } +rhino = { module = "com.github.ChatTriggers:rhino", version.ref = "rhino" } +jackson-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson-core" } +textarea = { module = "com.fifesoft:rsyntaxtextarea", version.ref = "textarea" } +serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" } +koffee = { module = "com.github.ChatTriggers:koffee", version.ref = "koffee" } + +universalcraft = { module = "gg.essential:universalcraft-1.20.4-fabric", version.ref = "universalcraft" } +elementa = { module = "gg.essential:elementa-1.18.1-fabric", version.ref = "elementa" } +vigilance = { module = "gg.essential:vigilance-1.18.1-fabric", version.ref = "vigilance" } + +modmenu = { module = "com.terraformersmc:modmenu", version.ref = "modmenu" } +devauth = { module = "me.djtheredstoner:DevAuth-fabric", version.ref = "devauth" } +versioning = { module = "org.jetbrains.dokka:versioning-plugin", version.ref = "dokka" } + +[bundles] +fabric = ["fabric-loader", "fabric-api", "fabric-kotlin"] +included = ["mapping-io", "rhino", "jackson-core", "textarea", "serialization", "koffee"] +essential = ["universalcraft", "elementa", "vigilance"] + +[plugins] +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +loom = { id = "fabric-loom", version.ref = "loom" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } +validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "validator" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a79..d64cd491 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d3..1af9e093 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index aeb74cbb..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -141,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/root.gradle.kts b/root.gradle.kts deleted file mode 100644 index bab20ac1..00000000 --- a/root.gradle.kts +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - kotlin("jvm") version "1.8.21" apply false - id("io.github.juuxel.loom-quiltflower") version "1.10.0" apply false - id("gg.essential.multi-version.root") - id("gg.essential.multi-version.api-validation") -} - -preprocess { - val fabric11904 = createNode("1.19.4-fabric", 11904, "yarn") - val fabric12004 = createNode("1.20.4-fabric", 12004, "yarn") - - fabric11904.link(fabric12004, file("versions/fabric1.19.4-1.20.4.txt")) -} - -apiValidation { - ignoredPackages.add("com.chattriggers.ctjs.internal") -} - -tasks.register("generateDokkaDocs") { - group = "documentation" - - val mainProjectName = rootProject.file("versions/mainProject").readText().trim() - val mainProject = subprojects.first { mainProjectName in it.name } - dependsOn(mainProject.tasks["dokkaHtml"]) - - doLast { - val dest = rootProject.file("build/javadocs/") - dest.deleteRecursively() - mainProject.file("build/javadocs/").copyRecursively(dest) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index c617c2bc..2107f5f7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,25 +2,8 @@ pluginManagement { repositories { gradlePluginPortal() mavenCentral() - maven("https://repo.essential.gg/repository/maven-public") - maven("https://maven.architectury.dev") maven("https://maven.fabricmc.net") - maven("https://maven.minecraftforge.net") - } - - plugins { - val egtVersion = "0.3.0" - id("gg.essential.multi-version.root") version egtVersion - id("gg.essential.multi-version.api-validation") version egtVersion - } -} - -providers.gradleProperty("supportedMcVersions").get().split(",").forEach { version -> - include(":$version") - project(":$version").apply { - projectDir = file("versions/$version") - buildFileName = "../../build.gradle.kts" } } -rootProject.buildFileName = "root.gradle.kts" +rootProject.name = "ctjs" diff --git a/src/main/java/com/chattriggers/ctjs/internal/mixins/EntityRenderDispatcherAccessor.java b/src/main/java/com/chattriggers/ctjs/internal/mixins/EntityRenderDispatcherAccessor.java index 470f1a3f..b08362b7 100644 --- a/src/main/java/com/chattriggers/ctjs/internal/mixins/EntityRenderDispatcherAccessor.java +++ b/src/main/java/com/chattriggers/ctjs/internal/mixins/EntityRenderDispatcherAccessor.java @@ -11,9 +11,5 @@ @Mixin(EntityRenderDispatcher.class) public interface EntityRenderDispatcherAccessor { @Invoker - //#if MC>=12004 void invokeRenderFire(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity, Quaternionf rotation); - //#else - //$$ void invokeRenderFire(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity); - //#endif } diff --git a/src/main/java/com/chattriggers/ctjs/internal/mixins/InGameHudMixin.java b/src/main/java/com/chattriggers/ctjs/internal/mixins/InGameHudMixin.java index c9728c08..23dcaaf0 100644 --- a/src/main/java/com/chattriggers/ctjs/internal/mixins/InGameHudMixin.java +++ b/src/main/java/com/chattriggers/ctjs/internal/mixins/InGameHudMixin.java @@ -1,7 +1,8 @@ package com.chattriggers.ctjs.internal.mixins; -import com.chattriggers.ctjs.internal.engine.CTEvents; import com.chattriggers.ctjs.api.world.Scoreboard; +import com.chattriggers.ctjs.internal.engine.CTEvents; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.hud.InGameHud; import net.minecraft.scoreboard.ScoreboardObjective; import org.spongepowered.asm.mixin.Mixin; @@ -9,42 +10,24 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -//#if MC>=12000 -import net.minecraft.client.gui.DrawContext; -//#else -//$$ import net.minecraft.client.util.math.MatrixStack; -//#endif @Mixin(InGameHud.class) public class InGameHudMixin { @Inject(method = "renderScoreboardSidebar", at = @At("HEAD"), cancellable = true) - //#if MC>=12000 private void injectRenderScoreboard(DrawContext matrices, ScoreboardObjective objective, CallbackInfo ci) { - //#else - //$$ private void injectRenderScoreboard(MatrixStack matrices, ScoreboardObjective objective, CallbackInfo ci) { - //#endif if (!Scoreboard.getShouldRender()) ci.cancel(); } @Inject( - method = "render", - at = @At( - value = "INVOKE", - //#if MC>=12000 - target = "Lnet/minecraft/client/gui/hud/InGameHud;renderStatusEffectOverlay(Lnet/minecraft/client/gui/DrawContext;)V", - //#else - //$$ target = "Lnet/minecraft/client/gui/hud/InGameHud;renderStatusEffectOverlay(Lnet/minecraft/client/util/math/MatrixStack;)V", - //#endif - shift = At.Shift.AFTER - ) + method = "render", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/client/gui/hud/InGameHud;renderStatusEffectOverlay(Lnet/minecraft/client/gui/DrawContext;)V", + shift = At.Shift.AFTER + ) ) - //#if MC>=12000 private void injectRenderOverlay(DrawContext drawContext, float tickDelta, CallbackInfo ci) { CTEvents.RENDER_OVERLAY.invoker().render(drawContext.getMatrices(), tickDelta); - //#else - //$$ private void injectRenderOverlay(MatrixStack matrices, float tickDelta, CallbackInfo ci) { - //$$ CTEvents.RENDER_OVERLAY.invoker().render(matrices, tickDelta); - //#endif } } diff --git a/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerListHudMixin.java b/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerListHudMixin.java index d0fe048c..e0cde8b1 100644 --- a/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerListHudMixin.java +++ b/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerListHudMixin.java @@ -1,6 +1,7 @@ package com.chattriggers.ctjs.internal.mixins; import com.chattriggers.ctjs.api.triggers.TriggerType; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.hud.PlayerListHud; import net.minecraft.scoreboard.Scoreboard; import net.minecraft.scoreboard.ScoreboardObjective; @@ -9,20 +10,10 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -//#if MC>=12000 -import net.minecraft.client.gui.DrawContext; -//#else -//$$ import net.minecraft.client.util.math.MatrixStack; -//#endif - @Mixin(PlayerListHud.class) public class PlayerListHudMixin { @Inject(method = "render", at = @At("HEAD"), cancellable = true) - //#if MC>=12000 private void injectRenderPlayerList(DrawContext context, int scaledWindowWidth, Scoreboard scoreboard, ScoreboardObjective objective, CallbackInfo ci) { - //#else - //$$ private void injectRenderPlayerList(MatrixStack matrices, int scaledWindowWidth, Scoreboard scoreboard, ScoreboardObjective objective, CallbackInfo ci) { - //#endif TriggerType.RENDER_PLAYER_LIST.triggerAll(ci); } } diff --git a/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerScreenHandlerMixin.java b/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerScreenHandlerMixin.java index 63f41ab5..e5a33e1c 100644 --- a/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerScreenHandlerMixin.java +++ b/src/main/java/com/chattriggers/ctjs/internal/mixins/PlayerScreenHandlerMixin.java @@ -1,7 +1,7 @@ package com.chattriggers.ctjs.internal.mixins; -import com.chattriggers.ctjs.api.triggers.CancellableEvent; import com.chattriggers.ctjs.api.inventory.Item; +import com.chattriggers.ctjs.api.triggers.CancellableEvent; import com.chattriggers.ctjs.api.triggers.TriggerType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.inventory.RecipeInputInventory; @@ -21,21 +21,17 @@ public class PlayerScreenHandlerMixin { private RecipeInputInventory craftingInput; @Inject( - method = "onClosed", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/inventory/CraftingResultInventory;clear()V", - shift = At.Shift.AFTER - ) + method = "onClosed", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/inventory/CraftingResultInventory;clear()V", + shift = At.Shift.AFTER + ) ) private void injectOnClosed(PlayerEntity player, CallbackInfo ci) { // dropping items for player's crafting slots. needs a whole injection point due to there // being an extra if to make sure it only calls dropInventory server-side - //#if MC>=12000 if (player.getWorld().isClient) { - //#else - //$$ if (player.world.isClient) { - //#endif for (int i = 0; i < craftingInput.size(); i++) { ItemStack stack = craftingInput.getStack(i); if (!stack.isEmpty()) { diff --git a/src/main/java/com/chattriggers/ctjs/internal/mixins/commands/EntitySelectorAccessor.java b/src/main/java/com/chattriggers/ctjs/internal/mixins/commands/EntitySelectorAccessor.java index 38242211..90d666f1 100644 --- a/src/main/java/com/chattriggers/ctjs/internal/mixins/commands/EntitySelectorAccessor.java +++ b/src/main/java/com/chattriggers/ctjs/internal/mixins/commands/EntitySelectorAccessor.java @@ -27,11 +27,7 @@ public interface EntitySelectorAccessor { Predicate getBasePredicate(); @Accessor - //#if MC>=12002 NumberRange.DoubleRange getDistance(); - //#else - //$$ NumberRange.FloatRange getDistance(); - //#endif @Accessor Function getPositionOffset(); diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/client/Client.kt b/src/main/kotlin/com/chattriggers/ctjs/api/client/Client.kt index 55e84b67..ee696a54 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/client/Client.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/client/Client.kt @@ -81,11 +81,7 @@ object Client { getMinecraft().setScreen( when { getMinecraft().isInSingleplayer -> TitleScreen() - //#if MC==12002 getMinecraft().currentServerEntry?.isRealm == true -> RealmsMainScreen(TitleScreen()) - //#else - //$$ getMinecraft().isConnectedToRealms -> RealmsMainScreen(TitleScreen()) - //#endif else -> MultiplayerScreen(TitleScreen()) } ) @@ -104,14 +100,8 @@ object Client { MultiplayerScreen(TitleScreen()), getMinecraft(), ServerAddress(ip, port), - //#if MC==11202 ServerInfo("Server", ip, ServerInfo.ServerType.OTHER), - //#else - //$$ ServerInfo("Server", ip, false), - //#endif - //#if MC>=12000 false, - //#endif ) } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/client/Player.kt b/src/main/kotlin/com/chattriggers/ctjs/api/client/Player.kt index e7a9c4d2..2e9276f4 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/client/Player.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/client/Player.kt @@ -137,13 +137,7 @@ object Player { * @return the player's uuid */ @JvmStatic - fun getUUID(): UUID { - //#if MC>=12002 - return UMinecraft.getMinecraft().gameProfile.id - //#else - //$$ return UMinecraft.getMinecraft().session.profile.id - //#endif - } + fun getUUID(): UUID = UMinecraft.getMinecraft().gameProfile.id @JvmStatic fun getHP(): Float = toMC()?.health ?: 0f diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/client/Settings.kt b/src/main/kotlin/com/chattriggers/ctjs/api/client/Settings.kt index 94f12d81..c5316161 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/client/Settings.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/client/Settings.kt @@ -287,7 +287,7 @@ object Settings { companion object { @JvmStatic - fun fromMC(mcValue: MCCloudRenderMode) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCCloudRenderMode) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { @@ -306,7 +306,7 @@ object Settings { companion object { @JvmStatic - fun fromMC(mcValue: MCParticlesMode) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCParticlesMode) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { @@ -325,7 +325,7 @@ object Settings { companion object { @JvmStatic - fun fromMC(mcValue: MCChatVisibility) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCChatVisibility) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { @@ -345,7 +345,7 @@ object Settings { companion object { @JvmStatic - fun fromMC(mcValue: MCDifficulty) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCDifficulty) = entries.first { it.mcValue == mcValue } } } @@ -356,7 +356,7 @@ object Settings { companion object { @JvmStatic - fun fromMC(mcValue: MCGraphicsMode) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCGraphicsMode) = entries.first { it.mcValue == mcValue } } } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/client/Sound.kt b/src/main/kotlin/com/chattriggers/ctjs/api/client/Sound.kt index 2d6fcd61..2c815004 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/client/Sound.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/client/Sound.kt @@ -460,7 +460,7 @@ class Sound(private val config: NativeObject) { companion object { @JvmStatic - fun fromMC(mcValue: SoundCategory) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: SoundCategory) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { @@ -478,7 +478,7 @@ class Sound(private val config: NativeObject) { companion object { @JvmStatic - fun fromMC(mcValue: MCAttenuationType) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCAttenuationType) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { @@ -528,7 +528,7 @@ class Sound(private val config: NativeObject) { } } - companion object { + private companion object { private val soundSystem by lazy { Client.getMinecraft().soundManager.asMixin().soundSystem } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/commands/DynamicCommands.kt b/src/main/kotlin/com/chattriggers/ctjs/api/commands/DynamicCommands.kt index 1e83b934..352dabd1 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/commands/DynamicCommands.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/commands/DynamicCommands.kt @@ -357,7 +357,7 @@ object DynamicCommands : CommandCollection() { "minecraft:overworld_caves", ) ) { name -> - Entity.DimensionType.values().first { it.toMC().value.toString() == name } + Entity.DimensionType.entries.first { it.toMC().value.toString() == name } } /** diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/entity/Entity.kt b/src/main/kotlin/com/chattriggers/ctjs/api/entity/Entity.kt index fe5df654..ba418d6f 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/entity/Entity.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/entity/Entity.kt @@ -200,7 +200,7 @@ open class Entity(override val mcValue: MCEntity) : CTWrapper { fun isWet() = mcValue.isWet fun getDimension() = mcValue.world.dimensionKey.let { key -> - DimensionType.values().first { it.toMC() == key } + DimensionType.entries.first { it.toMC() == key } } fun getMaxInPortalTime() = mcValue.maxNetherPortalTime diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/entity/LivingEntity.kt b/src/main/kotlin/com/chattriggers/ctjs/api/entity/LivingEntity.kt index 4e456d79..a3516725 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/entity/LivingEntity.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/entity/LivingEntity.kt @@ -25,7 +25,7 @@ open class LivingEntity(override val mcValue: MCLivingEntity) : Entity(mcValue) * @return the item in said slot */ fun getStackInSlot(slot: Int): Item? { - return mcValue.getEquippedStack(EquipmentSlot.values()[slot])?.let(Item::fromMC) + return mcValue.getEquippedStack(EquipmentSlot.entries[slot])?.let(Item::fromMC) } fun getHP() = mcValue.health diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/entity/Team.kt b/src/main/kotlin/com/chattriggers/ctjs/api/entity/Team.kt index 226c2fab..54f817c1 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/entity/Team.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/entity/Team.kt @@ -107,7 +107,7 @@ class Team(override val mcValue: MCTeam) : CTWrapper { companion object { @JvmStatic - fun fromMC(mcValue: AbstractTeam.VisibilityRule) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: AbstractTeam.VisibilityRule) = entries.first { it.mcValue == mcValue } } } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/inventory/Item.kt b/src/main/kotlin/com/chattriggers/ctjs/api/inventory/Item.kt index d0f26d38..bc69a57d 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/inventory/Item.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/inventory/Item.kt @@ -121,7 +121,6 @@ class Item(override val mcValue: ItemStack) : CTWrapper { // The item draw method moved to DrawContext in 1.20, which we don't have access // to here, so its drawItem method has been copy-pasted here instead - //#if MC>=12000 if (mcValue.isEmpty) return val bakedModel = itemRenderer.getModel(mcValue, World.toMC(), null, 0) @@ -161,10 +160,6 @@ class Item(override val mcValue: ItemStack) : CTWrapper { Renderer.popMatrix() Renderer.popMatrix() } - //#else - //$$ itemRenderer.renderInGui(Renderer.matrixStack.toMC(), mcValue, 0, 0) - //$$ Renderer.popMatrix() - //#endif } override fun toString(): String = "Item{name=${getName()}, type=${type.getRegistryName()}, size=${getStackSize()}}" diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/message/TextComponent.kt b/src/main/kotlin/com/chattriggers/ctjs/api/message/TextComponent.kt index 9c5e0fec..2c00eebd 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/message/TextComponent.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/message/TextComponent.kt @@ -6,7 +6,6 @@ import com.chattriggers.ctjs.api.client.Player import com.chattriggers.ctjs.api.entity.Entity import com.chattriggers.ctjs.api.inventory.Item import com.chattriggers.ctjs.api.inventory.ItemType -import com.chattriggers.ctjs.internal.utils.hoverEventActionByName import com.chattriggers.ctjs.internal.utils.toIdentifier import com.mojang.serialization.Codec import com.mojang.serialization.MapCodec @@ -280,22 +279,14 @@ class TextComponent private constructor( it.put("obfuscated", it, true) style_.clickEvent?.let { event -> if (event.action != null) { - //#if MC>=12004 it.put("clickAction", it, event.action.asString()) - //#else - //$$ it.put("clickAction", it, event.action.name) - //#endif if (event.value != null) it.put("clickValue", it, event.value) } } style_.hoverEvent?.let { event -> if (event.action != null) { - //#if MC>=12004 it.put("hoverAction", it, event.action.asString()) - //#else - //$$ it.put("hoverAction", it, event.action.name) - //#endif event.getValue(event.action!!)?.let { value -> it.put("hoverValue", it, value) } @@ -372,24 +363,20 @@ class TextComponent private constructor( return visitor.accept(this.style_.withParent(style), text) } - //#if MC>=12004 override fun getType(): TextContent.Type<*> = TextContent.Type(CODEC, "ctjs_part") - //#endif companion object { - //#if MC>=12004 private val CODEC: MapCodec = RecordCodecBuilder.mapCodec { builder -> builder.group( Codec.STRING.fieldOf("text").forGetter(PartContent::text), net.minecraft.text.Style.Codecs.CODEC.fieldOf("style").forGetter(PartContent::style_), ).apply(builder) { text, style -> PartContent(text, style) } } - //#endif } } - companion object { - private val colorToFormatChar = Formatting.values().mapNotNull { format -> + private companion object { + private val colorToFormatChar = Formatting.entries.mapNotNull { format -> TextColor.fromFormatting(format)?.let { it to format } }.toMap() @@ -400,13 +387,9 @@ class TextComponent private constructor( is TextColor -> color is Formatting -> TextColor.fromFormatting(color) is Number -> TextColor.fromRgb(color.toInt()) - //#if MC>=12004 is CharSequence -> TextColor.parse(color.toString()).result().orElseThrow { IllegalArgumentException("Could not parse \"$color\" as a text color") } - //#else - //$$ is CharSequence -> TextColor.parse(color.toString()) ?: throw IllegalArgumentException("Could not parse \"$color\" as a text color") - //#endif else -> throw IllegalArgumentException("Could not convert type ${color::class.simpleName} to a text color") } }) @@ -487,7 +470,12 @@ class TextComponent private constructor( private fun makeHoverEvent(action: Any?, value: Any?): HoverEvent? { val hoverAction = when (action) { is HoverEvent.Action<*> -> action - is CharSequence -> hoverEventActionByName(action.toString()) + is CharSequence -> when (action.toString().uppercase()) { + "SHOW_TEXT" -> HoverEvent.Action.SHOW_TEXT + "SHOW_ITEM" -> HoverEvent.Action.SHOW_ITEM + "SHOW_ENTITY" -> HoverEvent.Action.SHOW_ENTITY + else -> throw IllegalStateException("Unknown hover event action \"$action\"") + } null -> if (value != null) { error("Cannot set Style's hover value without a hover action") } else return null @@ -522,12 +510,8 @@ class TextComponent private constructor( return when (obj) { is MCEntity -> obj is Entity -> obj.toMC() - //#if MC>=12004 is CharSequence -> return HoverEvent.EntityContent.legacySerializer(TextComponent(obj)) .getOrThrow(false) {} - //#else - //$$ is CharSequence -> return HoverEvent.EntityContent.parse(TextComponent(obj)) - //#endif is HoverEvent.EntityContent -> return obj else -> error("${obj::class} cannot be parsed as an entity HoverEvent") }.let { HoverEvent.EntityContent(it.type, it.uuid, it.name) } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/render/Gui.kt b/src/main/kotlin/com/chattriggers/ctjs/api/render/Gui.kt index ada0f195..2b0035c2 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/render/Gui.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/render/Gui.kt @@ -10,15 +10,12 @@ import gg.essential.universal.UKeyboard import gg.essential.universal.UMatrixStack import gg.essential.universal.UScreen import net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents -import net.minecraft.client.gui.widget.ButtonWidget -import net.minecraft.client.gui.tooltip.Tooltip - -//#if MC>=12000 import net.minecraft.client.gui.DrawContext -//#endif +import net.minecraft.client.gui.tooltip.Tooltip +import net.minecraft.client.gui.widget.ButtonWidget class Gui @JvmOverloads constructor( - title: TextComponent = TextComponent("") + title: TextComponent = TextComponent(""), ) : UScreen(unlocalizedName = title.formattedText) { private var onDraw: RegularTrigger? = null private var onClick: RegularTrigger? = null @@ -257,7 +254,12 @@ class Gui @JvmOverloads constructor( /** * Internal method to run trigger. Not meant for public use */ - override fun onMouseDragged(x: Double, y: Double, clickedButton: Int, timeSinceLastClick: Long) { + override fun onMouseDragged( + x: Double, + y: Double, + clickedButton: Int, + timeSinceLastClick: Long, + ) { super.onMouseDragged(x, y, clickedButton, timeSinceLastClick) onMouseDragged?.trigger(arrayOf(mouseX, mouseY, clickedButton)) } @@ -265,16 +267,17 @@ class Gui @JvmOverloads constructor( /** * Internal method to run trigger. Not meant for public use */ - override fun onDrawScreen(matrixStack: UMatrixStack, mouseX: Int, mouseY: Int, partialTicks: Float) { + override fun onDrawScreen( + matrixStack: UMatrixStack, + mouseX: Int, + mouseY: Int, + partialTicks: Float, + ) { super.onDrawScreen(matrixStack, mouseX, mouseY, partialTicks) - //#if MC>=12000 @Suppress("UNCHECKED_CAST") val drawContexts = drawContextsField.get(this) as List Renderer.pushMatrix(UMatrixStack(drawContexts.last().matrices)) - //#else - //$$ Renderer.pushMatrix(matrixStack) - //#endif Renderer.partialTicks = partialTicks @@ -331,7 +334,13 @@ class Gui @JvmOverloads constructor( * @return the button ID for use in actionPerformed */ @JvmOverloads - fun addButton(x: Int, y: Int, width: Int = 200, height: Int = 20, buttonText: TextComponent): Int { + fun addButton( + x: Int, + y: Int, + width: Int = 200, + height: Int = 20, + buttonText: TextComponent, + ): Int { val id = nextButtonId++ val button = ButtonWidget.builder(buttonText) { onActionPerformed?.trigger(arrayOf(id)) @@ -489,11 +498,9 @@ class Gui @JvmOverloads constructor( */ fun setTooltip(text: String) = setTooltip(TextComponent(text)) - companion object { - //#if MC>=12000 + private companion object { private val drawContextsField = UScreen::class.java.getDeclaredField("drawContexts").also { it.isAccessible = true } - //#endif } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/render/Renderer.kt b/src/main/kotlin/com/chattriggers/ctjs/api/render/Renderer.kt index b52dd28e..b9345338 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/render/Renderer.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/render/Renderer.kt @@ -717,11 +717,7 @@ object Renderer { entityRenderer.render(entity, 0.0f, 1.0f, matrixStack.toMC(), vertexConsumers, light) if (entity.doesRenderOnFire()) { entityRenderDispatcher.asMixin() - //#if MC>=12004 .invokeRenderFire(matrixStack.toMC(), vertexConsumers, entity, Quaternionf()) - //#else - //$$ .invokeRenderFire(matrixStack.toMC(), vertexConsumers, entity) - //#endif } } @@ -768,7 +764,7 @@ object Renderer { companion object { @JvmStatic - fun fromUC(ucValue: UGraphics.DrawMode) = values().first { it.ucValue == ucValue } + fun fromUC(ucValue: UGraphics.DrawMode) = entries.first { it.ucValue == ucValue } } } @@ -787,7 +783,7 @@ object Renderer { companion object { @JvmStatic - fun fromMC(ucValue: MCVertexFormat) = values().first { it.mcValue == ucValue } + fun fromMC(ucValue: MCVertexFormat) = entries.first { it.mcValue == ucValue } } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/render/Toast.kt b/src/main/kotlin/com/chattriggers/ctjs/api/render/Toast.kt index 6da8671b..82026fae 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/render/Toast.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/render/Toast.kt @@ -6,15 +6,12 @@ import com.chattriggers.ctjs.engine.printTraceToConsole import com.chattriggers.ctjs.internal.engine.JSLoader import com.chattriggers.ctjs.internal.utils.getOrNull import com.chattriggers.ctjs.internal.utils.toIdentifier -import com.chattriggers.ctjs.internal.utils.toMatrixStack import com.mojang.blaze3d.systems.RenderSystem import net.minecraft.client.gui.DrawContext -import net.minecraft.client.render.GameRenderer import net.minecraft.client.toast.ToastManager import net.minecraft.util.Identifier import org.mozilla.javascript.* import net.minecraft.client.toast.Toast -import net.minecraft.client.util.math.MatrixStack // https://github.com/Edgeburn/Toasts /** @@ -27,6 +24,7 @@ import net.minecraft.client.util.math.MatrixStack * - icon: An Image or a String/Identifier that points to a texture * - width: The width of the toast, defaults to 160 * - height: The height of the toast, defaults to 32 + * - displayTime: The time in ms the toast will be displayed, defaults to 5000 * - render: An optional function that will be called to render the toast. By default, it renders the same * way that advancement toasts do. If this function is called, it will not render anything by default. * It takes no parameters and is called with the Toast object as its receiver. @@ -78,7 +76,7 @@ class Toast(config: NativeObject) : Toast { init { title = config.getOrNull("title") description = config.getOrNull("description") - background = config.getOrNull("background") + background = config.getOrDefault("background", backgroundBacker) icon = config.getOrNull("icon") } @@ -89,10 +87,9 @@ class Toast(config: NativeObject) : Toast { Client.getMinecraft().toastManager.add(this) } - //#if MC>=12004 override fun draw(context: DrawContext, manager: ToastManager, startTime: Long): Toast.Visibility { if (customRenderFunction != null) { - Renderer.withMatrix(context.toMatrixStack()) { + Renderer.withMatrix(context.matrices) { try { JSLoader.invoke(customRenderFunction!!, emptyArray(), thisObj = jsReceiver!!) } catch (e: Throwable) { @@ -130,54 +127,8 @@ class Toast(config: NativeObject) : Toast { return if (startTime > displayTime) Toast.Visibility.HIDE else Toast.Visibility.SHOW } - //#else - //$$ override fun draw(matrices: MatrixStack, manager: ToastManager, startTime: Long): Toast.Visibility { - //$$ if (customRenderFunction != null) { - //$$ Renderer.withMatrix(matrices) { - //$$ try { - //$$ JSLoader.invoke(customRenderFunction!!, emptyArray(), thisObj = jsReceiver!!) - //$$ } catch (e: Throwable) { - //$$ e.printTraceToConsole() - //$$ - //$$ // If the method threw, don't invoke it again - //$$ customRenderFunction = Callable { _, _, _, _ -> Undefined.instance } - //$$ } - //$$ } - //$$ } else { - //$$ backgroundBacker?.let { - //$$ RenderSystem.setShader(GameRenderer::getPositionTexProgram) - //$$ RenderSystem.setShaderTexture(0, it) - //$$ RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f) - //$$ DrawableHelper.drawTexture(matrices, 0, 0, 0.0f, 0.0f, width, height, width, height) - //$$ } - //$$ - //$$ iconBacker?.let { - //$$ RenderSystem.setShader(GameRenderer::getPositionTexProgram) - //$$ RenderSystem.setShaderTexture(0, it) - //$$ RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f) - //$$ val iconSize = height - ICON_PADDING * 2 - //$$ DrawableHelper.drawTexture(matrices, ICON_PADDING, ICON_PADDING, 0.0f, 0.0f, iconSize, iconSize, iconSize, iconSize) - //$$ } - //$$ - //$$ val textX = if (icon == null) ICON_PADDING else height - //$$ var textY = ICON_PADDING - //$$ val textRenderer = Client.getMinecraft().textRenderer - //$$ - //$$ titleBacker?.let { - //$$ textRenderer.draw(matrices, it, textX.toFloat(), textY.toFloat(), 0xffffff) - //$$ textY += textRenderer.fontHeight + 1 - //$$ } - //$$ - //$$ descriptionBacker?.let { - //$$ textRenderer.draw(matrices, it, textX.toFloat(), textY.toFloat(), 0xffffff) - //$$ } - //$$ } - //$$ - //$$ return if (startTime > displayTime) Toast.Visibility.HIDE else Toast.Visibility.SHOW - //$$ } - //#endif - - companion object { + + private companion object { private const val ICON_PADDING = 7 private fun toIdentifier(value: Any?): Identifier? = when (value) { diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/triggers/ChatTrigger.kt b/src/main/kotlin/com/chattriggers/ctjs/api/triggers/ChatTrigger.kt index e828d852..7f284d08 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/triggers/ChatTrigger.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/triggers/ChatTrigger.kt @@ -252,7 +252,7 @@ class ChatTrigger(method: Any, type: ITriggerType) : Trigger(method, type) { companion object { fun getParameterByName(name: String) = - values().find { param -> + entries.find { param -> param.names.any { it.lowercase() == name } } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/world/BossBars.kt b/src/main/kotlin/com/chattriggers/ctjs/api/world/BossBars.kt index 92bfa6f4..ba14e961 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/world/BossBars.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/world/BossBars.kt @@ -247,7 +247,7 @@ object BossBars { companion object { @JvmStatic - fun fromMC(mcValue: MCBossBarColor) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCBossBarColor) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { @@ -268,14 +268,14 @@ object BossBars { companion object { @JvmStatic - fun fromMC(mcValue: MCBossBarStyle) = values().first { it.mcValue == mcValue } + fun fromMC(mcValue: MCBossBarStyle) = entries.first { it.mcValue == mcValue } @JvmStatic fun from(value: Any) = when (value) { is CharSequence -> valueOf(value.toString()) is MCBossBarStyle -> fromMC(value) is Style -> value - is Number -> values().first { it.sections == value } + is Number -> entries.first { it.sections == value } else -> throw IllegalArgumentException("Cannot create BossBars.Style from $value") } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/world/Scoreboard.kt b/src/main/kotlin/com/chattriggers/ctjs/api/world/Scoreboard.kt index 199ab340..9d718de7 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/world/Scoreboard.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/world/Scoreboard.kt @@ -4,10 +4,7 @@ import com.chattriggers.ctjs.api.message.TextComponent import com.chattriggers.ctjs.MCTeam import net.minecraft.scoreboard.ScoreboardEntry import net.minecraft.scoreboard.ScoreboardObjective - -//#if MC>=12004 import net.minecraft.scoreboard.ScoreboardScore -//#endif object Scoreboard { private var needsUpdate = true @@ -109,30 +106,18 @@ object Scoreboard { val sidebarObjective = getSidebar() ?: return if (override) { - //#if MC>=12004 scoreboard.getScoreboardEntries(sidebarObjective).filter { it.value == score }.forEach { scoreboard.removeScore({ it.owner }, sidebarObjective) } - //#else - //$$ scoreboard.getAllPlayerScores(sidebarObjective).filter { - //$$ it.score == score - //$$ }.forEach { - //$$ scoreboard.resetPlayerScore(it.playerName, sidebarObjective) - //$$ } - //#endif } - //#if MC>=12004 scoreboard.knownScoreHolders.forEach { val scoreboardScore = scoreboard.getScore({ it.nameForScoreboard }, sidebarObjective) as? ScoreboardScore if (scoreboardScore?.score == score) scoreboardScore.displayText = line } - //#else - //$$ scoreboard.getPlayerScore(line.formattedText, sidebarObjective).score = score - //#endif } @JvmStatic @@ -156,11 +141,7 @@ object Scoreboard { scoreboardTitle = TextComponent(objective.displayName) scoreboardNames = scoreboard.getScoreboardEntries(objective).filter { - //#if MC>=12004 it.owner != null && !it.owner.startsWith("#") - //#else - //$$ it.playerName != null && !it.playerName.startsWith("#") - //#endif }.map(::Score).sortedBy { it.getPoints() }.toMutableList() } @@ -177,11 +158,7 @@ object Scoreboard { * * @return the actual point value */ - //#if MC>=12004 fun getPoints(): Int = mcValue.value - //#else - //$$ fun getPoints(): Int = mcValue.score - //#endif /** * Gets the display string of this score @@ -190,13 +167,8 @@ object Scoreboard { */ fun getName() = TextComponent( MCTeam.decorateName( - //#if MC>=12004 Scoreboard.toMC()!!.getScoreHolderTeam(mcValue.owner), TextComponent(mcValue.owner), - //#else - //$$ Scoreboard.toMC()!!.getPlayerTeam(mcValue.playerName), - //$$ TextComponent(mcValue.playerName), - //#endif ) ) diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/world/TabList.kt b/src/main/kotlin/com/chattriggers/ctjs/api/world/TabList.kt index 324e01e8..f8c0ae1a 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/world/TabList.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/world/TabList.kt @@ -1,21 +1,18 @@ package com.chattriggers.ctjs.api.world +import com.chattriggers.ctjs.MCTeam import com.chattriggers.ctjs.api.client.Client import com.chattriggers.ctjs.api.client.Player import com.chattriggers.ctjs.api.message.TextComponent import com.chattriggers.ctjs.internal.mixins.PlayerListHudAccessor -import com.chattriggers.ctjs.MCTeam import com.chattriggers.ctjs.internal.utils.asMixin import com.google.common.collect.ComparisonChain import com.google.common.collect.Ordering import net.minecraft.client.network.PlayerListEntry +import net.minecraft.scoreboard.ScoreboardDisplaySlot import net.minecraft.text.Text import net.minecraft.world.GameMode -//#if MC==12002 -import net.minecraft.scoreboard.ScoreboardDisplaySlot -//#endif - object TabList { private val playerComparator = Ordering.from(PlayerComparator()) @@ -30,22 +27,14 @@ object TabList { @JvmStatic fun getNamesByObjectives(): List { val scoreboard = Scoreboard.toMC() ?: return emptyList() - //#if MC>=12004 - val sidebarObjective = scoreboard.getObjectiveForSlot(ScoreboardDisplaySlot.LIST) ?: return emptyList() - //#else - //$$ val sidebarObjective = scoreboard.getObjectiveForSlot(0) ?: return emptyList() - //#endif + val sidebarObjective = + scoreboard.getObjectiveForSlot(ScoreboardDisplaySlot.LIST) ?: return emptyList() val scores = scoreboard.getScoreboardEntries(sidebarObjective) return scores.map { - //#if MC>=12004 val team = scoreboard.getTeam(it.owner) TextComponent(MCTeam.decorateName(team, TextComponent(it.owner))).formattedText - //#else - //$$ val team = scoreboard.getTeam(it.playerName) - //$$ TextComponent(MCTeam.decorateName(team, TextComponent(it.playerName))).formattedText - //#endif } } @@ -131,7 +120,10 @@ object TabList { return ComparisonChain .start() - .compareTrueFirst(playerOne.gameMode != GameMode.SPECTATOR, playerTwo.gameMode != GameMode.SPECTATOR) + .compareTrueFirst( + playerOne.gameMode != GameMode.SPECTATOR, + playerTwo.gameMode != GameMode.SPECTATOR + ) .compare(teamOne?.name ?: "", teamTwo?.name ?: "") .compare(playerOne.profile.name, playerTwo.profile.name) .result() diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/world/World.kt b/src/main/kotlin/com/chattriggers/ctjs/api/world/World.kt index 8c39a231..3f0fe4b3 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/world/World.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/world/World.kt @@ -214,12 +214,8 @@ object World { */ @JvmStatic fun getTicksPerSecond(): Int { - //#if MC>=12004 val mpt = toMC()?.tickManager?.millisPerTick ?: return 20 return (1000.0 / mpt).roundToInt() - //#else - //$$ return 20 - //#endif } /** diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/world/block/Block.kt b/src/main/kotlin/com/chattriggers/ctjs/api/world/block/Block.kt index a51ed2cd..ec06dddc 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/world/block/Block.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/world/block/Block.kt @@ -34,14 +34,14 @@ open class Block( fun isEmittingPower(face: BlockFace? = null): Boolean { if (face != null) return World.toMC()!!.isEmittingRedstonePower(pos.toMC(), face.toMC()) - return BlockFace.values().any { isEmittingPower(it) } + return BlockFace.entries.any { isEmittingPower(it) } } @JvmOverloads fun getEmittingPower(face: BlockFace? = null): Int { if (face != null) return World.toMC()!!.getEmittedRedstonePower(pos.toMC(), face.toMC()) - return BlockFace.values().asSequence().map(::getEmittingPower).firstOrNull { it != 0 } ?: 0 + return BlockFace.entries.asSequence().map(::getEmittingPower).firstOrNull { it != 0 } ?: 0 } fun isReceivingPower() = World.toMC()!!.isReceivingRedstonePower(pos.toMC()) diff --git a/src/main/kotlin/com/chattriggers/ctjs/api/world/block/BlockFace.kt b/src/main/kotlin/com/chattriggers/ctjs/api/world/block/BlockFace.kt index 83c183bf..291eaf6a 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/api/world/block/BlockFace.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/api/world/block/BlockFace.kt @@ -20,7 +20,7 @@ enum class BlockFace( WEST(5, AxisDirection.NEGATIVE, Axis.X, Vec3i(-1, 0, 0), Direction.WEST), EAST(4, AxisDirection.POSITIVE, Axis.X, Vec3i(1, 0, 0), Direction.EAST); - fun getOpposite() = values()[oppositeIndex] + fun getOpposite() = entries[oppositeIndex] fun getOffsetX() = directionVec.x diff --git a/src/main/kotlin/com/chattriggers/ctjs/internal/commands/CTCommand.kt b/src/main/kotlin/com/chattriggers/ctjs/internal/commands/CTCommand.kt index c3d660b1..9b3cde12 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/internal/commands/CTCommand.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/internal/commands/CTCommand.kt @@ -206,7 +206,7 @@ internal object CTCommand : Initializer { ACTION_BAR(ClientListener::actionBarHistory); companion object { - fun fromString(str: String) = DumpType.values().first { it.name.equals(str, ignoreCase = true) } + fun fromString(str: String) = DumpType.entries.first { it.name.equals(str, ignoreCase = true) } } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/internal/launch/Descriptor.kt b/src/main/kotlin/com/chattriggers/ctjs/internal/launch/Descriptor.kt index 2562b01c..6f4d64b7 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/internal/launch/Descriptor.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/internal/launch/Descriptor.kt @@ -32,7 +32,7 @@ sealed interface Descriptor { override fun toString() = originalDescriptor() companion object { - val IDENTIFIERS = values().map { it.toString() } + val IDENTIFIERS = entries.map { it.toString() } } } @@ -279,7 +279,7 @@ sealed interface Descriptor { cursor += objectType.length Object(objectType) } else if (ch in "VZCBSIFJD") { - val primitive = Primitive.values().first { it.toString() == ch.toString() } + val primitive = Primitive.entries.first { it.toString() == ch.toString() } cursor++ primitive } else if (ch == '[') { diff --git a/src/main/kotlin/com/chattriggers/ctjs/internal/listeners/ClientListener.kt b/src/main/kotlin/com/chattriggers/ctjs/internal/listeners/ClientListener.kt index df486ebb..72ee569d 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/internal/listeners/ClientListener.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/internal/listeners/ClientListener.kt @@ -17,7 +17,6 @@ import com.chattriggers.ctjs.internal.engine.CTEvents import com.chattriggers.ctjs.internal.engine.JSContextFactory import com.chattriggers.ctjs.internal.engine.JSLoader import com.chattriggers.ctjs.internal.utils.Initializer -import com.chattriggers.ctjs.internal.utils.toMatrixStack import gg.essential.universal.UMinecraft import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents @@ -62,11 +61,7 @@ object ClientListener : Initializer { } } - //#if MC>=12004 if (World.isLoaded() && World.toMC()?.tickManager?.shouldTick() == true) { - //#else - //$$ if (World.isLoaded()) { - //#endif TriggerType.TICK.triggerAll(ticksPassed) ticksPassed++ @@ -91,14 +86,14 @@ object ClientListener : Initializer { ScreenEvents.BEFORE_INIT.register { _, screen, _, _ -> // TODO: Why does Renderer.drawString not work in here? ScreenEvents.beforeRender(screen).register { _, stack, mouseX, mouseY, partialTicks -> - Renderer.withMatrix(stack.toMatrixStack(), partialTicks) { + Renderer.withMatrix(stack.matrices, partialTicks) { TriggerType.GUI_RENDER.triggerAll(mouseX, mouseY, screen) } } // TODO: Why does Renderer.drawString not work in here? ScreenEvents.afterRender(screen).register { _, stack, mouseX, mouseY, partialTicks -> - Renderer.withMatrix(stack.toMatrixStack(), partialTicks) { + Renderer.withMatrix(stack.matrices, partialTicks) { TriggerType.POST_GUI_RENDER.triggerAll(mouseX, mouseY, screen, partialTicks) } } diff --git a/src/main/kotlin/com/chattriggers/ctjs/internal/utils/multiversion.kt b/src/main/kotlin/com/chattriggers/ctjs/internal/utils/multiversion.kt deleted file mode 100644 index 2d95270d..00000000 --- a/src/main/kotlin/com/chattriggers/ctjs/internal/utils/multiversion.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.chattriggers.ctjs.internal.utils - -import net.minecraft.client.util.math.MatrixStack -import net.minecraft.text.HoverEvent - -//#if MC>=12000 -import net.minecraft.client.gui.DrawContext - -fun DrawContext.toMatrixStack(): MatrixStack = matrices -//#endif - -fun MatrixStack.toMatrixStack() = this - -fun hoverEventActionByName(name: String): HoverEvent.Action<*> { - //#if MC>=12004 - return when (name.uppercase()) { - "SHOW_TEXT" -> HoverEvent.Action.SHOW_TEXT - "SHOW_ITEM" -> HoverEvent.Action.SHOW_ITEM - "SHOW_ENTITY" -> HoverEvent.Action.SHOW_ENTITY - else -> throw IllegalStateException("Unknown hover event action \"$name\"") - } - //#else - //$$ return HoverEvent.Action.byName(name.lowercase()) - //$$ ?: throw IllegalStateException("Unknown hover event action \"$name\"") - //#endif -} diff --git a/src/main/kotlin/com/chattriggers/ctjs/typealiases.kt b/src/main/kotlin/com/chattriggers/ctjs/typealiases.kt index 6ecab8e5..159e8e83 100644 --- a/src/main/kotlin/com/chattriggers/ctjs/typealiases.kt +++ b/src/main/kotlin/com/chattriggers/ctjs/typealiases.kt @@ -24,9 +24,4 @@ typealias MCCloudRenderMode = net.minecraft.client.option.CloudRenderMode typealias MCParticlesMode = net.minecraft.client.option.ParticlesMode typealias MCDimensionType = net.minecraft.world.dimension.DimensionType typealias MCVertexFormat = net.minecraft.client.render.VertexFormat - -//#if MC>=12001 typealias MCChatVisibility = net.minecraft.network.message.ChatVisibility -//#else -//$$ typealias MCChatVisibility = net.minecraft.client.option.ChatVisibility -//#endif diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index ed424fcf..f5f034eb 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -25,7 +25,9 @@ }, "mixins": ["chattriggers.mixins.json"], "depends": { - "fabric-language-kotlin": ">=1.9.4+kotlin.1.8.21" + "fabricloader": ">=$loader_version", + "fabric-api": ">=$fabric_api_version", + "fabric-language-kotlin": ">=$fabric_kotlin_version" }, "custom": { "ctjs:yarn-mappings": "$yarn_mappings", diff --git a/versions/1.19.4-fabric/gradle.properties b/versions/1.19.4-fabric/gradle.properties deleted file mode 100644 index edf5fa63..00000000 --- a/versions/1.19.4-fabric/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -yarn_mappings=1.19.4+build.2 -fabric_version=0.87.2+1.19.4 diff --git a/versions/1.20.4-fabric/gradle.properties b/versions/1.20.4-fabric/gradle.properties deleted file mode 100644 index 2f845ebe..00000000 --- a/versions/1.20.4-fabric/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -yarn_mappings=1.20.4+build.3 -fabric_version=0.92.0+1.20.4 -essential.defaults.loom.mappings=net.fabricmc:yarn:1.20.4+build.3:v2 diff --git a/versions/fabric1.19.4-1.20.4.txt b/versions/fabric1.19.4-1.20.4.txt deleted file mode 100644 index 73a78297..00000000 --- a/versions/fabric1.19.4-1.20.4.txt +++ /dev/null @@ -1,5 +0,0 @@ -net.minecraft.inventory.CraftingInventory net.minecraft.inventory.RecipeInputInventory -net.minecraft.screen.PlayerScreenHandler.craftingResult net.minecraft.screen.PlayerScreenHandler.craftingInput -net.minecraft.client.gui.screen.ConnectScreen net.minecraft.client.gui.screen.multiplayer.ConnectScreen -net.minecraft.scoreboard.Scoreboard.getPlayerTeam net.minecraft.scoreboard.Scoreboard.getTeam -net.minecraft.scoreboard.ScoreboardPlayerScore net.minecraft.scoreboard.ScoreboardEntry diff --git a/versions/mainProject b/versions/mainProject deleted file mode 100644 index dc8b25b7..00000000 --- a/versions/mainProject +++ /dev/null @@ -1 +0,0 @@ -1.20.4-fabric