Commit 617b2c8fd97388e3264e261818524e9347cf1b83
1 parent
fc78211e
add getGameEngine() accessor
Showing
3 changed files
with
20 additions
and
7 deletions
java/client/com/mumfrey/liteloader/client/LiteLoaderCoreProviderClient.java
... | ... | @@ -56,7 +56,7 @@ public class LiteLoaderCoreProviderClient implements CoreProvider |
56 | 56 | } |
57 | 57 | |
58 | 58 | // Add self as a resource pack for texture/lang resources |
59 | - LiteLoader.getInstance().registerModResourcePack(new InternalResourcePack("LiteLoader", LiteLoader.class, "liteloader")); | |
59 | + LiteLoader.getGameEngine().registerResourcePack(new InternalResourcePack("LiteLoader", LiteLoader.class, "liteloader")); | |
60 | 60 | } |
61 | 61 | |
62 | 62 | @Override | ... | ... |
java/common/com/mumfrey/liteloader/core/LiteLoader.java
... | ... | @@ -281,17 +281,25 @@ public final class LiteLoader |
281 | 281 | this.properties.writeProperties(); |
282 | 282 | } |
283 | 283 | |
284 | - /* (non-Javadoc) | |
285 | - * @see com.mumfrey.liteloader.core.ICustomResourcePackManager#registerModResourcePack(net.minecraft.client.resources.ResourcePack) | |
284 | + /** | |
285 | + * @param resourcePack | |
286 | + * @return | |
287 | + * | |
288 | + * @deprecated Use LiteLoader.getGameEngine().registerResourcePack() instead | |
286 | 289 | */ |
290 | + @Deprecated | |
287 | 291 | public boolean registerModResourcePack(IResourcePack resourcePack) |
288 | 292 | { |
289 | 293 | return this.engine.registerResourcePack(resourcePack); |
290 | 294 | } |
291 | - | |
292 | - /* (non-Javadoc) | |
293 | - * @see com.mumfrey.liteloader.core.ICustomResourcePackManager#unRegisterModResourcePack(net.minecraft.client.resources.ResourcePack) | |
295 | + | |
296 | + /** | |
297 | + * @param resourcePack | |
298 | + * @return | |
299 | + * | |
300 | + * @deprecated Use LiteLoader.getGameEngine().unRegisterResourcePack() instead | |
294 | 301 | */ |
302 | + @Deprecated | |
295 | 303 | public boolean unRegisterModResourcePack(IResourcePack resourcePack) |
296 | 304 | { |
297 | 305 | return this.engine.unRegisterResourcePack(resourcePack); |
... | ... | @@ -436,6 +444,11 @@ public final class LiteLoader |
436 | 444 | return LiteLoader.instance.permissionsManagerServer; |
437 | 445 | } |
438 | 446 | |
447 | + public static GameEngine<?, ?> getGameEngine() | |
448 | + { | |
449 | + return LiteLoader.instance.engine; | |
450 | + } | |
451 | + | |
439 | 452 | /** |
440 | 453 | * @return |
441 | 454 | */ | ... | ... |
java/common/com/mumfrey/liteloader/core/LiteLoaderMods.java
... | ... | @@ -447,7 +447,7 @@ public class LiteLoaderMods |
447 | 447 | { |
448 | 448 | container.initResourcePack(modName); |
449 | 449 | |
450 | - if (container.hasResourcePack() && this.loader.registerModResourcePack((IResourcePack)container.getResourcePack())) | |
450 | + if (container.hasResourcePack() && LiteLoader.getGameEngine().registerResourcePack((IResourcePack)container.getResourcePack())) | |
451 | 451 | { |
452 | 452 | LiteLoaderLogger.info("Successfully added \"%s\" to active resource pack set", container.getLocation()); |
453 | 453 | } | ... | ... |