Skip to content

Commit

Permalink
fixes seedhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
way2muchnoise committed Mar 26, 2016
1 parent b7d8ee1 commit 88e5906
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/jeresources/util/SeedHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ public class SeedHelper
public static List<PlantDrop> getSeeds()
{
List<PlantDrop> result = new ArrayList<PlantDrop>();
Class seedEntry;
seedEntry = ReflectionHelper.findClass("net.minecraftforge.common.ForgeHooks$SeedEntry");
Class seedEntry = ReflectionHelper.findClass("net.minecraftforge.common.ForgeHooks$SeedEntry");
if (seedEntry == null) return result;
List seedList = ReflectionHelper.getPrivateValue(ForgeHooks.class, null, "seedList");
for (Object o : seedList)
{
if (o == null || o.getClass() != seedEntry) continue;
if (o == null) continue;
ItemStack seed = (ItemStack) ReflectionHelper.getPrivateValue(seedEntry, o, "seed");
if (seed == null || seed.getItem() == null) continue;
int weight = ReflectionHelper.getPrivateValue(WeightedRandom.Item.class, (WeightedRandom.Item) o, "field_76292_a", "itemWeight");
Expand Down

0 comments on commit 88e5906

Please sign in to comment.