Skip to content

Commit

Permalink
Add Light to Fairy Slipper. Closes #67
Browse files Browse the repository at this point in the history
  • Loading branch information
JT122406 committed Aug 8, 2024
1 parent 2819011 commit 903fbb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Add Cracked Sand and Sandy Dirt to Sand Block and item tags
- Make Cypress Saplings use 2 by 2
- Fix Yucca Leaves Models
- Add Light to Fairy Slipper

# 1.0.5-Beta
- Workaround for a crash involving fruit leaves decay (No Drops)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public class BWGBlocks {
public static final FlowerBlockFeature CALIFORNIA_POPPY = registerFlower("california_poppy", MapColor.COLOR_ORANGE);
public static final FlowerBlockFeature CROCUS = registerFlower("crocus", MapColor.COLOR_PURPLE, Block.box(0.0, 0.0, 0.0, 16.0, 12.0, 16.0));
public static final Supplier<TallFlowerBlock> DELPHINIUM = registerTallFlower("delphinium", MapColor.COLOR_PURPLE);
public static final FlowerBlockFeature FAIRY_SLIPPER = registerFlower("fairy_slipper", MapColor.COLOR_PINK, Block.box(1.0, 0.0, 1.0, 15.0, 14.0, 15.0));
public static final FlowerBlockFeature FAIRY_SLIPPER = registerFlower("fairy_slipper", BlockBehaviour.Properties.copy(Blocks.WHITE_TULIP).noOcclusion().mapColor(MapColor.COLOR_PINK).lightLevel((level) -> 8), Block.box(1.0, 0.0, 1.0, 15.0, 14.0, 15.0));
public static final Supplier<TallFlowerBlock> FOXGLOVE = registerTallFlower("foxglove", MapColor.COLOR_ORANGE);
public static final FlowerBlockFeature GUZMANIA = registerFlower("guzmania", MapColor.COLOR_YELLOW, Block.box(4.0, 0.0, 4.0, 12.0, 15.0, 12.0));
public static final FlowerBlockFeature INCAN_LILY = registerFlower("incan_lily", MapColor.COLOR_PINK);
Expand Down Expand Up @@ -390,6 +390,11 @@ private static FlowerBlockFeature registerFlower(String key, MapColor mapColor,
return new FlowerBlockFeature(key, flower);
}

private static FlowerBlockFeature registerFlower(String key, BlockBehaviour.Properties properties, VoxelShape shape) {
Supplier<? extends Block> flower = registerBlockItem(key, () -> new BWGFlowerBlock(properties, BlockTags.DIRT, shape));
return new FlowerBlockFeature(key, flower);
}

private static Supplier<TallFlowerBlock> registerTallFlower(String key, MapColor mapColor) {
return registerBlockItem(key, () -> new BWGTallFlowerBlock(BlockBehaviour.Properties.copy(Blocks.SUNFLOWER).mapColor(mapColor)));
}
Expand Down

0 comments on commit 903fbb1

Please sign in to comment.