How to make fuel
4 posters
Page 1 of 1
How to make fuel
Well you make a fuel compatible with modloader first make the item/block (not tried it on block, so not sure) and then in the mod_* put this code in.
bassically public in AddFuel tells that it's making a fuel, simple. the int i stands for what the thing is and int j is how long it burns for. and the return 0 is so the item deletes after its done, if you delete that it will be infinite.
Hope this help.
- Code:
public int AddFuel(int i, int j)
{
if(i == <Block/Item here>)
{
return <How long, coal is 1600>;
}
return 0;
}
bassically public in AddFuel tells that it's making a fuel, simple. the int i stands for what the thing is and int j is how long it burns for. and the return 0 is so the item deletes after its done, if you delete that it will be infinite.
Hope this help.
viktorjanpaulis- Member
- Posts : 2
Join date : 2011-10-26
Re: How to make fuel
Just to help people a little: this means that an item that smelts for 200 can smelt one item before the flame goes out. Nice Tut BTW
mastereric- Member
- Posts : 30
Join date : 2011-10-26
Re: How to make fuel
Thanksalot
Also is it possible to change the ammount of coal required for an item to smelt, instead of lets say 1/8 coal for 1 iron, 1/2 coal for 1 iron?
Also is it possible to change the ammount of coal required for an item to smelt, instead of lets say 1/8 coal for 1 iron, 1/2 coal for 1 iron?
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 29
Location : The netherlands
How to make fuel
ikke009 wrote:Thanksalot
Also is it possible to change the ammount of coal required for an item to smelt, instead of lets say 1/8 coal for 1 iron, 1/2 coal for 1 iron?
i think so... you just need to get your numbers right.
go into GOOGLE and type in 'minecraf furnace' then is says something like crafting furnace wiki click on that and scroll down to basic recipes and you'll see there..
I can't leave link cause i registered less than 7 days ago.
viktorjanpaulis- Member
- Posts : 2
Join date : 2011-10-26
Re: How to make fuel
- Code:
public int AddFuel(int i, int j)
{
if(i == mod_jasper.browncoalbit.shiftedIndex)
{
return 2400;
}
return 0;
}
Why does this not work? i put it in my mod_jasper outside of any {} thingys
nvm it works fine
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 29
Location : The netherlands
Re: How to make fuel
I can't get this to work: I removed
- Code:
return 0;
- Code:
public int AddFuel(int i, int j)
BobTehCodar- Member
- Posts : 3
Join date : 2011-10-28
Re: How to make fuel
try deleting int j so it will be
public int AddFuel(int i)
not sure if that would work but worth a try no?
public int AddFuel(int i)
not sure if that would work but worth a try no?
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 29
Location : The netherlands
Re: How to make fuel
I still get an error D:ikke009 wrote:try deleting int j so it will be
public int AddFuel(int i)
not sure if that would work but worth a try no?
BobTehCodar- Member
- Posts : 3
Join date : 2011-10-28
Re: How to make fuel
im just going to make another guess since nobody else is responding..
try making the code like this
try making the code like this
- Code:
public int AddFuel(int i, int j)
{
if(i == <Block/Item here>)
{
return -1;
}
return 0;
}
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 29
Location : The netherlands
Similar topics
» [1.8.1 Mod Creation] How to make Multi-Textured blocks!
» How do i make a bow? [UNANSWERED]
» How to make a new block that has a gui simply
» [SSP Modding For 1.0.0] How To Make An Item For 1.0.0
» [Unanswered] How to make a block like a clock
» How do i make a bow? [UNANSWERED]
» How to make a new block that has a gui simply
» [SSP Modding For 1.0.0] How To Make An Item For 1.0.0
» [Unanswered] How to make a block like a clock
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|