Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
CJCrafter authored Sep 16, 2024
2 parents a3e2894 + 77958ac commit a306f13
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ public Mechanics serialize(@NotNull SerializeData data) throws SerializerExcepti
// Store cacheable mechanics into this list to improve performance.
PlayerEffectMechanicList cacheList = new PlayerEffectMechanicList();

for (Object obj : list) {
for (int i = 0; i < list.size(); i++) {
Object obj = list.get(i);
if (obj == null) {
throw data.listException(null, i, "Found a null/empty mechanic", "This happens when you have an empty line in your list");
}

Mechanic mechanic = serializeOne(data, obj.toString());

if (mechanic instanceof PlayerEffectMechanic playerMechanic && playerMechanic.getViewerTargeter() instanceof WorldTargeter worldTargeter) {
Expand Down

0 comments on commit a306f13

Please sign in to comment.