Fixed pick block on leaves, fixed an error reading config files on second run (stages weren't being added to wrapped generators)

This commit is contained in:
Adubbz 2015-04-10 21:27:21 +10:00
parent 567ce24721
commit 9c9037e6d3
2 changed files with 5 additions and 3 deletions

View file

@ -29,6 +29,7 @@ public class GeneratorWeighted extends GeneratorCustomizable
public void add(int weight, IGenerator entry)
{
entry.setStage(GeneratorStage.PARENT);
this.weightedEntries.add(new GeneratorWeightedEntry(weight, entry));
}

View file

@ -126,7 +126,6 @@ public abstract class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
return i;
}
@Override
protected int getSaplingDropChance(IBlockState state)
{
@ -148,8 +147,10 @@ public abstract class BlockBOPLeaves extends BlockLeaves implements IBOPBlock
@Override
public int damageDropped(IBlockState state)
{
AllTrees tree = ((AllTrees) state.getValue(getMyVariantProperty()));
return tree.ordinal() % 8;
//Ignore all other properties, only the variant is important to ensure different variants use different stacks
PropertyEnum property = getMyVariantProperty();
AllTrees tree = ((AllTrees) state.getValue(property));
return this.getMetaFromState(this.getDefaultState().withProperty(property, tree));
}
// TODO: different fruits for different trees?