Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

maxpowa

Forge Modder
  • Joined

  • Last visited

  1. 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
  2. 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
  3. 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.
  4. Mew is actually right, if you look in the Levels class in the github, it uses that player.username a ton.
  5. 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.
  6. You're trying to call Minecraft.getMinecraft() before the minecraft instance is made, try running the initConfigs() in the postinit event.
  7. Uhhh.. stack.getTagCompound().setInteger("Length", intValue);
  8. Exactly as Mew said, change player.sendChatToPlayer(String message); to player.addChatMessage(String message);
  9. 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.
  10. 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.
  11. 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()); }
  12. Listen for RenderGameOverlayEvent, draw your HUD in there.
  13. 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); } }
  14. 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
  15. 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)); }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.