Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New texture and added inf lava cell #250

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/com/glodblock/github/FluidCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public static void postInit(FMLPostInitializationEvent event) {
if (!ModAndClassUtil.NEW_HORIZONS_CORE_MOD) {
RecipeLoader.addTerminalCards();
RecipeLoader.addInfiniteWaterCell();
RecipeLoader.addInfiniteLavaCell();
}
RecipeLoader.runTerminalRecipe();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.glodblock.github.common.item;

import static com.glodblock.github.util.Util.FluidUtil.lava_bucket;

import java.util.EnumSet;

import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;

import com.glodblock.github.FluidCraft;
import com.glodblock.github.common.storage.IStorageFluidCell;
import com.glodblock.github.common.tabs.FluidCraftingTabs;
import com.glodblock.github.loader.IRegister;
import com.glodblock.github.util.NameConst;

import appeng.api.config.FuzzyMode;
import appeng.core.features.AEFeature;
import appeng.tile.inventory.AppEngInternalInventory;
import cpw.mods.fml.common.registry.GameRegistry;

public class ItemInfinityLavaStorageCell extends ItemBaseInfinityStorageCell
implements IStorageFluidCell, IRegister<ItemInfinityLavaStorageCell> {

@Override
public IInventory getConfigInventory(ItemStack is) {
return new InfinityConfig(lava_bucket);
}

public static class InfinityConfig extends AppEngInternalInventory {

public InfinityConfig(final ItemStack is) {
super(null, 1);
this.setInventorySlotContents(0, is);
}

@Override
public void markDirty() {}
}

public ItemInfinityLavaStorageCell() {
super();
setUnlocalizedName(NameConst.ITEM_INFINITY_LAVA_FLUID_STORAGE);
setTextureName(FluidCraft.resource(NameConst.ITEM_INFINITY_FLUID_STORAGE).toString());
this.setFeature(EnumSet.of(AEFeature.StorageCells));
this.setMaxStackSize(1);
}

@Override
public ItemInfinityLavaStorageCell register() {
GameRegistry.registerItem(this, NameConst.ITEM_INFINITY_LAVA_FLUID_STORAGE, FluidCraft.MODID);
setCreativeTab(FluidCraftingTabs.INSTANCE);
return this;
}

@Override
public boolean isEditable(ItemStack is) {
return false;
}

@Override
public FuzzyMode getFuzzyMode(ItemStack is) {
return FuzzyMode.IGNORE_ALL;
}

@Override
public void setFuzzyMode(ItemStack is, FuzzyMode fzMode) {}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.common.item.ItemFluidStorageHousing;
import com.glodblock.github.common.item.ItemFluidStorageMonitor;
import com.glodblock.github.common.item.ItemInfinityLavaStorageCell;
import com.glodblock.github.common.item.ItemInfinityWaterStorageCell;
import com.glodblock.github.common.item.ItemMultiFluidStorageCell;
import com.glodblock.github.common.item.ItemPartFluidInterface;
Expand Down Expand Up @@ -142,6 +143,7 @@ public static void init() {}
600000D).register();
public static ItemCreativeFluidStorageCell CREATIVE_CELL = new ItemCreativeFluidStorageCell().register();
public static ItemInfinityWaterStorageCell INFINITY_WATER_CELL = new ItemInfinityWaterStorageCell().register();
public static ItemInfinityLavaStorageCell INFINITY_LAVA_CELL = new ItemInfinityLavaStorageCell().register();
public static ItemBasicFluidStoragePart CELL_PART = new ItemBasicFluidStoragePart().register();
public static ItemFluidStorageHousing CELL_HOUSING = new ItemFluidStorageHousing().register();

Expand Down
23 changes: 23 additions & 0 deletions src/main/java/com/glodblock/github/loader/RecipeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_TERM;
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_TERMINAL;
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_TERMINAL_EX;
import static com.glodblock.github.loader.ItemAndBlockHolder.INFINITY_LAVA_CELL;
import static com.glodblock.github.loader.ItemAndBlockHolder.INFINITY_WATER_CELL;
import static com.glodblock.github.loader.ItemAndBlockHolder.INTERFACE;
import static com.glodblock.github.loader.ItemAndBlockHolder.LARGE_BUFFER;
Expand Down Expand Up @@ -199,6 +200,7 @@ public class RecipeLoader implements Runnable {
47);
public static final ItemStack NETHER_STAR = new ItemStack(Items.nether_star, 1);
public static final ItemStack WATER_BUCKET = new ItemStack(Items.water_bucket, 1);
public static final ItemStack LAVA_BUCKET = new ItemStack(Items.lava_bucket, 1);

@Override
public void run() {
Expand Down Expand Up @@ -721,6 +723,27 @@ public static void addInfiniteWaterCell() {
AE2_MATTER_CONDENSER));
}

public static void addInfiniteLavaCell() {
GameRegistry.addRecipe(
new ShapedOreRecipe(
INFINITY_LAVA_CELL,
"BKB",
"ACF",
"BMB",
'B',
LAVA_BUCKET,
'K',
CellType.Cell64kPart.stack(1),
'A',
AE2_ANNIHILATION_CORE,
'C',
CELL_HOUSING.stack(1, 1),
'F',
AE2_FORMATION_CORE,
'M',
AE2_MATTER_CONDENSER));
}

public static void runTerminalRecipe() {
ItemStack[] fc2Terms = { WIRELESS_ULTRA_TERM.stack(), WIRELESS_FLUID_TERM.stack(),
WIRELESS_PATTERN_TERM.stack(), WIRELESS_INTERFACE_TERM.stack(), WIRELESS_LEVEL_TERM.stack() };
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/glodblock/github/util/NameConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class NameConst {
public static final String ITEM_ARTIFICIAL_UNIVERSE_STORAGE = ITEM_FLUID_STORAGE + ".Universe";
public static final String ITEM_INFINITY_FLUID_STORAGE = ITEM_FLUID_STORAGE + ".infinity";
public static final String ITEM_INFINITY_WATER_FLUID_STORAGE = ITEM_INFINITY_FLUID_STORAGE + ".water";
public static final String ITEM_INFINITY_LAVA_FLUID_STORAGE = ITEM_INFINITY_FLUID_STORAGE + ".lava";
public static final String ITEM_CREATIVE_FLUID_STORAGE = "creative_" + ITEM_FLUID_STORAGE;
public static final String ITEM_FLUID_PORTABLE_CELL = "portable_fluid_cell";
public static final String ITEM_WIRELESS_FLUID_TERMINAL = "wireless_fluid_terminal";
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/glodblock/github/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ public static int clamp(int value, int min, int max) {
public static class FluidUtil {

public static final ItemStack water_bucket = new ItemStack(Items.water_bucket, 1);
public static final ItemStack lava_bucket = new ItemStack(Items.lava_bucket, 1);

public static void fluidTankInfoWriteToNBT(FluidTankInfo[] infos, NBTTagCompound data) {
int i = 0;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/ae2fc/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ item.fluid_storage.quantum.name=ME Fluid Quantum Storage Cell
item.fluid_storage.singularity.name=ME Fluid Digital Singularity Storage Cell
item.fluid_storage.Universe.name=ME Fluid Artificial Universe Storage Cell
item.fluid_storage.infinity.water.name=ME Fluid Infinity Water Storage Cell
item.fluid_storage.infinity.lava.name=ME Fluid Infinity Lava Storage Cell
item.fluid_part.0.name=%s1k%s ME Fluid Storage Component
item.fluid_part.1.name=%s4k%s ME Fluid Storage Component
item.fluid_part.2.name=%s16k%s ME Fluid Storage Component
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.