mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +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,16 +145,20 @@ 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)));
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -163,6 +167,7 @@ public class MethodHandler implements IMethodHandler{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Converting the Items
|
||||
ArrayList<EntityItem> items = (ArrayList<EntityItem>)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(hitBlock.getX()-range, hitBlock.getY()-range, hitBlock.getZ()-range, hitBlock.getX()+range, hitBlock.getY()+range, hitBlock.getZ()+range));
|
||||
|
|
Loading…
Reference in a new issue