Jump to content

Kinniken

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Kinniken

  1. Thanks, I hadn't seen that setTextureEntity. I got it working. Just one thing, I'm expected to get the TextureMap by doing a cast on IconRegister, right? Just asking if there isn't an other way because I really don't like casts
  2. Well, mine worked fine in MC 1.4, with no significant CPU issue But switching to pre-generated sprites is also possible and if that's the recommended way it works for me too. However, how do I declare my animation now? There are no addAnimation methods anymore. (I can't just use a text file - I need custom logic to select the proper frame to use, like the compass and the watch do. For instance one my texture changes depending on the proximity of mobs).
  3. Hi guys, Anyone knows if it is still possible to use "calculated" textures for items in 1.5? Like you could in 1.4 by extending TextureFX and filling imageData[] manually? I saw that Mojang has switched to pre-calculated sprites for the clock and compass textures. It would be great if it was still possible... K.
  4. Indeed, seems to be working fine, and in 1.5 as well. Thanks.
  5. That worked, thanks! It also required me to move my item instancing to preInit (due to the icons). I assume that's not an issue? Didn't seem to cause any troubles in my quick testing.
  6. Hi guys, I've been recently working on adding achievements for my Millénaire mod (not released yet). They work fine, both display and triggering, but ever since I added them Minecraft reset all achievements (vanilla ones and mine) at every start of the game. I had heard that it's "normal" for achievements to be reseted whenever the jar is modified, but not at every launch. Any idea what I could be doing wrong? Here is my achievements class: package org.millenaire.common.forge; import org.millenaire.common.MLN; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; import net.minecraftforge.common.AchievementPage; public class MillAchievements extends Achievement { final String key; public MillAchievements(int par1, String par2Str, int par3, int par4, Block par5Block, Achievement par6Achievement) { super(par1, par2Str, par3, par4, par5Block, par6Achievement); key=par2Str; } public MillAchievements(int par1, String par2Str, int par3, int par4, Item par5Item, Achievement par6Achievement) { super(par1, par2Str, par3, par4, par5Item, par6Achievement); key=par2Str; } public MillAchievements(int par1, String par2Str, int par3, int par4, ItemStack par5ItemStack, Achievement par6Achievement) { super(par1, par2Str, par3, par4, par5ItemStack, par6Achievement); key=par2Str; } @Override public String getDescription() { return MLN.string("achievement."+key+".desc"); } @Override public String getName() { return MLN.string("achievement."+key+".name"); } public static final Achievement firstContact = new MillAchievements(7470, "firstcontact", 0, 0, Mill.parchmentVillagers, null).registerAchievement(); public static final Achievement cresus = new MillAchievements(7471, "cresus", 2, -1, Mill.denier_or, firstContact).registerAchievement(); public static final Achievement summoningwand = new MillAchievements(7472, "summoningwand", 5, 0, Mill.summoningWand, cresus).registerAchievement(); public static final Achievement villageleader = new MillAchievements(7473, "villageleader", 4, 2, Mill.normanHelmet, summoningwand).setSpecial().registerAchievement(); public static final Achievement thequest = new MillAchievements(7474, "thequest", 0, -4, Block.torchWood, firstContact).registerAchievement(); public static final Achievement maitreapenser = new MillAchievements(7475, "maitreapenser", 2, -5, Item.writableBook, thequest).registerAchievement(); public static final Achievement forbiddenknwoledge = new MillAchievements(7476, "forbiddenknwoledge", 2, -7, Mill.parchmentSadhu, maitreapenser).setSpecial().registerAchievement(); public static final Achievement puja = new MillAchievements(7477, "puja", -1, -6, Mill.indianstatue, maitreapenser).registerAchievement(); public static final Achievement explorer = new MillAchievements(7478, "explorer", -3, 1, Item.bootsLeather, firstContact).registerAchievement(); public static final Achievement marcopolo = new MillAchievements(7479, "marcopolo", -4, 3, Item.map, explorer).registerAchievement(); public static final Achievement magellan = new MillAchievements(7480, "magellan", -6, 5, Item.compass, marcopolo).setSpecial().registerAchievement(); public static final Achievement selfdefense = new MillAchievements(7481, "selfdefense", -5, 2, Mill.byzantinePlate, explorer).registerAchievement(); public static final Achievement pantheon = new MillAchievements(7482, "pantheon", -4, -5, Item.sign, explorer).registerAchievement(); public static final Achievement darkside = new MillAchievements(7483, "darkside", 0, 3, Item.swordStone, firstContact).registerAchievement(); public static final Achievement scipio = new MillAchievements(7484, "scipio", -1, 6, Item.swordSteel, darkside).registerAchievement(); public static final Achievement attila = new MillAchievements(7485, "attila", 2, 9, Mill.normanBroadsword, scipio).setSpecial().registerAchievement(); public static final Achievement cheers = new MillAchievements(7486, "cheers", 2, 2, Mill.calva, firstContact).registerAchievement(); public static final Achievement hired = new MillAchievements(7487, "hired", -1, -2, Mill.normanAxe, firstContact).registerAchievement(); public static final Achievement masterfarmer = new MillAchievements(7488, "masterfarmer", 3, -3, Mill.grapes, firstContact).registerAchievement(); //player.addStat(MillAchievements.thequest, 1); public static MillAchievementPage millAchievements = new MillAchievementPage("", firstContact,cresus,summoningwand,villageleader, thequest,maitreapenser,forbiddenknwoledge,puja,explorer,marcopolo,magellan,selfdefense,pantheon,darkside,scipio,attila, cheers,hired,masterfarmer); public static class MillAchievementPage extends AchievementPage { public MillAchievementPage(String name, Achievement... achievements) { super(name, achievements); } public String getName() { return MLN.string("achievementpage.name"); } } } I override both the Achievement and the AchievementPage classes but only to handle my own localisation system. Other than this code, I have this in my mod's load method: AchievementPage.registerAchievementPage(MillAchievements.millAchievements); And triggers for achievements like this one at the appropriate places: player.addStat(MillAchievements.darkside, 1); Any ideas on what I'm doing wrong would be great. I can't release the feature as long as it causes this issue... Thanks K.
  7. Nobody has any idea about this? Or even has had the issue as well? It's annoying, many users are reporting it but I can't narrow it down.
  8. Hi guys, Just wondering if anybody has faced the following problem before or has some idea as to what could cause it. Villagers in my Millénaire mod are sometime invisible client-side (more specifically, the entities do not exist on the client, I've tested for them). On the server-side, they do exist and are properly active (for those who've played Millénaire, you can "see" them building for instance). This happens occasionally, and villagers can sometime be made to re-appear by moving away from the village and coming back to it, presumably because that forces Minecraft to reload the entities. This is in both SSP and SMP. It looks like this is a recent problem, I had occasional reports of missing villagers but never clearly of "active villagers server side, invisible client-side" issues like I'm getting now. Weirdly, while I can reproduce the bug when playing the regular game, it never seems to happen when running it from MCP. But maybe that's because I'm still using MC 1.4.6 in my dev environment? Thanks K. edit: updated versions in the topic title
  9. Bump. Until now I used a utility class located in the Minecraft package. Now this won't work as the Minecraft code is split between packages when in MCP but isn't when reobfuscated. I'd use the subclass method but it does not work for objects you did not instantiate yourself. Before I get into weird hacks, anybody has a "clean" solution to this? To pick an example, for EntityCreature.entityToAttack for an existing entity, not a mod-created one?
  10. Hi guys, I've had some users report crashes when using Millénaire with Forge with error logs like this: ---- Minecraft Crash Report ---- // I bet Cylons wouldn't have this problem. Time: 9/3/12 11:48 PM Description: Exception in server tick loop java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(Unknown Source) at java.util.AbstractList$Itr.next(Unknown Source) at java.util.AbstractCollection.removeAll(Unknown Source) at up.h(World.java:1820) at gr.h(WorldServer.java:437) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:616) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:547) at axv.p(IntegratedServer.java:102) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453) at ep.run(SourceFile:539) Relevant Details: - Minecraft Version: 1.3.2 - Operating System: Windows 7 (amd64) version 6.1 - Java Version: 1.6.0_30, Sun Microsystems Inc. - Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Sun Microsystems Inc. - Memory: 110421280 bytes (105 MB) / 527892480 bytes (503 MB) up to 954466304 bytes (910 MB) - JVM Flags: 2 total; -Xms512m -Xmx1024m - Is Modded: Definitely; 'forge,fml' - Profiler Position: N/A (disabled) - Player Count: 1 / 8; [gu['clownfish'/87, l='Clownfish Daddy', x=-275.28, y=68.25, z=382.80]] - World Clownfish Daddy Entities: 0 total; [] - World Clownfish Daddy Players: 0 total; [] - World Clownfish Daddy Chunk Stats: ServerChunkCache: 0 Drop: 0 - Type: Integrated Server This appears to happen when a loaded entity is removed from World.loadedEntityList. It's not clear from the reports whether this is caused by Millénaire or by Forge itself, though based on the trace it doesn't involve my code directly. Anybody has any idea as to the cause of this? I've tried reproducing it without success. Thanks K.
  11. I'm not sure why it would be easier for users to install a zip instead of a zip and two folders in the same place And I want people to be aware that Millénaire comes with plenty of user-accessible content. Otherwise cpw how is the situation regarding Bukkit and Forge? I'd like to tackle that once the current Millénaire version is stable.
  12. Two of them in mods/ for easy user-modding. Nobody else ever complained
  13. I solved this one, with a stack trace in the constructor. Very stupid error. I had overridden createTileEntity(World world, int metadata) which is used client-side but not createNewTileEntity(World world, int metadata) which is used server-side...
  14. I'm getting the same issue with the last promoted version. I'll upgrade to 228 and check. However, I assume this means I must require that my users do the same whenever I release a public version?
  15. I guess one guy's bug is an other guy's feature Any change of being able to request the loading of a directory in a future update? Maybe triggered by an info file at the root of the dir? Otherwise, what is the status of Forge for Bukkit in MC 1.3? It works well? That's my next project.
  16. Declaration: public class TileEntityMillChest extends TileEntityChest { And there's no constructor, like for TileEntityChest.
  17. As the author of a large Forge mod I can tell you that upgrading to MC 1.3 / Forge 4 is not easy and takes quite a while. So have some patience
  18. I have a very strange issue, I wonder if anyone knows whether it's a bug in Forge or MC. Basically I have a custom chest which extends (block and TE) the normal one. In the block I declare this: When the blocks are created, on the client a TileEntityMillChest is created. On the server side however it's a generic TileEntitChest. This log shows it: 2012-08-23 18:06:50 [iNFO] [sTDOUT] CLIENT TEMP: net.minecraft.src.WorldServer@aad33f6: Checking TE at 94/68/276: net.minecraft.src.TileEntityChest@8f706d5 2012-08-23 18:06:50 [iNFO] [sTDOUT] CLIENT TEMP: net.minecraft.src.WorldServer@aad33f6: Block id: 1515 2012-08-23 18:06:50 [iNFO] [sTDOUT] CLIENT TEMP: net.minecraft.src.WorldClient@18101044: Checking TE at 94/68/276: org.millenaire.common.TileEntityMillChest@4b7ac3e5 2012-08-23 18:06:50 [iNFO] [sTDOUT] CLIENT TEMP: net.minecraft.src.WorldClient@18101044: Block id: 1515 Any idea what could cause this?
  19. A better solution might be an option to have the mcmod.info file be automatically generated based from the tag data, maybe when the code is re-obfuscated.
  20. Ok, the bug was my fault, faulty logging. In fact it seems to be working fine. Just one thing - is there a way of knowing server-side whether an entity was created in a specific client? I use custom packets to update some properties of my villagers and I'd like to make sure I don't send them for villagers not loaded on a given client.
  21. I figured out the resource problem, if anyone else is having the same. It's due to me splitting the Millénaire mod between a millenaire zip file that contains the classes and a millenaire folder with the content, including the textures. Forge 3 loaded the content of the folder as resources even if it wasn't a "mod" folder as such. Forge 4 doesn't. So I'll now package the textures in the zip file instead.
  22. Spawn for each other? I can see the name of each entity concerned, they each produce write and read calls. I'll check the stack.
  23. I've just noticed an oddity, it seems like my client packet handler receives all the packets when running a stand-alone server (the server packet handler also gets them). It doesn't really affect anything in my case since my packet type ids are different for server and client packets but it's odd. Is this a known issue?
  24. I've noticed something odd while doing some debugging - writeVillagerStreamData seems to be firing constantly for every one of my entity loaded server-side. The equivalent readVillagerStreamdata fires whenever the player is close enough, otherwise it doesn't. Is this intended? I thought that data was only supposed to be sent once, when the entity is created client-side.
  25. I solved it by switching to using just DataInput and DataOutput in my utility methods. Works for both now. And switching the interface indeed solved my issues, my villagers are back to normal now. Getting there, slowly
×
×
  • Create New...

Important Information

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