mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Fix beds on contraptions
- Add beds tag to brittle tag - Let contraptions know bed halves are attached to each other
This commit is contained in:
parent
bc6a6a3c9b
commit
480d86c5ad
2 changed files with 10 additions and 0 deletions
|
@ -209,6 +209,7 @@ public class AllTags {
|
|||
AllBlockTags.WINDMILL_SAILS.includeAll(BlockTags.WOOL);
|
||||
|
||||
AllBlockTags.BRITTLE.includeAll(BlockTags.DOORS);
|
||||
AllBlockTags.BRITTLE.includeAll(BlockTags.BEDS);
|
||||
AllBlockTags.BRITTLE.add(Blocks.FLOWER_POT, Blocks.BELL, Blocks.COCOA);
|
||||
|
||||
AllBlockTags.FAN_TRANSPARENT.includeAll(BlockTags.FENCES);
|
||||
|
|
|
@ -29,6 +29,7 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock;
|
|||
import net.minecraft.block.AbstractPressurePlateBlock;
|
||||
import net.minecraft.block.AbstractRailBlock;
|
||||
import net.minecraft.block.AbstractSignBlock;
|
||||
import net.minecraft.block.BedBlock;
|
||||
import net.minecraft.block.BellBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -49,6 +50,7 @@ import net.minecraft.block.WallSignBlock;
|
|||
import net.minecraft.block.WallTorchBlock;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.state.properties.AttachFace;
|
||||
import net.minecraft.state.properties.BedPart;
|
||||
import net.minecraft.state.properties.BellAttachment;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -163,6 +165,13 @@ public class BlockMovementTraits {
|
|||
return direction == Direction.DOWN;
|
||||
if (block instanceof DoorBlock)
|
||||
return direction == Direction.DOWN;
|
||||
if (block instanceof BedBlock) {
|
||||
Direction facing = state.get(BedBlock.HORIZONTAL_FACING);
|
||||
if (state.get(BedBlock.PART) == BedPart.HEAD) {
|
||||
facing = facing.getOpposite();
|
||||
}
|
||||
return direction == facing;
|
||||
}
|
||||
if (block instanceof RedstoneLinkBlock)
|
||||
return direction.getOpposite() == state.get(RedstoneLinkBlock.FACING);
|
||||
if (block instanceof FlowerPotBlock)
|
||||
|
|
Loading…
Reference in a new issue