Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Abastro

  1. What... 1. Why do you substitute the TileEntityA parameter? Learn Basic Java. Please... 2. You said 'What should I do here to modify the value??', but you don't say anything about what 'modify' do you want. What are you actually wanting to do? PLEASE CLARIFY YOUR DEMAND, with more detail.
  2. What do you actually want? It seems that it is really bad idea..
  3. Why don't you use Reflection?
  4. The first parameter is the metadata value.
  5. Ah so do you want to get the NBT of block B. then you should get the TileEntity for the block B, (using World#getTileEntity(x,y,z)) and make the getter method for TileEntityB's NBT. Then in the onBlockActivated, pass the NBT value as parameter. You should make a field in TileEntity for saving NBT.
  6. What do you mean by "Block B get the value of block A"...?
  7. Please post the Screenshot of the GUI. Is it ever opened?
  8. But , when Block B get the value , how can I edit the value ?? What? Didn't you say that you want to modify "BlockA"'s NBT value?
  9. Then what is problem? Just use your previous code in onBlockActivated. If you want to change NBT of all nearby blockAs of blockB, then you need to check all nearby blocks if it is BlockA.
  10. mcp/lib? You don't need that. (Also why mcp...) To make an addon for existing mod, put the dev version jar in the 'libs' folder in the project location, and run 'gradle setupDecompWorkspace eclipse'.
  11. So is this what you want? : when right click blockB, change the NBT Tag of blockA in specific way? or using some information of blockB? How do you modify the NBT Tag of blockA? You have to clarify your demand.
  12. So.. What do you want? Getting the NBT Tag form block C and write the NBT Tag of Block C into Block A? or just modifying NBT of Block B?
  13. There is no inbuilt support for multiblock in forge. So you should code the multiblock structure yourself, using some metadata and onNeighborBlockChange, and so on. The code for vanilla door would be a good example.
  14. That really make sense. Then it is working normally on Server side, but not working on Client side. So.. make sure that GuiWorkbench class does not import ContainerWorkbench of vanilla minecraft.
  15. You have to set up your own Gui Handler..
  16. What is Block C, and what do you mean by "cover the NBT Tag of Block A"?
  17. That seems strange. Does the GUI really open? and retry putting breakpoint in the method "onCraftMatrixChanged". It would be called at least once.
  18. I said: You have to check if the tileentity is your tile entity. try instanceof TileEntityA
  19. The fact that onCraftMatrixChanged method is never called implies that the ContainerWorkbench is not being used. It is strange.. anyway please show your Gui Handler class.
  20. ... I said: & World class implements the IBlockAccess, so you can use the parameter "world" of the method "onBlockActivated". You have to check first before casting, that if it is null or it is not instance of TileEntityA.
  21. I think this solution would be fine. 1. When BlockB is right-clicked, first find nearby BlockA. 2. Get the TileEntity of BlockA. (using IBlockAccess#getTileEntity), and cast it to TileEntityA. (You might have to check before casting) 3. Call the NBT-changing method of TileEntityA. 4. In the NBT-changing method, changes the NBT.
  22. Load all categories and send all of them as string? That doesn't make sense.. and Configuration#containsKey(String) or Configuration#get(String) doesn't seem to exist in forge 1.7.10. Plus there was no method for getting Config String from Configuration class. (As it just uses the File class..) I'd just use my current way with Json. I think I got every help that I needed. There was no easier way with Json. So I want to lock this thread.. how I can lock this thread? Or I cannot?
  23. Are you really doing it for your custom crafting table? then please post your full code of the tileentity (or block) and the class which onCraftMatrixChanged method is placed.
  24. Of course it has no effect.. @Override is just a check. And if it doesnt give any errors, then it is fine. + does "working" not get printed?
  25. Every directory name should be lowercase, since java does care the case, while windows does not.
×
×
  • Create New...

Important Information

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