Skip to content

Commit

Permalink
Fix items topping in 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelpro authored and Pokechu22 committed Feb 17, 2022
1 parent cb52b48 commit 2057d15
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions burger/toppings/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def _process_1point14(aggregate, classloader, verbose):
if isinstance(const, String) and const.string.value == "Unable to have damage AND stack.":
max_stack_method = method
break
if max_stack_method:
break
if not max_stack_method:
raise Exception("Couldn't find max stack size setter in " + builder_class)

Expand Down Expand Up @@ -166,9 +168,10 @@ def on_invoke(self, ins, const, obj, args):
current_item = {}

text_id = None
idx = 0
for arg in desc.args:
for idx, arg in enumerate(desc.args):
if arg.name == blockclass:
if isinstance(args[idx], list):
continue
block = args[idx]
text_id = block["text_id"]
if "name" in block:
Expand All @@ -182,7 +185,6 @@ def on_invoke(self, ins, const, obj, args):
text_id = current_item["text_id"]
elif arg.name == "java/lang/String":
text_id = args[idx]
idx += 1

if current_item == {} and not text_id:
if verbose:
Expand Down

0 comments on commit 2057d15

Please sign in to comment.