mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +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
@@ -36,6 +36,7 @@ import vazkii.botania.common.block.tile.TileSimpleInventory;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
@@ -52,6 +53,7 @@ public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.NORTH));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
if(state.getValue(BotaniaStateProps.CARDINALS).getAxis() == EnumFacing.Axis.X)
|
||||
@@ -59,6 +61,7 @@ public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
else return Z_AABB;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, BotaniaStateProps.CARDINALS);
|
||||
@@ -69,6 +72,7 @@ public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
return state.getValue(BotaniaStateProps.CARDINALS).getIndex();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
if (meta < 2 || meta > 5) {
|
||||
@@ -98,7 +102,7 @@ public class BlockAvatar 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) {
|
||||
@@ -150,6 +154,7 @@ public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(IBlockState state) {
|
||||
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
@@ -160,8 +165,9 @@ public class BlockAvatar 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 TileAvatar();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user