mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-26 06:53:30 +00:00
More null annotations
This commit is contained in:
1 parent
16b955b443
commit
da8a833485
96 files changed
+573
-360
No files matched your search
@@ -17,6 +17,8 @@ import forestry.api.apiculture.IHiveFrame;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class AlvearyFrame {
|
||||
public static int slotFrame = 0;
|
||||
|
||||
@@ -66,6 +68,7 @@ public class AlvearyFrame {
|
||||
this.getInventory().setInventorySlotContents(AlvearyFrame.slotFrame, this.getHiveFrame().frameUsed(((TileExtraBeeAlveary) this.getMachine().getTileEntity()).getMultiblockLogic().getController(), this.getInventory().getStackInSlot(AlvearyFrame.slotFrame), null, wear));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public IHiveFrame getHiveFrame() {
|
||||
ItemStack stackInSlot = this.getInventory().getStackInSlot(AlvearyFrame.slotFrame);
|
||||
if (stackInSlot != null) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class AlvearyMutator {
|
||||
return getMutationMult(item) > 0.0f;
|
||||
}
|
||||
|
||||
public static float getMutationMult(final ItemStack item) {
|
||||
public static float getMutationMult(@Nullable final ItemStack item) {
|
||||
if (item == null) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import forestry.api.circuits.ICircuitBoard;
|
||||
import forestry.api.circuits.ICircuitLayout;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -84,6 +85,7 @@ public class AlvearyStimulator {
|
||||
this.powered = this.getUtil().hasEnergyMJ(this.powerUsage);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ICircuitBoard getHiveFrame() {
|
||||
if (!this.getUtil().isSlotEmpty(AlvearyStimulator.slotCircuit)) {
|
||||
return ChipsetManager.circuitRegistry.getCircuitBoard(this.getUtil().getStack(AlvearyStimulator.slotCircuit));
|
||||
|
||||
Reference in new issue
Block a user