Make a block stock data

Started by scorpion981 on

Topic category: Advanced modding

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a block stock data

Im making a mod that add village and in every village there is a central block. I want the central block to hold data like reputation and other number values. I cant use global data because all villages while have the same values and local value is stocked in the procedure and not in the block i think. If someone have an other idea to solve the problem instead of using a block to stock data say it to me.

 

Sorry if its too complicated and sorry for my bad english

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I create a int value in the…
Fri, 12/20/2019 - 16:38

I create a int value in the block be adding this:

			public static void main(String args[]) {
        int rep = 34;
	}

Now i need to know how to add number to this value for the exterior, like when kill villager, find nearest central block, remove 5 to rep.