Fix rotation with wrench. Closes #1940
This commit is contained in:
parent
97728587b3
commit
65a429a4e3
1 changed files with 7 additions and 0 deletions
|
@ -36,6 +36,7 @@ import net.minecraft.state.StateManager;
|
|||
import net.minecraft.state.property.DirectionProperty;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.BlockRotation;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -138,4 +139,10 @@ public abstract class EnergyStorageBlock extends BaseBlockEntityProvider {
|
|||
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
|
||||
return PowerAcceptorBlockEntity.calculateComparatorOutputFromEnergy(world.getBlockEntity(pos));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public BlockState rotate(BlockState state, BlockRotation rotation) {
|
||||
return state.with(FACING, rotation.rotate(state.get(FACING)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue