use of com.enderio.core.common.util.NNList in project EnderIO by SleepyTrousers.
the class BlockPaintedPressurePlate method getSubItems.
@Override
@Nonnull
public NNList<ItemStack> getSubItems() {
NNList<ItemStack> list = new NNList<>();
for (EnumPressurePlateType type : EnumPressurePlateType.values()) {
list.add(new ItemStack(this, 1, EnumPressurePlateType.getMetaFromType(type, false)));
list.add(new ItemStack(this, 1, EnumPressurePlateType.getMetaFromType(type, true)));
}
return list;
}
use of com.enderio.core.common.util.NNList in project EnderIO by SleepyTrousers.
the class BlockPaintedRedstone method getDrops.
@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);
}
use of com.enderio.core.common.util.NNList in project EnderIO by SleepyTrousers.
the class BlockPaintedSlab method getDrops.
@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);
}
use of com.enderio.core.common.util.NNList in project EnderIO by SleepyTrousers.
the class BlockPaintedTrapDoor method getDrops.
@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);
}
use of com.enderio.core.common.util.NNList in project EnderIO by SleepyTrousers.
the class BlockPaintedWall method getDrops.
@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);
}
Aggregations