Skip to content

Commit cdae223

Browse files
Fix CautionWetFloorSignBlock OutlineShape
Fix CautionWetFloorSignBlock Model Fix ExtravaganzaBlocks#HANGING_LIGHTS
1 parent e828a6d commit cdae223

File tree

3 files changed

+36
-25
lines changed

3 files changed

+36
-25
lines changed

src/main/java/com/mmodding/extravaganza/block/CautionWetFloorSignBlock.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44
import net.minecraft.block.Block;
55
import net.minecraft.block.BlockState;
66
import net.minecraft.block.HorizontalFacingBlock;
7+
import net.minecraft.block.ShapeContext;
78
import net.minecraft.item.ItemPlacementContext;
89
import net.minecraft.state.StateManager;
10+
import net.minecraft.util.math.BlockPos;
11+
import net.minecraft.util.shape.VoxelShape;
12+
import net.minecraft.world.BlockView;
913

1014
public class CautionWetFloorSignBlock extends HorizontalFacingBlock {
1115

1216
public static final MapCodec<CautionWetFloorSignBlock> CODEC = CautionWetFloorSignBlock.createCodec(CautionWetFloorSignBlock::new);
1317

18+
public static final VoxelShape SHAPE = Block.createCuboidShape(1.0, 0.0, 1.0, 15.0, 16.0, 15.0);
19+
1420
public CautionWetFloorSignBlock(Settings settings) {
1521
super(settings);
1622
}
@@ -20,6 +26,11 @@ protected MapCodec<? extends HorizontalFacingBlock> getCodec() {
2026
return CautionWetFloorSignBlock.CODEC;
2127
}
2228

29+
@Override
30+
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
31+
return CautionWetFloorSignBlock.SHAPE;
32+
}
33+
2334
@Override
2435
public BlockState getPlacementState(ItemPlacementContext ctx) {
2536
return this.getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing().getOpposite());

src/main/java/com/mmodding/extravaganza/init/ExtravaganzaBlocks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected List<ItemStack> getDroppedStacks(BlockState state, LootContextParamete
6767
public static final Block CAUTION_WET_FLOOR_SIGN = new CautionWetFloorSignBlock(AbstractBlock.Settings.create().strength(1.0f, 2.0f).mapColor(MapColor.YELLOW).nonOpaque().sounds(BlockSoundGroup.WOOD));
6868

6969
// Not meant to be climbable.
70-
public static final Block HANGING_LIGHTS = new LadderBlock(AbstractBlock.Settings.create().breakInstantly().nonOpaque().sounds(BlockSoundGroup.WOOD));
70+
public static final Block HANGING_LIGHTS = new LadderBlock(AbstractBlock.Settings.create().breakInstantly().luminance(ignored -> 9).nonOpaque().sounds(BlockSoundGroup.WOOD));
7171

7272
public static final Block TEAR_STAINED_GLASS = new TransparentBlock(AbstractBlock.Settings.create().strength(1.5f, 3.0f).nonOpaque().sounds(BlockSoundGroup.GLASS));
7373
public static final Block PLANT_STAINED_GLASS = new TransparentBlock(AbstractBlock.Settings.create().strength(1.5f, 3.0f).nonOpaque().sounds(BlockSoundGroup.GLASS));

src/main/resources/assets/extravaganza/models/block/caution_wet_floor_sign.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
},
88
"elements": [
99
{
10-
"from": [1, 0, 13],
11-
"to": [15, 11, 14],
12-
"rotation": {"angle": -22.5, "axis": "x", "origin": [-6, 0, 13]},
10+
"from": [1, 0, 14],
11+
"to": [15, 11, 15],
12+
"rotation": {"angle": -22.5, "axis": "x", "origin": [-6, 0, 14]},
1313
"faces": {
1414
"north": {"uv": [0, 0, 3.5, 2.75], "texture": "#all"},
1515
"east": {"uv": [5.75, 7, 6, 9.75], "texture": "#all"},
@@ -20,9 +20,9 @@
2020
}
2121
},
2222
{
23-
"from": [1, 14.6, 5.7],
24-
"to": [15, 16.6, 6.7],
25-
"rotation": {"angle": 22.5, "axis": "x", "origin": [-6, 14, 5]},
23+
"from": [1, 14.6, 6.7],
24+
"to": [15, 16.6, 7.7],
25+
"rotation": {"angle": 22.5, "axis": "x", "origin": [-6, 14, 6]},
2626
"faces": {
2727
"north": {"uv": [0, 6.25, 3.5, 6.75], "texture": "#all"},
2828
"east": {"uv": [2.75, 7.5, 3, 8], "texture": "#all"},
@@ -33,9 +33,9 @@
3333
}
3434
},
3535
{
36-
"from": [12, 10.71, 4.1],
37-
"to": [15, 14.71, 5.1],
38-
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 10, 4]},
36+
"from": [12, 10.71, 5.1],
37+
"to": [15, 14.71, 6.1],
38+
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 10, 5]},
3939
"faces": {
4040
"north": {"uv": [4.25, 7, 5, 8], "texture": "#all"},
4141
"east": {"uv": [0.5, 7.25, 0.75, 8.25], "texture": "#all"},
@@ -46,9 +46,9 @@
4646
}
4747
},
4848
{
49-
"from": [1, 10.71, 4.1],
50-
"to": [4, 14.71, 5.1],
51-
"rotation": {"angle": 22.5, "axis": "x", "origin": [-6, 10, 4]},
49+
"from": [1, 10.71, 5.1],
50+
"to": [4, 14.71, 6.1],
51+
"rotation": {"angle": 22.5, "axis": "x", "origin": [-6, 10, 5]},
5252
"faces": {
5353
"north": {"uv": [5, 7, 5.75, 8], "texture": "#all"},
5454
"east": {"uv": [1, 7.25, 1.25, 8.25], "texture": "#all"},
@@ -59,9 +59,9 @@
5959
}
6060
},
6161
{
62-
"from": [1, 0.5, 0],
63-
"to": [15, 11.5, 1],
64-
"rotation": {"angle": 22.5, "axis": "x", "origin": [-6, 0, 0]},
62+
"from": [1, 0.5, 1],
63+
"to": [15, 11.5, 2],
64+
"rotation": {"angle": 22.5, "axis": "x", "origin": [-6, 0, 1]},
6565
"faces": {
6666
"north": {"uv": [3.5, 0, 7, 2.75], "texture": "#all"},
6767
"east": {"uv": [6.25, 7, 6.5, 9.75], "texture": "#all"},
@@ -72,9 +72,9 @@
7272
}
7373
},
7474
{
75-
"from": [12, 10.2, 8.85],
76-
"to": [15, 14.2, 9.85],
77-
"rotation": {"angle": -22.5, "axis": "x", "origin": [5, 10, 9]},
75+
"from": [12, 10.2, 9.85],
76+
"to": [15, 14.2, 10.85],
77+
"rotation": {"angle": -22.5, "axis": "x", "origin": [5, 10, 10]},
7878
"faces": {
7979
"north": {"uv": [7, 1.25, 7.75, 2.25], "texture": "#all"},
8080
"east": {"uv": [6.5, 7, 6.75, 8], "texture": "#all"},
@@ -85,9 +85,9 @@
8585
}
8686
},
8787
{
88-
"from": [1, 10.2, 8.85],
89-
"to": [4, 14.2, 9.85],
90-
"rotation": {"angle": -22.5, "axis": "x", "origin": [-6, 10, 9]},
88+
"from": [1, 10.2, 9.85],
89+
"to": [4, 14.2, 10.85],
90+
"rotation": {"angle": -22.5, "axis": "x", "origin": [-6, 10, 10]},
9191
"faces": {
9292
"north": {"uv": [7, 3.25, 7.75, 4.25], "texture": "#all"},
9393
"east": {"uv": [0, 7.25, 0.25, 8.25], "texture": "#all"},
@@ -98,9 +98,9 @@
9898
}
9999
},
100100
{
101-
"from": [1, 13.72, 7.18],
102-
"to": [15, 16.72, 8.18],
103-
"rotation": {"angle": -22.5, "axis": "x", "origin": [-6, 14, 7]},
101+
"from": [1, 13.72, 8.18],
102+
"to": [15, 16.72, 9.18],
103+
"rotation": {"angle": -22.5, "axis": "x", "origin": [-6, 14, 8]},
104104
"faces": {
105105
"north": {"uv": [0, 5.5, 3.5, 6.25], "texture": "#all"},
106106
"east": {"uv": [1.5, 7.25, 1.75, 8], "texture": "#all"},

0 commit comments

Comments
 (0)