More null annotations

This commit is contained in:
mezz committed 2017-02-07 00:05:24 -08:00
1 parent da8a833485
commit a5daa93bf1
163 files changed
+952 -849

No files matched your search

@@ -1,8 +1,6 @@
package binnie.extrabees.gui;
import binnie.core.AbstractMod;
import binnie.core.machines.Machine;
import binnie.core.machines.TileEntityMachine;
import binnie.craftgui.minecraft.Window;
import binnie.craftgui.minecraft.control.ControlPlayerInventory;
import binnie.craftgui.minecraft.control.ControlSlot;
@@ -11,17 +9,17 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraftforge.fml.relauncher.Side;
import javax.annotation.Nullable;
public class WindowAlvearyFrame extends Window {
Machine machine;
ControlPlayerInventory playerInventory;
public WindowAlvearyFrame(final EntityPlayer player, final IInventory inventory, final Side side) {
super(176, 144, player, inventory, side);
this.machine = ((TileEntityMachine) inventory).getMachine();
}
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
if (player == null || inventory == null) {
@Nullable
public static Window create(final EntityPlayer player, @Nullable final IInventory inventory, final Side side) {
if (inventory == null) {
return null;
}
return new WindowAlvearyFrame(player, inventory, side);
@@ -30,9 +28,8 @@ public class WindowAlvearyFrame extends Window {
@Override
public void initialiseClient() {
this.setTitle("Frame Housing");
this.playerInventory = new ControlPlayerInventory(this);
final ControlSlot slot = new ControlSlot(this, 79, 30);
slot.assign(0);
ControlPlayerInventory playerInventory = new ControlPlayerInventory(this);
new ControlSlot.Builder(this, 79, 30).assign(0);
}
@Override