Jump to content

Recommended Posts

Posted

So after updating my mod to 1.8.9, everything was going fine untill i realised my fuel source wasnt adding powerr to my machines.

Specifically this line of code.

if(canRecievePower())
        {
        	if (Itemstack[1] != null)
            {
                Item item = Itemstack[1].getItem();
                if(item == Item_List.Electrified_Fuel)
                {
                	--Itemstack[1].stackSize;
    	                 if (Itemstack[1].stackSize <= 0)
    	                     Itemstack[1] = null;
    	                 power+=100;
                		
                }
            }
        }

 

public boolean canRecievePower()
    {
    	if(power < maxpower)
    		return true;
    	else
    		return false;
    }

Posted

Well, this code says nothing. Did you implement ITickable for your TileEntity?

1.7.10 is no longer supported by forge, you are on your own.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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