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