mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed being able to place doors and torches on inverted cloud slabs and stairs
This commit is contained in:
parent
86c336dcee
commit
a9485a82b3
3 changed files with 27 additions and 1 deletions
|
@ -96,7 +96,7 @@ public class BlockCloud extends Block implements ICloudBlock, ITillable {
|
|||
@Deprecated
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||
if (side == EnumFacing.UP && world.getBlockState(pos.up()).getBlock() instanceof ICloudBlock) {
|
||||
if (side == EnumFacing.UP && (variant == CloudType.ENCHANTED || world.getBlockState(pos.up()).getBlock() instanceof ICloudBlock)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Random;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
import com.minelittlepony.unicopia.CloudType;
|
||||
import com.minelittlepony.unicopia.forgebullshit.FUF;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
|
@ -94,6 +95,18 @@ public abstract class BlockCloudSlab<T extends Block & ICloudBlock> extends Bloc
|
|||
return modelBlock.getRenderLayer();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTopSolid(IBlockState state) {
|
||||
return getCloudMaterialType(state) == CloudType.ENCHANTED && super.isTopSolid(state);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@FUF(reason = "...Really?")
|
||||
public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||
return getCloudMaterialType(base_state) == CloudType.ENCHANTED && super.isSideSolid(base_state, world, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess worldIn, BlockPos pos) {
|
||||
return super.isPassable(worldIn, pos);
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
import com.minelittlepony.unicopia.CloudType;
|
||||
import com.minelittlepony.unicopia.forgebullshit.FUF;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
|
@ -116,6 +117,18 @@ public class BlockCloudStairs extends BlockStairs implements ICloudBlock {
|
|||
return super.collisionRayTrace(blockState, worldIn, pos, start, end);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTopSolid(IBlockState state) {
|
||||
return getCloudMaterialType(state) == CloudType.ENCHANTED && super.isTopSolid(state);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@FUF(reason = "...Really?")
|
||||
public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||
return getCloudMaterialType(base_state) == CloudType.ENCHANTED && super.isSideSolid(base_state, world, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face) {
|
||||
state = state.getActualState(world, pos);
|
||||
|
|
Loading…
Reference in a new issue