Everything posted by DarkEyeDragon
-
Send chat message to player
alright i got it to work. Thanks.
-
Send chat message to player
I'm confused on how to use this? I tried a few things but havent managed to get it to work yet. Is there any documentation on the ITextComponent somewhere?
-
Send chat message to player
So i'm trying to display a message to the player. I used Minecraft.getMinecraft().player.sendChatMessage(""); But that just makes the player say it. How would i make the player only receive the message? (This is not on a command btw)
-
Reading data from config
https://github.com/DarkEyeDragon/ScreenshotUploader Full source now on github.
-
Reading data from config
Wow i feel so stupid now Changing it also didnt work though. public static void syncConfig() { ConfigManager.sync(MODID, Config.Type.INSTANCE); overrideDefaultScreenshotKey = config.getBoolean("B:Override", Configuration.CATEGORY_GENERAL, false, "Override the default screenshotkey"); saveScreenshot = config.getBoolean("B:Save", Configuration.CATEGORY_GENERAL, true, "Set to true if you want your screenshots to save locally and upload to Imgur. Only has effect if Override is set to true"); System.out.println(overrideDefaultScreenshotKey+":"+saveScreenshot); } I tried with and without the B: also tried the .sync before and after. No luck so far.
-
No errors but still crashes
From what i can tell its something with galacticraft. Time: 1/18/18 9:59 AM Description: Exception in server tick loop java.lang.IllegalArgumentException: Could not get provider type for dimension -30, does not exist at net.minecraftforge.common.DimensionManager.getProviderType(DimensionManager.java:148) at net.minecraftforge.common.DimensionManager.shouldLoadSpawn(DimensionManager.java:268) at codechicken.chunkloader.ChunkLoaderManager.cleanChunks(ChunkLoaderManager.java:745) at codechicken.chunkloader.ChunkLoaderManager.tickEnd(ChunkLoaderManager.java:755) at codechicken.chunkloader.ChunkLoaderEventHandler.worldTick(ChunkLoaderEventHandler.java:32) at cpw.mods.fml.common.eventhandler.ASMEventHandler_1236_ChunkLoaderEventHandler_worldTick_WorldTickEvent.invoke(.dynamic) at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) at cpw.mods.fml.common.FMLCommonHandler.onPostWorldTick(FMLCommonHandler.java:255) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:645) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:186) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) You also might want to take a look at this [09:58:30] [Client thread/ERROR]: ########## GL ERROR ########## [09:58:30] [Client thread/ERROR]: @ Post render [09:58:30] [Client thread/ERROR]: 1280: Invalid enum It gets spammed a lot. Not sure what it means though.
-
Reading data from config
How would i get data from the config? This is what i tried. It only seems to get the default values though. public static void syncConfig() { ConfigManager.sync(MODID, Config.Type.INSTANCE); overrideDefaultScreenshotKey = config.getBoolean(Configuration.CATEGORY_GENERAL, "Override", false, ""); saveScreenshot = config.getBoolean(Configuration.CATEGORY_GENERAL, "Save", true, "Set to true if you want your screenshots to save locally and upload to Imgur. Only has effect if Override is set to true"); System.out.println(overrideDefaultScreenshotKey+":"+saveScreenshot); } # Configuration file general { # Override the default screenshotkey B:Override=true # Set to true if you want your screenshots to save locally and upload to Imgur. Only has effect if Override is set to true B:Save=true }
-
[Solved] Config not saving changes
That worked. Thanks!
-
[Solved] Config not saving changes
Yeah i find it kinda weird too. But that's how it was done in the example i followed. I'm not really sure how to get the new values.
-
[Solved] Config not saving changes
So i'm trying to save a config using the new annotation system. However it seems my config doesnt want to update. Event triggers fine. "Config changed" shows up. public class ConfigChanged{ @SubscribeEvent public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) { if(eventArgs.getModID().equals("screenshotuploader")){ System.out.println("Config changed!"); ScreenshotMain.syncConfig(); } } } public static void syncConfig() { overrideDefaultScreenshotKey = config.getBoolean("Override", Configuration.CATEGORY_GENERAL, overrideDefaultScreenshotKey, "Override the default screenshotkey"); saveScreenshot = config.getBoolean("Save", Configuration.CATEGORY_GENERAL, saveScreenshot, "Set to true if you want your screenshots to save locally and upload to Imgur. Only has effect if Override is set to true"); if(config.hasChanged()) config.save(); } The method called from the onConfigChanged. What i tried so far: Moving the config.save() out of the if statement. No effect. Saving the config first then getting the values again. No effect. What am i missing here? Thanks in advance. EDIT: It get the values fine from the config. It just doesnt change them. Also my modConfig public class ModConfig{ @Config.Name("Override") @Config.Comment("Override the default screenshotkey") public static boolean Override = false; @Config.Name("Save") @Config.Comment("Set to true if you want your screenshots to save locally and upload to Imgur. Only has effect if Override is set to true") public static boolean SaveScreenshots = true; }
-
Set config subtitles?
So I figured out how to make a config using the annotation system. However I can't seem to figure out how to set subtitles. What I have now: http://prntscr.com/i0p0yx what i would like: http://prntscr.com/i0p1xb Yes its ugly. I am very aware of this ;p (it's just for testing purposes)
IPS spam blocked by CleanTalk.