mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Semi-automatic minor cleanup
This commit is contained in:
1 parent
1d2c4e438d
commit
cc187d6b8b
48 files changed
+176
-198
No files matched your search
@@ -10,17 +10,17 @@
|
||||
******************************************************************************/
|
||||
package forestry.arboriculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.plugins.PluginArboriculture;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.plugins.PluginArboriculture;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Simple fruit provider which drops from any leaf block according to yield and either marks all leave blocks as fruit leaves or none.
|
||||
@@ -55,12 +55,13 @@ public class FruitProviderRandom extends FruitProviderNone {
|
||||
if (world.rand.nextFloat() <= genome.getYield() * modeYieldMod * entry.getValue())
|
||||
product.add(entry.getKey().copy());
|
||||
|
||||
return product.toArray(new ItemStack[0]);
|
||||
return product.toArray(new ItemStack[product.size()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getProducts() {
|
||||
return products.keySet().toArray(new ItemStack[0]);
|
||||
Set<ItemStack> products = this.products.keySet();
|
||||
return products.toArray(new ItemStack[products.size()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user