fixed the ritual working even if there's no tree

This commit is contained in:
Ellpeck 2019-02-02 14:35:59 +01:00
parent 57d44f68bd
commit a3575eb63a

View file

@ -149,6 +149,11 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
if (!Multiblocks.TREE_RITUAL.isComplete(this.world, this.ritualPos)) { if (!Multiblocks.TREE_RITUAL.isComplete(this.world, this.ritualPos)) {
return false; return false;
} }
for (int i = 0; i < 2; i++) {
IBlockState state = this.world.getBlockState(this.ritualPos.up(i));
if(!(state.getBlock() instanceof BlockLog))
return false;
}
if (this.timer < this.recipe.time / 2) { if (this.timer < this.recipe.time / 2) {
List<Ingredient> required = new ArrayList<>(Arrays.asList(this.recipe.ingredients)); List<Ingredient> required = new ArrayList<>(Arrays.asList(this.recipe.ingredients));
boolean fine = Multiblocks.TREE_RITUAL.forEach(this.ritualPos, 'W', (pos, matcher) -> { boolean fine = Multiblocks.TREE_RITUAL.forEach(this.ritualPos, 'W', (pos, matcher) -> {