Jump to content

Jantomedes

Members
  • Posts

    32
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Poland
  • Personal Text
    TechGuy

Jantomedes's Achievements

Tree Puncher

Tree Puncher (2/8)

3

Reputation

  1. Oh, you didn't describe your problem enough to help you but I will try. The point is, you have to make this value static. Than it will the same for all instances of your block. The other thing is that you should use saving it to NBT tag by overriding method writeToNBT(NBTTagCompund nbt) and readFromNBT(NBTTagCompund nbt). These methods are in TileEntity class. And about the mod you are writing about. Applying is pretty simple - you have to create an account first, than just validate your email by clicking a link in mail you gonna receive, than get back to the applying page. First you have to choose a category you'd want to apply. Than write a little description, for example if you want to be a coder, write about a mod you are proud of and you have made. Also attach some screenshots or videos and the mod's files and code from done tasks for your category to let them now you are good. Click the big green button 'submit application' and wait for an anwer. Before you'll make that, I suggest you to look at left and read what they want from a 3D artist, coder etc. I hope I helped you. If yes, don't forget to give me a 'thank' ;-) Regards. Jantomedes
  2. Oh, you didn't describe your problem enough to help you but I will try. The point is, you have to make this value static. Than it will the same for all instances of your block. The other thing is that you should use saving it to NBT tag by overriding method writeToNBT(NBTTagCompund nbt) and readFromNBT(NBTTagCompund nbt). These methods are in TileEntity class. And about the mod you are writing about. Applying is pretty simple - you have to create an account first, than just validate your email by clicking a link in mail you gonna receive, than get back to the applying page. First you have to choose a category you'd want to apply. Than write a little description, for example if you want to be a coder, write about a mod you are proud of and you have made. Also attach some screenshots or videos and the mod's files and code from done tasks for your category to let them now you are good. Click the big green button 'submit application' and wait for an anwer. Before you'll make that, I suggest you to look at left and read what they want from a 3D artist, coder etc. I hope I helped you. If yes, don't forget to give me a 'thank' ;-) Regards. Jantomedes
  3. I knew what a reference type is but didn't know that all not primitive types are reference types automatically. And your answer helped me - I've read on the wiki about that. I have to say it wasn't true that you didn't helped me. You didn't have to write the first part so precisely because I know how to create a new TE of good type. But thanks for the last lines with neat way of saving TE to NBT. Without that and without mnm saying it could be done like this, I would have made it with manually saving important values from TEs. Oh, or I even wouldn't because they are private. And grab some karma for this NBT ;-) It's the same thing - he wrote that it magically uses some link. If he don't know what a "reference type" (or "static" or "value type" or "method" or "field") means, he should stop trying to mod and go back to learning Java. If he don't uderstand it and just copy-paste your code, he'll be back tomorrow with similar "learn java" issue. Also it will be frustrating for him, becuase in the end he ends up with code which is impossible to maintain - copied pieces together without any knowledge why it works. I did write that on the end of my post... I wonder how machines from BC, IC2 or computers from RP or CC wound react on this copying. *thinking about multiblock structures* I don't think that a lot (if any) modders were considering this when writing their TE. Mnn, you're making a little mistake. I have to say I didn't know how reference types are working but I know the basic Java. Of course I know what static/value type/method/field means. I am not somebody who thinks that learning Java by modding is a good way to do that. It isn't a way at all. So why if I know Java I have such simple problem? Well, I know the basic Java. And basic means much more than just 'static' or 'field'. The point is that I have sometimes some gaps in my knowledge. The main reason is probably that I didn't understand something and forgot to get back to it. Maybe sounds dumb but that's it. I don't learn Java by modding. At most just realize what I've missed or what I have to remind. Anyway, this was a Java question so sorry for 'offtopicing'. And thanks fro your answers. I will worry later about multiblock structures. And these emotions were because of comparing me to noobs which think that they can learn Java by modding. Regards. Jantomedes @Down: Argh... So embarrassing... PS. assert this.nativeLanguage != Languages.ENGLISH; ;-)
  4. I knew what a reference type is but didn't know that all not primitive types are reference types automatically. And your answer helped me - I've read on the wiki about that. I have to say it wasn't true that you didn't helped me. You didn't have to write the first part so precisely because I know how to create a new TE of good type. But thanks for the last lines with neat way of saving TE to NBT. Without that and without mnm saying it could be done like this, I would have made it with manually saving important values from TEs. Oh, or I even wouldn't because they are private. And grab some karma for this NBT ;-) It's the same thing - he wrote that it magically uses some link. If he don't know what a "reference type" (or "static" or "value type" or "method" or "field") means, he should stop trying to mod and go back to learning Java. If he don't uderstand it and just copy-paste your code, he'll be back tomorrow with similar "learn java" issue. Also it will be frustrating for him, becuase in the end he ends up with code which is impossible to maintain - copied pieces together without any knowledge why it works. I did write that on the end of my post... I wonder how machines from BC, IC2 or computers from RP or CC wound react on this copying. *thinking about multiblock structures* I don't think that a lot (if any) modders were considering this when writing their TE. Mnn, you're making a little mistake. I have to say I didn't know how reference types are working but I know the basic Java. Of course I know what static/value type/method/field means. I am not somebody who thinks that learning Java by modding is a good way to do that. It isn't a way at all. So why if I know Java I have such simple problem? Well, I know the basic Java. And basic means much more than just 'static' or 'field'. The point is that I have sometimes some gaps in my knowledge. The main reason is probably that I didn't understand something and forgot to get back to it. Maybe sounds dumb but that's it. I don't learn Java by modding. At most just realize what I've missed or what I have to remind. Anyway, this was a Java question so sorry for 'offtopicing'. And thanks fro your answers. I will worry later about multiblock structures. And these emotions were because of comparing me to noobs which think that they can learn Java by modding. Regards. Jantomedes @Down: Argh... So embarrassing... PS. assert this.nativeLanguage != Languages.ENGLISH; ;-)
  5. Oh, you didn't read my post carefully. YES, this exactly a "learn java" thread. Many of you already have a reflex 'if it's a Java question, we have to hate it immediately'. But I believe there are some kind people who don't have it and know the difference between a question from a noob who doesn't learn Java at all or he does it 'by modding' and a question from a person who know the basics of Java but sometimes also has some problems. Thanks for saying me exactly what I wrote in my post. Very helpful and clever. That's very practical if I can ask a question on a forum and get the precise name of my problem. I also believe that there are some of these kind people who can give me a little explanation and write an example. Thanks. --------------------- If I've gone too far, sorry - emotions.
  6. But I do :-) Look into GUI of "DoYouWantToDownloadTheTexturepackThisServerUsesAndWhichSucks?". I'm afraid it was called a little bit differently ;-)
  7. Well, I know you can place them in /bin or bin/natives but maybe there is a extra external super hyper secret magic additional way to do that.
  8. When you are in Eclipse, right click your mod project and select Properties->Java build path->Libraries->Add external JARs
  9. Hi there. First, I wanted to make a simple tool for copying and replacing blocks, so I can easily copy a chest or something else and place copy it somewhere else. This seems so easy but I have some terrible problems. It looks Java bites me when I want to make a copy of something but it's a link not a copy. When I am copying a block everything is ok but when I set another block, the TileEntity of the original block disappears and the new block also don't have a TileEntity. When I set a block to another it even doesn't set the metadata... -.- Wrench of copying: Wrench of setting: ChainSettings: Regards. Jantomedes
  10. Hey there! I made a block which should be rendered depending on a value in his TileEntity. The problem is that it depends on default value from TileEntity's constructor. I checked and the value is properly saved and loaded. Code from the block: @SideOnly(Side.CLIENT) public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5){ return Block.blocksList[((TileEntityChainReactiveRock)par1IBlockAccess.getBlockTileEntity(par2, par3, par4)).textureID].getBlockTexture(par1IBlockAccess, par2, par3, par4, par5); } And from TileEntity: I don't paste the whole code of block because there is so much of it and there is nothing about block's texture except what I pasted. I think it could be something with IBlockAccess. Regards. Jantomedes
  11. Now I know :-) Any block with TileEntity has to implement ITileEntityProvider. I didn't see that because major of blocks with TileEntitys (all of them?) are extending BlockContainer which is implementing that. Anyway thanks for your help.
  12. I'm sorry but it didn't help me at all. Anyway thank for your trying to help ;-) Better let's get an example: We have ItemArmor(EnumArmorMaterial) and we want to define an object with it but no of existing values in EnumArmorMaterial is good for us. We also don't want to change ItemArmor or EnumArmorMaterial class nor create new class which is just a bit changed ItemArmor. How we can do that? Possible ideas: (i didn't check them, they're just examples what I'm searching for) ItemArmor(new EnumArmorMaterial(data)); ItemArmor((EnumArmorMaterial)Enum.setOf(data));
  13. I have always been a bit confused with Enums. So my question is if we have e.g. constructor with an EnumMagic for an argument and we want to use other data than the existing in EnumMagic, so do we HAVE to edit EnumMagic or is there way to to something like "new EnumMagic(data)". Regards. Jantomedes This is just a theoretical Java question. It's not about the armor. Really.
  14. I added the snippet and it's working. I also overrided the method (registration I already had but blocks still don't update after loading a world. I have to place them again to start them counting. Do you have any ideas? Anyway, thanks a lot ;-)
  15. Hey there. I have an issue that tileentity of a block is not updating after loading a saved game but when I place a new block it is updating even after destroying the block. The code for block and tileentity: http://pastebin.com/CuCbTafE
×
×
  • Create New...

Important Information

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