bad
This commit is contained in:
Ellpeck 2017-02-20 13:24:57 +01:00
parent f01be2a8ad
commit 3e0f163fac

View file

@ -30,7 +30,6 @@ import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
@ -234,8 +233,7 @@ public class MethodHandler implements IMethodHandler{
@Override @Override
public boolean invokeReconstructor(IAtomicReconstructor tile){ public boolean invokeReconstructor(IAtomicReconstructor tile){
if(tile.getEnergy() >= TileEntityAtomicReconstructor.ENERGY_USE){ if(tile.getEnergy() >= TileEntityAtomicReconstructor.ENERGY_USE){
IBlockState state = tile.getWorldObject().getBlockState(tile.getPosition()); EnumFacing sideToManipulate = tile.getOrientation();
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(state.getBlock().getMetaFromState(state));
Lens currentLens = tile.getLens(); Lens currentLens = tile.getLens();
if(currentLens.canInvoke(tile, sideToManipulate, TileEntityAtomicReconstructor.ENERGY_USE)){ if(currentLens.canInvoke(tile, sideToManipulate, TileEntityAtomicReconstructor.ENERGY_USE)){
tile.extractEnergy(TileEntityAtomicReconstructor.ENERGY_USE); tile.extractEnergy(TileEntityAtomicReconstructor.ENERGY_USE);