@Nonnull public final static <P> P notnullM(@Nullable P o, @Nonnull String message) { return notnullM(o, (Object) message); }
@Override public boolean apply(@Nullable Item item) { return NullHelper.notnullM(item, "EnumEnchantmentType.canEnchantItem(null)").isDamageable() && !(item instanceof ItemArmor) && !(item instanceof ItemFishingRod); }
public @Nonnull Entity getRidingEntityNN() { return NullHelper.notnullM(getRidingEntity(), "getRidingEntity()"); }
@Override public boolean apply(@Nullable Item item) { return NullHelper.notnullM(item, "EnumEnchantmentType.canEnchantItem(null)").isDamageable() && !(item instanceof ItemArmor) && !(item instanceof ItemSword) && !(item instanceof ItemBow) && !(item instanceof ItemFishingRod); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); for (ItemStack drop : drops2) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); } drops.addAll(drops2); }
@Override public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) { NNList<ItemStack> drops2 = new NNList<>(); super.getDrops(drops2, world, pos, state, fortune); boolean first = true; for (ItemStack drop : drops2) { if (first || !isDouble()) { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos)); first = false; } else { PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource2(state, world, pos)); } } drops.addAll(drops2); }
private IRecipe getRecipeForStacks(@Nonnull NNList<ItemStack> inputs) { NNList<MachineRecipeInput> ins = new NNList<>(); for (ItemStack stack : inputs) { ins.add(new MachineRecipeInput(-1, NullHelper.notnullM(stack, "NNList iterated with null"))); } return getRecipeForInputs(RecipeLevel.IGNORE, ins); }
public @Nonnull ItemStack toStack(@Nonnull Item item, int meta, int amount) { ItemStack stack = new ItemStack(item, amount, meta); stack.setTagCompound(toNbt(null)); if (item == itemSoulVial.getItem() && customName == null && PIG.equals(entityId) && Math.random() < 0.01) { NullHelper.notnullM(stack.getTagCompound(), "getTagCompound() doesn't produce value that was set with setTagCompound()").setString(CUSTOM_NAME_KEY, Lang.EASTER_PIGGY.get()); } return stack; }
private static void addSlabRecipe(@Nonnull ItemStack stack, @Nonnull String slab) { ForgeRegistries.RECIPES.register(new ShapelessOreRecipe(null, stack, slab, slab) .setRegistryName(slab + "_to_" + NullHelper.notnullM(stack.getItem().getRegistryName(), "found unregistered item").getResourcePath())); }
private static void registerSlabToBlock() { for (int j = 0; j < slabEndingsWood.length; j++) { addSlabRecipe(new ItemStack(Blocks.PLANKS, 1, j), "slab" + slabEndingsWood[j]); } for (int j = 0; j < slabEndingsStone.length; j++) { addSlabRecipe(new ItemStack(NullHelper.notnullM(slabResults[j], "Blocks are missing from the game")), "slab" + slabEndingsStone[j]); } }
@Override @SideOnly(Side.CLIENT) public void registerRenderers(@Nonnull IModObject modObject) { for (Integer dmg : DAMAGE.getAllowedValues()) { ClientUtil.regRenderer(this, dmg, DAMAGE.getName() + "=" + DAMAGE.getName(NullHelper.notnullM(dmg, "invalid property")) + "," + FACING.getName() + "=" + FACING.getName(EnumFacing.NORTH)); } }