use of net.minecraft.client.render.BackgroundRenderer in project ImmersivePortalsMod by qouteall.
the class MyCommandClient method reportFogColor.
private static int reportFogColor(CommandContext<ServerCommandSource> context) {
MinecraftClient.getInstance().execute(() -> {
StringBuilder str = new StringBuilder();
CGlobal.clientWorldLoader.clientWorldMap.values().forEach(world -> {
DimensionRenderHelper helper = CGlobal.clientWorldLoader.getDimensionRenderHelper(world.dimension.getType());
str.append(String.format("%s %s %s %s\n", world.dimension.getType(), helper.fogRenderer, helper.getFogColor(), ((IEBackgroundRenderer) helper.fogRenderer).getDimensionConstraint()));
});
BackgroundRenderer currentFogRenderer = ((IEGameRenderer) MinecraftClient.getInstance().gameRenderer).getBackgroundRenderer();
str.append(String.format("current: %s %s \n switched %s \n", currentFogRenderer, ((IEBackgroundRenderer) currentFogRenderer).getDimensionConstraint(), CGlobal.switchedFogRenderer));
String result = str.toString();
Helper.log(str);
McHelper.getServer().execute(() -> {
try {
context.getSource().getPlayer().sendMessage(new LiteralText(result));
} catch (CommandSyntaxException e) {
e.printStackTrace();
}
});
});
return 0;
}
Aggregations