mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Fix nullability warnings
This commit is contained in:
1 parent
dd36746240
commit
70bf28c1c4
19 files changed
+43
-6
No files matched your search
@@ -10,6 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.multiblock;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -139,6 +141,7 @@ public class TileAlvearyHygroregulator extends TileAlveary implements IInventory
|
||||
}
|
||||
|
||||
/* ILIQUIDTANKCONTAINER */
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ModelBaker implements IModelBaker {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addModel(AxisAlignedBB renderBounds, @Nonnull TextureAtlasSprite[] textures, int colorIndex) {
|
||||
public void addModel(@Nonnull AxisAlignedBB renderBounds, @Nonnull TextureAtlasSprite[] textures, int colorIndex) {
|
||||
setRenderBounds(renderBounds);
|
||||
|
||||
setColorIndex(colorIndex);
|
||||
@@ -93,12 +93,12 @@ public class ModelBaker implements IModelBaker {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addModel(AxisAlignedBB renderBounds, @Nonnull TextureAtlasSprite texture, int colorIndex) {
|
||||
public void addModel(@Nonnull AxisAlignedBB renderBounds, @Nonnull TextureAtlasSprite texture, int colorIndex) {
|
||||
addModel(renderBounds, new TextureAtlasSprite[]{ texture, texture, texture, texture, texture, texture }, colorIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockModel(@Nonnull Block block, AxisAlignedBB renderBounds, @Nullable BlockPos pos, @Nonnull TextureAtlasSprite[] textures, int colorIndex) {
|
||||
public void addBlockModel(@Nonnull Block block, @Nonnull AxisAlignedBB renderBounds, @Nullable BlockPos pos, @Nonnull TextureAtlasSprite[] textures, int colorIndex) {
|
||||
setRenderBounds(renderBounds);
|
||||
|
||||
setColorIndex(colorIndex);
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.vecmath.Matrix4f;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
@@ -181,7 +182,7 @@ public class ModelBakerModel implements IModelBakerModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addQuad(EnumFacing facing, BakedQuad quad) {
|
||||
public void addQuad(EnumFacing facing, @Nonnull BakedQuad quad) {
|
||||
if(facing != null){
|
||||
faceQuads.get(facing).add(quad);
|
||||
}else{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -240,6 +241,7 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
|
||||
}
|
||||
|
||||
/* ILiquidTankTile */
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.energy.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -65,6 +66,7 @@ public class TileEngineBiogas extends TileEngine implements ISidedInventory, ILi
|
||||
this.tankManager = new TankManager(this, fuelTank, heatingTank, burnTank);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.energy.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -197,6 +198,7 @@ public class TileEuGenerator extends TileBase implements ISidedInventory, ILiqui
|
||||
return tankManager.fill(from, resource, doFill);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -154,6 +155,7 @@ public class TileBottler extends TilePowered implements ISidedInventory, ILiquid
|
||||
}
|
||||
|
||||
/* ILIQUIDCONTAINER */
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -246,6 +247,7 @@ public class TileCarpenter extends TilePowered implements ISidedInventory, ILiqu
|
||||
return tankManager.fill(direction, resource, doFill);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -308,6 +309,7 @@ public class TileFabricator extends TilePowered implements ISlotPickupWatcher, I
|
||||
}
|
||||
|
||||
/* ILIQUIDCONTAINER */
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -313,6 +314,7 @@ public class TileFermenter extends TilePowered implements ISidedInventory, ILiqu
|
||||
return tankManager.canDrain(from, fluid);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -483,6 +484,7 @@ public class TileMoistener extends TileBase implements ISidedInventory, ILiquidT
|
||||
return tankManager.fill(from, resource, doFill);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -194,6 +195,7 @@ public class TileRaintank extends TileBase implements ISidedInventory, ILiquidTa
|
||||
return tankManager.canDrain(from, fluid);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -206,6 +207,7 @@ public class TileSqueezer extends TilePowered implements ISocketable, ISidedInve
|
||||
}
|
||||
|
||||
/* ILIQUIDCONTAINER IMPLEMENTATION */
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -202,6 +203,7 @@ public class TileStill extends TilePowered implements ISidedInventory, ILiquidTa
|
||||
return tankManager.canDrain(from, fluid);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public TankManager getTankManager() {
|
||||
return tankManager;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.logic;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -51,7 +52,7 @@ public class FarmLogicArboreal extends FarmLogicHomogeneous {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAcceptedSoil(ItemStack soil) {
|
||||
public boolean isAcceptedSoil(@Nonnull ItemStack soil) {
|
||||
if (super.isAcceptedSoil(soil)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.logic;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -44,7 +45,7 @@ public abstract class FarmLogicHomogeneous extends FarmLogic {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isAcceptedSoil(ItemStack itemStack) {
|
||||
protected boolean isAcceptedSoil(@Nonnull ItemStack itemStack) {
|
||||
return ItemStackUtil.isIdenticalItem(soilBlock, itemStack);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.multiblock;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -128,6 +130,7 @@ public class FakeFarmController extends FakeMultiblockController implements IFar
|
||||
return FakeInventoryAdapter.instance();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ITankManager getTankManager() {
|
||||
return FakeTankManager.instance;
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -53,6 +55,7 @@ public class TileFarmValve extends TileFarm implements ILiquidTankTile, IFluidHa
|
||||
return getTankManager().getTankInfo(from);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ITankManager getTankManager() {
|
||||
return getMultiblockLogic().getController().getTankManager();
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.greenhouse.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -53,6 +55,7 @@ public class TileGreenhouseValve extends TileGreenhouse implements ILiquidTankTi
|
||||
return getTankManager().getTankInfo(from);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ITankManager getTankManager() {
|
||||
return getMultiblockLogic().getController().getTankManager();
|
||||
|
||||
Reference in new issue
Block a user