Skip to content

Commit

Permalink
Fix X-ray with certain mods using double shelves blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Aug 9, 2023
1 parent aaca7eb commit 51e5c9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,8 @@

- Fixed missing mushroom-derived blocks like mushroom stem pile, mushroom stump, etc.

### 1.0.0-beta.17

- Fixed X-ray with certain mods using double shelves blocks.

[EMI]: https://modrinth.com/mod/emi "EMI Modrinth page"
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx1G

# Mod properties
mod_version=1.0.0-beta.16
mod_version=1.0.0-beta.17
maven_group=dev.lambdaurora
archives_base_name=aurorasdecorations
modrinth_id=GOqAnOfW
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/dev/lambdaurora/aurorasdeco/block/ShelfBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private static QuiltBlockSettings settings(WoodType woodType) {
.nonOpaque();
}

private static Map<PartType, VoxelShape> createTypeShapes(int xMin, int zMin, int xMax, int zMax) {
private static Map<PartType, VoxelShape> createTypeShapes(double xMin, double zMin, double xMax, double zMax) {
var builder = ImmutableMap.<PartType, VoxelShape>builder();
builder.put(PartType.BOTTOM, createCuboidShape(xMin, 0, zMin, xMax, 8, zMax));
builder.put(PartType.TOP, createCuboidShape(xMin, 8, zMin, xMax, 16, zMax));
Expand All @@ -381,10 +381,10 @@ private static Map<PartType, VoxelShape> createTypeShapes(int xMin, int zMin, in
static {
var facingBuilder = ImmutableMap.<Direction, Map<PartType, VoxelShape>>builder();

facingBuilder.put(Direction.NORTH, createTypeShapes(0, 12, 16, 16));
facingBuilder.put(Direction.EAST, createTypeShapes(0, 0, 4, 16));
facingBuilder.put(Direction.SOUTH, createTypeShapes(0, 0, 16, 4));
facingBuilder.put(Direction.WEST, createTypeShapes(12, 0, 16, 16));
facingBuilder.put(Direction.NORTH, createTypeShapes(0, 12, 16, 15.99f));
facingBuilder.put(Direction.EAST, createTypeShapes(0.01f, 0, 4, 16));
facingBuilder.put(Direction.SOUTH, createTypeShapes(0, 0.01f, 16, 4));
facingBuilder.put(Direction.WEST, createTypeShapes(12, 0, 15.99f, 16));

SHAPES = new EnumMap<>(facingBuilder.build());

Expand Down

0 comments on commit 51e5c9a

Please sign in to comment.