add 5 type fluid cell

This commit is contained in:
GlodBlock committed 2023-02-12 20:12:23 +08:00
1 parent 96c7032523
commit 4f54c9bb28
21 files changed
+380 -152

No files matched your search

@@ -41,29 +41,53 @@ public class ItemAndBlockHolder {
public static ItemWirelessInterfaceTerminal WIRELESS_INTERFACE_TERM = new ItemWirelessInterfaceTerminal()
.register();
public static ItemFluidPacket PACKET = new ItemFluidPacket().register();
public static ItemBasicFluidStorageCell CELL1K = new ItemBasicFluidStorageCell(CellType.Cell1kPart, 1).register();
public static ItemBasicFluidStorageCell CELL4K = new ItemBasicFluidStorageCell(CellType.Cell4kPart, 4).register();
public static ItemBasicFluidStorageCell CELL16K = new ItemBasicFluidStorageCell(CellType.Cell16kPart, 16)
public static ItemBasicFluidStorageCell CELL1K = new ItemBasicFluidStorageCell(CellType.Cell1kPart, 0, 1)
.register();
public static ItemBasicFluidStorageCell CELL64K = new ItemBasicFluidStorageCell(CellType.Cell64kPart, 64)
public static ItemBasicFluidStorageCell CELL4K = new ItemBasicFluidStorageCell(CellType.Cell4kPart, 0, 4)
.register();
public static ItemBasicFluidStorageCell CELL256K = new ItemBasicFluidStorageCell(CellType.Cell256kPart, 256)
public static ItemBasicFluidStorageCell CELL16K = new ItemBasicFluidStorageCell(CellType.Cell16kPart, 0, 16)
.register();
public static ItemBasicFluidStorageCell CELL1024K = new ItemBasicFluidStorageCell(CellType.Cell1024kPart, 1024)
public static ItemBasicFluidStorageCell CELL64K = new ItemBasicFluidStorageCell(CellType.Cell64kPart, 0, 64)
.register();
public static ItemBasicFluidStorageCell CELL4096K = new ItemBasicFluidStorageCell(CellType.Cell4096kPart, 4096)
public static ItemBasicFluidStorageCell CELL256K = new ItemBasicFluidStorageCell(CellType.Cell256kPart, 1, 256)
.register();
public static ItemBasicFluidStorageCell CELL16384K = new ItemBasicFluidStorageCell(CellType.Cell16384kPart, 16384)
public static ItemBasicFluidStorageCell CELL1024K = new ItemBasicFluidStorageCell(CellType.Cell1024kPart, 1, 1024)
.register();
public static ItemBasicFluidStorageCell CELL4096K = new ItemBasicFluidStorageCell(CellType.Cell4096kPart, 1, 4096)
.register();
public static ItemBasicFluidStorageCell CELL16384K = new ItemBasicFluidStorageCell(
CellType.Cell16384kPart,
1,
16384).register();
public static ItemMultiFluidStorageCell CELL1KM = new ItemMultiFluidStorageCell(CellType.Cell1kPart, 2, 1)
.register();
public static ItemMultiFluidStorageCell CELL4KM = new ItemMultiFluidStorageCell(CellType.Cell4kPart, 2, 4)
.register();
public static ItemMultiFluidStorageCell CELL16KM = new ItemMultiFluidStorageCell(CellType.Cell16kPart, 2, 16)
.register();
public static ItemMultiFluidStorageCell CELL64KM = new ItemMultiFluidStorageCell(CellType.Cell64kPart, 2, 64)
.register();
public static ItemMultiFluidStorageCell CELL256KM = new ItemMultiFluidStorageCell(CellType.Cell256kPart, 3, 256)
.register();
public static ItemMultiFluidStorageCell CELL1024KM = new ItemMultiFluidStorageCell(CellType.Cell1024kPart, 3, 1024)
.register();
public static ItemMultiFluidStorageCell CELL4096KM = new ItemMultiFluidStorageCell(CellType.Cell4096kPart, 3, 4096)
.register();
public static ItemMultiFluidStorageCell CELL16384KM = new ItemMultiFluidStorageCell(
CellType.Cell16384kPart,
3,
16384).register();
public static ItemFluidExtremeStorageCell QUANTUM_CELL = new ItemFluidExtremeStorageCell(
NameConst.ITEM_QUANTUM_FLUID_STORAGE,
Integer.MAX_VALUE / 16,
8,
5,
4.5).register();
public static ItemFluidExtremeStorageCell SINGULARITY_CELL = new ItemFluidExtremeStorageCell(
NameConst.ITEM_SINGULARITY_FLUID_STORAGE,
Long.MAX_VALUE / (singleByteAmount * 2),
8,
1,
5).register();
public static ItemCreativeFluidStorageCell CREATIVE_CELL = new ItemCreativeFluidStorageCell().register();
public static ItemBasicFluidStoragePart CELL_PART = new ItemBasicFluidStoragePart().register();
@@ -79,13 +103,5 @@ public class ItemAndBlockHolder {
CellType.Cell1024kPart.setItemInstance(CELL_PART);
CellType.Cell4096kPart.setItemInstance(CELL_PART);
CellType.Cell16384kPart.setItemInstance(CELL_PART);
CellType.Cell1kPart.setHousingValue(0);
CellType.Cell4kPart.setHousingValue(0);
CellType.Cell16kPart.setHousingValue(0);
CellType.Cell64kPart.setHousingValue(0);
CellType.Cell256kPart.setHousingValue(1);
CellType.Cell1024kPart.setHousingValue(1);
CellType.Cell4096kPart.setHousingValue(1);
CellType.Cell16384kPart.setHousingValue(1);
}
}
@@ -2,6 +2,7 @@ package com.glodblock.github.loader;
import static com.glodblock.github.common.storage.CellType.Cell16384kPart;
import static com.glodblock.github.loader.ItemAndBlockHolder.*;
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL4KM;
import static net.minecraft.init.Blocks.redstone_torch;
import static net.minecraft.init.Items.fish;
@@ -16,7 +17,7 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import com.glodblock.github.common.Config;
import com.glodblock.github.common.item.ItemBasicFluidStorageCell;
import com.glodblock.github.common.item.FCBaseItemCell;
import com.glodblock.github.common.storage.CellType;
import com.glodblock.github.loader.recipe.WirelessTerminalRecipe;
import com.glodblock.github.util.ModAndClassUtil;
@@ -393,8 +394,9 @@ public class RecipeLoader implements Runnable {
'G',
AE2_LAMP_GLASS));
ItemBasicFluidStorageCell[] cells = new ItemBasicFluidStorageCell[] { CELL1K, CELL4K, CELL16K, CELL64K,
CELL256K, CELL1024K, CELL4096K, CELL16384K };
FCBaseItemCell[] cells = new FCBaseItemCell[] { CELL1K, CELL4K, CELL16K, CELL64K, CELL256K, CELL1024K,
CELL4096K, CELL16384K, CELL1KM, CELL4KM, CELL16KM, CELL64KM, CELL256KM, CELL1024KM, CELL4096KM,
CELL16384KM };
GameRegistry.addRecipe(
new ShapedOreRecipe(
QUANTUM_CELL.stack(),
@@ -417,7 +419,7 @@ public class RecipeLoader implements Runnable {
QUANTUM_CELL,
'M',
AE2_MATTER_CONDENSER));
for (ItemBasicFluidStorageCell cell : cells) {
for (FCBaseItemCell cell : cells) {
if (cell.getHousing().getItemDamage() == 0) {
GameRegistry.addRecipe(
new ShapedOreRecipe(
@@ -443,10 +445,40 @@ public class RecipeLoader implements Runnable {
'D',
"dustRedstone",
'G',
AE2_LAMP_GLASS,
'C',
cell.getComponent(),
'I',
"gemDiamond"));
} else if (cell.getHousing().getItemDamage() == 2) {
GameRegistry.addRecipe(
new ShapedOreRecipe(
cell,
"GDG",
"DCD",
"III",
'D',
"dyeBlue",
'G',
AE2_QUARTZ_GLASS,
'C',
cell.getComponent(),
'I',
"ingotIron"));
} else if (cell.getHousing().getItemDamage() == 3) {
GameRegistry.addRecipe(
new ShapedOreRecipe(
cell,
"GDG",
"DCD",
"III",
'D',
"dustGlowstone",
'G',
AE2_LAMP_GLASS,
'C',
cell.getComponent(),
'I',
"gemDiamond"));
}
GameRegistry.addRecipe(new ShapelessOreRecipe(cell, cell.getHousing(), cell.getComponent()));
@@ -472,8 +504,32 @@ public class RecipeLoader implements Runnable {
'D',
"dustRedstone",
'G',
AE2_LAMP_GLASS,
'I',
"gemDiamond"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
CELL_HOUSING.stack(1, 2),
"GDG",
"D D",
"III",
'D',
"dyeBlue",
'G',
AE2_QUARTZ_GLASS,
'I',
"ingotIron"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
CELL_HOUSING.stack(1, 3),
"GDG",
"D D",
"III",
'D',
"dustGlowstone",
'G',
AE2_LAMP_GLASS,
'I',
"gemDiamond"));
}