Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Sep 24, 2024
1 parent e0449b1 commit e746be4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ catch (Exception ignored) {

// Pulls version first from the VERSION env and then git tag
String identifiedVersion = null
String versionOverride = '0.0.19p1'
String versionOverride = '0.0.19p2'
try {
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
if (versionOverride == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,14 @@ static void ser(PacketBuffer pb,TransferCheckResult thiz){
}


}
private ItemStack cp(ItemStack c){
if(c!=null)return c.copy();
return null;
}
private IAEItemStack cp(IAEItemStack c){
if(c!=null)return c.copy();
return null;
}
static Field f,f2;
@SuppressWarnings({ "unchecked", "unused" })
Expand All @@ -730,15 +738,21 @@ private TransferCheckResult checkMEBus(GT_MetaTileEntity_Hatch_OutputBus_ME bus,
try {
IItemList<IAEItemStack> itemCache =(IItemList<IAEItemStack>) f.get(bus);
Iterator<IAEItemStack> itr = itemCache.iterator();
//if(check!=null)
while(itr.hasNext()){IAEItemStack next;
if((next=itr.next()).isSameType(check)==false){
return TransferCheckResult.ofFail("cache.diff.bus",index,check.copy(),next.copy());
if(check==null)
return TransferCheckResult.ofFail("cache.diff.bus.null",index,cp(next));
return TransferCheckResult.ofFail("cache.diff.bus",index,cp(next),cp(check));
}
}
itr = bus.getProxy().getStorage().getItemInventory().getStorageList().iterator();
//if(check!=null)
while(itr.hasNext()){IAEItemStack next;
if((next=itr.next()).isSameType(check)==false){
return TransferCheckResult.ofFail("net.diff.bus",index,check.copy(),next.copy());
if(check==null)
return TransferCheckResult.ofFail("net.diff.bus.null",index,cp(next));
return TransferCheckResult.ofFail("net.diff.bus",index,cp(next),cp(check));
}
}
if(check!=null){
Expand Down Expand Up @@ -771,15 +785,22 @@ private TransferCheckResult checkMEHatch(GT_MetaTileEntity_Hatch_Output_ME bus,F
try {
IItemList<IAEFluidStack> itemCache =(IItemList<IAEFluidStack>) f2.get(bus);
Iterator<IAEFluidStack> itr = itemCache.iterator();
//if(check!=null)
while(itr.hasNext()){IAEFluidStack next;
if(!sameType(next=itr.next(),(check))){
return TransferCheckResult.ofFail("cache.diff.hatch",index,check.copy(),next.copy());
if(check==null)
return TransferCheckResult.ofFail("net.diff.hatch.null",index,cp(next));
return TransferCheckResult.ofFail("cache.diff.hatch",index,cp(next),cp(check));
}
}

itr = bus.getProxy().getStorage().getFluidInventory().getStorageList().iterator();
//if(check!=null)
while(itr.hasNext()){IAEFluidStack next;
if(!sameType(next=itr.next(),(check))){
return TransferCheckResult.ofFail("net.diff.hatch",index,check.copy(),next.copy());
if(check==null)
return TransferCheckResult.ofFail("net.diff.hatch.null",index,cp(next));
return TransferCheckResult.ofFail("net.diff.hatch",index,cp(next),cp(check));
}
}if(check!=null){
IAEFluidStack notadded = bus.getProxy().getStorage().getFluidInventory().injectItems(
Expand All @@ -797,6 +818,17 @@ private TransferCheckResult checkMEHatch(GT_MetaTileEntity_Hatch_Output_ME bus,F

return TransferCheckResult.ofSuccess();
}
private IAEFluidStack cp(IAEFluidStack c) {

if(c!=null)return c.copy();
return null;
}

private FluidStack cp(FluidStack c) {

if(c!=null)return c.copy();
return null;
}
static BaseActionSource fakeSource=new BaseActionSource();

static Method[] cache;
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/assets/proghatches/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -563,5 +563,7 @@ proghatch.chunk_loading_alert.info.none=Alerting Anchor: No improperly-unloaded
proghatch.waypoint.info=Alerting Anchor Mark
programmable_hatches.buffer.waila.hidden=§rAnd %s more §2Idle§r Buffers...
proghatch.dualhatch.optinv.broken=§4This Multiblock Machine does not support Upgrades! Please create issue if you see this.


proghatch.ingbuf.fail.net.diff.bus.null=The bus#%s has %s in its ME storage while it should be empty.
proghatch.ingbuf.fail.cache.diff.bus.null=The bus#%s has %s in its cache while it should be empty.
proghatch.ingbuf.fail.net.diff.hatch.null=The hatch#%s has %s in its ME storage while it should be empty.
proghatch.ingbuf.fail.cache.diff.hatch.null=The hatch#%s has %s in its cache while it should be empty.
4 changes: 4 additions & 0 deletions src/main/resources/assets/proghatches/lang/zh_CN.lang
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,7 @@ proghatch.chunk_loading_alert.info.none=警告锚: 没有非正常卸载区块
proghatch.waypoint.info=警告锚标记
programmable_hatches.buffer.waila.hidden=§r以及%s个空闲的§2就绪§r缓存...
proghatch.dualhatch.optinv.broken=§4这个多方块不兼容升级!如果看到这行字请提issue
proghatch.ingbuf.fail.net.diff.bus.null=%s号ME输出总线内部缓存含有:%s 尽管不需要向此网络输出但其应该被清空
proghatch.ingbuf.fail.cache.diff.bus.null=%s号ME输出总线内部缓存含有:%s 尽管不需要向此网络输出但其应该被清空
proghatch.ingbuf.fail.net.diff.hatch.null=%s号ME输出仓内部缓存含有:%s 尽管不需要向此网络输出但其应该被清空
proghatch.ingbuf.fail.cache.diff.hatch.null=%s号ME输出仓内部缓存含有:%s 尽管不需要向此网络输出但其应该被清空

0 comments on commit e746be4

Please sign in to comment.