Skip to content

Commit 12c5564

Browse files
committed
Fixed cable blocks, Wireless Transmitter, Detector and Portable Grid acting as full blocks (being able to place torches on them etc), fixes #1493
1 parent 8a978e4 commit 12c5564

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Updated Portuguese (Brazilian) translation (Pinz714)
55
- Fixed crash with External Storage (raoulvdberge)
66
- Fixed stack-crafting in the crafting grid (crafting table) causing lag on a dedicated server (Lordmau5)
7+
- Fixed cable blocks, Wireless Transmitter, Detector and Portable Grid acting as full blocks (being able to place torches on them etc) (raoulvdberge)
78

89
### 1.5.20
910
- Restore MC 1.12.0 compatibility (raoulvdberge)

src/main/java/com/raoulvdberge/refinedstorage/block/BlockCable.java

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.raoulvdberge.refinedstorage.tile.TileNode;
88
import com.raoulvdberge.refinedstorage.util.RenderUtils;
99
import net.minecraft.block.properties.PropertyBool;
10+
import net.minecraft.block.state.BlockFaceShape;
1011
import net.minecraft.block.state.BlockStateContainer;
1112
import net.minecraft.block.state.IBlockState;
1213
import net.minecraft.entity.Entity;
@@ -226,6 +227,12 @@ public BlockRenderLayer getBlockLayer() {
226227
return BlockRenderLayer.CUTOUT;
227228
}
228229

230+
@Override
231+
@SuppressWarnings("deprecation")
232+
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
233+
return BlockFaceShape.UNDEFINED;
234+
}
235+
229236
@Override
230237
@Nullable
231238
public Direction getDirection() {

src/main/java/com/raoulvdberge/refinedstorage/block/BlockDetector.java

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.raoulvdberge.refinedstorage.RSGui;
44
import com.raoulvdberge.refinedstorage.tile.TileDetector;
55
import net.minecraft.block.properties.PropertyBool;
6+
import net.minecraft.block.state.BlockFaceShape;
67
import net.minecraft.block.state.BlockStateContainer;
78
import net.minecraft.block.state.IBlockState;
89
import net.minecraft.entity.player.EntityPlayer;
@@ -95,4 +96,10 @@ public BlockRenderLayer getBlockLayer() {
9596
public Direction getDirection() {
9697
return null;
9798
}
99+
100+
@Override
101+
@SuppressWarnings("deprecation")
102+
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
103+
return BlockFaceShape.UNDEFINED;
104+
}
98105
}

src/main/java/com/raoulvdberge/refinedstorage/block/BlockPortableGrid.java

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.raoulvdberge.refinedstorage.tile.grid.portable.TilePortableGrid;
77
import net.minecraft.block.properties.PropertyBool;
88
import net.minecraft.block.properties.PropertyEnum;
9+
import net.minecraft.block.state.BlockFaceShape;
910
import net.minecraft.block.state.BlockStateContainer;
1011
import net.minecraft.block.state.IBlockState;
1112
import net.minecraft.entity.EntityLivingBase;
@@ -126,4 +127,10 @@ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, En
126127

127128
return true;
128129
}
130+
131+
@Override
132+
@SuppressWarnings("deprecation")
133+
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
134+
return BlockFaceShape.UNDEFINED;
135+
}
129136
}

src/main/java/com/raoulvdberge/refinedstorage/block/BlockWirelessTransmitter.java

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.raoulvdberge.refinedstorage.RSGui;
44
import com.raoulvdberge.refinedstorage.tile.TileWirelessTransmitter;
55
import net.minecraft.block.Block;
6+
import net.minecraft.block.state.BlockFaceShape;
67
import net.minecraft.block.state.IBlockState;
78
import net.minecraft.client.resources.I18n;
89
import net.minecraft.client.util.ITooltipFlag;
@@ -98,4 +99,10 @@ public void addInformation(ItemStack stack, @Nullable World world, List<String>
9899

99100
tooltip.add(I18n.format("block.refinedstorage:wireless_transmitter.tooltip", TextFormatting.WHITE + I18n.format("block.refinedstorage:cable.name") + TextFormatting.GRAY));
100101
}
102+
103+
@Override
104+
@SuppressWarnings("deprecation")
105+
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
106+
return BlockFaceShape.UNDEFINED;
107+
}
101108
}

0 commit comments

Comments
 (0)