use of com.enderio.core.common.util.stackable.Things in project EnderIO by SleepyTrousers.
the class HandleThings method read.
@Override
public Things read(@Nonnull Registry registry, @Nonnull Set<NBTAction> phase, @Nonnull NBTTagCompound nbt, @Nullable Field field, @Nonnull String name, @Nullable Things object) throws IllegalArgumentException, IllegalAccessException, InstantiationException, NoHandlerFoundException {
object = new Things();
NBTTagList list = nbt.getTagList(name, 8);
for (int i = 0; i < list.tagCount(); i++) {
object.add(list.getStringTagAt(i));
}
return object;
}
use of com.enderio.core.common.util.stackable.Things in project EnderIO by SleepyTrousers.
the class Glowstone method registerGlowstoneRecipes.
public static void registerGlowstoneRecipes() {
Fluid f = FluidRegistry.getFluid(TicProxy.GLOWSTONE_FLUID_NAME);
if (f != null) {
// Note: We match the old TE amounts
TicHandler.instance.registerSmelterySmelting(new Things().add(Items.GLOWSTONE_DUST), f, 250);
TicHandler.instance.registerSmelterySmelting(new Things().add(Blocks.GLOWSTONE), f, 1000);
TicHandler.instance.registerBasinCasting(new Things().add(Blocks.GLOWSTONE), new Things(), f, 1000);
}
}
use of com.enderio.core.common.util.stackable.Things in project EnderIO by SleepyTrousers.
the class Redstone method registerRedstoneRecipes.
public static void registerRedstoneRecipes() {
Fluid f = FluidRegistry.getFluid(TicProxy.REDSTONE_FLUID_NAME);
if (f != null) {
// Note: We match the old TE amounts
TicHandler.instance.registerSmelterySmelting(new Things().add(Items.REDSTONE), f, 100);
TicHandler.instance.registerSmelterySmelting(new Things().add(Blocks.REDSTONE_BLOCK), f, 900);
TicHandler.instance.registerBasinCasting(new Things().add(Blocks.REDSTONE_BLOCK), new Things(), f, 900);
}
}
use of com.enderio.core.common.util.stackable.Things in project EnderIO by SleepyTrousers.
the class Ender method registerEnderRecipes.
public static void registerEnderRecipes() {
Fluid f = FluidRegistry.getFluid(TicProxy.ENDER_FLUID_NAME);
if (f != null) {
// Note: We match the old TE amounts
TicHandler.instance.registerSmelterySmelting(new Things().add(Items.ENDER_PEARL), f, 250);
// Need to do this late because of the cast
Things cast = new Things("tconstruct:cast_custom:2");
TicHandler.instance.registerTableCast(new Things().add(Items.ENDER_PEARL), cast, f, 250, false);
}
TicHandler.instance.registerSmelterySmelting(new Things().add(POWDER_ENDER.getStack()), f, 250 / 9);
}
use of com.enderio.core.common.util.stackable.Things in project EnderIO by SleepyTrousers.
the class TicRegistration method tryBasinAloying.
private static void tryBasinAloying(@Nonnull Things result, NNList<Things> inputs) {
if (!result.isValid() || result.getItemStack().getCount() != 1 || !(result.getItemStack().getItem() instanceof ItemBlock) || inputs.size() != 2) {
return;
}
final Things input0 = inputs.get(0);
final Things input1 = inputs.get(1);
if (!input0.isValid() || !input1.isValid()) {
return;
}
FluidStack a = getFluidForItems(input0);
FluidStack b = getFluidForItems(input1);
if ((a == null) == (b == null)) {
return;
}
if (a == null && !(input0.getItemStack().getCount() == 1 && input0.getItemStack().getItem() instanceof ItemBlock)) {
return;
}
if (b == null && !(input1.getItemStack().getCount() == 1 && input1.getItemStack().getItem() instanceof ItemBlock)) {
return;
}
if (a != null) {
TicHandler.instance.registerBasinCasting(result, input1, a.getFluid(), a.amount);
} else if (b != null) {
TicHandler.instance.registerBasinCasting(result, input0, b.getFluid(), b.amount);
}
}
Aggregations