Skip to content

Commit

Permalink
Fixed statistics throwing an NPE and not loading Closes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Aug 19, 2017
1 parent 019d035 commit 7394eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public boolean canBreatheUnderwater() {
}

@Override
public boolean isBreedingItem(@Nullable ItemStack stack) {
return stack != null && TEMPTATION_ITEMS.contains(stack.getItem());
public boolean isBreedingItem(@Nonnull ItemStack stack) {
return !stack.isEmpty() && TEMPTATION_ITEMS.contains(stack.getItem());
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void registerPenguins(RegistryEvent.Register<EntityEntry> event) {
for (EntityEntry entry : entities) {
event.getRegistry().register(entry);
id++;
EntityRegistry.registerModEntity(entry.getRegistryName(), entry.getEntityClass(), entry.getName(), id, Waddles.instance, 64, 1, true);
EntityRegistry.registerModEntity(entry.getRegistryName(), entry.getEntityClass(), entry.getName(), id, Waddles.instance, 64, 1, true, entry.getEgg().primaryColor, entry.getEgg().secondaryColor);
}
}

Expand Down

0 comments on commit 7394eef

Please sign in to comment.