
NomNuggetNom
Members-
Posts
92 -
Joined
-
Last visited
Everything posted by NomNuggetNom
-
Anyone? It's really frustrating to have to build just to test a small change
-
Okay, so I tried --username=username --password=password and that didn't work either.
-
As of 1.7.10, the classic run configuration for logging into Minecraft automatically doesn't work: --username AzureDiamond@gmail.com --password hunter2 In the above example, it sets the user to AzureDiamond@gmail.com, not AzureDiamond. Any pointers? And no, that's not my password, it's a reference.
-
When changes to the config are made, it does not trigger: ConfigChangedEvent.OnConfigChangedEvent Like it does with other mods.
-
Bump :\
-
[1.7.2] Need help with multilayered texture for custom item model
NomNuggetNom replied to sigurd4's topic in Modder Support
Try looking at the beacon block code. It has the mechanics you want. -
This event was just added to Forge, so your friend probably didn't have the correct release of Forge. I needs to be something like 1133 or later (if I remember correctly, you can check the release notes) Indeed, this was the problem. I told him to get latest, but he just doesn't listen! . Still having the other problem.
-
My friend got this error after I compiled and send it to him: cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: cpw/mods/fml/client/event/ConfigChangedEvent$OnConfigChangedEvent
-
My configuration GUI is not triggering a call of ConfigChangedEvent.OnConfigChangedEvent and I don't have the slightest clue why. Everything else is working fine: reading values has no problem, the .cfg is fine, etc. On startup, I sync the configuration, and it works perfectly. Also, as a result of this, any events marked as requiring a restart do not actually require a restart. It's really odd. What could be going wrong? My messy config file (please try not to hurt yourselves while viewing). I am probably doing this VERY wrong, please tell me if so: public class Config extends GuiConfig { public static Configuration configFile; /* * Actual configuration values. */ public static String membersList = ""; public static String mercsList = ""; public Config(GuiScreen parent) { super(parent, new ConfigElement(configFile.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), "MCCTF Mod", false, true, "MCCTF General Config"); } public static void syncConfig() { Pattern usernamePattern = Pattern.compile("([A-Za-z0-9_]+((,){1}( )*|$))+?"); /* * Members List */ membersList = configFile.getString("Members List", Configuration.CATEGORY_GENERAL, "username, username, username", "These people will appear on your \"Clan Mate\" list in white.", usernamePattern); System.out.println("membersList: " + membersList); Matcher matcherMembers = usernamePattern.matcher(membersList); while (matcherMembers.find()) { System.out.println("Found member match: " + matcherMembers.group().replace(", ", "")); Main.membersList.add(matcherMembers.group().replace(", ", "")); } /* * Merc List */ mercsList = configFile.getString("Mercs List", Configuration.CATEGORY_GENERAL, "username, username, username", "These people will appear on your \"Clan Mate\" list in gray.", usernamePattern); Matcher matcherMercs = usernamePattern.matcher(mercsList); while (matcherMercs.find()) { Main.mercsList.add(matcherMercs.group()); } if (configFile.hasChanged()) { configFile.save(); } } } My GUIFactory: public class GuiFactory implements IModGuiFactory { @Override public void initialize(Minecraft minecraftInstance) { } @Override public Class<? extends GuiScreen> mainConfigGuiClass() { return Config.class; } @Override public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { return null; } @Override public RuntimeOptionGuiHandler getHandlerFor( RuntimeOptionCategoryElement element) { return null; } } My preInit in Main: @EventHandler public void preInit(FMLPreInitializationEvent e) { MinecraftForge.EVENT_BUS.register(new Events()); FMLCommonHandler.instance().bus().register(new Events()); Config.configFile = new Configuration(e.getSuggestedConfigurationFile()); Config.syncConfig(); } My Events class for catching: @SubscribeEvent public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { System.out.println("Config changed!"); if(event.modID.equals("mcctf")) { Config.syncConfig(); } } Note: "Config changed" isn't even printed after I edit my config. It prints when I edit other mods though.
-
How can I get the player that joined from this? I suppose I could keep a list of all online players and check for differences when this event is called. But is there any easier way?
-
I forgot to mention, my mod is client side only. It seems as if those methods are for the server only.
-
Neither PlayerEvent.PlayerLoggedInEvent nor PlayerEvent.PlayerLoggedOutEvent are getting called.
-
Similar to the EntityJoinEvent, is there an EntityLeaveEvent? I'm trying to detect when a player leaves a server.
-
Exactly right, thanks!
-
I changed it to a different block and it works fine. new ItemStack(Blocks.wool, 1, 1)); Sorry, which method did you need?
-
EntityJoinWorldEvent. I've extended the achievement class to make custom notifications, and I was trying to call one. @SubscribeEvent public void onJoin(EntityJoinWorldEvent event) { if (event.entity instanceof EntityPlayer && !mc.isSingleplayer()) { EntityPlayer player = (EntityPlayer) event.entity; if (Main.membersList.contains(player.getDisplayName()) && !player.getDisplayName().equals(mc.thePlayer.getDisplayName())) { alert.sendAlertWithItem("A clan member joined!", player.getDisplayName() + " is now online.", -1, new ItemStack(Blocks.skull, 1, 1)); } } }
-
So, here's what I'm trying: new ItemStack(Blocks.skull, 1, 3) Blocks.skull is the skull, and metadata 3 is the "Head" (the steve head). This crashes my game though. java.lang.NullPointerException: Rendering item at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:266) So how do I create an ItemStack of "head"?
-
Ah, a simple solution, thank you! I had assumed I didn't need to use them because it looked fine in Eclipse. But you know what they say about assuming.
-
How can I keep unicodes when compiling? I keep getting errors. They work fine when running in Eclipse, but break when I try and build the mod. The main problem is the formatting unicode "§" which I use to detect colors and strings. Other unicodes include a circle: • and an arrow ►. All of the unicodes are on Code page 437, which is in Minecraft by default. I saved my .java file as UTF-8, which I assume is the problem. I can't save it as the file Minecraft wants me to use, Cp1252. Here is my usage, for example: clanMembers.add(Main.getBoard().getPlayersTeam(player2).getColorPrefix() + "•§r " + player2);
-
Thank you. Sorry diesieben07, some of us need to be spoon-fed :\
-
I'm aware that it uses metadata. I still don't know how you specify the metadata.. There is no Blocks.wool.blue or anything convenient.
-
For example, blue wool. Here is what I'm doing now: Block blueWool = Block.getBlockFromName("Blue Wool"); Item blueWoolItem = Item.getItemFromBlock(blueWool); ItemStack blueWoolStack = new ItemStack(blueWoolItem); RenderHelper.enableGUIStandardItemLighting(); this.item.renderItemAndEffectIntoGUI( mc.fontRenderer, mc.getTextureManager(), blueWoolStack, var5 + 8, var6 + ; For comparison, this code works fine: RenderHelper.enableGUIStandardItemLighting(); this.item.renderItemAndEffectIntoGUI( mc.fontRenderer, mc.getTextureManager(), new ItemStack(Item.getItemById(35)), var5 + 8, var6 + ;
-
How do I set the message to the new ChatComponentText? By the way, thank you for all your help thusfar. I know I'm a noob and I appreciate you continuing to answer my nooby questions