Skip to content

Commit 4968107

Browse files
committed
Fix #1
恢复缓存指令器的id以确保旧存档的兼容
1 parent a1d3580 commit 4968107

17 files changed

+64
-64
lines changed

src/main/java/com/glodblock/github/client/GuiGeneralLevelMaintainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
public class GuiGeneralLevelMaintainer extends AEBaseGui implements IJEIGhostIngredients {
3333

34-
private static final ResourceLocation TEX_BG = FluidCraft.resource("textures/gui/general_level_maintainer.png");
34+
private static final ResourceLocation TEX_BG = FluidCraft.resource("textures/gui/fluid_level_maintainer.png");
3535

3636
private final ContainerGeneralLevelMaintainer cont;
3737
private final GuiNumberBox[] maintain = new GuiNumberBox[TileGeneralLevelMaintainer.MAX_FLUID];

src/main/java/com/glodblock/github/inventory/FluidConvertingInventoryAdaptor.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ public static InventoryAdaptor wrap(final ICapabilityProvider capProvider, final
5858
final DualityInterface dualInterface = getInterfaceTE(inter, face) == null ?
5959
null : Objects.requireNonNull(getInterfaceTE(inter, face)).getInterfaceDuality();
6060
boolean onmi = false;
61-
if (inter instanceof TileInterface) {
62-
onmi = ((TileInterface) inter).getTargets().size() > 1;
63-
} else if (inter instanceof TileDualInterface) {
64-
onmi = ((TileDualInterface) inter).getTargets().size() > 1;
61+
if (inter instanceof TileInterface i) {
62+
onmi = i.getTargets().size() > 1;
63+
} else if (inter instanceof TileDualInterface i) {
64+
onmi = i.getTargets().size() > 1;
6565
}
6666

6767
if (dualInterface == null || !((FCDualityInterface) dualInterface).isFluidPacket()) {
@@ -431,8 +431,8 @@ public boolean hasSlots() {
431431
protected static IInterfaceHost getInterfaceTE(final TileEntity te, final EnumFacing face) {
432432
if (te instanceof IInterfaceHost) {
433433
return (IInterfaceHost) te;
434-
} else if (te instanceof TileCableBus) {
435-
final IPart part = ((TileCableBus) te).getPart(face.getOpposite());
434+
} else if (te instanceof TileCableBus p) {
435+
final IPart part = p.getPart(face.getOpposite());
436436
if (part instanceof IInterfaceHost) {
437437
return (IInterfaceHost) part;
438438
}
@@ -444,8 +444,8 @@ protected static IInterfaceHost getInterfaceTE(final TileEntity te, final EnumFa
444444
protected static IFluidInterfaceHost getFluidInterfaceTE(final TileEntity te, final EnumFacing face) {
445445
if (te instanceof IFluidInterfaceHost) {
446446
return (IFluidInterfaceHost) te;
447-
} else if (te instanceof TileCableBus) {
448-
final IPart part = ((TileCableBus) te).getPart(face.getOpposite());
447+
} else if (te instanceof TileCableBus p) {
448+
final IPart part = p.getPart(face.getOpposite());
449449
if (part instanceof IFluidInterfaceHost) {
450450
return (IFluidInterfaceHost) part;
451451
}
@@ -457,8 +457,8 @@ protected static IFluidInterfaceHost getFluidInterfaceTE(final TileEntity te, fi
457457
protected static Object getGasInterfaceTE(final TileEntity te, final EnumFacing face) {
458458
if (te instanceof IGasInterfaceHost) {
459459
return te;
460-
} else if (te instanceof TileCableBus) {
461-
final IPart part = ((TileCableBus) te).getPart(face.getOpposite());
460+
} else if (te instanceof TileCableBus p) {
461+
final IPart part = p.getPart(face.getOpposite());
462462
if (part instanceof IGasInterfaceHost) {
463463
return part;
464464
}
@@ -469,8 +469,8 @@ protected static Object getGasInterfaceTE(final TileEntity te, final EnumFacing
469469
protected static AENetworkProxy getGasInterfaceGrid(@Nullable final TileEntity te, final EnumFacing face) {
470470
if (te instanceof IGasInterfaceHost) {
471471
return Ae2Reflect.getGasInterfaceGrid(((IGasInterfaceHost) te).getDualityGasInterface());
472-
} else if (te instanceof TileCableBus) {
473-
final IPart part = ((TileCableBus) te).getPart(face.getOpposite());
472+
} else if (te instanceof TileCableBus p) {
473+
final IPart part = p.getPart(face.getOpposite());
474474
if (part instanceof IGasInterfaceHost) {
475475
return Ae2Reflect.getGasInterfaceGrid(((IGasInterfaceHost) part).getDualityGasInterface());
476476
}

src/main/java/com/glodblock/github/util/NameConst.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public final class NameConst {
1313
public static final String BLOCK_LARGE_INGREDIENT_BUFFER = "large_ingredient_buffer";
1414
public static final String BLOCK_BURETTE = "burette";
1515
public static final String BLOCK_DUAL_INTERFACE = "dual_interface";
16-
public static final String BLOCK_GENERAL_LEVEL_MAINTAINER = "general_level_maintainer";
16+
public static final String BLOCK_GENERAL_LEVEL_MAINTAINER = "fluid_level_maintainer";
1717
public static final String BLOCK_FLUID_ASSEMBLER = "fluid_assembler";
1818
public static final String BLOCK_ULTIMATE_ENCODER = "ultimate_encoder";
1919
public static final String BLOCK_TRIO_INTERFACE = "trio_interface";
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"variants": {
3+
"facing=north": {
4+
"model": "ae2fc:fluid_level_maintainer"
5+
},
6+
"facing=south": {
7+
"model": "ae2fc:fluid_level_maintainer",
8+
"y": 180
9+
},
10+
"facing=west": {
11+
"model": "ae2fc:fluid_level_maintainer",
12+
"y": 270
13+
},
14+
"facing=east": {
15+
"model": "ae2fc:fluid_level_maintainer",
16+
"y": 90
17+
},
18+
"facing=down": {
19+
"model": "ae2fc:fluid_level_maintainer",
20+
"x": 90
21+
},
22+
"facing=up": {
23+
"model": "ae2fc:fluid_level_maintainer",
24+
"x": 270
25+
}
26+
}
27+
}

src/main/resources/assets/ae2fc/blockstates/general_level_maintainer.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/main/resources/assets/ae2fc/lang/en_us.lang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tile.ae2fc:large_ingredient_buffer.name=Large Ingredient Buffer
1212
tile.ae2fc:burette.name=Precision Burette
1313
tile.ae2fc:dual_interface.name=ME Dual Interface
1414
tile.ae2fc:part_dual_interface.name=ME Dual Interface
15-
tile.ae2fc:general_level_maintainer.name=ME General Level Maintainer
15+
tile.ae2fc:fluid_level_maintainer.name=ME General Level Maintainer
1616
tile.ae2fc:fluid_assembler.name=ME Fluid Assembler
1717
tile.ae2fc:ultimate_encoder.name=ME Ultimate Encoder
1818
tile.ae2fc:trio_interface.name=ME Trio Interface
@@ -35,7 +35,7 @@ ae2fc.gui.fluid_packet_decoder=ME Fluid Packet Decoder
3535
ae2fc.gui.ingredient_buffer=Ingredient Buffer
3636
ae2fc.gui.large_ingredient_buffer=Large Ingredient Buffer
3737
ae2fc.gui.burette=Precision Burette
38-
ae2fc.gui.general_level_maintainer=ME General Level Maintainer
38+
ae2fc.gui.fluid_level_maintainer=ME General Level Maintainer
3939
ae2fc.gui.fluid_assembler=ME Fluid Assembler
4040
ae2fc.gui.ultimate_encoder=ME Ultimate Encoder
4141
ae2fc.gui.item_amount_set=Set Amount

src/main/resources/assets/ae2fc/lang/ja_jp.lang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tile.ae2fc:large_ingredient_buffer.name=ME大型材料バッファ
1010
tile.ae2fc:burette.name=ME精密ビュレット
1111
tile.ae2fc:dual_interface.name=ME混合インターフェース
1212
tile.ae2fc:part_dual_interface.name=ME混合インターフェース
13-
tile.ae2fc:general_level_maintainer.name=ME通用レベルメンテナ
13+
tile.ae2fc:fluid_level_maintainer.name=ME通用レベルメンテナ
1414
tile.ae2fc:fluid_assembler.name=ME液体組立機
1515
tile.ae2fc:ultimate_encoder.name=ME究極エンコーダー
1616

@@ -31,7 +31,7 @@ ae2fc.gui.fluid_packet_decoder=ME液体パケットデコーダー
3131
ae2fc.gui.ingredient_buffer=ME材料バッファ
3232
ae2fc.gui.large_ingredient_buffer=ME大型材料バッファ
3333
ae2fc.gui.burette=ME精密ビュレット
34-
ae2fc.gui.general_level_maintainer=ME通用レベルメンテナ
34+
ae2fc.gui.fluid_level_maintainer=ME通用レベルメンテナ
3535
ae2fc.gui.fluid_assembler=ME液体組立機
3636
ae2fc.gui.ultimate_encoder=ME究極エンコーダー
3737
ae2fc.gui.item_amount_set=数を設定

src/main/resources/assets/ae2fc/lang/ru_ru.lang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tile.ae2fc:large_ingredient_buffer.name=Большой буфер ингреди
88
tile.ae2fc:burette.name=Точная бюретка
99
tile.ae2fc:dual_interface.name=ME Двойной интерфейс
1010
tile.ae2fc:part_dual_interface.name=ME Двойной интерфейс
11-
tile.ae2fc:general_level_maintainer.name=ME Устройство поддержания универсального уровня
11+
tile.ae2fc:fluid_level_maintainer.name=ME Устройство поддержания универсального уровня
1212

1313
item.ae2fc:fluid_drop.name=Капля из %s
1414
item.ae2fc:fluid_packet.name=Жидкостный пакет
@@ -22,7 +22,7 @@ ae2fc.gui.fluid_packet_decoder=ME Декодер жидкостных пакет
2222
ae2fc.gui.ingredient_buffer=Буфер ингредиентов
2323
ae2fc.gui.large_ingredient_buffer=Большой буфер ингредиентов
2424
ae2fc.gui.burette=Точная бюретка
25-
ae2fc.gui.general_level_maintainer=ME Устройство поддержания универсального уровня
25+
ae2fc.gui.fluid_level_maintainer=ME Устройство поддержания универсального уровня
2626

2727
ae2fc.misc.threshold=Порог
2828
ae2fc.misc.request=Размер партии

src/main/resources/assets/ae2fc/lang/zh_cn.lang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tile.ae2fc:large_ingredient_buffer.name=大型原材料缓存仓
1212
tile.ae2fc:burette.name=精准滴定器
1313
tile.ae2fc:dual_interface.name=ME二合一接口
1414
tile.ae2fc:part_dual_interface.name=ME二合一接口
15-
tile.ae2fc:general_level_maintainer.name=ME通用缓存指令器
15+
tile.ae2fc:fluid_level_maintainer.name=ME通用缓存指令器
1616
tile.ae2fc:fluid_assembler.name=ME流体装配室
1717
tile.ae2fc:ultimate_encoder.name=ME终极编码台
1818
tile.ae2fc:trio_interface.name=ME三合一接口
@@ -35,7 +35,7 @@ ae2fc.gui.fluid_packet_decoder=ME流体封包解码器
3535
ae2fc.gui.ingredient_buffer=原材料缓存仓
3636
ae2fc.gui.large_ingredient_buffer=大型原材料缓存仓
3737
ae2fc.gui.burette=精准滴定器
38-
ae2fc.gui.general_level_maintainer=ME通用缓存指令器
38+
ae2fc.gui.fluid_level_maintainer=ME通用缓存指令器
3939
ae2fc.gui.fluid_assembler=ME流体装配室
4040
ae2fc.gui.ultimate_encoder=ME终极编码台
4141
ae2fc.gui.item_amount_set=设置数量
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parent": "block/orientable",
3+
"textures": {
4+
"top": "ae2fc:blocks/fluid_level_maintainer_side",
5+
"bottom": "ae2fc:blocks/fluid_level_maintainer_side",
6+
"front": "ae2fc:blocks/fluid_level_maintainer",
7+
"side": "ae2fc:blocks/fluid_level_maintainer_side",
8+
"back": "ae2fc:blocks/fluid_level_maintainer_side"
9+
}
10+
}

0 commit comments

Comments
 (0)