Jump to content

Recommended Posts

Posted

Hello,

 

I have a problem. When i put a item in my gui and i do stackSize-- a ghost item remains in the gui. I solved that problem with packets, but i think there is a easier way to do this. This is how i do it:

 

http://gw.minecraftforge.net/M2nX

 

My second problem is that the power and the progress that's displayed on the gui wouldn't saved in the nbt data:

 

http://gw.minecraftforge.net/XsgM

 

ss7

You sir are a god damn hero.

Posted

Hello,

 

Because when i put in a item in the generator, it burns down and creates power. But when i put a item in, it doesn't decrease the stack size, so the item burns forever. And when i take the item out and right-click with it, it's gone! And i thought this has something to do with desync.

 

ss7

You sir are a god damn hero.

Posted

Hello,

 

The isRemote does nothing  :'(. And i don't know what methods in ContainerFurnace are for the progress bar. There are so many!

 

ss7

You sir are a god damn hero.

Posted

Hello,

 

if (worldObj.isRemote)
		{
			if (inventory[0] != null && progress == 0)
			{
				if (inventory[0].stackSize > 1)
				{
					inventory[0].stackSize--;
				}

				if (inventory[0].stackSize == 0)
				{
					inventory[0] = null;
				}

				progress = 13;

				power++;
			}
		}

 

ss7

You sir are a god damn hero.

Posted

Hello,

 

Oh, sorry for that, my mistake.

 

My updateProgressBar, etc... code:

 

http://gw.minecraftforge.net/U7Fz

 

So can i remove my progress bar code in the updateEntity() method now?

 

EDIT: When i check for isRemote == false, it does nothing. I doesn't even burn.

 

ss7

You sir are a god damn hero.

Posted

Hello,

 

With burn, i mean that the item is consumed and the generator starts to generate power.

 

With progress bar code i mean this in updateEntity():

 

if (progressticks == 10)
	{
		progressticks = 0;

		if (progress != 0)
		{
			progress--;

			power++;
		}
	}

 

ss7

You sir are a god damn hero.

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.