35
35
import dan200 .computercraft .shared .computer .core .ComputerFamily ;
36
36
import dan200 .computercraft .shared .computer .core .ServerComputer ;
37
37
import dan200 .computercraft .shared .computer .inventory .ComputerMenuWithoutInventory ;
38
- import dan200 .computercraft .shared .computer .items .CommandComputerItem ;
39
- import dan200 .computercraft .shared .computer .items .ComputerItem ;
40
38
import dan200 .computercraft .shared .computer .items .ServerComputerReference ;
41
39
import dan200 .computercraft .shared .config .Config ;
42
40
import dan200 .computercraft .shared .data .BlockNamedEntityLootCondition ;
114
112
import net .minecraft .resources .ResourceLocation ;
115
113
import net .minecraft .world .flag .FeatureFlags ;
116
114
import net .minecraft .world .inventory .MenuType ;
117
- import net .minecraft .world .item .BlockItem ;
118
- import net .minecraft .world .item .CreativeModeTab ;
119
- import net .minecraft .world .item .Item ;
120
- import net .minecraft .world .item .ItemStack ;
115
+ import net .minecraft .world .item .*;
121
116
import net .minecraft .world .item .component .DyedItemColor ;
122
117
import net .minecraft .world .item .crafting .CustomRecipe ;
123
118
import net .minecraft .world .item .crafting .Recipe ;
@@ -291,9 +286,9 @@ private static <B extends Block, I extends Item> RegistryEntry<I> ofBlock(Regist
291
286
return register (parent .id ().getPath (), p -> supplier .apply (parent .get (), p ), properties ().useBlockDescriptionPrefix ());
292
287
}
293
288
294
- public static final RegistryEntry <ComputerItem > COMPUTER_NORMAL = ofBlock (Blocks .COMPUTER_NORMAL , ComputerItem ::new );
295
- public static final RegistryEntry <ComputerItem > COMPUTER_ADVANCED = ofBlock (Blocks .COMPUTER_ADVANCED , ComputerItem ::new );
296
- public static final RegistryEntry <ComputerItem > COMPUTER_COMMAND = ofBlock (Blocks .COMPUTER_COMMAND , CommandComputerItem ::new );
289
+ public static final RegistryEntry <BlockItem > COMPUTER_NORMAL = ofBlock (Blocks .COMPUTER_NORMAL , BlockItem ::new );
290
+ public static final RegistryEntry <BlockItem > COMPUTER_ADVANCED = ofBlock (Blocks .COMPUTER_ADVANCED , BlockItem ::new );
291
+ public static final RegistryEntry <GameMasterBlockItem > COMPUTER_COMMAND = ofBlock (Blocks .COMPUTER_COMMAND , GameMasterBlockItem ::new );
297
292
298
293
public static final RegistryEntry <PocketComputerItem > POCKET_COMPUTER_NORMAL = register ("pocket_computer_normal" ,
299
294
p -> new PocketComputerItem (p , ComputerFamily .NORMAL ), properties ().stacksTo (1 ));
@@ -305,19 +300,19 @@ private static <B extends Block, I extends Item> RegistryEntry<I> ofBlock(Regist
305
300
306
301
public static final RegistryEntry <DiskItem > DISK =
307
302
register ("disk" , DiskItem ::new , properties ().stacksTo (1 ));
308
- public static final RegistryEntry <TreasureDiskItem > TREASURE_DISK =
309
- register ("treasure_disk" , TreasureDiskItem ::new , properties ().stacksTo (1 ));
303
+ public static final RegistryEntry <DiskItem > TREASURE_DISK =
304
+ register ("treasure_disk" , DiskItem ::new , properties ().stacksTo (1 ));
310
305
311
306
private static Item .Properties printoutProperties () {
312
307
return properties ().stacksTo (1 ).component (DataComponents .PRINTOUT .get (), PrintoutData .EMPTY );
313
308
}
314
309
315
310
public static final RegistryEntry <PrintoutItem > PRINTED_PAGE = register ("printed_page" ,
316
- p -> new PrintoutItem ( p , PrintoutItem . Type . PAGE ) , Items ::printoutProperties );
311
+ PrintoutItem :: new , Items ::printoutProperties );
317
312
public static final RegistryEntry <PrintoutItem > PRINTED_PAGES = register ("printed_pages" ,
318
- p -> new PrintoutItem ( p , PrintoutItem . Type . PAGES ) , Items ::printoutProperties );
313
+ PrintoutItem :: new , Items ::printoutProperties );
319
314
public static final RegistryEntry <PrintoutItem > PRINTED_BOOK = register ("printed_book" ,
320
- p -> new PrintoutItem ( p , PrintoutItem . Type . BOOK ) , Items ::printoutProperties );
315
+ PrintoutItem :: new , Items ::printoutProperties );
321
316
322
317
public static final RegistryEntry <BlockItem > SPEAKER = ofBlock (Blocks .SPEAKER , BlockItem ::new );
323
318
public static final RegistryEntry <BlockItem > DISK_DRIVE = ofBlock (Blocks .DISK_DRIVE , BlockItem ::new );
@@ -344,20 +339,13 @@ private static <T> RegistryEntry<DataComponentType<T>> register(String name, Una
344
339
345
340
/**
346
341
* The id of a computer.
347
- *
348
- * @see ComputerItem
349
- * @see PocketComputerItem
350
342
*/
351
343
public static final RegistryEntry <DataComponentType <NonNegativeId >> COMPUTER_ID = register ("computer_id" , b -> b
352
344
.persistent (NonNegativeId .CODEC ).networkSynchronized (NonNegativeId .STREAM_CODEC )
353
345
);
354
346
355
347
/**
356
348
* The storage capacity of a computer or disk.
357
- *
358
- * @see ComputerItem
359
- * @see PocketComputerItem
360
- * @see DiskItem
361
349
*/
362
350
public static final RegistryEntry <DataComponentType <StorageCapacity >> STORAGE_CAPACITY = register ("storage_capacity" , b -> b
363
351
.persistent (StorageCapacity .CODEC ).networkSynchronized (StorageCapacity .STREAM_CODEC )
@@ -426,18 +414,13 @@ private static <T> RegistryEntry<DataComponentType<T>> register(String name, Una
426
414
427
415
/**
428
416
* Information about a treasure disk's mount.
429
- *
430
- * @see TreasureDiskItem
431
- * @see TreasureDisk
432
417
*/
433
418
public static final RegistryEntry <DataComponentType <TreasureDisk >> TREASURE_DISK = register ("treasure_disk" , b -> b
434
419
.persistent (TreasureDisk .CODEC ).networkSynchronized (TreasureDisk .STREAM_CODEC )
435
420
);
436
421
437
422
/**
438
423
* The id of a disk.
439
- *
440
- * @see DiskItem
441
424
*/
442
425
public static final RegistryEntry <DataComponentType <NonNegativeId >> DISK_ID = register ("disk_id" , b -> b
443
426
.persistent (NonNegativeId .CODEC ).networkSynchronized (NonNegativeId .STREAM_CODEC )
0 commit comments