Skip to content

Commit df9d2fb

Browse files
committed
Remove default impl from ModernFixPlatformHooks
1 parent acec611 commit df9d2fb

File tree

1 file changed

+18
-68
lines changed

1 file changed

+18
-68
lines changed

common/src/main/java/org/embeddedt/modernfix/platform/ModernFixPlatformHooks.java

Lines changed: 18 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -18,92 +18,42 @@
1818
public interface ModernFixPlatformHooks {
1919
ModernFixPlatformHooks INSTANCE = PlatformHookLoader.findInstance();
2020

21-
default boolean isClient() {
22-
throw new AssertionError();
23-
}
24-
21+
boolean isClient();
2522

26-
default boolean isDedicatedServer() {
27-
throw new AssertionError();
28-
}
29-
23+
boolean isDedicatedServer();
3024

31-
default String getVersionString() {
32-
throw new AssertionError();
33-
}
25+
String getVersionString();
3426

27+
boolean modPresent(String modId);
3528

36-
default boolean modPresent(String modId) {
37-
throw new AssertionError();
38-
}
29+
boolean isDevEnv();
3930

40-
41-
default boolean isDevEnv() {
42-
throw new AssertionError();
43-
}
31+
void injectPlatformSpecificHacks();
4432

45-
46-
default void injectPlatformSpecificHacks() {
47-
throw new AssertionError();
48-
}
33+
void applyASMTransformers(String mixinClassName, ClassNode targetClass);
4934

50-
51-
default void applyASMTransformers(String mixinClassName, ClassNode targetClass) {
52-
throw new AssertionError();
53-
}
35+
MinecraftServer getCurrentServer();
5436

55-
56-
default MinecraftServer getCurrentServer() {
57-
throw new AssertionError();
58-
}
59-
60-
61-
default boolean isEarlyLoadingNormally() {
62-
throw new AssertionError();
63-
}
37+
boolean isEarlyLoadingNormally();
6438

65-
66-
default boolean isLoadingNormally() {
67-
throw new AssertionError();
68-
}
39+
boolean isLoadingNormally();
6940

70-
71-
default TextureAtlasSprite loadTextureAtlasSprite(TextureAtlas atlasTexture,
41+
TextureAtlasSprite loadTextureAtlasSprite(TextureAtlas atlasTexture,
7242
ResourceManager resourceManager, TextureAtlasSprite.Info textureInfo,
7343
Resource resource,
7444
int atlasWidth, int atlasHeight,
7545
int spriteX, int spriteY, int mipmapLevel,
76-
NativeImage image) {
77-
throw new AssertionError();
78-
}
79-
80-
81-
default Path getGameDirectory() {
82-
throw new AssertionError();
83-
}
84-
85-
86-
default void sendPacket(ServerPlayer player, Object packet) {
87-
throw new AssertionError();
88-
}
46+
NativeImage image);
8947

90-
91-
default void onServerCommandRegister(Consumer<CommandDispatcher<CommandSourceStack>> handler) {
92-
throw new AssertionError();
93-
}
48+
Path getGameDirectory();
9449

50+
void sendPacket(ServerPlayer player, Object packet);
9551

96-
default Multimap<String, String> getCustomModOptions() {
97-
throw new AssertionError();
98-
}
52+
void onServerCommandRegister(Consumer<CommandDispatcher<CommandSourceStack>> handler);
9953

100-
101-
default void onLaunchComplete() {
54+
Multimap<String, String> getCustomModOptions();
10255

103-
}
56+
void onLaunchComplete();
10457

105-
106-
default String getPlatformName() {
107-
throw new AssertionError();
108-
}
58+
String getPlatformName();
10959
}

0 commit comments

Comments
 (0)