-
[1.6] Translating chat strings.
So I've managed to find this method ChatMessageComponent.func_111078_c(serializedMessage).func_111068_a(true) but when I try to use it, it crashes with the stacktrace
-
Is it possible to add my own character to chat?
I don't think that would be possible without changing the way fontrenderer works, though you could use a UTF-8 non-standard currency symbol -- there's a list of them here http://www.fileformat.info/info/unicode/block/currency_symbols/images.htm
-
Fatal scala error while decompiling
Lex, the problem lies in the command line arguments you're sending to the scala compiler, they changed their syntax in 2.9.0 so you probably have to change the syntax in which they are sent from the python files. '"scalac.bat" -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "jars\vers ions\1.6.2\1.6.2.jar;...' failed : 255 The syntax of the command is incorrect.
-
[Not solved but im done.]How to save integers to a file.
Mew is actually right, if you look in the Levels class in the github, it uses that player.username a ton.
-
Fatal scala error while decompiling
I've never personally used Scala, but looking at the changelog, it looks like some command line arguments changed in 2.9.0, you might want to use the compiler version 2.8.x or below.
-
[Not solved but im done.]How to save integers to a file.
You're trying to call Minecraft.getMinecraft() before the minecraft instance is made, try running the initConfigs() in the postinit event.
-
[1.6.1] Alternative to TileEntity for Items?
Uhhh.. stack.getTagCompound().setInteger("Length", intValue);
-
[1.6.2][Solved] ChatMessageComponent
Exactly as Mew said, change player.sendChatToPlayer(String message); to player.addChatMessage(String message);
-
[Not solved but im done.]How to save integers to a file.
Levels class is uploaded to the GitHub repo, check it out, I think it matches your per world on singleplayer and global on servers idea, as you wanted.
-
[Not solved but im done.]How to save integers to a file.
Every bit of code I've used to help him can just as easily be adapted to yours. If you feel that I'm not helping you in particular, it's because I'm not. Frankly, Flenix has been much easier to work with, and his case can easily be modified to fit your needs. Have you even looked at the source of the TestMod I posted on my GitHub? I'll add an equivalent of your class to prove how easily the system can be adapted if you just tried.
-
Show text in-game
Do you have your event method set up in a different class from your main mod and like so? @ForgeSubscribe public void renderGui(RenderGameOverlayEvent event) { if (!Minecraft.isGuiEnabled()) return; // draw stuff here } and your init method @EventHandler public void initMod(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new EventHandler()); }
-
Show text in-game
Listen for RenderGameOverlayEvent, draw your HUD in there.
-
[Not solved but im done.]How to save integers to a file.
Awesome You'll probably have to create if statements for each different currency item, unless you have them all using one superclass with the currency value in that, then you could iterate through each currency object and get the value simply like that and.. This is getting to be confusing in this sentence. for (CurrencyObject currency : BaseMod.currencysAddedByMod) { if (item.id == currency.id) { addMoney(currency.value); } }
-
[Not solved but im done.]How to save integers to a file.
Woohoo! BTW, those are super-sexy ATM models, are they going to be a part of your city mod or a separate mod? I'd love to see that as a standalone currency mod
-
custom events based on enchantments?
NBTTagList enchlist = itemHeld.getEnchantmentTagList(); for(int i = 0; i < enchlist.tagCount(); i++) { System.out.println(enchlist.tagAt(i)); } In this, you just have to add a check if enchlist.tagAt(I) is equal to your custom enchant NBTTagList enchlist = itemHeld.getEnchantmentTagList(); for(int i = 0; i < enchlist.tagCount(); i++) { if (enchlist.tagAt(i).getInteger("id") == MainModFile.enchantShocking.enchID) { //Do what you want your enchant to do, probably shock someone. } System.out.println(enchlist.tagAt(i)); }
IPS spam blocked by CleanTalk.