mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-22 21:09:43 +00:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8140da431 | ||
|
|
47dce05cfa | ||
|
|
ab4acbe5eb | ||
|
|
587fd70876 | ||
|
|
d820b68a7d | ||
|
|
bce6e35675 | ||
|
|
b6b9f71677 | ||
|
|
63daee5e56 | ||
|
|
c6f7c17854 | ||
|
|
61ac42d270 | ||
|
|
989cd173fb | ||
|
|
8cafbceed7 | ||
|
|
292a70ab6e | ||
|
|
a575e58ac7 | ||
|
|
b6e7a2f570 | ||
|
|
69418714dd | ||
|
|
de89faed70 | ||
|
|
2b8c983e8a | ||
|
|
733774e7a3 | ||
|
|
a63add7bff | ||
|
|
f6c10901d9 | ||
|
|
c313f51750 | ||
|
|
1d4acb8076 | ||
|
|
bdf3ab1a56 | ||
|
|
b51f786f53 | ||
|
|
6d5c8ca435 | ||
|
|
9d6c0b4c56 | ||
|
|
49181f3df6 | ||
|
|
92e5c4adc7 | ||
|
|
409e1f2a8d | ||
|
|
15c056556d | ||
|
|
76f2ddf18e | ||
|
|
6a69f807f1 | ||
|
|
b9d82c5da5 | ||
|
|
72270a3f64 | ||
|
|
89ca4b8313 | ||
|
|
52031271b4 | ||
|
|
88ccb54fe3 | ||
|
|
bba4eb14cc | ||
|
|
de3715cbf3 | ||
|
|
acf8ab44d7 | ||
|
|
c7925b2b6c |
No files matched your search
+9
-9
@@ -2,25 +2,25 @@
|
||||
|
||||
dependencies {
|
||||
compile('com.github.GTNewHorizons:NotEnoughItems:2.2.17-GTNH:dev')
|
||||
compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-92-GTNH:dev')
|
||||
compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-109-GTNH:dev')
|
||||
compile('curse.maven:cofh-core-69162:2388751')
|
||||
compile('com.github.GTNewHorizons:ExtraCells2:2.5.9:dev') {transitive = false}
|
||||
compile('com.github.GTNewHorizons:ExtraCells2:2.5.20:dev') {transitive = false}
|
||||
compile("com.github.GTNewHorizons:WirelessCraftingTerminal:1.8.8.5:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.7:dev")
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.27:dev")
|
||||
compileOnly("com.github.GTNewHorizons:EnderCore:0.2.6:dev")
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.4.7:dev')
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.3.1.27:dev')
|
||||
compileOnly('com.github.GTNewHorizons:EnderCore:0.2.6:dev')
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.40.41:dev')
|
||||
compileOnly('com.github.GTNewHorizons:StructureLib:1.0.15:dev')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
compileOnly('com.github.GTNewHorizons:AppleCore:3.1.9:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.27:dev') {transitive = false}
|
||||
compileOnly("com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev") {transitive = false}
|
||||
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.7.5.23-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.3.19-GTNH:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.29:dev") {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:GTplusplus:1.7.49:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.3.1.29:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GTplusplus:1.7.49:dev') {transitive = false}
|
||||
|
||||
runtime("com.github.GTNewHorizons:Baubles:1.0.1.14:dev")
|
||||
runtime('com.github.GTNewHorizons:Baubles:1.0.1.14:dev')
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import appeng.api.AEApi;
|
||||
import appeng.api.config.Upgrades;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.storage.FluidCellHandler;
|
||||
import com.glodblock.github.crossmod.opencomputers.OCDriverInit;
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.loader.ChannelLoader;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
@@ -43,6 +44,9 @@ public class FluidCraft {
|
||||
@Mod.EventHandler
|
||||
public static void init(FMLInitializationEvent event) {
|
||||
ModAndClassUtil.init();
|
||||
if (ModAndClassUtil.OC) {
|
||||
OCDriverInit.run();
|
||||
}
|
||||
proxy.init(event);
|
||||
}
|
||||
|
||||
@@ -71,6 +75,7 @@ public class FluidCraft {
|
||||
Upgrades.REDSTONE.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_IMPORT_BUS), 1 );
|
||||
Upgrades.SPEED.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_EXPORT_BUS), 4 );
|
||||
Upgrades.SPEED.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_IMPORT_BUS), 4 );
|
||||
Upgrades.CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_EXPORT_BUS), 1 );
|
||||
}
|
||||
|
||||
proxy.postInit(event);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class GuiBaseFluidPatternTerminal extends GuiFCBaseMonitor {
|
||||
}
|
||||
else if( this.encodeBtn == btn )
|
||||
{
|
||||
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Encode", isShiftKeyDown() ? "2" : "1" ) );
|
||||
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminal.Encode", (isCtrlKeyDown() ? 1 : 0) << 1 | (isShiftKeyDown() ? 1 : 0) ));
|
||||
}
|
||||
else if( this.clearBtn == btn )
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
|
||||
|
||||
if( this.encodeBtn == btn )
|
||||
{
|
||||
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Encode", isShiftKeyDown() ? "2" : "1" ) );
|
||||
FluidCraft.proxy.netHandler.sendToServer( new CPacketFluidPatternTermBtns( "PatternTerminalEx.Encode",(isCtrlKeyDown() ? 1 : 0) << 1 | (isShiftKeyDown() ? 1 : 0)) );
|
||||
}
|
||||
else if( this.clearBtn == btn )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.glodblock.github.client.gui;
|
||||
|
||||
import appeng.api.config.InsertionMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
@@ -30,6 +31,7 @@ public class GuiDualInterface extends GuiUpgradeable {
|
||||
private GuiTabButton switcher;
|
||||
private GuiImgButton BlockMode;
|
||||
private GuiToggleButton interfaceMode;
|
||||
private GuiImgButton insertionMode;
|
||||
private final IInterfaceHost host;
|
||||
|
||||
public GuiDualInterface(InventoryPlayer inventoryPlayer, IInterfaceHost te) {
|
||||
@@ -53,6 +55,9 @@ public class GuiDualInterface extends GuiUpgradeable {
|
||||
|
||||
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal.getLocal(), GuiText.InterfaceTerminalHint.getLocal() );
|
||||
this.buttonList.add( this.interfaceMode );
|
||||
|
||||
this.insertionMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 44, Settings.INSERTION_MODE, InsertionMode.DEFAULT );
|
||||
this.buttonList.add( this.insertionMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,8 +72,12 @@ public class GuiDualInterface extends GuiUpgradeable {
|
||||
{
|
||||
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).getInterfaceTerminalMode() == YesNo.YES );
|
||||
}
|
||||
if( this.insertionMode != null )
|
||||
{
|
||||
this.insertionMode.set( ( (ContainerInterface) this.cvb ).getInsertionMode());
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString( StatCollector.translateToLocal(NameConst.GUI_FLUID_INTERFACE), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( getGuiDisplayName(StatCollector.translateToLocal(NameConst.GUI_FLUID_INTERFACE)), 8, 6, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,5 +133,9 @@ public class GuiDualInterface extends GuiUpgradeable {
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
||||
}
|
||||
if( btn == this.insertionMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.insertionMode.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,7 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
private GuiButton start;
|
||||
private GuiButton selectCPU;
|
||||
private int tooltip = -1;
|
||||
private ItemStack hoveredStack;
|
||||
|
||||
public GuiFluidCraftConfirm(final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
@@ -202,7 +203,7 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
final List<String> lineList = new LinkedList<String>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
hoveredStack = null;
|
||||
final int offY = 23;
|
||||
|
||||
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
|
||||
@@ -324,6 +325,7 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
|
||||
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
||||
toolPosY = y * offY + yo;
|
||||
hoveredStack = is;
|
||||
}
|
||||
|
||||
this.drawItem( posX, posY, is );
|
||||
@@ -551,4 +553,7 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getHoveredStack() {
|
||||
return hoveredStack;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import appeng.core.localization.GuiText;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidIO;
|
||||
import com.glodblock.github.common.parts.PartFluidImportBus;
|
||||
import com.glodblock.github.common.parts.PartSharedFluidBus;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class GuiFluidIO extends GuiUpgradeable
|
||||
@@ -29,4 +31,30 @@ public class GuiFluidIO extends GuiUpgradeable
|
||||
((ContainerFluidIO)this.cvb).getBus().setFluidInSlot(id, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName(I18n.format(this.bus instanceof PartFluidImportBus ? NameConst.GUI_FLUID_IMPORT : NameConst.GUI_FLUID_EXPORT)), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if( this.redstoneMode != null )
|
||||
{
|
||||
this.redstoneMode.set( this.cvb.getRedStoneMode() );
|
||||
}
|
||||
|
||||
if( this.fuzzyMode != null )
|
||||
{
|
||||
this.fuzzyMode.set( this.cvb.getFuzzyMode() );
|
||||
}
|
||||
|
||||
if( this.craftMode != null )
|
||||
{
|
||||
this.craftMode.set( this.cvb.getCraftingMode() );
|
||||
}
|
||||
|
||||
if( this.schedulingMode != null )
|
||||
{
|
||||
this.schedulingMode.set( this.cvb.getSchedulingMode() );
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
-2
@@ -18,6 +18,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -57,9 +59,22 @@ public abstract class ContainerFluidConfigurable extends ContainerUpgradeable {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.standardDetectAndSendChanges();
|
||||
return null;
|
||||
} else {
|
||||
if(idx < this.availableUpgrades()){
|
||||
if(!mergeItemStack(tis, this.getFakeFluidInv().getSizeInventory()+this.availableUpgrades(), this.inventorySlots.size(), false)) return null;
|
||||
}else if(idx>=this.getFakeFluidInv().getSizeInventory()+this.availableUpgrades()){
|
||||
if(!mergeItemStack(tis, 0, this.availableUpgrades(), false)) return null;
|
||||
}
|
||||
if (tis.stackSize == 0) {
|
||||
clickSlot.putStack(null);
|
||||
} else {
|
||||
clickSlot.onSlotChanged();
|
||||
}
|
||||
this.standardDetectAndSendChanges();
|
||||
return tis;
|
||||
}
|
||||
this.standardDetectAndSendChanges();
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void setupConfig()
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.glodblock.github.client.gui.container;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.tile.inventory.AppEngInternalAEInventory;
|
||||
import com.glodblock.github.common.parts.PartFluidExportBus;
|
||||
import com.glodblock.github.common.parts.PartSharedFluidBus;
|
||||
import com.glodblock.github.util.Ae2Reflect;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class ContainerFluidIO extends ContainerFluidConfigurable
|
||||
@@ -22,4 +27,12 @@ public class ContainerFluidIO extends ContainerFluidConfigurable
|
||||
public AppEngInternalAEInventory getFakeFluidInv() {
|
||||
return (AppEngInternalAEInventory) this.bus.getInventoryByName("config");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadSettingsFromHost(IConfigManager cm) {
|
||||
super.loadSettingsFromHost(cm);
|
||||
if (Ae2Reflect.getUpgradeableHost(this) instanceof PartFluidExportBus) {
|
||||
this.setCraftingMode((YesNo)cm.getSetting(Settings.CRAFT_ONLY));
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -29,6 +29,19 @@ public class ContainerFluidPatternTerminal extends FCBasePartContainer implement
|
||||
super(ip, monitorable);
|
||||
}
|
||||
|
||||
public void encodeAllItemAndMoveToInventory(){
|
||||
encode();
|
||||
ItemStack output = this.patternSlotOUT.getStack();
|
||||
if(output != null){
|
||||
if(this.patternSlotIN.getStack() != null) output.stackSize += this.patternSlotIN.getStack().stackSize;
|
||||
if (!getPlayerInv().addItemStackToInventory( output )){
|
||||
getPlayerInv().player.entityDropItem(output, 0);
|
||||
}
|
||||
this.patternSlotOUT.putStack( null );
|
||||
this.patternSlotIN.putStack(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encode() {
|
||||
if (!checkHasFluidPattern()) {
|
||||
|
||||
+14
@@ -28,6 +28,19 @@ public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx imple
|
||||
super(ip, monitorable);
|
||||
}
|
||||
|
||||
public void encodeAllItemAndMoveToInventory(){
|
||||
encode();
|
||||
ItemStack output = this.patternSlotOUT.getStack();
|
||||
if(output != null){
|
||||
if(this.patternSlotIN.getStack() != null) output.stackSize += this.patternSlotIN.getStack().stackSize;
|
||||
if (!getPlayerInv().addItemStackToInventory( output )){
|
||||
getPlayerInv().player.entityDropItem(output, 0);
|
||||
}
|
||||
this.patternSlotOUT.putStack( null );
|
||||
this.patternSlotIN.putStack(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encode() {
|
||||
if (!checkHasFluidPattern()) {
|
||||
@@ -98,6 +111,7 @@ public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx imple
|
||||
private void encodeFluidPattern() {
|
||||
ItemStack patternStack = new ItemStack(ItemAndBlockHolder.PATTERN);
|
||||
FluidPatternDetails pattern = new FluidPatternDetails(patternStack);
|
||||
pattern.setCombine(this.combine ? 1:0);
|
||||
pattern.setInputs(collectInventory(craftingSlots));
|
||||
pattern.setOutputs(collectInventory(outputSlots));
|
||||
patternSlotOUT.putStack(pattern.writeToStack());
|
||||
|
||||
@@ -214,8 +214,7 @@ public class FCBasePartContainerEx extends FCBaseMonitorContain implements IAEAp
|
||||
|
||||
encodedValue.setTag( "in", tagIn );
|
||||
encodedValue.setTag( "out", tagOut );
|
||||
encodedValue.setBoolean( "piroritize", this.isPrioritize() );
|
||||
|
||||
encodedValue.setBoolean( "prioritize", this.isPrioritize() );
|
||||
|
||||
output.setTagCompound( encodedValue );
|
||||
}
|
||||
|
||||
@@ -82,8 +82,15 @@ public class ItemDropRender implements IItemRenderer {
|
||||
}
|
||||
int colour = fluid.getColor();
|
||||
if (colour == 0xFFFFFF) {
|
||||
TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks()
|
||||
.getTextureExtry(fluid.getStillIcon().getIconName());
|
||||
TextureAtlasSprite sprite;
|
||||
try {
|
||||
sprite = Minecraft.getMinecraft().getTextureMapBlocks()
|
||||
.getTextureExtry(fluid.getStillIcon().getIconName());
|
||||
} catch (NullPointerException e) {
|
||||
colourCache.put(fluid.getName(), colour);
|
||||
return colour;
|
||||
}
|
||||
|
||||
if (sprite != null && sprite.getFrameCount() > 0) {
|
||||
int[][] image = sprite.getFrameTextureData(0);
|
||||
int r = 0, g = 0, b = 0, count = 0;
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.glodblock.github.common.block;
|
||||
import appeng.block.AEBaseItemBlock;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.common.tile.TileOCPatternEditor;
|
||||
import com.glodblock.github.crossmod.opencomputers.OCDriverInit;
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
@@ -44,7 +43,6 @@ public class BlockOCPatternEditor extends FCBaseBlock {
|
||||
if (ModAndClassUtil.OC) {
|
||||
GameRegistry.registerBlock(this, AEBaseItemBlock.class, NameConst.BLOCK_OC_PATTERN_EDITOR);
|
||||
GameRegistry.registerTileEntity(TileOCPatternEditor.class, NameConst.BLOCK_OC_PATTERN_EDITOR);
|
||||
OCDriverInit.run();
|
||||
setCreativeTab(FluidCraftingTabs.INSTANCE);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.glodblock.github.common.item;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.misc.ItemEncodedPattern;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.util.FluidPatternDetails;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFluidEncodedPattern extends ItemEncodedPattern {
|
||||
|
||||
@@ -28,4 +33,22 @@ public class ItemFluidEncodedPattern extends ItemEncodedPattern {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCheckedInformation(final ItemStack stack, final EntityPlayer player, final List<String> lines, final boolean displayMoreInfo )
|
||||
{
|
||||
NBTTagCompound data = stack.getTagCompound();
|
||||
final boolean combine = data.getBoolean("combine");
|
||||
final boolean prio = data.getBoolean("prioritize");
|
||||
super.addCheckedInformation(stack, player, lines, displayMoreInfo);
|
||||
// lines.add(String.format("%s: %s",combine ? StatCollector.translateToLocal(NameConst.TT_KEY+"combine"):StatCollector.translateToLocal(NameConst.TT_KEY+"not_combine"),combine ? GuiText.Yes.getLocal() : GuiText.No.getLocal()));
|
||||
// lines.add(String.format("%s: %s",prio ? StatCollector.translateToLocal(NameConst.TT_KEY+"prio"):StatCollector.translateToLocal(NameConst.TT_KEY+"not_prio"),prio ? GuiText.Yes.getLocal() : GuiText.No.getLocal()));
|
||||
}
|
||||
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
public ItemStack stack(int size) {
|
||||
return new ItemStack(this, size);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,10 @@ package com.glodblock.github.common.parts;
|
||||
|
||||
import appeng.api.config.*;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.crafting.ICraftingGrid;
|
||||
import appeng.api.networking.crafting.ICraftingLink;
|
||||
import appeng.api.networking.crafting.ICraftingRequester;
|
||||
import appeng.api.networking.energy.IEnergyGrid;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.security.MachineSource;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
@@ -10,11 +14,21 @@ import appeng.api.parts.IPartCollisionHelper;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.core.AELog;
|
||||
import appeng.helpers.MultiCraftingTracker;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.item.AEFluidStack;
|
||||
import appeng.util.item.AEItemStack;
|
||||
import com.glodblock.github.client.textures.FCPartsTexture;
|
||||
import com.glodblock.github.common.item.ItemFluidDrop;
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.inventory.FluidConvertingInventoryAdaptor;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -23,9 +37,10 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
public class PartFluidExportBus extends PartSharedFluidBus {
|
||||
public class PartFluidExportBus extends PartSharedFluidBus implements ICraftingRequester {
|
||||
|
||||
private final BaseActionSource source;
|
||||
private final MultiCraftingTracker craftingTracker = new MultiCraftingTracker( this, 9 );
|
||||
|
||||
public PartFluidExportBus( ItemStack is )
|
||||
{
|
||||
@@ -74,6 +89,8 @@ public class PartFluidExportBus extends PartSharedFluidBus {
|
||||
{
|
||||
try
|
||||
{
|
||||
final InventoryAdaptor destination = this.getHandler(te);
|
||||
final ICraftingGrid cg = this.getProxy().getCrafting();
|
||||
final IFluidHandler fh = (IFluidHandler) te;
|
||||
final IMEMonitor<IAEFluidStack> inv = this.getProxy().getStorage().getFluidInventory();
|
||||
|
||||
@@ -82,13 +99,20 @@ public class PartFluidExportBus extends PartSharedFluidBus {
|
||||
IAEFluidStack fluid = AEFluidStack.create(ItemFluidPacket.getFluidStack(this.getInventoryByName("config").getStackInSlot(i)));
|
||||
if( fluid != null )
|
||||
{
|
||||
boolean isAllowed = true;
|
||||
|
||||
final IAEFluidStack toExtract = fluid.copy();
|
||||
|
||||
toExtract.setStackSize( this.calculateAmountToSend() );
|
||||
|
||||
if( this.craftOnly() )
|
||||
{
|
||||
isAllowed = this.craftingTracker.handleCrafting( i, toExtract.getStackSize(), ItemFluidDrop.newAeStack(toExtract), destination, this.getTile().getWorldObj(), this.getProxy().getGrid(), cg, this.source );
|
||||
}
|
||||
|
||||
final IAEFluidStack out = inv.extractItems( toExtract, Actionable.SIMULATE, this.source );
|
||||
|
||||
if( out != null )
|
||||
if( out != null && isAllowed )
|
||||
{
|
||||
int wasInserted = fh.fill( this.getSide().getOpposite(), out.getFluidStack(), true );
|
||||
|
||||
@@ -100,6 +124,10 @@ public class PartFluidExportBus extends PartSharedFluidBus {
|
||||
return TickRateModulation.FASTER;
|
||||
}
|
||||
}
|
||||
|
||||
if( this.isCraftingEnabled() ) {
|
||||
this.craftingTracker.handleCrafting( i, toExtract.getStackSize(), ItemFluidDrop.newAeStack(toExtract), destination, this.getTile().getWorldObj(), this.getProxy().getGrid(), cg, this.source );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,4 +197,64 @@ public class PartFluidExportBus extends PartSharedFluidBus {
|
||||
return (RedstoneMode) this.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
||||
}
|
||||
|
||||
private boolean craftOnly() {
|
||||
return this.getConfigManager().getSetting(Settings.CRAFT_ONLY) == YesNo.YES;
|
||||
}
|
||||
|
||||
private boolean isCraftingEnabled()
|
||||
{
|
||||
return this.getInstalledUpgrades( Upgrades.CRAFTING ) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs() {
|
||||
return this.craftingTracker.getRequestedJobs();
|
||||
}
|
||||
|
||||
protected InventoryAdaptor getHandler(TileEntity target) {
|
||||
return target != null ? FluidConvertingInventoryAdaptor.wrap(target, Util.from(this.getSide().getOpposite())) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode) {
|
||||
final InventoryAdaptor d = this.getHandler(getConnectedTE());
|
||||
|
||||
try
|
||||
{
|
||||
if( d != null && this.getProxy().isActive() )
|
||||
{
|
||||
final IEnergyGrid energy = this.getProxy().getEnergy();
|
||||
final double power = Math.ceil(items.getStackSize() / 1000D);
|
||||
|
||||
if( energy.extractAEPower( power, mode, PowerMultiplier.CONFIG ) > power - 0.01 )
|
||||
{
|
||||
ItemStack inputStack = items.getItemStack();
|
||||
|
||||
ItemStack remaining;
|
||||
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
remaining = d.simulateAdd( inputStack );
|
||||
}
|
||||
else
|
||||
{
|
||||
remaining = d.addItems( inputStack );
|
||||
}
|
||||
|
||||
return AEItemStack.create( remaining );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( final GridAccessException e )
|
||||
{
|
||||
AELog.debug( e );
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void jobStateChange(ICraftingLink link) {
|
||||
this.craftingTracker.jobStateChange( link );
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,10 @@ public class PartFluidPatternTerminal extends FCBasePart {
|
||||
|
||||
this.setCraftingRecipe(details.isCraftable());
|
||||
this.setSubstitution(details.canSubstitute());
|
||||
|
||||
if(newStack != null){
|
||||
NBTTagCompound data = newStack.getTagCompound();
|
||||
this.setCombineMode(data.getInteger("combine") == 1);
|
||||
}
|
||||
for (int i = 0; i < this.crafting.getSizeInventory(); i++) {
|
||||
this.crafting.setInventorySlotContents(i, null);
|
||||
}
|
||||
|
||||
@@ -160,6 +160,11 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
|
||||
}
|
||||
|
||||
this.setSubstitution(details.canSubstitute());
|
||||
if(newStack != null){
|
||||
NBTTagCompound data = newStack.getTagCompound();
|
||||
this.setCombineMode(data.getInteger("combine") == 1);
|
||||
this.setPrioritization(data.getInteger("prioritize") == 1);
|
||||
}
|
||||
this.setInverted(inputsCount <= 8 && outputCount >= 8);
|
||||
this.setActivePage(0);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
private final ItemStack cellItem;
|
||||
private final ISaveProvider container;
|
||||
private final static int MAX_TYPE = 1;
|
||||
private int storedFluidCount;
|
||||
private long storedFluidCount;
|
||||
private short storedFluids;
|
||||
private IItemList<IAEFluidStack> cellItems;
|
||||
private final NBTTagCompound tagCompound;
|
||||
@@ -78,7 +78,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
this.container = container;
|
||||
this.tagCompound = Platform.openNbtData( o );
|
||||
this.storedFluids = this.tagCompound.getShort( FLUID_TYPE_TAG );
|
||||
this.storedFluidCount = this.tagCompound.getInteger( FLUID_COUNT_TAG );
|
||||
this.storedFluidCount = this.tagCompound.getLong( FLUID_COUNT_TAG );
|
||||
this.cellItems = null;
|
||||
}
|
||||
|
||||
@@ -221,14 +221,15 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
for( int x = 0; x < types; x++ )
|
||||
{
|
||||
final FluidStack t = FluidStack.loadFluidStackFromNBT( this.tagCompound.getCompoundTag( fluidSlots[x] ) );
|
||||
final AEFluidStack aet = AEFluidStack.create( t );
|
||||
|
||||
if( t != null )
|
||||
if( aet != null )
|
||||
{
|
||||
t.amount = this.tagCompound.getInteger( fluidSlotCount[x] );
|
||||
aet.setStackSize( this.tagCompound.getLong( fluidSlotCount[x] ) );
|
||||
|
||||
if( t.amount > 0 )
|
||||
if( aet.getStackSize() > 0 )
|
||||
{
|
||||
this.cellItems.add( AEFluidStack.create( t ) );
|
||||
this.cellItems.add( aet );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,12 +248,12 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
private void updateFluidCount( final long delta )
|
||||
{
|
||||
this.storedFluidCount += delta;
|
||||
this.tagCompound.setInteger( FLUID_COUNT_TAG, this.storedFluidCount );
|
||||
this.tagCompound.setLong( FLUID_COUNT_TAG, this.storedFluidCount );
|
||||
}
|
||||
|
||||
private void saveChanges()
|
||||
{
|
||||
int itemCount = 0;
|
||||
long itemCount = 0;
|
||||
|
||||
int x = 0;
|
||||
|
||||
@@ -277,7 +278,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
* NBTBase tagSlotCount = tagCompound.getTag( itemSlotCount[x] ); if ( tagSlotCount instanceof
|
||||
* NBTTagInt ) ((NBTTagInt) tagSlotCount).data = (int) v.getStackSize(); else
|
||||
*/
|
||||
this.tagCompound.setInteger( fluidSlotCount[x], (int) v.getStackSize() );
|
||||
this.tagCompound.setLong( fluidSlotCount[x], v.getStackSize() );
|
||||
|
||||
x++;
|
||||
}
|
||||
@@ -312,7 +313,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
}
|
||||
else
|
||||
{
|
||||
this.tagCompound.setInteger( FLUID_COUNT_TAG, itemCount );
|
||||
this.tagCompound.setLong( FLUID_COUNT_TAG, itemCount );
|
||||
}
|
||||
|
||||
// clean any old crusty stuff...
|
||||
|
||||
@@ -64,12 +64,13 @@ public class TileFluidPacketDecoder extends AENetworkTile implements IGridTickab
|
||||
inventory.setInventorySlotContents(0, null);
|
||||
return TickRateModulation.SLEEP;
|
||||
}
|
||||
IAEFluidStack aeFluid = AEFluidStack.create(fluid);
|
||||
IAEFluidStack aeFluid = AEFluidStack.create(fluid.copy());
|
||||
IEnergyGrid energyGrid = node.getGrid().getCache(IEnergyGrid.class);
|
||||
IMEMonitor<IAEFluidStack> fluidGrid = node.getGrid().<IStorageGrid>getCache(IStorageGrid.class).getFluidInventory();
|
||||
IAEFluidStack remaining = Platform.poweredInsert(energyGrid, fluidGrid, aeFluid, ownActionSource);
|
||||
if (remaining != null) {
|
||||
if (remaining.getStackSize() == aeFluid.getStackSize()) {
|
||||
inventory.setInventorySlotContents(0, ItemFluidPacket.newStack(remaining.getFluidStack()));
|
||||
return TickRateModulation.SLOWER;
|
||||
}
|
||||
inventory.setInventorySlotContents(0, ItemFluidPacket.newStack(remaining.getFluidStack()));
|
||||
|
||||
@@ -29,10 +29,13 @@ public class FCClassTransformer implements IClassTransformer {
|
||||
case "net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftConfirm":
|
||||
tform = GuiCraftingTransformer.INSTANCE;
|
||||
break;
|
||||
case "appeng.integration.modules.NEI":
|
||||
tform = NEITransfermer.INSTANCE;
|
||||
break;
|
||||
default:
|
||||
return code;
|
||||
}
|
||||
System.out.println("[FCAE2] Transforming class: " + transformedName);
|
||||
System.out.println("[AE2FC] Transforming class: " + transformedName);
|
||||
return tform.transformClass(code);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,15 @@ import appeng.api.networking.storage.IStorageGrid;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.implementations.GuiCraftConfirm;
|
||||
import appeng.client.gui.implementations.GuiCraftingCPU;
|
||||
import appeng.crafting.MECraftingInventory;
|
||||
import appeng.me.MachineSet;
|
||||
import appeng.me.cluster.implementations.CraftingCPUCluster;
|
||||
import appeng.parts.misc.PartInterface;
|
||||
import appeng.tile.misc.TileInterface;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import com.glodblock.github.client.gui.GuiFluidCraftConfirm;
|
||||
import com.glodblock.github.common.item.ItemFluidDrop;
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.common.parts.PartFluidInterface;
|
||||
@@ -26,6 +29,7 @@ import com.glodblock.github.util.Ae2Reflect;
|
||||
import com.glodblock.github.util.SetBackedMachineSet;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.Sets;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -52,6 +56,17 @@ public class CoreModHooks {
|
||||
return stack;
|
||||
}
|
||||
|
||||
public static ItemStack removeFluidPackets(InventoryCrafting inv, int index) {
|
||||
ItemStack stack = inv.getStackInSlot(index);
|
||||
if (stack != null && stack.getItem() instanceof ItemFluidPacket) {
|
||||
FluidStack fluid = ItemFluidPacket.getFluidStack(stack);
|
||||
return ItemFluidDrop.newStack(fluid);
|
||||
}
|
||||
else {
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static InventoryAdaptor wrapInventory(@Nullable TileEntity tile, ForgeDirection face) {
|
||||
return tile != null ? FluidConvertingInventoryAdaptor.wrap(tile, Util.from(face)) : null;
|
||||
@@ -59,7 +74,14 @@ public class CoreModHooks {
|
||||
|
||||
public static long getCraftingByteCost(IAEItemStack stack) {
|
||||
return stack.getItem() instanceof ItemFluidDrop
|
||||
? (long)Math.ceil(stack.getStackSize() / 1000D) : stack.getStackSize();
|
||||
? (long) Math.ceil(stack.getStackSize() / 1000D) : stack.getStackSize();
|
||||
}
|
||||
|
||||
public static long getFluidDropsByteCost(long totalBytes, long originByte, IAEItemStack stack) {
|
||||
if (stack != null && stack.getItem() instanceof ItemFluidDrop) {
|
||||
return (long) Math.ceil(originByte / 1000D) + totalBytes;
|
||||
}
|
||||
return originByte + totalBytes;
|
||||
}
|
||||
|
||||
public static IAEItemStack[] flattenFluidPackets(IAEItemStack[] stacks) {
|
||||
@@ -158,4 +180,18 @@ public class CoreModHooks {
|
||||
Ae2Reflect.markCPUDirty(instance);
|
||||
}
|
||||
|
||||
public static ItemStack getStackUnderMouse(GuiContainer gui, int mousex, int mousey) {
|
||||
if (gui instanceof GuiFluidCraftConfirm) {
|
||||
return ((GuiFluidCraftConfirm) gui).getHoveredStack();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean shouldShowTooltip(GuiContainer gui) {
|
||||
if (gui instanceof GuiFluidCraftConfirm) {
|
||||
return ((GuiFluidCraftConfirm)gui).getHoveredStack() == null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -83,6 +83,15 @@ public class CraftingCpuTransformer extends FCClassTransformer.ClassMapper {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (opcode == Opcodes.INVOKEVIRTUAL
|
||||
&& owner.equals("net/minecraft/inventory/InventoryCrafting") && (name.equals("getStackInSlot") || name.equals("func_70301_a"))) {
|
||||
super.visitMethodInsn(Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"removeFluidPackets",
|
||||
"(Lnet/minecraft/inventory/InventoryCrafting;I)Lnet/minecraft/item/ItemStack;",
|
||||
false);
|
||||
return;
|
||||
}
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
if (gotInventory) {
|
||||
if (opcode == Opcodes.INVOKESTATIC
|
||||
|
||||
@@ -38,6 +38,7 @@ public class CraftingTreeNodeTransformer extends FCClassTransformer.ClassMapper
|
||||
private static class TransformRequest extends MethodVisitor {
|
||||
|
||||
private boolean writingBytes = false;
|
||||
private int cnt = 0;
|
||||
|
||||
TransformRequest(int api, MethodVisitor mv) {
|
||||
super(api, mv);
|
||||
@@ -62,6 +63,7 @@ public class CraftingTreeNodeTransformer extends FCClassTransformer.ClassMapper
|
||||
if (writingBytes && opcode == Opcodes.INVOKEINTERFACE
|
||||
&& owner.equals("appeng/api/storage/data/IAEItemStack") && name.equals("getStackSize")) {
|
||||
writingBytes = false;
|
||||
cnt ++;
|
||||
super.visitMethodInsn(Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"getCraftingByteCost",
|
||||
@@ -72,6 +74,27 @@ public class CraftingTreeNodeTransformer extends FCClassTransformer.ClassMapper
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInsn(int opcode) {
|
||||
if (writingBytes && cnt == 5 && opcode == Opcodes.LADD) {
|
||||
super.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
super.visitFieldInsn(Opcodes.GETFIELD,
|
||||
"appeng/crafting/CraftingTreeNode",
|
||||
"what",
|
||||
"Lappeng/api/storage/data/IAEItemStack;"
|
||||
);
|
||||
super.visitMethodInsn(Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"getFluidDropsByteCost",
|
||||
"(JJLappeng/api/storage/data/IAEItemStack;)J",
|
||||
false);
|
||||
writingBytes = false;
|
||||
cnt ++;
|
||||
return;
|
||||
}
|
||||
super.visitInsn(opcode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.glodblock.github.coremod.transform;
|
||||
|
||||
import com.glodblock.github.coremod.FCClassTransformer;
|
||||
import org.objectweb.asm.ClassVisitor;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
public class NEITransfermer extends FCClassTransformer.ClassMapper {
|
||||
|
||||
public static final NEITransfermer INSTANCE = new NEITransfermer();
|
||||
|
||||
private NEITransfermer() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClassVisitor getClassMapper(ClassVisitor downstream) {
|
||||
return new TransformNEI(Opcodes.ASM5, downstream);
|
||||
}
|
||||
|
||||
private static class TransformNEI extends ClassVisitor {
|
||||
|
||||
TransformNEI(int api, ClassVisitor cv) {
|
||||
super(api, cv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
switch (name) {
|
||||
case "getStackUnderMouse":
|
||||
return new TransformStackUnderMouse(api, super.visitMethod(access, name, desc, signature, exceptions));
|
||||
case "shouldShowTooltip":
|
||||
return new TransformShowTooltip(api, super.visitMethod(access, name, desc, signature, exceptions));
|
||||
default:
|
||||
return super.visitMethod(access, name, desc, signature, exceptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class TransformStackUnderMouse extends MethodVisitor {
|
||||
|
||||
TransformStackUnderMouse(int api, MethodVisitor mv) {
|
||||
super(api, mv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInsn(int opcode) {
|
||||
if (opcode == Opcodes.ACONST_NULL) {
|
||||
super.visitVarInsn(Opcodes.ALOAD, 1);
|
||||
super.visitVarInsn(Opcodes.ILOAD, 2);
|
||||
super.visitVarInsn(Opcodes.ILOAD, 3);
|
||||
super.visitMethodInsn(Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"getStackUnderMouse",
|
||||
"(Lnet/minecraft/client/gui/inventory/GuiContainer;II)Lnet/minecraft/item/ItemStack;",
|
||||
false
|
||||
);
|
||||
return;
|
||||
}
|
||||
super.visitInsn(opcode);
|
||||
}
|
||||
}
|
||||
|
||||
private static class TransformShowTooltip extends MethodVisitor {
|
||||
|
||||
int const_1 = 0;
|
||||
|
||||
TransformShowTooltip(int api, MethodVisitor mv) {
|
||||
super(api, mv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInsn(int opcode) {
|
||||
if (opcode == Opcodes.ICONST_1 && const_1 == 2) {
|
||||
super.visitVarInsn(Opcodes.ALOAD, 1);
|
||||
super.visitMethodInsn(Opcodes.INVOKESTATIC,
|
||||
"com/glodblock/github/coremod/hooker/CoreModHooks",
|
||||
"shouldShowTooltip",
|
||||
"(Lnet/minecraft/client/gui/inventory/GuiContainer;)Z",
|
||||
false
|
||||
);
|
||||
const_1 ++;
|
||||
return;
|
||||
}
|
||||
if (opcode == Opcodes.ICONST_1) {
|
||||
const_1 ++;
|
||||
}
|
||||
super.visitInsn(opcode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ public class AEFluidInventory implements IAEFluidTank
|
||||
private final IAEFluidStack[] fluids;
|
||||
private final IAEFluidInventory handler;
|
||||
private final int capacity;
|
||||
public int lastIndex;
|
||||
|
||||
public AEFluidInventory( final IAEFluidInventory handler, final int slots, final int capcity )
|
||||
{
|
||||
@@ -253,9 +254,10 @@ public class AEFluidInventory implements IAEFluidTank
|
||||
FluidStack totalDrained = null;
|
||||
int toDrain = maxDrain;
|
||||
|
||||
for( int slot = 0; slot < this.getSlots(); ++slot )
|
||||
for( int slot = lastIndex; slot < this.getSlots(); ++slot )
|
||||
{
|
||||
if (this.getFluidInSlot(slot) == null) {
|
||||
if(slot == this.getSlots()-1) lastIndex = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -264,6 +266,7 @@ public class AEFluidInventory implements IAEFluidTank
|
||||
totalDrained = this.drain( slot, toDrain, doDrain );
|
||||
if( totalDrained != null )
|
||||
{
|
||||
lastIndex = slot;
|
||||
toDrain -= totalDrained.amount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
package com.glodblock.github.inventory;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.InsertionMode;
|
||||
import appeng.tile.misc.TileInterface;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.inv.IInventoryDestination;
|
||||
import appeng.util.inv.ItemSlot;
|
||||
import cofh.api.transport.IItemDuct;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.item.ItemFluidDrop;
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.common.parts.PartFluidExportBus;
|
||||
import com.glodblock.github.common.parts.PartFluidInterface;
|
||||
import com.glodblock.github.common.tile.TileFluidInterface;
|
||||
import com.glodblock.github.util.Ae2Reflect;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
import com.glodblock.github.util.ModAndClassUtil;
|
||||
import com.glodblock.github.util.Util;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -29,28 +36,48 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
// sometimes i wish 1.7.10 has cap system.
|
||||
ForgeDirection f = Util.from(face);
|
||||
TileEntity inter = capProvider.getWorldObj().getTileEntity(capProvider.xCoord + f.offsetX, capProvider.yCoord + f.offsetY, capProvider.zCoord + f.offsetZ);
|
||||
if (!Config.noFluidPacket && !(inter instanceof TileFluidInterface || (inter instanceof TileCableBus && ((TileCableBus) inter).getPart(f.getOpposite()) instanceof PartFluidInterface)))
|
||||
if (!Config.noFluidPacket && !(inter instanceof TileFluidInterface ||
|
||||
(inter instanceof TileCableBus && (((TileCableBus) inter).getPart(f.getOpposite()) instanceof PartFluidInterface || ((TileCableBus) inter).getPart(f.getOpposite()) instanceof PartFluidExportBus))))
|
||||
return InventoryAdaptor.getAdaptor(capProvider, f);
|
||||
InventoryAdaptor item = InventoryAdaptor.getAdaptor(capProvider, f);
|
||||
IFluidHandler fluid = capProvider instanceof IFluidHandler ? (IFluidHandler) capProvider : null;
|
||||
return new FluidConvertingInventoryAdaptor(item, fluid, face);
|
||||
boolean onmi = false;
|
||||
if (inter instanceof TileInterface) {
|
||||
onmi = ((TileInterface) inter).getTargets().size() > 1;
|
||||
}
|
||||
Object conduct = null;
|
||||
if (ModAndClassUtil.COFH && capProvider instanceof IItemDuct) {
|
||||
conduct = capProvider;
|
||||
}
|
||||
return new FluidConvertingInventoryAdaptor(item, fluid, face, new BlockPos(inter), onmi, conduct);
|
||||
}
|
||||
|
||||
private final InventoryAdaptor invItems;
|
||||
private final IFluidHandler invFluids;
|
||||
private final ForgeDirection side;
|
||||
private final BlockPos posInterface;
|
||||
private final Object eioDuct;
|
||||
private final boolean onmi;
|
||||
|
||||
public FluidConvertingInventoryAdaptor(@Nullable InventoryAdaptor invItems, @Nullable IFluidHandler invFluids, EnumFacing facing) {
|
||||
public FluidConvertingInventoryAdaptor(@Nullable InventoryAdaptor invItems, @Nullable IFluidHandler invFluids, EnumFacing facing, BlockPos pos, boolean isOnmi, Object eioConduct) {
|
||||
this.invItems = invItems;
|
||||
this.invFluids = invFluids;
|
||||
this.side = Util.from(facing);
|
||||
this.posInterface = pos;
|
||||
this.eioDuct = eioConduct;
|
||||
this.onmi = isOnmi;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack addItems(ItemStack toBeAdded) {
|
||||
if (toBeAdded.getItem() instanceof ItemFluidPacket) {
|
||||
public ItemStack addItems( ItemStack toBeAdded, InsertionMode insertionMode ) {
|
||||
if (toBeAdded.getItem() instanceof ItemFluidPacket || toBeAdded.getItem() instanceof ItemFluidDrop) {
|
||||
if (invFluids != null) {
|
||||
FluidStack fluid = ItemFluidPacket.getFluidStack(toBeAdded);
|
||||
FluidStack fluid;
|
||||
if( toBeAdded.getItem() instanceof ItemFluidPacket ) {
|
||||
fluid = ItemFluidPacket.getFluidStack(toBeAdded);
|
||||
} else {
|
||||
fluid = ItemFluidDrop.getFluidStack(toBeAdded);
|
||||
}
|
||||
|
||||
if (fluid != null) {
|
||||
int filled = invFluids.fill(side, fluid, true);
|
||||
if (filled > 0) {
|
||||
@@ -61,14 +88,58 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
}
|
||||
return toBeAdded;
|
||||
}
|
||||
return invItems != null ? invItems.addItems(toBeAdded) : toBeAdded;
|
||||
if (eioDuct != null) {
|
||||
return ((IItemDuct) eioDuct).insertItem(side, toBeAdded);
|
||||
}
|
||||
return invItems != null ? invItems.addItems(toBeAdded,insertionMode) : toBeAdded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack addItems(ItemStack toBeAdded) {
|
||||
return addItems(toBeAdded, InsertionMode.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateAdd(ItemStack toBeSimulated) {
|
||||
if (toBeSimulated.getItem() instanceof ItemFluidPacket) {
|
||||
return simulateAdd(toBeSimulated, InsertionMode.DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateAdd(ItemStack toBeSimulated, InsertionMode insertionMode) {
|
||||
if (toBeSimulated.getItem() instanceof ItemFluidPacket || toBeSimulated.getItem() instanceof ItemFluidDrop) {
|
||||
if (onmi) {
|
||||
boolean sus = false;
|
||||
FluidStack fluid;
|
||||
if( toBeSimulated.getItem() instanceof ItemFluidPacket ) {
|
||||
fluid = ItemFluidPacket.getFluidStack(toBeSimulated);
|
||||
} else {
|
||||
fluid = ItemFluidDrop.getFluidStack(toBeSimulated);
|
||||
}
|
||||
|
||||
if (fluid != null) {
|
||||
for (ForgeDirection dir : ForgeDirection.values()) {
|
||||
TileEntity te = posInterface.getOffSet(dir).getTileEntity();
|
||||
if (te instanceof IFluidHandler) {
|
||||
int filled = ((IFluidHandler) te).fill(dir.getOpposite(), fluid, false);
|
||||
if (filled > 0) {
|
||||
sus = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sus = true;
|
||||
}
|
||||
return sus ? null : toBeSimulated;
|
||||
}
|
||||
if (invFluids != null) {
|
||||
FluidStack fluid = ItemFluidPacket.getFluidStack(toBeSimulated);
|
||||
FluidStack fluid;
|
||||
if( toBeSimulated.getItem() instanceof ItemFluidPacket ) {
|
||||
fluid = ItemFluidPacket.getFluidStack(toBeSimulated);
|
||||
} else {
|
||||
fluid = ItemFluidDrop.getFluidStack(toBeSimulated);
|
||||
}
|
||||
|
||||
if (fluid != null) {
|
||||
int filled = invFluids.fill(side, fluid, false);
|
||||
if (filled > 0) {
|
||||
@@ -79,7 +150,11 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
}
|
||||
return toBeSimulated;
|
||||
}
|
||||
return invItems != null ? invItems.simulateAdd(toBeSimulated) : toBeSimulated;
|
||||
//Assert EIO conduct can hold all item, as it is the origin practice in AE2
|
||||
if (eioDuct != null) {
|
||||
return null;
|
||||
}
|
||||
return invItems != null ? invItems.simulateAdd(toBeSimulated, insertionMode) : toBeSimulated;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.glodblock.github.inventory.gui;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -39,6 +40,7 @@ public class MouseRegionManager {
|
||||
if (region.containsMouse(mX, mY)) {
|
||||
List<String> tooltip = region.handler.getTooltip();
|
||||
if (tooltip != null) {
|
||||
((AEBaseGui)gui).drawTooltip(mX,mY,0,String.join("\n",tooltip));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.addShapelessRecipe(FLUID_TERMINAL_EX.stack(), FLUID_TERMINAL.stack(), AE2_PROCESS_CAL, AE2_PROCESS_ENG, AE2_PROCESS_LOG);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(BUFFER.stack(), "ILI", "AGF", "IBI", 'I', "ingotIron", 'G', AE2_QUARTZ_GLASS, 'L', AE2_CELL_1K, 'A', AE2_CORE_ANN, 'F', AE2_CORE_FOM, 'B', BUCKET));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(LARGE_BUFFER.stack(), "BGB", "GEG", "BGB", 'B', BUFFER.stack(), 'G', AE2_QUARTZ_GLASS, 'E', AE2_PROCESS_ENG));
|
||||
|
||||
GameRegistry.addShapelessRecipe(AE2_BLANK_PATTERN,PATTERN.stack());
|
||||
if (Config.fluidCells) {
|
||||
OreDictionary.registerOre("anyCertusCrystal", AE2_PURE_CERTUS);
|
||||
for (ItemStack it : OreDictionary.getOres("crystalCertusQuartz"))
|
||||
|
||||
@@ -24,7 +24,7 @@ public class NEIUtils {
|
||||
if (currentStack.stackSize == 0) continue;
|
||||
boolean find = false;
|
||||
for (OrderStack<?> storedStack : comp) {
|
||||
if (storedStack == null || !(orderStack.getStack() instanceof ItemStack)) continue;
|
||||
if (storedStack == null || !(storedStack.getStack() instanceof ItemStack)) continue;
|
||||
ItemStack firstStack = (ItemStack) storedStack.getStack();
|
||||
boolean areItemStackEqual = firstStack.isItemEqual(currentStack) && ItemStack.areItemStackTagsEqual(firstStack, currentStack);
|
||||
if (areItemStackEqual && (firstStack.stackSize + currentStack.stackSize) <= firstStack.getMaxStackSize()) {
|
||||
|
||||
@@ -19,6 +19,11 @@ public class CPacketFluidPatternTermBtns implements IMessage {
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public CPacketFluidPatternTermBtns( final String name, final Integer value ) {
|
||||
Name = name;
|
||||
Value = value.toString();
|
||||
}
|
||||
|
||||
public CPacketFluidPatternTermBtns() {
|
||||
// NO-OP
|
||||
}
|
||||
@@ -66,10 +71,17 @@ public class CPacketFluidPatternTermBtns implements IMessage {
|
||||
cpt.getPatternTerminal().setCraftingRecipe(Value.equals("1"));
|
||||
break;
|
||||
case "PatternTerminal.Encode":
|
||||
if (Value.equals("2"))
|
||||
cpt.encodeAndMoveToInventory();
|
||||
else
|
||||
cpt.encode();
|
||||
switch (Value) {
|
||||
case "0":
|
||||
cpt.encode();
|
||||
break;
|
||||
case "1":
|
||||
cpt.encodeAndMoveToInventory();
|
||||
break;
|
||||
case "3":
|
||||
cpt.encodeAllItemAndMoveToInventory();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "PatternTerminal.Clear":
|
||||
cpt.clear();
|
||||
@@ -89,10 +101,17 @@ public class CPacketFluidPatternTermBtns implements IMessage {
|
||||
final ContainerFluidPatternTerminalEx cpt = (ContainerFluidPatternTerminalEx) c;
|
||||
switch (Name) {
|
||||
case "PatternTerminalEx.Encode":
|
||||
if (Value.equals("2"))
|
||||
cpt.encodeAndMoveToInventory();
|
||||
else
|
||||
cpt.encode();
|
||||
switch (Value) {
|
||||
case "0":
|
||||
cpt.encode();
|
||||
break;
|
||||
case "1":
|
||||
cpt.encodeAndMoveToInventory();
|
||||
break;
|
||||
case "3":
|
||||
cpt.encodeAllItemAndMoveToInventory();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "PatternTerminalEx.Clear":
|
||||
cpt.clear();
|
||||
|
||||
@@ -31,6 +31,7 @@ public class Ae2Reflect {
|
||||
private static final Field fCPU_size;
|
||||
private static final Field fCPU_inventory;
|
||||
private static final Field fCPU_machineSrc;
|
||||
private static final Field fContainerUpgradeable_upgradeable;
|
||||
private static final Method mItemSlot_setExtractable;
|
||||
private static final Method mCPU_getGrid;
|
||||
private static final Method mCPU_postChange;
|
||||
@@ -47,6 +48,7 @@ public class Ae2Reflect {
|
||||
fCPU_size = Ae2Reflect.reflectField(CraftingCPURecord.class, "size");
|
||||
fCPU_inventory = Ae2Reflect.reflectField(CraftingCPUCluster.class, "inventory");
|
||||
fCPU_machineSrc = Ae2Reflect.reflectField(CraftingCPUCluster.class, "machineSrc");
|
||||
fContainerUpgradeable_upgradeable = Ae2Reflect.reflectField(ContainerUpgradeable.class, "upgradeable");
|
||||
mItemSlot_setExtractable = reflectMethod(ItemSlot.class, "setExtractable", boolean.class);
|
||||
mCPU_getGrid = reflectMethod(CraftingCPUCluster.class, "getGrid");
|
||||
mCPU_postChange = reflectMethod(CraftingCPUCluster.class, "postChange", IAEItemStack.class, BaseActionSource.class);
|
||||
@@ -150,6 +152,10 @@ public class Ae2Reflect {
|
||||
return Ae2Reflect.readField(cpu, fCPU_machineSrc);
|
||||
}
|
||||
|
||||
public static IUpgradeableHost getUpgradeableHost(ContainerUpgradeable owner) {
|
||||
return Ae2Reflect.readField(owner, fContainerUpgradeable_upgradeable);
|
||||
}
|
||||
|
||||
public static void postCPUChange(CraftingCPUCluster cpu, IAEItemStack stack, MachineSource src) {
|
||||
try {
|
||||
mCPU_postChange.invoke(cpu, stack, src);
|
||||
|
||||
@@ -1,30 +1,49 @@
|
||||
package com.glodblock.github.util;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BlockPos {
|
||||
|
||||
private final int x;
|
||||
private final int y;
|
||||
private final int z;
|
||||
private final World w;
|
||||
|
||||
public BlockPos(int x, int y, int z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.w = null;
|
||||
}
|
||||
|
||||
public BlockPos(int x, int y, int z, World w) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.w = w;
|
||||
}
|
||||
|
||||
public BlockPos(@Nonnull TileEntity te) {
|
||||
this.x = te.xCoord;
|
||||
this.y = te.yCoord;
|
||||
this.z = te.zCoord;
|
||||
this.w = te.getWorldObj();
|
||||
}
|
||||
|
||||
public BlockPos getOffSet(ForgeDirection face) {
|
||||
return new BlockPos(this.x + face.offsetX, this.y + face.offsetY, this.z + face.offsetZ);
|
||||
return new BlockPos(this.x + face.offsetX, this.y + face.offsetY, this.z + face.offsetZ, this.w);
|
||||
}
|
||||
|
||||
public TileEntity getTileEntity() {
|
||||
if (w != null) {
|
||||
return w.getTileEntity(x, y, z);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
@@ -39,11 +58,15 @@ public class BlockPos {
|
||||
return z;
|
||||
}
|
||||
|
||||
public World getWorld() {
|
||||
return w;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof BlockPos) {
|
||||
BlockPos pos = (BlockPos) obj;
|
||||
return pos.x == x && pos.y == y && pos.z == z;
|
||||
return pos.x == x && pos.y == y && pos.z == z && Objects.equals(pos.w, w);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.glodblock.github.util;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.helpers.PatternHelper;
|
||||
import appeng.util.item.AEItemStack;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -12,8 +13,6 @@ import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<FluidPatternDetails>{
|
||||
@@ -22,6 +21,7 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
private IAEItemStack patternStackAe;
|
||||
private IAEItemStack[] inputs = null, inputsCond = null, outputs = null, outputsCond = null;
|
||||
private int priority = 0;
|
||||
private int combine = 0;
|
||||
|
||||
public FluidPatternDetails(ItemStack stack) {
|
||||
this.patternStack = stack;
|
||||
@@ -43,6 +43,14 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public void setCombine(int combine) {
|
||||
this.combine = combine;
|
||||
}
|
||||
|
||||
public int getCombine() {
|
||||
return combine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCraftable() {
|
||||
return false;
|
||||
@@ -96,20 +104,7 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
}
|
||||
|
||||
private static IAEItemStack[] condenseStacks(IAEItemStack[] stacks) {
|
||||
// AE item stacks are equivalent iff they are of the same item type (not accounting for stack size)
|
||||
// thus, it's not the semantically-correct definition of "equal" but it's useful for matching item types
|
||||
Map<IAEItemStack, IAEItemStack> accMap = new HashMap<>();
|
||||
for (IAEItemStack stack : stacks) {
|
||||
if (stack != null) {
|
||||
IAEItemStack acc = accMap.get(stack);
|
||||
if (acc == null) {
|
||||
accMap.put(stack, stack.copy());
|
||||
} else {
|
||||
acc.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
return accMap.values().toArray(new IAEItemStack[0]);
|
||||
return PatternHelper.convertToCondensedList(stacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -154,6 +149,7 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
//Shits
|
||||
tag.setTag("in", writeStackArray(checkInitialized(inputs)));
|
||||
tag.setTag("out", writeStackArray(checkInitialized(outputs)));
|
||||
tag.setInteger("combine", this.getCombine());
|
||||
patternStack.setTagCompound(tag);
|
||||
patternStackAe = Objects.requireNonNull(AEItemStack.create(patternStack));
|
||||
return patternStack;
|
||||
@@ -165,7 +161,6 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
|
||||
// see note at top of class
|
||||
NBTTagCompound stackTag = new NBTTagCompound();
|
||||
if (stack != null) stack.writeToNBT(stackTag);
|
||||
|
||||
listTag.appendTag(stackTag);
|
||||
}
|
||||
return listTag;
|
||||
|
||||
@@ -22,6 +22,7 @@ public final class ModAndClassUtil {
|
||||
public static boolean WCT = false;
|
||||
public static boolean IC2 = false;
|
||||
public static boolean NEI = false;
|
||||
public static boolean COFH = false;
|
||||
public static boolean GTPP = false;
|
||||
|
||||
public static boolean isDoubleButton;
|
||||
@@ -119,6 +120,8 @@ public final class ModAndClassUtil {
|
||||
IC2 = true;
|
||||
if (Loader.isModLoaded("NotEnoughItems"))
|
||||
NEI = true;
|
||||
if (Loader.isModLoaded("CoFHCore"))
|
||||
COFH = true;
|
||||
if (Loader.isModLoaded("miscutils"))
|
||||
GTPP = true;
|
||||
}
|
||||
|
||||
@@ -41,5 +41,7 @@ public class NameConst {
|
||||
public static final String GUI_LARGE_INGREDIENT_BUFFER = GUI_KEY + BLOCK_LARGE_INGREDIENT_BUFFER;
|
||||
public static final String GUI_FLUID_INTERFACE = GUI_KEY + BLOCK_FLUID_INTERFACE;
|
||||
public static final String GUI_OC_PATTERN_EDITOR = GUI_KEY + BLOCK_OC_PATTERN_EDITOR;
|
||||
public static final String GUI_FLUID_IMPORT = GUI_KEY + ITEM_PART_FLUID_IMPORT;
|
||||
public static final String GUI_FLUID_EXPORT = GUI_KEY + ITEM_PART_FLUID_EXPORT;
|
||||
|
||||
}
|
||||
@@ -60,5 +60,6 @@ ae2fc.gui.fluid_interface.4=W
|
||||
ae2fc.gui.fluid_interface.5=E
|
||||
ae2fc.gui.oc_pattern_editor=OC Pattern Editor
|
||||
ae2fc.gui.button.set=Set
|
||||
|
||||
ae2fc.gui.part_fluid_import=ME Fluid Import Bus
|
||||
ae2fc.gui.part_fluid_export=ME Fluid Export Bus
|
||||
itemGroup.ae2fc=Fluid Craft For AE2
|
||||
@@ -1,53 +1,65 @@
|
||||
item.fluid_drop.name=%s液滴
|
||||
item.fluid_encoded_pattern.name=编写样板
|
||||
item.part_fluid_pattern_terminal.name=ME流体样板终端
|
||||
item.part_fluid_pattern_terminal_ex.name=ME增广流体样板终端
|
||||
item.part_fluid_interface.name=ME二合一接口
|
||||
item.part_fluid_import.name=ME流体输入总线
|
||||
item.part_fluid_export.name=ME流体输出总线
|
||||
item.fluid_packet.name=流体封包
|
||||
item.fluid_storage.1.name=1k-ME流体存储元件
|
||||
item.fluid_storage.4.name=4k-ME流体存储元件
|
||||
item.fluid_storage.16.name=16k-ME流体存储元件
|
||||
item.fluid_storage.64.name=64k-ME流体存储元件
|
||||
item.fluid_storage.256.name=256k-ME流体存储元件
|
||||
item.fluid_storage.1024.name=1024k-ME流体存储元件
|
||||
item.fluid_storage.4096.name=4096k-ME流体存储元件
|
||||
item.fluid_part.0.name=1k-ME流体存储组件
|
||||
item.fluid_part.1.name=4k-ME流体存储组件
|
||||
item.fluid_part.2.name=16k-ME流体存储组件
|
||||
item.fluid_part.3.name=64k-ME流体存储组件
|
||||
item.fluid_part.4.name=256k-ME流体存储组件
|
||||
item.fluid_part.5.name=1024k-ME流体存储组件
|
||||
item.fluid_part.6.name=4096k-ME流体存储组件
|
||||
|
||||
tile.fluid_discretizer.name=ME流体离散器
|
||||
tile.fluid_pattern_encoder.name=流体适配型样板编码台
|
||||
tile.fluid_packet_decoder.name=ME流体封包解码器
|
||||
tile.fluid_interface.name=ME二合一接口
|
||||
tile.ingredient_buffer.name=原材料缓存仓
|
||||
tile.large_ingredient_buffer.name=大型原材料缓存仓
|
||||
tile.oc_pattern_editor.name=OC样板编辑器
|
||||
|
||||
ae2fc.tooltip.invalid_fluid=流体无效!
|
||||
ae2fc.tooltip.encode_pattern=编写样板
|
||||
ae2fc.tooltip.fluid_packet=使用ME流体封包解码器\n来将其转换回流体形式。
|
||||
ae2fc.tooltip.empty=空
|
||||
ae2fc.tooltip.dump_tank=排空该流体槽
|
||||
ae2fc.tooltip.switch_fluid_interface=切换ME二合一接口GUI
|
||||
|
||||
ae2fc.gui.part_fluid_pattern_terminal=ME流体样板终端
|
||||
ae2fc.gui.part_fluid_pattern_terminal_ex=ME增广流体样板终端
|
||||
ae2fc.gui.fluid_pattern_encoder=流体适配型样板编码台
|
||||
ae2fc.gui.fluid_packet_decoder=ME流体封包解码器
|
||||
ae2fc.gui.ingredient_buffer=原材料缓存仓
|
||||
ae2fc.gui.large_ingredient_buffer=大型原材料缓存仓
|
||||
ae2fc.gui.fluid_interface=ME二合一接口
|
||||
ae2fc.gui.fluid_interface.0=下
|
||||
ae2fc.gui.fluid_interface.1=上
|
||||
ae2fc.gui.fluid_interface.2=北
|
||||
ae2fc.gui.fluid_interface.3=南
|
||||
ae2fc.gui.fluid_interface.4=西
|
||||
ae2fc.gui.fluid_interface.5=东
|
||||
ae2fc.gui.oc_pattern_editor=OC样板编辑器
|
||||
ae2fc.gui.button.set=设置
|
||||
item.fluid_drop.name=%s液滴
|
||||
item.fluid_encoded_pattern.name=编码样板
|
||||
item.part_fluid_pattern_terminal.name=ME流体样板终端
|
||||
item.part_fluid_pattern_terminal_ex.name=ME增广流体样板终端
|
||||
item.part_fluid_interface.name=ME二合一接口
|
||||
item.part_fluid_import.name=ME流体输入总线
|
||||
item.part_fluid_export.name=ME流体输出总线
|
||||
item.fluid_packet.name=流体封包
|
||||
item.fluid_storage.1.name=1k-ME流体存储元件
|
||||
item.fluid_storage.4.name=4k-ME流体存储元件
|
||||
item.fluid_storage.16.name=16k-ME流体存储元件
|
||||
item.fluid_storage.64.name=64k-ME流体存储元件
|
||||
item.fluid_storage.256.name=256k-ME流体存储元件
|
||||
item.fluid_storage.1024.name=1024k-ME流体存储元件
|
||||
item.fluid_storage.4096.name=4096k-ME流体存储元件
|
||||
item.fluid_part.0.name=1k-ME流体存储组件
|
||||
item.fluid_part.1.name=4k-ME流体存储组件
|
||||
item.fluid_part.2.name=16k-ME流体存储组件
|
||||
item.fluid_part.3.name=64k-ME流体存储组件
|
||||
item.fluid_part.4.name=256k-ME流体存储组件
|
||||
item.fluid_part.5.name=1024k-ME流体存储组件
|
||||
item.fluid_part.6.name=4096k-ME流体存储组件
|
||||
|
||||
tile.fluid_discretizer.name=ME流体离散器
|
||||
tile.fluid_pattern_encoder.name=流体适配型样板编码台
|
||||
tile.fluid_packet_decoder.name=ME流体封包解码器
|
||||
tile.fluid_interface.name=ME二合一接口
|
||||
tile.ingredient_buffer.name=原材料缓存仓
|
||||
tile.large_ingredient_buffer.name=大型原材料缓存仓
|
||||
tile.oc_pattern_editor.name=OC样板编辑器
|
||||
|
||||
ae2fc.tooltip.invalid_fluid=流体无效!
|
||||
ae2fc.tooltip.encode_pattern=编写样板
|
||||
ae2fc.tooltip.fluid_packet=使用ME流体封包解码器\n来将其转换回流体形式。
|
||||
ae2fc.tooltip.empty=空
|
||||
ae2fc.tooltip.dump_tank=排空该流体槽
|
||||
ae2fc.tooltip.switch_fluid_interface=切换ME二合一接口GUI
|
||||
ae2fc.tooltip.not_combine=合并输出相同物品
|
||||
ae2fc.tooltip.not_combine.hint=禁用
|
||||
ae2fc.tooltip.combine=合并输出相同物品
|
||||
ae2fc.tooltip.combine.hint=启用
|
||||
|
||||
ae2fc.tooltip.not_prio=优先放置流体
|
||||
ae2fc.tooltip.not_prio.hint=启用
|
||||
ae2fc.tooltip.prio=优先放置流体
|
||||
ae2fc.tooltip.prio.hint=禁用
|
||||
|
||||
ae2fc.gui.part_fluid_pattern_terminal=ME流体样板终端
|
||||
ae2fc.gui.part_fluid_pattern_terminal_ex=ME增广流体样板终端
|
||||
ae2fc.gui.fluid_pattern_encoder=流体适配型样板编码台
|
||||
ae2fc.gui.fluid_packet_decoder=ME流体封包解码器
|
||||
ae2fc.gui.ingredient_buffer=原材料缓存仓
|
||||
ae2fc.gui.large_ingredient_buffer=大型原材料缓存仓
|
||||
ae2fc.gui.fluid_interface=ME二合一接口
|
||||
ae2fc.gui.fluid_interface.0=下
|
||||
ae2fc.gui.fluid_interface.1=上
|
||||
ae2fc.gui.fluid_interface.2=北
|
||||
ae2fc.gui.fluid_interface.3=南
|
||||
ae2fc.gui.fluid_interface.4=西
|
||||
ae2fc.gui.fluid_interface.5=东
|
||||
ae2fc.gui.oc_pattern_editor=OC样板编辑器
|
||||
ae2fc.gui.button.set=设置
|
||||
ae2fc.gui.part_fluid_import=ME流体输入总线
|
||||
ae2fc.gui.part_fluid_export=ME流体输出总线
|
||||
itemGroup.ae2fc=AE2流体合成套件重置
|
||||
Reference in new issue
Block a user