[MFR] Can't get FruitPicker.AddFruit() to work

Need help with your script? Want to know how to do something? Want to post an example? Post it here!

[MFR] Can't get FruitPicker.AddFruit() to work

Postby Sinhika » Tue Mar 08, 2016 8:59 pm

Note: cross-posted to Minecraftforum as well.

Okay, I have been trying to get a script that adds MFR Fruit Picker support for Growthcraft Apple Trees--but it's undocumented. I've been having to dig through the Minetweaker MFR source on GitHub to figure it out. I almost had it, but I cannot figure out how to turn a standard IItemStack into the IBlock it's looking for.

: [Select all] [/] [] ()
import minetweaker.item.IItemStack;
import minetweaker.block.IBlock;

import mods.mfr.Planter;
import mods.mfr.Fertilizer;
import mods.mfr.FruitPicker;

var ripeAppleItem = <growthcraft|apples:grc.appleblock:2> as IItemStack;
#var ripeApple = ripeAppleItem as Block;
var greenAppleItem = <growthcraft|apples:grc.appleblock:0> as IItemStack;
#var greenApple = greenAppleItem as Block;

# MFR COMPATIBILITY
# apple trees
Planter.addPlantable(<growthcraft|apples:grc.applesapling>);

Fertilizer.addFertilizable( <growthcraft|apples:grc.applesapling>, "normal");
Fertilizer.addFertilizable( <growthcraft|apples:grc.appleblock> , "normal");

#FruitPicker.addFruit(ripeAppleItem, greenAppleItem, <minecraft:apple>.weight(100));
GeSHi © Codebox Plus


The stuff that's commented out, doesn't work. It either causes the script to abort with an exception (that's the "ripeApple ... as Block" lines; can't find IItemStackAny, why it's looking for that I don't know), or it complains that it can't find a matching method (that's if I use the plain old items). So, how do I feed FruitPicker.addFruit() a block-type variable? Second question, the greenApple var really should be "<minecraft:air>", except that Minetweaker 3 apparently doesn't know about air.
Sinhika
 
Posts: 1
Joined: Tue Mar 08, 2016 7:24 pm

Re: [MFR] Can't get FruitPicker.AddFruit() to work

Postby zikyqekiqaf » Wed Jan 15, 2020 8:26 am

thank you
Mine tweaker is a software that helps you to customize tools or extension or remove or add scripts. Developers who program this also fix the problem and oxbridge proofreading reviews for the viewers or visitors because they must visit again.
zikyqekiqaf
 
Posts: 1
Joined: Wed Jan 15, 2020 8:25 am


Return to Scripting Help

Who is online

Users browsing this forum: Bing [Bot] and 16 guests

cron