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.
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.
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.
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'.
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.
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.
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.
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.
... 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.
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.
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?
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.