Skip to content

Instantly share code, notes, and snippets.

@marchermans
Created November 22, 2019 15:33
Show Gist options
  • Save marchermans/4378efb9382faedb1db18148f1972ea0 to your computer and use it in GitHub Desktop.
Save marchermans/4378efb9382faedb1db18148f1972ea0 to your computer and use it in GitHub Desktop.
Java
Stream.of(
VoxelShapes.combineAndSimplify(Block.makeCuboidShape(-12.5, 16, 3.5, -3.5, 17, 12.5), Stream.of(
Block.makeCuboidShape(-13.25, 16.75, 3.5, -12.5, 17.75, 12.5),
Block.makeCuboidShape(-3.5, 16.75, 3.5, -2.75, 17.75, 12.5),
Block.makeCuboidShape(-12.5, 16.75, 2.75, -3.5, 17.75, 3.5),
Block.makeCuboidShape(-12.5, 16.75, 12.5, -3.5, 17.75, 13.25)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});, IBooleanFunction.OR),
Stream.of(
Stream.of(
Stream.of(
Block.makeCuboidShape(20, 20.5, 19.5, 23, 21, 20.5),
Block.makeCuboidShape(20, 20.5, 15.5, 23, 21, 16.5),
Block.makeCuboidShape(23, 20.5, 16.5, 24, 21, 19.5),
Block.makeCuboidShape(19, 20.5, 16.5, 20, 21, 19.5),
Block.makeCuboidShape(20, 21, 16.5, 23, 22.5, 19.5),
Block.makeCuboidShape(19.875, 21.25, 16.375, 23.125, 21.75, 19.625)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(20, 17, 20.5, 23, 20.5, 21),
Block.makeCuboidShape(20, 17, 15, 23, 20.5, 15.5),
Block.makeCuboidShape(18.5, 17, 16.5, 19, 20.5, 19.5),
Block.makeCuboidShape(24, 17, 16.5, 24.5, 20.5, 19.5),
Block.makeCuboidShape(19, 17, 19.5, 20, 20.5, 20.5),
Block.makeCuboidShape(23, 17, 19.5, 24, 20.5, 20.5),
Block.makeCuboidShape(23, 17, 15.5, 24, 20.5, 16.5),
Block.makeCuboidShape(19, 17, 15.5, 20, 20.5, 16.5)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(20, 16, 16.5, 23, 16.5, 19.5),
Block.makeCuboidShape(20, 16.5, 19.5, 23, 17, 20.5),
Block.makeCuboidShape(20, 16.5, 15.5, 23, 17, 16.5),
Block.makeCuboidShape(19, 16.5, 16.5, 20, 17, 19.5),
Block.makeCuboidShape(23, 16.5, 16.5, 24, 17, 19.5)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Stream.of(
Block.makeCuboidShape(21.5, 18.25, 5.25, 22, 18.5, 6.75),
Block.makeCuboidShape(19.5, 18.25, 5.25, 20, 18.5, 6.75),
Block.makeCuboidShape(20, 18.25, 4.75, 21.5, 18.5, 5.25),
Block.makeCuboidShape(20, 18.25, 6.75, 21.5, 18.5, 7.25),
Block.makeCuboidShape(20, 18.5, 5.25, 21.5, 19.25, 6.75),
Block.makeCuboidShape(19.9375, 18.625, 5.1875, 21.5625, 18.875, 6.8125)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(22, 16.5, 5.25, 22.25, 18.25, 6.75),
Block.makeCuboidShape(19.25, 16.5, 5.25, 19.5, 18.25, 6.75),
Block.makeCuboidShape(20, 16.5, 7.25, 21.5, 18.25, 7.5),
Block.makeCuboidShape(20, 16.5, 4.5, 21.5, 18.25, 4.75),
Block.makeCuboidShape(21.5, 16.5, 6.75, 22, 18.25, 7.25),
Block.makeCuboidShape(21.5, 16.5, 4.75, 22, 18.25, 5.25),
Block.makeCuboidShape(19.5, 16.5, 4.75, 20, 18.25, 5.25),
Block.makeCuboidShape(19.5, 16.5, 6.75, 20, 18.25, 7.25)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(20, 16, 5.25, 21.5, 16.25, 6.75),
Block.makeCuboidShape(21.5, 16.25, 5.25, 22, 16.5, 6.75),
Block.makeCuboidShape(19.5, 16.25, 5.25, 20, 16.5, 6.75),
Block.makeCuboidShape(20, 16.25, 6.75, 21.5, 16.5, 7.25),
Block.makeCuboidShape(20, 16.25, 4.75, 21.5, 16.5, 5.25)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Stream.of(
Block.makeCuboidShape(26, 18.25, 9.75, 27.5, 18.5, 10.25),
Block.makeCuboidShape(26, 18.25, 7.75, 27.5, 18.5, 8.25),
Block.makeCuboidShape(27.5, 18.25, 8.25, 28, 18.5, 9.75),
Block.makeCuboidShape(25.5, 18.25, 8.25, 26, 18.5, 9.75),
Block.makeCuboidShape(26, 18.5, 8.25, 27.5, 19.25, 9.75),
Block.makeCuboidShape(25.9375, 18.625, 8.1875, 27.5625, 18.875, 9.8125)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(26, 16.5, 10.25, 27.5, 18.25, 10.5),
Block.makeCuboidShape(26, 16.5, 7.5, 27.5, 18.25, 7.75),
Block.makeCuboidShape(25.25, 16.5, 8.25, 25.5, 18.25, 9.75),
Block.makeCuboidShape(28, 16.5, 8.25, 28.25, 18.25, 9.75),
Block.makeCuboidShape(25.5, 16.5, 9.75, 26, 18.25, 10.25),
Block.makeCuboidShape(27.5, 16.5, 9.75, 28, 18.25, 10.25),
Block.makeCuboidShape(27.5, 16.5, 7.75, 28, 18.25, 8.25),
Block.makeCuboidShape(25.5, 16.5, 7.75, 26, 18.25, 8.25)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(26, 16, 8.25, 27.5, 16.25, 9.75),
Block.makeCuboidShape(26, 16.25, 9.75, 27.5, 16.5, 10.25),
Block.makeCuboidShape(26, 16.25, 7.75, 27.5, 16.5, 8.25),
Block.makeCuboidShape(25.5, 16.25, 8.25, 26, 16.5, 9.75),
Block.makeCuboidShape(27.5, 16.25, 8.25, 28, 16.5, 9.75)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Stream.of(
Block.makeCuboidShape(0, 0, 0, 16, 1, 16),
Block.makeCuboidShape(16, 0, -16, 32, 1, 0),
Block.makeCuboidShape(-16, 0, -16, 0, 1, 0),
Block.makeCuboidShape(16, 0, 0, 32, 1, 16),
Block.makeCuboidShape(-16, 0, 0, 0, 1, 16),
Stream.of(
Block.makeCuboidShape(22, 1, -10, 26, 14, -6),
Block.makeCuboidShape(22, 1, 6, 26, 14, 10),
Block.makeCuboidShape(-10, 1, -10, -6, 14, -6),
Block.makeCuboidShape(-10, 1, 6, -6, 14, 10)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(-8, 7, 6.75, 24, 9, 9.25),
Block.makeCuboidShape(-8, 7, 7, 24, 9, 9),
Block.makeCuboidShape(22.75, 1.75, -6.5, 25.25, 3.75, 11.5),
Block.makeCuboidShape(23, -6.75, 1, 25, 11.25, 3),
Block.makeCuboidShape(-9, -6.75, 1, -7, 11.25, 3),
Block.makeCuboidShape(-9.25, 1.75, -6.5, -6.75, 3.75, 11.5)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});,
Stream.of(
Block.makeCuboidShape(16, 14, 0, 32, 16, 16),
Block.makeCuboidShape(0, 14, 0, 16, 16, 16),
Block.makeCuboidShape(-16, 14, 0, 0, 16, 16),
Block.makeCuboidShape(16, 14, -16, 32, 16, 0),
Block.makeCuboidShape(-16, 14, -16, 0, 16, 0),
Block.makeCuboidShape(2, 16, 4, 14, 16.25, 12)
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment