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) public void add(int weight, IGenerator entry)
{ {
entry.setStage(GeneratorStage.PARENT);
this.weightedEntries.add(new GeneratorWeightedEntry(weight, entry)); this.weightedEntries.add(new GeneratorWeightedEntry(weight, entry));
} }

View File

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