Jump to content

LordFokas

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by LordFokas

  1. I know it is an Object, var3 is an array of Object. I wanted to know what each of those objects represents.
  2. Check this tutorial out: http://www.minecraftforge.net/wiki/Category:Generic_Mod It covers that and much more things you'll probably need in a near future.
  3. 2 Questions: - what does that var3 represent? - why are making a cast from Object to Entity without checking if var3[0] is an instance of Entity?
  4. And that makes it a good excuse to show people your square version of the wheel? If you don't have code that does what people want, you don't show it. Still, if you know how to do that, you can tell them, and if you don't know, you don't say a thing. Now, every time someone has a problem, you send them to your github, showing off your code, where you proudly reinvent the [square] wheel. And that, kind sir, is not acceptable. In this particular case, this guy wanted something that is a 5 line solution, and you pointed him to a 525 line file and a class that does nothing besides creating an instance of another class. @pro_mole: this is an adaptation from the code I use: @PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile())); config.load(); int block_id = config.get(Configuration.CATEGORY_BLOCK, "property_name", default_block_id).getInt(); config.save(); } If you have any doubts, feel free to ask me. I'll gladly help.
  5. Actually, if you check Viper's github, you'll find a class that is a cheap custom ripoff of Forge's Configuration class. Just compare it with Forge's. All you need to use is a few functions from the Configuration class, not create a huge class to do what forge already does for you. There was a great tutorial on that, I think it was part of the Generic Mod tutorial, look for it on forge tutorials in the forum index. For mcmod.info, try opening forge's own mcmod.info, I found it pretty explanatory.
  6. It appears like you're using a RenderBlocks instance as an EntityItem instance on line 55 of that file. You may want to check that line out for the problem.
  7. But default categories are supposed to be removed in forge 6.x, so getBlock no longer makes sense, I think. I am still developing on forge 4 #303, so I'm not sure what changes were made in that system, but with no default categories, functions like getBlock should either get deprecated or removed. .get, on the other hand, will stay for sure. Also, if you read the code, all getBlock does is call .get with Configuration.CATEGORY_BLOCK Also .get is way easier to use in expanding mods, because you only need to know one method, instead of memorizing a method per category. So, yes, you can use Configuration.getBlock(), but it's better to just use Configuration.get() It's not that I'm measuring d*cks with you, because I'm not, but if we're helping / teaching / giving tips, we are at least a little bit responsible to head people the best way, in order to avoid future incompatibilities when porting to later forge versions and avoid other kinds of problems. I believe that's what you'd like to happen when someone explains something to you too, so as a community, we should make this little effort to enhance new modders' experience. (I know of people who quit modding because they had some problems with the code, and no one explained them things properly) And this was a little bit of a stretch for what should have been a short answer, so I'll just shut up now.
  8. You need to use Get, and then specify the category you want. Like this: config.get(Configuration.CATEGORY_BLOCK, name, defaultid).getInt(); Where 'config' is your Configuration instance. Did that help?
  9. Hi, I'm having a problem with my block and I have absolutely no idea how to fix it. I'm working on a shields (as in forcefield) mod, and the shield block is supposed to be transparent. I did it easily by overriding getRenderPass to return 1, so the texture's alpha channel is used. So far so good. The thing is, the texture has noise, and I wanted to iterate over similar textures with different noise patterns, so that the shield would be animated. The problem is, using a custom renderer (an instance of ISimpleBlockRenderingHandler) while returning 1 on getRenderPass makes the block flicker. Some times the block is fine, and most other times (90%++) it's just a dark shadow. I know there is an ITextureFX and ModTextureAnimation, but I have no idea on how to use those, and also I wanted to make sure shield faces touching other shields aren't rendering so you don't see those visual artifacts when going through the block (yes, you can go through them, other entities can't). Can anyone help me figuring a solution out? Thanks a lot! PS: This is my first (*actual*) mod (as in decent and made with the intention of releasing it).
×
×
  • Create New...

Important Information

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