mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 03:49:07 +00:00
More null annotations
This commit is contained in:
1 parent
da8a833485
commit
a5daa93bf1
163 files changed
+952
-849
No files matched your search
@@ -45,6 +45,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -164,9 +165,9 @@ public class WindowAnalyst extends Window {
|
||||
x += 22;
|
||||
}
|
||||
} else {
|
||||
new ControlSlot(this, x, y + 1).assign(InventoryType.Window, 0);
|
||||
new ControlSlot.Builder(this, x, y + 1).assign(InventoryType.Window, 0);
|
||||
x += 22;
|
||||
new ControlSlot(this, x, y + 1).assign(InventoryType.Window, 1);
|
||||
new ControlSlot.Builder(this, x, y + 1).assign(InventoryType.Window, 1);
|
||||
x += 26;
|
||||
this.setupValidators();
|
||||
}
|
||||
@@ -461,13 +462,14 @@ public class WindowAnalyst extends Window {
|
||||
if (ind != null) {
|
||||
ind.getGenome().getSpeciesRoot().getBreedingTracker(this.getWorld(), this.getUsername()).registerBirth(ind);
|
||||
}
|
||||
// TODO why is this specific client/server code needed?
|
||||
if (this.isClient()) {
|
||||
this.setStack(this.getWindowInventory().getStackInSlot(0));
|
||||
} else if (this.isServer()) {
|
||||
}
|
||||
}
|
||||
|
||||
public void setStack(final ItemStack stack) {
|
||||
public void setStack(@Nullable final ItemStack stack) {
|
||||
final IIndividual ind = AlleleManager.alleleRegistry.getIndividual(stack);
|
||||
this.setIndividual(ind);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user