Compare commits

..
Author SHA1 Message Date
Martin Robertz b51f786f53 Merge pull request #14 from asdflj/master
update zh lang and fix import export bus shift click transfer upgrade card
2022-09-04 17:49:39 +02:00
asdflj 6d5c8ca435 Update zh_CN.lang 2022-09-04 19:03:33 +08:00
zy 9d6c0b4c56 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/main/java/com/glodblock/github/client/gui/container/ContainerFluidConfigurable.java
2022-09-03 20:20:49 +08:00
zy 49181f3df6 add fluid bus shift click transfer upgrade card into the slot 2022-09-03 20:19:38 +08:00
zy 92e5c4adc7 add fluid bus shift click transfer upgrade card into the slot 2022-09-03 18:55:42 +08:00
asdflj 409e1f2a8d Merge branch 'GTNewHorizons:master' into master 2022-09-03 03:47:32 -05:00
asdflj 15c056556d update zh_ch lang 2022-09-02 10:44:29 +08:00
Martin Robertz 76f2ddf18e Merge pull request #13 from GTNewHorizons/overflow
fix int overflow in fluid storage cell
2022-09-01 11:32:26 +02:00
GlodBlock 6a69f807f1 update ec2 dep 2022-08-31 23:33:11 +08:00
GlodBlock b9d82c5da5 fix oversight in nbt load 2022-08-31 23:32:46 +08:00
GlodBlock 72270a3f64 use long for data storage 2022-08-31 23:06:09 +08:00
Yang Xizhi 89ca4b8313 fix oversight
fix https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11138
2022-08-27 17:42:26 +08:00
Martin Robertz 52031271b4 Merge pull request #12 from GTNewHorizons/oc
fix oc driver register crash
2022-08-23 08:20:11 +02:00
GlodBlock 88ccb54fe3 fix oc driver register crash 2022-08-23 10:07:01 +08:00
7 changed files with 98 additions and 69 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ 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('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")
@@ -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);
}
@@ -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()
@@ -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;
}
@@ -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...
@@ -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()) {
+64 -53
View File
@@ -1,53 +1,64 @@
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=设置
itemGroup.ae2fc=AE2流体合成套件重置