mirror of
https://github.com/Motschen/Blur.git
synced 2025-12-17 04:05:10 +01:00
Fix reflection for prod
This commit is contained in:
@@ -52,7 +52,12 @@ public class Blur implements ModInitializer {
|
|||||||
public static Blur instance;
|
public static Blur instance;
|
||||||
|
|
||||||
public Blur() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
|
public Blur() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
|
||||||
Field _rps = MinecraftClient.class.getDeclaredField("resourcePackContainerManager");
|
Field _rps;
|
||||||
|
try {
|
||||||
|
_rps = MinecraftClient.class.getDeclaredField("field_1715");
|
||||||
|
} catch (NoSuchFieldException e) {
|
||||||
|
_rps = MinecraftClient.class.getDeclaredField("resourcePackContainerManager");
|
||||||
|
}
|
||||||
_rps.setAccessible(true);
|
_rps.setAccessible(true);
|
||||||
ResourcePackContainerManager<ClientResourcePackContainer> rps = (ResourcePackContainerManager<ClientResourcePackContainer>)_rps.get(MinecraftClient.getInstance());
|
ResourcePackContainerManager<ClientResourcePackContainer> rps = (ResourcePackContainerManager<ClientResourcePackContainer>)_rps.get(MinecraftClient.getInstance());
|
||||||
rps.addCreator(new ResourcePackCreator() {
|
rps.addCreator(new ResourcePackCreator() {
|
||||||
|
|||||||
Reference in New Issue
Block a user