File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
src/main/java/com/glodblock/github/client/container Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,21 @@ public void encodeAndMoveToInventory() {
225225
226226 public void encode () {
227227 if (!checkHasFluidPattern ()) {
228- encodeItem ();
228+ ItemStack stack = this .patternSlotOUT .getStack ();
229+ if (stack .isEmpty ()) {
230+ stack = this .patternSlotIN .getStack ();
231+ if (stack .isEmpty () || notPattern (stack )) {
232+ return ;
233+ }
234+ if (stack .getCount () == 1 ) {
235+ this .patternSlotIN .putStack (ItemStack .EMPTY );
236+ } else {
237+ stack .shrink (1 );
238+ }
239+ encodeItem ();
240+ } else if (!notPattern (stack )) {
241+ encodeItem ();
242+ }
229243 return ;
230244 }
231245 ItemStack stack = this .patternSlotOUT .getStack ();
@@ -338,7 +352,8 @@ private boolean notPattern(final ItemStack output) {
338352 if (output .isEmpty ()) {
339353 return true ;
340354 }
341- if (output .getItem () instanceof ItemFluidEncodedPattern ) {
355+ if (output .getItem () == FCItems .DENSE_ENCODED_PATTERN ||
356+ output .getItem () == FCItems .LARGE_ITEM_ENCODED_PATTERN ) {
342357 return false ;
343358 }
344359 final IDefinitions defs = AEApi .instance ().definitions ();
You can’t perform that action at this time.
0 commit comments