Jump to content

Recommended Posts

Posted

Hey guys, so im working on my Machine and i added a slot for an "Energy Upgrade" . Basically what i want this to do is when its in the correct slot it will double the amount of energy the block can store. The problem im having is i cant figure out how to dynamically change it. if tried setting it to energyStored * energyMultiplier  and set energyMultiplier to 2 if the upgrade is detected but i get nothing out of that.

public int storageMultiplier = 1;

	public TilePulverizer() {
		if(pulverizerInv.get(5).getItem() == ModItems.EnergyUpgrade)
			storageMultiplier = 2;
		if(pulverizerInv.get(5).isEmpty())
			storageMultiplier = 1;
	}

	public EnergyStorage storage = new EnergyStorage(50000 * storageMultiplier);

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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