@@ -134,9 +134,8 @@ public static void init(IEventBus modBus) {
134134 public static final BlockDefinition <CreativeStorageUnitBlock > CREATIVE_STORAGE_UNIT = block ("Creative Storage Unit" ,
135135 "creative_storage_unit" , BlockDefinitionParams .defaultStone ().withBlockConstructor (CreativeStorageUnitBlock ::new ));
136136
137- // TODO SWEDZ: make these blocks not show up in the creative tab and dont give them mineable tags
138137 public static final BlockDefinition <StructureMultiblockControllerBlock > STRUCTURE_MULTIBLOCK_CONTROLLER = block ("Structure Multiblock Controller" ,
139- "structure_multiblock_controller" , BlockDefinitionParams .defaultStone ()
138+ "structure_multiblock_controller" , BlockDefinitionParams .defaultCreativeOnly ()
140139 .withBlockConstructor (StructureMultiblockControllerBlock ::new )
141140 .withBlockItemConstructor ((block , p ) -> new BlockItem (block , p .rarity (Rarity .EPIC )))
142141 .withModel ((block , gen ) -> {
@@ -147,28 +146,25 @@ public static void init(IEventBus modBus) {
147146 gen .blockTexture ("structure_multiblock_controller_side" ));
148147 gen .horizontalBlock (block , model );
149148 gen .simpleBlockItem (block , model );
150- })
151- .noLootTable ());
149+ }));
152150
153151 public static final BlockDefinition <StructureMultiblockHatchBlock > STRUCTURE_MULTIBLOCK_HATCH = block ("Structure Multiblock Hatch" ,
154- "structure_multiblock_hatch" , BlockDefinitionParams .defaultStone ()
152+ "structure_multiblock_hatch" , BlockDefinitionParams .defaultCreativeOnly ()
155153 .withBlockConstructor (StructureMultiblockHatchBlock ::new )
156154 .withBlockItemConstructor ((block , p ) -> new BlockItem (block , p .rarity (Rarity .EPIC )))
157155 .withModel ((block , gen ) -> {
158156 String name = gen .name (block );
159157 gen .simpleBlockWithItem (block , gen .models ().cubeAll (name , gen .blockTexture ("structure_multiblock_hatch" )));
160- })
161- .noLootTable ());
158+ }));
162159
163160 public static final BlockDefinition <StructureMultiblockMemberBlock > STRUCTURE_MULTIBLOCK_MEMBER = block ("Structure Multiblock Member" ,
164- "structure_multiblock_member" , BlockDefinitionParams .defaultStone ()
161+ "structure_multiblock_member" , BlockDefinitionParams .defaultCreativeOnly ()
165162 .withBlockConstructor (StructureMultiblockMemberBlock ::new )
166163 .withBlockItemConstructor ((block , p ) -> new BlockItem (block , p .rarity (Rarity .EPIC )))
167164 .withModel ((block , gen ) -> {
168165 String name = gen .name (block );
169166 gen .simpleBlockWithItem (block , gen .models ().cubeAll (name , gen .blockTexture ("structure_multiblock_member" )));
170- })
171- .noLootTable ());
167+ }));
172168
173169 // Materials
174170 public static final BlockDefinition <Block > BLOCK_FIRE_CLAY_BRICKS = block ("Fire Clay Bricks" , "fire_clay_bricks" ,
@@ -247,6 +243,14 @@ public static BlockDefinitionParams<Block> of(BlockBehaviour.Properties properti
247243 List .of (BlockTags .NEEDS_STONE_TOOL , BlockTags .MINEABLE_WITH_PICKAXE ));
248244 }
249245
246+ public static BlockDefinitionParams <Block > defaultCreativeOnly () {
247+ return new BlockDefinitionParams <>(
248+ BlockBehaviour .Properties .of ().mapColor (MapColor .METAL ).destroyTime (-1.0f ).explosionResistance (3600000.0f ), Block ::new ,
249+ BlockItem ::new ,
250+ (block , modelGenerator ) -> modelGenerator .simpleBlockWithItem (block , modelGenerator .cubeAll (block )),
251+ null , List .of ());
252+ }
253+
250254 public static BlockDefinitionParams <Block > defaultStone () {
251255 return of (BlockBehaviour .Properties .of ().mapColor (MapColor .METAL ).destroyTime (4.0f ).requiresCorrectToolForDrops ());
252256 }
0 commit comments