Examples of FluidContainerData


Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

        ForgeChunkManager.setForcedChunkLoadingCallback(GalacticraftCore.instance, new ChunkLoadingCallback());
        FMLCommonHandler.instance().bus().register(new ConnectionEvents());

        for (int i = GCItems.fuelCanister.getMaxDamage() - 1; i > 0; i--)
        {
            FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidFuel, GCItems.fuelCanister.getMaxDamage() - i), new ItemStack(GCItems.fuelCanister, 1, i), new ItemStack(GCItems.oilCanister, 1, GCItems.fuelCanister.getMaxDamage())));
        }

        for (int i = GCItems.oilCanister.getMaxDamage() - 1; i > 0; i--)
        {
            FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(GalacticraftCore.fluidOil, GCItems.oilCanister.getMaxDamage() - i), new ItemStack(GCItems.oilCanister, 1, i), new ItemStack(GCItems.oilCanister, 1, GCItems.fuelCanister.getMaxDamage())));
        }

        SchematicRegistry.registerSchematicRecipe(new SchematicRocketT1());
        SchematicRegistry.registerSchematicRecipe(new SchematicMoonBuggy());
        SchematicRegistry.registerSchematicRecipe(new SchematicAdd());
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

        GalacticraftRegistry.addT3RocketRecipe(new NasaWorkbenchRecipe(new ItemStack(AsteroidsItems.tier3Rocket, 1, 3), input2));

        int canisterMaxDamage = AsteroidsItems.methaneCanister.getMaxDamage();
        for (int i = canisterMaxDamage - 1; i > 0; i--)
        {
            FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(AsteroidsModule.fluidMethaneGas, canisterMaxDamage - i), new ItemStack(AsteroidsItems.methaneCanister, 1, i), new ItemStack(GCItems.oilCanister, 1, canisterMaxDamage)));
            FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(AsteroidsModule.fluidLiquidOxygen, canisterMaxDamage - i), new ItemStack(AsteroidsItems.canisterLOX, 1, i), new ItemStack(GCItems.oilCanister, 1, canisterMaxDamage)));
            FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(AsteroidsModule.fluidLiquidNitrogen, canisterMaxDamage - i), new ItemStack(AsteroidsItems.canisterLN2, 1, i), new ItemStack(GCItems.oilCanister, 1, canisterMaxDamage)));
        }
    }
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

        MarsModule.SLUDGE.setBlock(MarsBlocks.blockSludge);

        MarsItems.initItems();

    FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(MarsModule.SLUDGE, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(MarsItems.bucketSludge), new ItemStack(Items.bucket)));
    }
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

    if (worldObj.getTotalWorldTime() % 20 * 10 != 0)
      return;

    // Check if we have suitable items waiting in the item slot
    if (inventory.getStackInSlot(SLOT_CAN) != null) {
      FluidContainerData container = LiquidHelper.getLiquidContainer(inventory.getStackInSlot(SLOT_CAN));
      if (container != null && liquidTank.accepts(container.fluid.getFluid())) {

        inventory.setInventorySlotContents(SLOT_CAN, StackUtils.replenishByContainer(this, inventory.getStackInSlot(SLOT_CAN), container, liquidTank));
        if (inventory.getStackInSlot(SLOT_CAN).stackSize <= 0)
          inventory.setInventorySlotContents(SLOT_CAN, null);
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

    if (worldObj.getTotalWorldTime() % 20 * 10 != 0)
      return;

    // Check if we have suitable items waiting in the item slot
    if (accessibleInventory.getStackInSlot(SLOT_CAN_INPUT) != null) {
      FluidContainerData container = LiquidHelper.getLiquidContainer(accessibleInventory.getStackInSlot(SLOT_CAN_INPUT));
      if (container != null && RecipeManager.isResourceLiquid(container.fluid)) {

        accessibleInventory.setInventorySlotContents(SLOT_CAN_INPUT,
            StackUtils.replenishByContainer(this, accessibleInventory.getStackInSlot(SLOT_CAN_INPUT), container, resourceTank));
        if (accessibleInventory.getStackInSlot(SLOT_CAN_INPUT).stackSize <= 0)
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

  public void updateServerSide() {

    // Check if we have suitable items waiting in the item slot
    if (inventory.getStackInSlot(SLOT_INPUT) != null) {

      FluidContainerData container = LiquidHelper.getLiquidContainer(inventory.getStackInSlot(SLOT_INPUT));
      if (container != null && RecipeManager.isLiquidResource(container.fluid)) {

        inventory.setInventorySlotContents(SLOT_INPUT, StackUtils.replenishByContainer(this, inventory.getStackInSlot(SLOT_INPUT), container, resourceTank));
        if (inventory.getStackInSlot(SLOT_INPUT).stackSize <= 0)
          inventory.setInventorySlotContents(SLOT_INPUT, null);

      }
    }
    // Can/capsule input/output needs to be handled here.
    if (inventory.getStackInSlot(SLOT_CAN_INPUT) != null) {
      FluidContainerData container = LiquidHelper.getEmptyContainer(inventory.getStackInSlot(SLOT_CAN_INPUT), productTank.getFluid());

      if (container != null) {
        inventory.setInventorySlotContents(SLOT_CAN_OUTPUT, bottleIntoContainer(inventory.getStackInSlot(SLOT_CAN_INPUT), inventory.getStackInSlot(SLOT_CAN_OUTPUT), container,
            productTank));
        if (inventory.getStackInSlot(SLOT_CAN_INPUT).stackSize <= 0)
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

    if (slotIndex == SLOT_RESOURCE && RecipeManager.isResource(itemstack))
      return true;


    if (slotIndex == SLOT_INPUT) {
      FluidContainerData container = LiquidHelper.getLiquidContainer(itemstack);
      return container != null && RecipeManager.isLiquidResource(container.fluid);
    }

    if (slotIndex == SLOT_CAN_INPUT && LiquidHelper.isEmptyContainer(itemstack)) {
      return true;
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

  public void updateServerSide() {

    // Can/capsule input/output needs to be handled here.
    if (inventory.getStackInSlot(SLOT_CAN_INPUT) != null) {

      FluidContainerData container = LiquidHelper.getEmptyContainer(inventory.getStackInSlot(SLOT_CAN_INPUT), productTank.getFluid());
      if (container != null) {
        inventory.setInventorySlotContents(SLOT_CAN_OUTPUT, bottleIntoContainer(inventory.getStackInSlot(SLOT_CAN_INPUT), inventory.getStackInSlot(SLOT_CAN_OUTPUT), container, productTank));
        if (inventory.getStackInSlot(SLOT_CAN_INPUT).stackSize <= 0)
          inventory.setInventorySlotContents(SLOT_CAN_INPUT, null);
      }
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

    super.updateServerSide();

    // Check if we have suitable items waiting in the item slot
    if (inventory.getStackInSlot(SLOT_CAN) != null) {

      FluidContainerData container = LiquidHelper.getLiquidContainer(inventory.getStackInSlot(SLOT_CAN));
      if (container != null) {

        StandardTank tank = null;

        if (heatingTank.accepts(container.fluid.getFluid()))
View Full Code Here

Examples of net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData

  }

  /* ISPECIALINVENTORY */
  @Override
  public int addItem(ItemStack stack, boolean doAdd, ForgeDirection from) {
    FluidContainerData container = LiquidHelper.getLiquidContainer(stack);
    if (container == null)
      return 0;

    return inventory.addStack(stack, false, doAdd);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.