Files
ForestryMC/src/main/java/forestry/energy/tiles/EngineDefinition.java
T
2016-01-22 19:33:35 +01:00

38 lines
1.3 KiB
Java

/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.energy.tiles;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
import forestry.core.blocks.IMachinePropertiesTESR;
import forestry.core.tiles.MachineDefinition;
import forestry.core.tiles.TileEngine;
import forestry.core.tiles.TileUtil;
public class EngineDefinition extends MachineDefinition {
public EngineDefinition(IMachinePropertiesTESR properties) {
super(properties);
}
@Override
public boolean isSolidOnSide(IBlockAccess world, BlockPos pos, EnumFacing side) {
TileEngine tile = TileUtil.getTile(world, pos, TileEngine.class);
if (tile == null) {
return false;
}
return tile.getOrientation().getOpposite() == side;
}
}