mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 05:02:30 +00:00
Get rid of all the nullable-nonnull stuff, warning huge diff
This commit is contained in:
344 files changed
+1603
-582
No files matched your search
@@ -35,6 +35,7 @@ import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
@@ -51,11 +52,13 @@ public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.POWERED, true));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return AABB;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, BotaniaStateProps.POWERED);
|
||||
@@ -66,6 +69,7 @@ public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
return state.getValue(BotaniaStateProps.POWERED) ? 8 : 0;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState().withProperty(BotaniaStateProps.POWERED, meta == 8);
|
||||
@@ -125,7 +129,7 @@ public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, BlockPos pos, IBlockState state) {
|
||||
public void breakBlock(@Nonnull World par1World, @Nonnull BlockPos pos, @Nonnull IBlockState state) {
|
||||
TileSimpleInventory inv = (TileSimpleInventory) par1World.getTileEntity(pos);
|
||||
|
||||
if (inv != null) {
|
||||
@@ -181,8 +185,9 @@ public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState state) {
|
||||
return new TileSparkChanger();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user