Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/net/limit/cubliminal/CubliminalClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void onInitializeClient() {
CubliminalBlocks.FUSED_WALL_LIGHT_BULB,
CubliminalBlocks.SMOKE_DETECTOR,
CubliminalBlocks.VENTILATION_DUCT,
CubliminalBlocks.VENTILATION_PIPE,
CubliminalBlocks.CHAIN_WALL,
CubliminalBlocks.CHAIN_BLOCK,
CubliminalBlocks.CHAIN_SLAB,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class VentilationPipeBlock extends Block implements Waterloggable {
public static final BooleanProperty WEST;
public static final BooleanProperty UP;
public static final BooleanProperty DOWN;
public static final BooleanProperty WATERLOGGED;
protected static final Map<Direction, BooleanProperty> FACING_PROPERTIES;

public VentilationPipeBlock(Settings settings) {
Expand All @@ -50,7 +49,6 @@ public BlockState getPlacementState(ItemPlacementContext ctx) {
.with(EAST, this.connectsTo(world, blockPos, Direction.EAST))
.with(UP, this.connectsTo(world, blockPos, Direction.UP))
.with(DOWN, this.connectsTo(world, blockPos, Direction.DOWN))
.with(WATERLOGGED, fluidState.getFluid() == Fluids.WATER)
.with(FAN, random.nextDouble() < 0.1f);
}

Expand All @@ -67,10 +65,6 @@ protected boolean isShapeFullCube(BlockState state, BlockView world, BlockPos po
return false;
}

protected FluidState getFluidState(BlockState state) {
return state.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(state);
}

protected BlockState rotate(BlockState state, BlockRotation rotation) {
switch (rotation) {
case CLOCKWISE_180 -> {
Expand Down Expand Up @@ -104,16 +98,12 @@ protected BlockState mirror(BlockState state, BlockMirror mirror) {

@Override
protected BlockState getStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) {
if (state.get(WATERLOGGED)) {
tickView.scheduleFluidTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
}

return state.with(FACING_PROPERTIES.get(direction), this.connectsTo(neighborState));
}

@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(NORTH, EAST, WEST, SOUTH, UP, DOWN, WATERLOGGED, FAN);
builder.add(NORTH, EAST, WEST, SOUTH, UP, DOWN, FAN);
}

static {
Expand All @@ -123,7 +113,6 @@ protected void appendProperties(StateManager.Builder<Block, BlockState> builder)
WEST = ConnectingBlock.WEST;
UP = ConnectingBlock.UP;
DOWN = ConnectingBlock.DOWN;
WATERLOGGED = Properties.WATERLOGGED;
FACING_PROPERTIES = ConnectingBlock.FACING_PROPERTIES;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
Expand All @@ -21,81 +19,66 @@
},
"facing=east,half=top,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
Expand All @@ -104,104 +87,86 @@
},
"facing=south,half=bottom,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "cubliminal:block/damp_carpet_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "cubliminal:block/damp_carpet_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "cubliminal:block/damp_carpet_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
Expand Down
Loading
Loading