Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Abastro

  1. I said, don't override the method, and just use Configuration class. I think you can get the properties as Collection. Then you can sort it with your custom comparator using Collections#sort(List, Comparator). The comparator should compare the properties with the value. From the sorted list, build another list of List<String> containing the name of properties. Then you can provide the list to the Configuration#setCategoryPropertyOrder(..)
  2. . Do it yourself. You should be able to write that logic.
  3. .... You should sync your client TileEntity with server version.. The aim of the existence of client side tileentity is tileentity-specific rendering and Gui/Container.
  4. ... After you registers the properties you want to sort.
  5. I think you can get the value of the properties. Sort it with the name of the properties. Then provide the List<String> of the sorted order of the name of the properties to the method.
  6. When did you need the sorting? It depends.
  7. I think it is for checking leaked worlds, which means that the world is not used. It seems to be for purely debugging purpose.
  8. No. In this way you should not make your own class. You should just use Configuration class.
  9. Ah, yes that would work too. (Actually I didn't remember that % sign can also be used for double) Then you should check carefully, covering the case of 0 and 360.
  10. No, you can just use Configuration class. Your custom class is not needed. You call Configuration#setCategoryPropertyOrder when you want.
  11. What you should override: public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) So you omitted a boolean!
  12. No, I wont provide you copy-paste code, and I think your problem is not getting to the concept. Do you know what I mean by 'remainder'? I think at least you know %...
  13. Then, first put @Override on the head of the method to check if your method is overriding the Item's method properly.
  14. That is natural, because reflection can sometimes throw exceptions like NoSuchFieldException. Besides, I think you should not use reflection in this case.. You can sort the order of properties using Configuration#setCategoryPropertyOrder.
  15. Please describe what you want in detail, and what you get with that code.
  16. No, that was not I meant with 'clip'. You should take a remainder of the angle with 360.
  17. ... ModConfigCategory ret = field1.get(category); In this you are getting a field of ModConfigCategory from String! I think it should be field1.get(this). Also what that will give you is instance of ConfigCategory, not your own class 'ModConfigCategory'. + Why are you using reflection in this case? You can just make another class copying that, and change some behaviors you want there. Configuration class is not intended to be inherited, so in this case this way is better.
  18. You don't need the knowledge at least you are not using GUIs.
  19. @Failender: It is irrelevant with this issue. @Ms_Raven: I think you created the CreativeTabs before your item is initiated. Please post your class that registers your items.
  20. You should clip the rotationYaw to be in -180~180. Then you can compare like you did. Because it can have any value in -360~360 I remember.
  21. EDIT: Im late, a post already answered it so discarded this answer.
  22. Ah, then you just need to create a new recipe. Or you can use custom reflexible IRecipe implementation.
  23. Do you mean something like 'uncrafting'? Then you need to implement your own custom reversible table. EDIT: Nevermind, you don't need custom table. First, you should make recipe which gives the most important ingredient. Then subscribe to the PlayerEvent#ItemCraftedEvent, and give player the rest of the item there.
  24. You should have the deobfuscated version of API...
×
×
  • Create New...

Important Information

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