Fixes #190
This commit is contained in:
parent
2d3c6a8dec
commit
a74154688c
2 changed files with 19 additions and 2 deletions
|
@ -97,8 +97,8 @@ dependencies {
|
|||
if (!f.exists()) {
|
||||
f.mkdir()
|
||||
}
|
||||
compile 'net.industrial-craft:industrialcraft-2:2.2.780-experimental:dev'
|
||||
shade 'net.industrial-craft:industrialcraft-2:2.2.780-experimental:api'
|
||||
compile 'net.industrial-craft:industrialcraft-2:2.2.782-experimental:dev'
|
||||
shade 'net.industrial-craft:industrialcraft-2:2.2.782-experimental:api'
|
||||
compile "codechicken:CodeChickenLib:1.7.10-1.1.3.136:dev"
|
||||
compile "codechicken:CodeChickenCore:1.7.10-1.0.6.+:dev"
|
||||
compile "codechicken:NotEnoughItems:1.7.10-1.0.4.+:dev"
|
||||
|
|
|
@ -16,8 +16,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.Functions;
|
||||
import techreborn.tiles.TileMachineBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -177,4 +179,19 @@ public class BlockMachineBase extends BlockContainer {
|
|||
public boolean isAdvanced(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis) {
|
||||
if(axis == ForgeDirection.UNKNOWN){
|
||||
return false;
|
||||
} else {
|
||||
TileEntity tile = worldObj.getTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof TileMachineBase){
|
||||
TileMachineBase machineBase = (TileMachineBase) tile;
|
||||
machineBase.setRotation(ForgeDirection.getOrientation(machineBase.getRotation()).getRotation(axis).ordinal());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue