Fixed cable blocks, Wireless Transmitter, Detector and Portable Grid acting as full blocks (being able to place torches on them etc), fixes #1493

This commit is contained in:
raoulvdberge
2017-10-19 22:48:40 +02:00
parent 8a978e4c40
commit 12c55641ee
5 changed files with 29 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import com.raoulvdberge.refinedstorage.tile.TileCable;
import com.raoulvdberge.refinedstorage.tile.TileNode;
import com.raoulvdberge.refinedstorage.util.RenderUtils;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
@@ -226,6 +227,12 @@ public class BlockCable extends BlockNode {
return BlockRenderLayer.CUTOUT;
}
@Override
@SuppressWarnings("deprecation")
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
return BlockFaceShape.UNDEFINED;
}
@Override
@Nullable
public Direction getDirection() {

View File

@@ -3,6 +3,7 @@ package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.tile.TileDetector;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
@@ -95,4 +96,10 @@ public class BlockDetector extends BlockNode {
public Direction getDirection() {
return null;
}
@Override
@SuppressWarnings("deprecation")
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
return BlockFaceShape.UNDEFINED;
}
}

View File

@@ -6,6 +6,7 @@ import com.raoulvdberge.refinedstorage.item.ItemBlockPortableGrid;
import com.raoulvdberge.refinedstorage.tile.grid.portable.TilePortableGrid;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
@@ -126,4 +127,10 @@ public class BlockPortableGrid extends BlockBase {
return true;
}
@Override
@SuppressWarnings("deprecation")
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
return BlockFaceShape.UNDEFINED;
}
}

View File

@@ -3,6 +3,7 @@ package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.tile.TileWirelessTransmitter;
import net.minecraft.block.Block;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
@@ -98,4 +99,10 @@ public class BlockWirelessTransmitter extends BlockNode {
tooltip.add(I18n.format("block.refinedstorage:wireless_transmitter.tooltip", TextFormatting.WHITE + I18n.format("block.refinedstorage:cable.name") + TextFormatting.GRAY));
}
@Override
@SuppressWarnings("deprecation")
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
return BlockFaceShape.UNDEFINED;
}
}