Skip to content

Commit 69f98cb

Browse files
committed
Merged branches (50%)
1 parent 950a2dc commit 69f98cb

77 files changed

Lines changed: 740 additions & 320 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ mossyDependencies {
2323
additional {
2424
override("mossyCompileOnly", "flashback")
2525
override("mossyCompileOnly", "replaymod")
26+
override("mossyCompileOnly", "iris")
27+
override("mossyCompileOnly", "sodium")
28+
override("mossyCompileOnly", "controlling")
29+
override("mossyCompileOnly", "searchables")
30+
override("mossyCompileOnly", "cloth-config")
31+
override("mossyCompileOnly", "geckolib")
2632

2733
disable("fabric-permissions-api")
2834
}
@@ -42,7 +48,7 @@ dependencies {
4248
if (fabric) {
4349
def fpa = prop("build.fabric-permissions-api")
4450
if (fpa != "unknown") {
45-
include(mossyImplementation("me.lucko:fabric-permissions-api:${fpa}")){
51+
mossyInclude(mossyImplementation("me.lucko:fabric-permissions-api:${fpa}")){
4652
exclude(group: "net.fabricmc.fabric-api")
4753
}
4854
}
@@ -52,7 +58,7 @@ dependencies {
5258

5359
if (forge) {
5460
annotationProcessor("net.fabricmc:sponge-mixin:0.16.5+mixin.0.8.7")
55-
modImplementation("maven.modrinth:mixinbooster:0.1.2+1.20.1")
61+
mossyImplementation("maven.modrinth:mixinbooster:0.1.2+1.20.1")
5662
}
5763
}
5864

@@ -73,18 +79,20 @@ if (fabric) {
7379
}
7480
}
7581

76-
fabricApi {
77-
configureTests {
78-
createSourceSet = true
79-
modId = "patpat-mod-test-${project.name}"
80-
enableGameTests = true // Default is true
81-
enableClientGameTests = true // Default is true
82-
eula = true // By setting this to true, you agree to the Minecraft EULA.
82+
if (sc.current.parsed.matches(">=26.1")) {
83+
fabricApi {
84+
configureTests {
85+
createSourceSet = true
86+
modId = "patpat-mod-test-${project.name}"
87+
enableGameTests = true // Default is true
88+
enableClientGameTests = true // Default is true
89+
eula = true // By setting this to true, you agree to the Minecraft EULA.
90+
}
8391
}
84-
}
8592

86-
tasks.named("runClientGameTest", JavaExec) {
87-
jvmArgs "-ea"
93+
tasks.named("runClientGameTest", JavaExec) {
94+
jvmArgs "-ea"
95+
}
8896
}
8997

9098
configurations.configureEach {
@@ -129,7 +137,10 @@ stonecutter {
129137
replace("RenderType", "RenderTypes")
130138
}
131139

132-
constants["debug_mode"] = false
140+
replacements.string(current.parsed >= "26.1") {
141+
replace("net.minecraft.client.gui.GuiGraphics", "net.minecraft.client.gui.GuiGraphicsExtractor")
142+
replace("GuiGraphics", "GuiGraphicsExtractor")
143+
}
133144
}
134145

135146
stonecutter.filters.exclude("**/*.accesswidener")

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx16G
77
org.gradle.parallel=true
88

99
# Mossy Plugin
10-
mossy_plugin_version = 3.3.0
10+
mossy_plugin_version = 3.4.0-beta
1111

1212
# Stonecutter
1313
dev.kikugie.stonecutter.hard_mode=true
@@ -34,7 +34,7 @@ base.mixinextras_version = 0.4.1
3434
base.mixin_version = 0.8.5
3535

3636
# Multi-Versions Properties
37-
fabric.multi_versions = 1.21.11 26.1
37+
fabric.multi_versions = 1.20.1 1.21 1.21.1 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1
3838
neoforge.multi_versions = 1.21.1 1.21.11
3939
forge.multi_versions = 1.20.1
4040

src/gametest/java/net/lopymine/patpat/client/PatPatClientGameTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package net.lopymine.patpat.client;
22

3+
// 😭 я ни понимяу
4+
//? if >=26.1 {
5+
36
import net.fabricmc.loader.api.FabricLoader;
47
import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.SelectedGameMode;
58
import net.minecraft.server.level.ServerLevel;
@@ -56,9 +59,9 @@ public void runTest(ClientGameTestContext context) {
5659

5760
//? if >=26.1 {
5861
singleplayer.getClientLevel().waitForChunksDownload();
59-
//?} else {
62+
//?} else {
6063
/*singleplayer.getClientWorld().waitForChunksDownload();
61-
*///?}
64+
*///?}
6265

6366
context.takeScreenshot("initializing_world");
6467
context.getInput().holdKey(GLFW.GLFW_KEY_LEFT_SHIFT);
@@ -92,3 +95,4 @@ public boolean detectPat(ClientGameTestContext context) {
9295
return false;
9396
}
9497
}
98+
//?}

src/gametest/java/net/lopymine/patpat/client/PatPatSingleplayerContextImplDecorator.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package net.lopymine.patpat.client;
22

3+
//? if >=26.1 {
4+
35
import lombok.SneakyThrows;
46
import net.minecraft.SharedConstants;
57
import net.minecraft.client.gui.screens.TitleScreen;
@@ -22,14 +24,14 @@ public class PatPatSingleplayerContextImplDecorator implements TestSingleplayerC
2224
private final TestServerContext server;
2325

2426

25-
public PatPatSingleplayerContextImplDecorator(TestSingleplayerContext testSingleplayerContext){
27+
public PatPatSingleplayerContextImplDecorator(TestSingleplayerContext testSingleplayerContext) {
2628
try {
2729
this.testSingleplayerContext = testSingleplayerContext;
2830
Class<? extends TestSingleplayerContext> testSingleplayerContextClass = testSingleplayerContext.getClass();
2931
Field contextField = testSingleplayerContextClass.getDeclaredField("context");
3032
contextField.setAccessible(true);
3133
this.context = (ClientGameTestContext) contextField.get(testSingleplayerContext);
32-
this.server = testSingleplayerContext.getServer();
34+
this.server = testSingleplayerContext.getServer();
3335
} catch (NoSuchFieldException | IllegalAccessException e) {
3436
throw new RuntimeException(e);
3537
}
@@ -47,9 +49,9 @@ public PatPatSingleplayerContextImplDecorator(TestSingleplayerContext testSingle
4749
}
4850
//?} else {
4951
/*@Override
50-
public @NotNull TestClientWorldContext getClientWorld() {
51-
return this.testSingleplayerContext.getClientWorld();
52-
}
52+
public @NotNull TestClientWorldContext getClientWorld() {
53+
return this.testSingleplayerContext.getClientWorld();
54+
}
5355
*///?}
5456

5557
@Override
@@ -65,3 +67,4 @@ public void close() {
6567
context.setScreen(TitleScreen::new);
6668
}
6769
}
70+
//?}

src/main/java/net/lopymine/patpat/PatPat.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package net.lopymine.patpat;
22

3-
import net.fabricmc.api.ModInitializer;
4-
53
import net.lopymine.patpat.common.config.PatPatConfigManager;
64
import net.lopymine.patpat.entrypoint.*;
75
import net.lopymine.patpat.logger.PatLogger;
@@ -12,7 +10,7 @@
1210
public class PatPat {
1311

1412
public static final String MOD_VERSION = /*$ mod_version*/ "1.2.6+26.1+fabric";
15-
public static final String BUILD_CODE_TIME = /*$ build_code_time*/ "02b3c23";
13+
public static final String BUILD_CODE_TIME = /*$ build_code_time*/ "02b88d3";
1614
public static final String MOD_NAME = /*$ mod_name*/ "PatPat";
1715
public static final String MOD_ID = /*$ mod_id*/ "patpat";
1816
public static final String SERVER_CONFIG_VERSION = /*$ server_config_version*/ "1.0.0";

src/main/java/net/lopymine/patpat/client/command/PatPatClientCommandManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import net.lopymine.patpat.entrypoint.ClientMultiLoader;
1515
import net.lopymine.patpat.extension.TextExtension;
1616
import net.lopymine.patpat.logger.PatLogger;
17-
import net.minecraft.commands.CommandSourceStack;
17+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
1818

1919
@ExtensionMethod(TextExtension.class)
2020
public class PatPatClientCommandManager {
@@ -37,11 +37,11 @@ public static void register() {
3737
});
3838
}
3939

40-
public static LiteralArgumentBuilder<CommandSourceStack> literal(String name) {
40+
public static LiteralArgumentBuilder<FabricClientCommandSource> literal(String name) {
4141
return LiteralArgumentBuilder.literal(name);
4242
}
4343

44-
public static <T> RequiredArgumentBuilder<CommandSourceStack, T> argument(String name, ArgumentType<T> type) {
44+
public static <T> RequiredArgumentBuilder<FabricClientCommandSource, T> argument(String name, ArgumentType<T> type) {
4545
return RequiredArgumentBuilder.argument(name, type);
4646
}
4747
}

src/main/java/net/lopymine/patpat/client/command/ignore/PatPatClientIgnoreCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import java.util.Objects;
2121

22-
import net.minecraft.commands.CommandSourceStack;
22+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
2323
import static net.lopymine.patpat.client.command.PatPatClientCommandManager.literal;
2424
import static net.lopymine.patpat.client.command.PatPatClientCommandManager.argument;
2525

@@ -32,13 +32,13 @@ private PatPatClientIgnoreCommand() {
3232
throw new IllegalStateException("Command class");
3333
}
3434

35-
public static LiteralArgumentBuilder<CommandSourceStack> get() {
35+
public static LiteralArgumentBuilder<FabricClientCommandSource> get() {
3636
return literal("ignore")
3737
.then(getAdd())
3838
.then(getRemove());
3939
}
4040

41-
public static LiteralArgumentBuilder<CommandSourceStack> getAdd() {
41+
public static LiteralArgumentBuilder<FabricClientCommandSource> getAdd() {
4242
return literal("add")
4343
.then(argument(ENTITY_TYPE_ARGUMENT_NAME, EntityTypeArgumentType.entityType())
4444
.suggests((context, builder) -> SharedSuggestionProvider
@@ -56,7 +56,7 @@ public static LiteralArgumentBuilder<CommandSourceStack> getAdd() {
5656
.executes(context -> onIgnoreChange(context, true)));
5757
}
5858

59-
public static LiteralArgumentBuilder<CommandSourceStack> getRemove() {
59+
public static LiteralArgumentBuilder<FabricClientCommandSource> getRemove() {
6060
return literal("remove")
6161
.then(argument(ENTITY_TYPE_ARGUMENT_NAME, EntityTypeArgumentType.entityType())
6262
.suggests((context, builder) -> SharedSuggestionProvider
@@ -69,7 +69,7 @@ public static LiteralArgumentBuilder<CommandSourceStack> getRemove() {
6969
.executes(context -> onIgnoreChange(context, false)));
7070
}
7171

72-
private static int onIgnoreChange(CommandContext<CommandSourceStack> context, boolean add) {
72+
private static int onIgnoreChange(CommandContext<FabricClientCommandSource> context, boolean add) {
7373
EntityType<?> entityType = EntityTypeArgumentType.getEntityType(ENTITY_TYPE_ARGUMENT_NAME, context);
7474
PatPatClientIgnoreMobListConfig config = PatPatClientIgnoreMobListConfig.getInstance();
7575
boolean success = add ? config.addMob(entityType) : config.removeMob(entityType);

src/main/java/net/lopymine/patpat/client/command/info/PatPatClientInfoCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import net.minecraft.network.chat.*;
1818
import net.minecraft.network.chat.ClickEvent.Action;
1919

20-
import net.minecraft.commands.CommandSourceStack;
20+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
2121
import static net.lopymine.patpat.client.command.PatPatClientCommandManager.literal;
2222

2323
@ExtensionMethod(ClientCommandExtension.class)
@@ -62,12 +62,12 @@ public static PatPatClientInfoCommand getInstance() {
6262
return INSTANCE;
6363
}
6464

65-
public static LiteralArgumentBuilder<CommandSourceStack> get() {
65+
public static LiteralArgumentBuilder<FabricClientCommandSource> get() {
6666
return literal("info")
6767
.executes(context -> PatPatClientInfoCommand.getInstance().version(context));
6868
}
6969

70-
public int version(CommandContext<CommandSourceStack> context) {
70+
public int version(CommandContext<FabricClientCommandSource> context) {
7171
context.sendMsg(this.platformText);
7272
context.sendMsg(this.minecraftVersionText);
7373
context.sendMsg(this.versionText);

src/main/java/net/lopymine/patpat/client/command/list/PatPatClientListChangeCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import java.util.*;
2121

22-
import net.minecraft.commands.CommandSourceStack;
22+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
2323
import static net.lopymine.patpat.client.command.PatPatClientCommandManager.literal;
2424
import static net.lopymine.patpat.client.command.PatPatClientCommandManager.argument;
2525

@@ -32,21 +32,21 @@ private PatPatClientListChangeCommand() {
3232
throw new IllegalStateException("Command class");
3333
}
3434

35-
public static LiteralArgumentBuilder<CommandSourceStack> getAdd() {
35+
public static LiteralArgumentBuilder<FabricClientCommandSource> getAdd() {
3636
return literal("add")
3737
.then(argument(PLAYER_ARGUMENT_NAME, PlayerInfoArgumentType.player())
3838
.suggests(((context, builder) -> SharedSuggestionProvider.suggest(context.getSource().getOnlinePlayerNames(), builder)))
3939
.executes(context -> onListChange(context, true)));
4040
}
4141

42-
public static LiteralArgumentBuilder<CommandSourceStack> getRemove() {
42+
public static LiteralArgumentBuilder<FabricClientCommandSource> getRemove() {
4343
return literal("remove")
4444
.then(argument(PLAYER_ARGUMENT_NAME, PlayerInfoArgumentType.player())
4545
.suggests((context, builder) -> SharedSuggestionProvider.suggest(ClientNetworkUtils.getOnlinePlayersFromUuids(), builder))
4646
.executes(context -> onListChange(context, false)));
4747
}
4848

49-
private static int onListChange(CommandContext<CommandSourceStack> context, boolean add) {
49+
private static int onListChange(CommandContext<FabricClientCommandSource> context, boolean add) {
5050
PatPatClientPlayerListConfig config = PatPatClientPlayerListConfig.getInstance();
5151
Map<UUID, String> map = config.getValues();
5252
PlayerInfo playerInfo = PlayerInfoArgumentType.getPlayerInfo(PLAYER_ARGUMENT_NAME, context);

src/main/java/net/lopymine/patpat/client/command/list/PatPatClientListCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package net.lopymine.patpat.client.command.list;
44

55
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
6-
import net.minecraft.commands.CommandSourceStack;
6+
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
77
import static net.lopymine.patpat.client.command.PatPatClientCommandManager.literal;
88

99
public class PatPatClientListCommand {
@@ -12,7 +12,7 @@ private PatPatClientListCommand() {
1212
throw new IllegalStateException("Command class");
1313
}
1414

15-
public static LiteralArgumentBuilder<CommandSourceStack> get() {
15+
public static LiteralArgumentBuilder<FabricClientCommandSource> get() {
1616
return literal("list")
1717
.then(PatPatClientListInfoCommand.get())
1818
.then(PatPatClientListSetModeCommand.get())

0 commit comments

Comments
 (0)