mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
ug fixes (#377)
This commit is contained in:
1 parent
f8b19c7e16
commit
ac4bfc9411
14 files changed
+67
-109
No files matched your search
@@ -1,49 +0,0 @@
|
||||
package com.glodblock.github.common.block;
|
||||
|
||||
import static net.minecraft.client.gui.GuiScreen.isShiftKeyDown;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.glodblock.github.common.item.FCBaseItemBlock;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.common.tile.TileFluidDiscretizer;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.glodblock.github.util.RenderUtil;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockFluidDiscretizer extends FCBaseBlock {
|
||||
|
||||
public BlockFluidDiscretizer() {
|
||||
super(Material.iron, NameConst.BLOCK_FLUID_DISCRETIZER);
|
||||
setFullBlock(true);
|
||||
setOpaque(true);
|
||||
setTileEntity(TileFluidDiscretizer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockFluidDiscretizer register() {
|
||||
GameRegistry.registerBlock(this, FCBaseItemBlock.class, NameConst.BLOCK_FLUID_DISCRETIZER);
|
||||
GameRegistry.registerTileEntity(TileFluidDiscretizer.class, NameConst.BLOCK_FLUID_DISCRETIZER);
|
||||
setCreativeTab(FluidCraftingTabs.INSTANCE);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip,
|
||||
final boolean advancedToolTips) {
|
||||
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.addAll(RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_FLUID_DISCRETIZER_DESC)));
|
||||
} else {
|
||||
toolTip.add(NameConst.i18n(NameConst.TT_SHIFT_FOR_MORE));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.google.common.base.Optional;
|
||||
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.items.AEBaseCell;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public abstract class FCBaseItemCell extends AEBaseCell {
|
||||
|
||||
@@ -46,4 +47,20 @@ public abstract class FCBaseItemCell extends AEBaseCell {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCellData(ItemStack is) {
|
||||
return totalBytes + ","
|
||||
+ this.getTotalTypes(null)
|
||||
+ ","
|
||||
+ perType
|
||||
+ ","
|
||||
+ 8 * 256
|
||||
+ ","
|
||||
+ Platform.openNbtData(is).getByte("cellRestrictionTypes")
|
||||
+ ","
|
||||
+ Platform.openNbtData(is).getLong("cellRestrictionAmount")
|
||||
+ ","
|
||||
+ "fluid";
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class ItemFluidLevelEmitter extends FCBaseItem implements IPartItem {
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List<String> lines,
|
||||
final boolean displayMoreInfo) {
|
||||
lines.add("Deprecated, use regular level emitter, hold CTRL for get fluid of container.");
|
||||
lines.add("§4Deprecated, use regular level emitter, hold CTRL for get fluid of container.");
|
||||
super.addInformation(stack, player, lines, displayMoreInfo);
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,6 @@ public class ItemPartFluidPatternTerminal extends FCBaseItem implements IPartIte
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
toolTip.add("DEPRECATED!");
|
||||
toolTip.add("§4DEPRECATED!");
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,6 @@ public class ItemPartFluidPatternTerminalEx extends FCBaseItem implements IPartI
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
toolTip.add("DEPRECATED!");
|
||||
toolTip.add("§4DEPRECATED!");
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class ItemPartFluidTerminal extends FCBaseItem implements IPartItem {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
toolTip.add("DEPRECATED!");
|
||||
toolTip.add("§4DEPRECATED!");
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.add(NameConst.i18n(NameConst.TT_FLUID_TERMINAL));
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.glodblock.github.common.item;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -38,4 +39,10 @@ public class ItemWirelessFluidTerminal extends ItemBaseWirelessTerminal
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCheckedInformation(ItemStack stack, EntityPlayer player, List<String> lines,
|
||||
boolean displayMoreInfo) {
|
||||
lines.add("§4DEPRECATED!");
|
||||
super.addCheckedInformation(stack, player, lines, displayMoreInfo);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.glodblock.github.common.parts;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.parts.automation.PartLevelEmitter;
|
||||
|
||||
@@ -11,4 +16,14 @@ public class PartFluidLevelEmitter extends PartLevelEmitter {
|
||||
public PartFluidLevelEmitter(final ItemStack is) {
|
||||
super(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data) {
|
||||
super.readFromNBT(data);
|
||||
|
||||
final IAEStack<?> aes = this.getAEInventoryByName(null).getAEStackInSlot(0);
|
||||
if (aes instanceof IAEItemStack ais && ais.getItem() instanceof ItemFluidPacket) {
|
||||
this.getAEInventoryByName(null).putAEStackInSlot(0, ItemFluidPacket.getFluidAEStack(ais));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ public class FluidCraftingTabs extends CreativeTabs {
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return ItemAndBlockHolder.DISCRETIZER.stack().getItem();
|
||||
return ItemAndBlockHolder.WALRUS.stack().getItem();
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.glodblock.github.common.tile;
|
||||
|
||||
import appeng.tile.grid.AENetworkTile;
|
||||
|
||||
public class TileFluidDiscretizer extends AENetworkTile {
|
||||
|
||||
public TileFluidDiscretizer() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.block.BlockCertusQuartzTank;
|
||||
import com.glodblock.github.common.block.BlockFluidAutoFiller;
|
||||
import com.glodblock.github.common.block.BlockFluidBuffer;
|
||||
import com.glodblock.github.common.block.BlockFluidDiscretizer;
|
||||
import com.glodblock.github.common.block.BlockFluidInterface;
|
||||
import com.glodblock.github.common.block.BlockFluidPacketDecoder;
|
||||
import com.glodblock.github.common.block.BlockFluidPatternEncoder;
|
||||
@@ -54,7 +53,6 @@ public class ItemAndBlockHolder {
|
||||
|
||||
public static BlockCertusQuartzTank CERTUS_QUARTZ_TANK = new BlockCertusQuartzTank().register();
|
||||
public static BlockFluidAutoFiller FLUID_AUTO_FILLER = new BlockFluidAutoFiller().register();
|
||||
public static BlockFluidDiscretizer DISCRETIZER = new BlockFluidDiscretizer().register();
|
||||
public static BlockLevelMaintainer LEVEL_MAINTAINER = new BlockLevelMaintainer().register();
|
||||
public static BlockFluidPatternEncoder ENCODER = new BlockFluidPatternEncoder().register();
|
||||
public static BlockFluidPacketDecoder DECODER = new BlockFluidPacketDecoder().register();
|
||||
|
||||
@@ -22,7 +22,6 @@ import static com.glodblock.github.loader.ItemAndBlockHolder.CELL64KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL_HOUSING;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CERTUS_QUARTZ_TANK;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.DECODER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.DISCRETIZER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.ENCODER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.ENERGY_CARD;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_AUTO_FILLER;
|
||||
@@ -51,11 +50,11 @@ import static com.glodblock.github.loader.ItemAndBlockHolder.QUANTUM_BRIDGE_CARD
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.QUANTUM_CELL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.SINGULARITY_CELL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WALRUS;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_FLUID_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_INTERFACE_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_LEVEL_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_PATTERN_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_ULTRA_TERM;
|
||||
import static net.minecraft.init.Blocks.redstone_torch;
|
||||
import static net.minecraft.init.Items.fish;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -111,6 +110,10 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiPart"),
|
||||
1,
|
||||
340);
|
||||
public static final ItemStack AE2_PATTERN_TERM_EX = new ItemStack(
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiPart"),
|
||||
1,
|
||||
500);
|
||||
public static final ItemStack AE2_PROCESS_LOG = new ItemStack(
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiMaterial"),
|
||||
1,
|
||||
@@ -189,6 +192,12 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiMaterial"),
|
||||
1,
|
||||
28);
|
||||
|
||||
public static final ItemStack AE2_LEVEL_EMITTER = new ItemStack(
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiPart"),
|
||||
1,
|
||||
280);
|
||||
|
||||
public static final ItemStack AE2_WIRELESS_RECEIVER = new ItemStack(
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiMaterial"),
|
||||
1,
|
||||
@@ -234,26 +243,12 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.addShapelessRecipe(FLUID_INTERFACE_P2P.stack(), AE2_P2P_ME, FLUID_INTERFACE.stack());
|
||||
}
|
||||
GameRegistry.addShapelessRecipe(INTERFACE.stack(), FLUID_INTERFACE.stack());
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_PATTERN_TERM.stack(), FLUID_TERMINAL);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_PATTERN_TERM.stack(), AE2_WIRELESS_TERMINAL, AE2_PATTERN_TERM);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_INTERFACE_TERM.stack(), AE2_WIRELESS_TERMINAL, AE2_INTERFACE_TERMINAL);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_LEVEL_TERM.stack(), AE2_WIRELESS_TERMINAL, LEVEL_MAINTAINER);
|
||||
GameRegistry
|
||||
.addRecipe(new ShapedOreRecipe(CERTUS_QUARTZ_TANK.stack(), "GGG", "G G", "GGG", 'G', AE2_QUARTZ_GLASS));
|
||||
GameRegistry.addShapelessRecipe(FLUID_AUTO_FILLER.stack(), FLUID_TERMINAL, ENCODER);
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(
|
||||
DISCRETIZER.stack(),
|
||||
"IPI",
|
||||
"TMT",
|
||||
"IPI",
|
||||
'I',
|
||||
"ingotIron",
|
||||
'P',
|
||||
AE2_PROCESS_ENG,
|
||||
'T',
|
||||
AE2_STORAGE_BUS,
|
||||
'M',
|
||||
AE2_CONDENSER));
|
||||
GameRegistry.addShapelessRecipe(FLUID_AUTO_FILLER.stack(), AE2_PATTERN_TERM, ENCODER);
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(
|
||||
DECODER.stack(),
|
||||
@@ -294,7 +289,7 @@ public class RecipeLoader implements Runnable {
|
||||
'I',
|
||||
"itemIlluminatedPanel",
|
||||
'E',
|
||||
FLUID_LEVEL_EMITTER,
|
||||
AE2_LEVEL_EMITTER,
|
||||
'P',
|
||||
"dyeBlue"));
|
||||
GameRegistry.addRecipe(
|
||||
@@ -307,13 +302,6 @@ public class RecipeLoader implements Runnable {
|
||||
FLUID_STORAGE_MONITOR,
|
||||
'F',
|
||||
AE2_CORE_FOM));
|
||||
GameRegistry.addShapelessRecipe(FLUID_TERMINAL.stack(), AE2_PATTERN_TERM, ENCODER);
|
||||
GameRegistry.addShapelessRecipe(
|
||||
FLUID_TERMINAL_EX.stack(),
|
||||
FLUID_TERMINAL.stack(),
|
||||
AE2_PROCESS_CAL,
|
||||
AE2_PROCESS_ENG,
|
||||
AE2_PROCESS_LOG);
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(
|
||||
BUFFER.stack(),
|
||||
@@ -333,16 +321,6 @@ public class RecipeLoader implements Runnable {
|
||||
'B',
|
||||
BUCKET));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(WALRUS, "FFF", "F F", "FFF", 'F', fish));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(
|
||||
FLUID_LEVEL_EMITTER.stack(),
|
||||
"RPD",
|
||||
'R',
|
||||
redstone_torch,
|
||||
'P',
|
||||
AE2_PROCESS_CAL,
|
||||
'D',
|
||||
"dyeBlue"));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(
|
||||
LARGE_BUFFER.stack(),
|
||||
@@ -356,7 +334,6 @@ public class RecipeLoader implements Runnable {
|
||||
'E',
|
||||
AE2_PROCESS_ENG));
|
||||
GameRegistry.addShapelessRecipe(AE2_BLANK_PATTERN, PATTERN.stack());
|
||||
GameRegistry.addShapelessRecipe(FLUID_TERM.stack(), AE2_TERMINAL, BUFFER);
|
||||
GameRegistry.addShapelessRecipe(LEVEL_TERMINAL.stack(), AE2_TERMINAL, LEVEL_MAINTAINER);
|
||||
GameRegistry.addShapelessRecipe(
|
||||
FLUID_BUFFER.stack(),
|
||||
@@ -365,6 +342,14 @@ public class RecipeLoader implements Runnable {
|
||||
: ModAndClassUtil.EC2 ? ItemEnum.STORAGECOMPONENT.getDamagedStack(4) : null);
|
||||
GameRegistry
|
||||
.addShapelessRecipe(LEVEL_MAINTAINER.stack(), AE2_CRAFTING_CP_UNIT, ENCODER, AE2_PATTERN_CAPACITY_CARD);
|
||||
|
||||
// Deprecated
|
||||
GameRegistry.addShapelessRecipe(AE2_TERMINAL, FLUID_TERM.stack());
|
||||
GameRegistry.addShapelessRecipe(AE2_WIRELESS_TERMINAL, WIRELESS_FLUID_TERM.stack());
|
||||
GameRegistry.addShapelessRecipe(AE2_LEVEL_EMITTER, FLUID_LEVEL_EMITTER.stack());
|
||||
GameRegistry.addShapelessRecipe(AE2_PATTERN_TERM, FLUID_TERMINAL.stack());
|
||||
GameRegistry.addShapelessRecipe(AE2_PATTERN_TERM_EX, FLUID_TERMINAL_EX.stack());
|
||||
|
||||
if (Config.fluidCells) {
|
||||
OreDictionary.registerOre("anyCertusCrystal", AE2_PURE_CERTUS);
|
||||
for (ItemStack it : OreDictionary.getOres("crystalCertusQuartz"))
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.glodblock.github.FluidCraft;
|
||||
public class NameConst {
|
||||
|
||||
public static final String BLOCK_CERTUS_QUARTZ_TANK = "certus_quartz_tank";
|
||||
public static final String BLOCK_FLUID_DISCRETIZER = "fluid_discretizer";
|
||||
public static final String BLOCK_FLUID_PATTERN_ENCODER = "fluid_pattern_encoder";
|
||||
public static final String BLOCK_FLUID_PACKET_DECODER = "fluid_packet_decoder";
|
||||
public static final String BLOCK_FLUID_INTERFACE = "fluid_interface";
|
||||
@@ -75,8 +74,6 @@ public class NameConst {
|
||||
public static final String TT_FLUID_PACKET_DECODER = TT_KEY + "fluid_packet_decoder.";
|
||||
public static final String TT_FLUID_PACKET_DECODER_DESC = TT_FLUID_PACKET_DECODER + "desc";
|
||||
public static final String TT_FLUID_BUFFER_DESC = TT_FLUID_BUFFER + "desc";
|
||||
public static final String TT_FLUID_DISCRETIZER = TT_KEY + "discretizer.";
|
||||
public static final String TT_FLUID_DISCRETIZER_DESC = TT_FLUID_DISCRETIZER + "desc";
|
||||
public static final String TT_LEVEL_MAINTAINER = TT_KEY + "level_maintainer.";
|
||||
public static final String TT_LEVEL_MAINTAINER_DESC = TT_LEVEL_MAINTAINER + "desc";
|
||||
public static final String TT_LEVEL_MAINTAINER_WHO_AM_I = TT_LEVEL_MAINTAINER + "Who_Am_I";
|
||||
|
||||
Reference in new issue
Block a user