Permalink
Browse files

Always create extended disks

Whilst the legacy ones are important for backwards compatibility, they
cannot have an ID of 0, which introduces issues when they are the first
disk created in the world.
  • Loading branch information...
SquidDev committed Apr 27, 2018
1 parent f976138 commit 2b6eb25bed3b7853711e57475daba3cc8335cc1b
Showing with 1 addition and 9 deletions.
  1. +1 −9 src/main/java/dan200/computercraft/shared/media/items/ItemDiskLegacy.java
@@ -54,15 +54,7 @@ public void getSubItems( @Nonnull CreativeTabs tabs, @Nonnull NonNullList<ItemSt
@Nonnull
public static ItemStack createFromIDAndColour( int id, String label, int colour )
{
if( colour != Colour.Blue.getHex() )
{
return ItemDiskExpanded.createFromIDAndColour( id, label, colour );
}
ItemStack stack = new ItemStack( ComputerCraft.Items.disk, 1 );
ComputerCraft.Items.disk.setDiskID( stack, id );
ComputerCraft.Items.disk.setLabel( stack, label );
return stack;
return ItemDiskExpanded.createFromIDAndColour( id, label, colour );
}
public int getDiskID( @Nonnull ItemStack stack )

0 comments on commit 2b6eb25

Please sign in to comment.