Update for 1.11. Missing assets, unstable.

This commit is contained in:
mezz committed 2016-12-22 16:47:56 -08:00
1 parent 30d7365518
commit 9611ae08ae
1145 files changed
+15561 -18107

No files matched your search

@@ -10,16 +10,15 @@
******************************************************************************/
package forestry.arboriculture;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
@@ -43,7 +42,7 @@ public class FruitProviderPod extends FruitProviderNone {
}
private final EnumPodType type;
@Nonnull
private final Map<ItemStack, Float> drops;
public FruitProviderPod(String unlocalizedDescription, IFruitFamily family, EnumPodType type, ItemStack... dropOnMature) {
@@ -60,22 +59,21 @@ public class FruitProviderPod extends FruitProviderNone {
return true;
}
@Nonnull
@Override
public List<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime) {
public NonNullList<ItemStack> getFruits(@Nullable ITreeGenome genome, World world, BlockPos pos, int ripeningTime) {
if (drops.isEmpty()) {
return Collections.emptyList();
return NonNullList.create();
}
if (ripeningTime >= 2) {
List<ItemStack> drops = new ArrayList<>();
NonNullList<ItemStack> drops = NonNullList.create();
for (ItemStack aDrop : this.drops.keySet()) {
drops.add(aDrop.copy());
}
return drops;
}
return Collections.emptyList();
return NonNullList.create();
}
@Override
@@ -89,7 +87,7 @@ public class FruitProviderPod extends FruitProviderNone {
return BlockUtil.tryPlantCocoaPod(world, pos);
} else {
IAlleleFruit activeAllele = (IAlleleFruit) genome.getActiveAllele(EnumTreeChromosome.FRUITS);
return TreeManager.treeRoot.setFruitBlock(world, activeAllele, genome.getSappiness(), pos);
return TreeManager.treeRoot.setFruitBlock(world, genome, activeAllele, genome.getSappiness(), pos);
}
}
@@ -102,8 +100,7 @@ public class FruitProviderPod extends FruitProviderNone {
public ResourceLocation getDecorativeSprite() {
return null;
}
@Nonnull
@Override
public Map<ItemStack, Float> getProducts() {
return Collections.unmodifiableMap(drops);
@@ -112,11 +109,9 @@ public class FruitProviderPod extends FruitProviderNone {
@Override
public void registerSprites() {
}
@Nonnull
@Override
public String getModelName() {
return type.getModelName();
}
}