mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-12 03:13:00 +00:00
Fix several craches caused by incorrect NonNull annotations.
Awfully sorry about this. It appears that Minecraft's annotations are occasionally wrong. IntelliJ will automatically add "not-null" checks on these annotations, resulting in crashes when they are actually null.
This commit is contained in:
@@ -14,6 +14,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemAdvancedModem extends ItemPeripheralBase
|
||||
@@ -49,7 +50,7 @@ public class ItemAdvancedModem extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems( @Nonnull Item itemID, @Nonnull CreativeTabs tabs, @Nonnull List<ItemStack> list )
|
||||
public void getSubItems( @Nonnull Item itemID, @Nullable CreativeTabs tabs, @Nonnull List<ItemStack> list )
|
||||
{
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.AdvancedModem, null, 1 ) );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCable extends ItemPeripheralBase
|
||||
@@ -63,7 +64,7 @@ public class ItemCable extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems( @Nonnull Item itemID, @Nonnull CreativeTabs tabs, @Nonnull List<ItemStack> list )
|
||||
public void getSubItems( @Nonnull Item itemID, @Nullable CreativeTabs tabs, @Nonnull List<ItemStack> list )
|
||||
{
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.WiredModem, null, 1 ) );
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.Cable, null, 1 ) );
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPeripheral extends ItemPeripheralBase
|
||||
@@ -69,7 +70,7 @@ public class ItemPeripheral extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems( @Nonnull Item itemID, @Nonnull CreativeTabs tabs, @Nonnull List<ItemStack> list )
|
||||
public void getSubItems( @Nonnull Item itemID, @Nullable CreativeTabs tabs, @Nonnull List<ItemStack> list )
|
||||
{
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.DiskDrive, null, 1 ) );
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.Printer, null, 1 ) );
|
||||
|
||||
Reference in New Issue
Block a user