Move some blocks to their own feature category and add some comments (#3618)

Start of a bigger cleanup happening in 1.13 to fix the worst issues.
This commit is contained in:
fscan
2018-07-14 21:25:06 +02:00
committed by GitHub
parent f4ef7edf86
commit c8eb792d38
3 changed files with 45 additions and 29 deletions
@@ -265,11 +265,13 @@ public final class ApiBlocks implements IBlocks
.build();
this.matrixFrame = registry.block( "matrix_frame", BlockMatrixFrame::new ).features( AEFeature.SPATIAL_IO ).build();
FeatureFactory deco = registry.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS );
FeatureFactory deco = registry.features( AEFeature.DECORATIVE_BLOCKS );
this.quartzBlock = deco.block( "quartz_block", BlockQuartz::new ).build();
this.quartzPillar = deco.block( "quartz_pillar", BlockQuartzPillar::new ).build();
this.chiseledQuartzBlock = deco.block( "chiseled_quartz_block", BlockChiseledQuartz::new ).build();
this.quartzGlass = deco.block( "quartz_glass", BlockQuartzGlass::new )
this.quartzGlass = registry.features( AEFeature.QUARTZ_GLASS )
.block( "quartz_glass", BlockQuartzGlass::new )
.useCustomItemModel()
.rendering( new BlockRenderingCustomizer()
{
@@ -282,7 +284,7 @@ public final class ApiBlocks implements IBlocks
} )
.build();
this.quartzVibrantGlass = deco.block( "quartz_vibrant_glass", BlockQuartzLamp::new )
.addFeatures( AEFeature.DECORATIVE_LIGHTS )
.addFeatures( AEFeature.DECORATIVE_LIGHTS, AEFeature.QUARTZ_GLASS )
.useCustomItemModel()
.build();
this.quartzFixture = registry.block( "quartz_fixture", BlockQuartzFixture::new )
@@ -290,19 +292,28 @@ public final class ApiBlocks implements IBlocks
.useCustomItemModel()
.build();
this.fluixBlock = deco.block( "fluix_block", BlockFluix::new ).build();
this.skyStoneBlock = deco.block( "sky_stone_block", () -> new BlockSkyStone( SkystoneType.STONE ) ).build();
this.smoothSkyStoneBlock = deco.block( "smooth_sky_stone_block", () -> new BlockSkyStone( SkystoneType.BLOCK ) ).build();
this.skyStoneBrick = deco.block( "sky_stone_brick", () -> new BlockSkyStone( SkystoneType.BRICK ) ).build();
this.skyStoneSmallBrick = deco.block( "sky_stone_small_brick", () -> new BlockSkyStone( SkystoneType.SMALL_BRICK ) ).build();
this.fluixBlock = registry.features( AEFeature.FLUIX ).block( "fluix_block", BlockFluix::new ).build();
this.skyStoneBlock = registry.features( AEFeature.SKY_STONE )
.block( "sky_stone_block", () -> new BlockSkyStone( SkystoneType.STONE ) )
.build();
this.smoothSkyStoneBlock = registry.features( AEFeature.SKY_STONE )
.block( "smooth_sky_stone_block", () -> new BlockSkyStone( SkystoneType.BLOCK ) )
.build();
this.skyStoneBrick = deco.block( "sky_stone_brick", () -> new BlockSkyStone( SkystoneType.BRICK ) )
.addFeatures( AEFeature.SKY_STONE )
.build();
this.skyStoneSmallBrick = deco.block( "sky_stone_small_brick", () -> new BlockSkyStone( SkystoneType.SMALL_BRICK ) )
.addFeatures( AEFeature.SKY_STONE )
.build();
this.skyStoneChest = registry.block( "sky_stone_chest", () -> new BlockSkyChest( SkyChestType.STONE ) )
.features( AEFeature.SKY_STONE_CHESTS )
.features( AEFeature.SKY_STONE, AEFeature.SKY_STONE_CHESTS )
.tileEntity( new TileEntityDefinition( TileSkyChest.class, "sky_stone_chest" ) )
.rendering( new SkyChestRenderingCustomizer( SkyChestType.STONE ) )
.build();
this.smoothSkyStoneChest = registry.block( "smooth_sky_stone_chest", () -> new BlockSkyChest( SkyChestType.BLOCK ) )
.features( AEFeature.SKY_STONE_CHESTS )
.features( AEFeature.SKY_STONE, AEFeature.SKY_STONE_CHESTS )
.tileEntity( new TileEntityDefinition( TileSkyChest.class, "sky_stone_chest" ) )
.rendering( new SkyChestRenderingCustomizer( SkyChestType.BLOCK ) )
.build();
@@ -571,7 +582,7 @@ public final class ApiBlocks implements IBlocks
Block block = blockDef.maybeBlock().get();
IBlockDefinition slabDef = registry.block( slabId, () -> new BlockSlabCommon.Half( block ) )
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
.features( AEFeature.DECORATIVE_BLOCKS )
.disableItem()
.build();
@@ -584,7 +595,7 @@ public final class ApiBlocks implements IBlocks
// Reigster the double slab variant as well
IBlockDefinition doubleSlabDef = registry.block( doubleSlabId, () -> new BlockSlabCommon.Double( slabBlock, block ) )
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
.features( AEFeature.DECORATIVE_BLOCKS )
.disableItem()
.build();
@@ -594,7 +605,7 @@ public final class ApiBlocks implements IBlocks
// Make the slab item
IItemDefinition itemDef = registry.item( slabId, () -> new ItemSlab( slabBlock, slabBlock, doubleSlabBlock ) )
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
.features( AEFeature.DECORATIVE_BLOCKS )
.build();
Verify.verify( itemDef.maybeItem().isPresent() );
@@ -606,7 +617,7 @@ public final class ApiBlocks implements IBlocks
private static IBlockDefinition makeStairs( String registryName, FeatureFactory registry, IBlockDefinition block )
{
return registry.block( registryName, () -> new BlockStairCommon( block.maybeBlock().get(), block.identifier() ) )
.features( AEFeature.DECORATIVE_QUARTZ_BLOCKS )
.features( AEFeature.DECORATIVE_BLOCKS )
.rendering( new BlockRenderingCustomizer()
{
@Override