mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-26 21:09:23 +01:00
Fixed mushrooms creating nether wart infinitely with the Reconstructor
This commit is contained in:
parent
81f743f03d
commit
e203b14f8d
1 changed files with 13 additions and 8 deletions
|
@ -145,18 +145,23 @@ public class MethodHandler implements IMethodHandler{
|
|||
List<ItemStack> outputs = RecipeUtil.getConversionLensOutputs(recipe);
|
||||
if(outputs != null && !outputs.isEmpty()){
|
||||
ItemStack output = outputs.get(0);
|
||||
if(output.getItem() instanceof ItemBlock){
|
||||
if(output != null){
|
||||
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
|
||||
tile.getWorldObject().playEvent(2001, pos, Block.getStateId(tile.getWorldObject().getBlockState(pos)));
|
||||
}
|
||||
tile.getWorldObject().setBlockState(pos, Block.getBlockFromItem(output.getItem()).getStateFromMeta(output.getItemDamage()), 2);
|
||||
|
||||
if(output.getItem() instanceof ItemBlock){
|
||||
tile.getWorldObject().setBlockState(pos, Block.getBlockFromItem(output.getItem()).getStateFromMeta(output.getItemDamage()), 2);
|
||||
}
|
||||
else{
|
||||
EntityItem item = new EntityItem(tile.getWorldObject(), pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, output.copy());
|
||||
tile.getWorldObject().spawnEntityInWorld(item);
|
||||
tile.getWorldObject().setBlockToAir(pos);
|
||||
}
|
||||
|
||||
tile.extractEnergy(recipe.energyUse);
|
||||
break;
|
||||
}
|
||||
else{
|
||||
EntityItem item = new EntityItem(tile.getWorldObject(), pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, output.copy());
|
||||
tile.getWorldObject().spawnEntityInWorld(item);
|
||||
}
|
||||
tile.extractEnergy(recipe.energyUse);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue