|
19 | 19 | public interface ModernFixPlatformHooks { |
20 | 20 | ModernFixPlatformHooks INSTANCE = PlatformHookLoader.findInstance(); |
21 | 21 |
|
22 | | - default boolean isClient() { |
23 | | - throw new AssertionError(); |
24 | | - } |
25 | | - |
| 22 | + boolean isClient(); |
26 | 23 |
|
27 | | - default boolean isDedicatedServer() { |
28 | | - throw new AssertionError(); |
29 | | - } |
30 | | - |
| 24 | + boolean isDedicatedServer(); |
31 | 25 |
|
32 | | - default String getVersionString() { |
33 | | - throw new AssertionError(); |
34 | | - } |
| 26 | + String getVersionString(); |
35 | 27 |
|
| 28 | + boolean modPresent(String modId); |
36 | 29 |
|
37 | | - default boolean modPresent(String modId) { |
38 | | - throw new AssertionError(); |
39 | | - } |
| 30 | + boolean isDevEnv(); |
40 | 31 |
|
41 | | - |
42 | | - default boolean isDevEnv() { |
43 | | - throw new AssertionError(); |
44 | | - } |
| 32 | + void injectPlatformSpecificHacks(); |
45 | 33 |
|
46 | | - |
47 | | - default void injectPlatformSpecificHacks() { |
48 | | - throw new AssertionError(); |
49 | | - } |
| 34 | + void applyASMTransformers(String mixinClassName, ClassNode targetClass); |
50 | 35 |
|
51 | | - |
52 | | - default void applyASMTransformers(String mixinClassName, ClassNode targetClass) { |
53 | | - throw new AssertionError(); |
54 | | - } |
| 36 | + MinecraftServer getCurrentServer(); |
55 | 37 |
|
56 | | - |
57 | | - default MinecraftServer getCurrentServer() { |
58 | | - throw new AssertionError(); |
59 | | - } |
60 | | - |
61 | | - |
62 | | - default boolean isEarlyLoadingNormally() { |
63 | | - throw new AssertionError(); |
64 | | - } |
| 38 | + boolean isEarlyLoadingNormally(); |
65 | 39 |
|
66 | | - |
67 | | - default boolean isLoadingNormally() { |
68 | | - throw new AssertionError(); |
69 | | - } |
| 40 | + boolean isLoadingNormally(); |
70 | 41 |
|
71 | | - |
72 | | - default TextureAtlasSprite loadTextureAtlasSprite(TextureAtlas atlasTexture, |
| 42 | + TextureAtlasSprite loadTextureAtlasSprite(TextureAtlas atlasTexture, |
73 | 43 | ResourceManager resourceManager, TextureAtlasSprite.Info textureInfo, |
74 | 44 | Resource resource, |
75 | 45 | int atlasWidth, int atlasHeight, |
76 | 46 | int spriteX, int spriteY, int mipmapLevel, |
77 | | - NativeImage image) throws IOException { |
78 | | - throw new AssertionError(); |
79 | | - } |
80 | | - |
81 | | - |
82 | | - default Path getGameDirectory() { |
83 | | - throw new AssertionError(); |
84 | | - } |
85 | | - |
86 | | - |
87 | | - default void sendPacket(ServerPlayer player, Object packet) { |
88 | | - throw new AssertionError(); |
89 | | - } |
| 47 | + NativeImage image) throws IOException; |
90 | 48 |
|
91 | | - |
92 | | - default void onServerCommandRegister(Consumer<CommandDispatcher<CommandSourceStack>> handler) { |
93 | | - throw new AssertionError(); |
94 | | - } |
| 49 | + Path getGameDirectory(); |
95 | 50 |
|
| 51 | + void sendPacket(ServerPlayer player, Object packet); |
96 | 52 |
|
97 | | - default Multimap<String, String> getCustomModOptions() { |
98 | | - throw new AssertionError(); |
99 | | - } |
| 53 | + void onServerCommandRegister(Consumer<CommandDispatcher<CommandSourceStack>> handler); |
100 | 54 |
|
101 | | - |
102 | | - default void onLaunchComplete() { |
| 55 | + Multimap<String, String> getCustomModOptions(); |
103 | 56 |
|
104 | | - } |
| 57 | + void onLaunchComplete(); |
105 | 58 |
|
106 | | - |
107 | | - default String getPlatformName() { |
108 | | - throw new AssertionError(); |
109 | | - } |
| 59 | + String getPlatformName(); |
110 | 60 | } |
0 commit comments