Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Sep 19, 2024
1 parent bb29056 commit bb1b735
Show file tree
Hide file tree
Showing 13 changed files with 545 additions and 28 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.18p26'
String versionOverride = '0.0.18p27'
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 @@ -56,7 +56,7 @@ public class DualInputHatchSlaveBus<T extends MetaTileEntity & IDualInputHatch&I
// masterY, masterZ are valid

public DualInputHatchSlaveBus(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6, 0, reobf.proghatches.main.Config.get("DHS", ImmutableMap.of())
super(aID, aName, aNameRegional, 6, 0, reobf.proghatches.main.Config.get("DHSB", ImmutableMap.of())

);
Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID));
Expand All @@ -73,15 +73,15 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new DualInputHatchSlaveBus<>(mName, mTier, mDescriptionArray, mTextures);
}

@Override
/*@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
return getTexturesInactive(aBaseTexture);
}
@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_CRAFTING_INPUT_SLAVE) };
}
}*/

@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
Expand Down Expand Up @@ -336,18 +336,52 @@ public FluidStack[] getFluidInputs() {
@Override
public int getSizeInventory() {
if(recipe){
if(tmpi==null){tmpi=tmpinv.getItemInputs();}
if(tmpi==null){tmpi=getDual().getItemInputs();}
return tmpi .length;

}
return 0;
}

@Override
public void setInventorySlotContents(int aIndex, ItemStack aStack) {
if (recipe) {
if (tmpi == null) {
tmpi = getDual().getItemInputs();
}
ItemStack is = getDual().getItemInputs()[aIndex];
if (is == null && aStack != null)
throw new UnsupportedOperationException();
if (aStack != null) {
if (aStack.getItem() != is.getItem() || ItemStack.areItemStackTagsEqual(aStack, is) == false) {
throw new UnsupportedOperationException();
}
is.stackSize = aStack.stackSize;
} else if(is!=null){
is.stackSize = 0;

}
}



}
@Override
public ItemStack decrStackSize(int aIndex, int aAmount) {
if(recipe){
if(tmpi==null){tmpi=getDual().getItemInputs();}
ItemStack is=getDual().getItemInputs()[aIndex];
if(is ==null)return is;
aAmount=Math.min(aAmount, is.stackSize);
return is.splitStack(aAmount);
}

return null;
}
@Override
public ItemStack getStackInSlot(int aIndex) {

if(recipe){
if(tmpi==null){tmpi=tmpinv.getItemInputs();}
if(tmpi==null){tmpi=getDual().getItemInputs();}
return getDual().getItemInputs()[aIndex];

}
Expand Down
Loading

0 comments on commit bb1b735

Please sign in to comment.