Minor refactor to prevent int to Integer warning.

This commit is contained in:
tastybento 2023-12-30 12:46:56 +09:00
parent 8d9a2597a0
commit 511b613324
2 changed files with 3 additions and 2 deletions

View File

@ -78,7 +78,8 @@ public class BlueprintEntity {
if (e instanceof AbstractHorse horse) { if (e instanceof AbstractHorse horse) {
if (domestication != null) horse.setDomestication(domestication); if (domestication != null) horse.setDomestication(domestication);
if (inventory != null) { if (inventory != null) {
inventory.forEach(horse.getInventory()::setItem); inventory.forEach((index, item) -> horse.getInventory().setItem(index.intValue(), item));
} }
} }
if (style != null && e instanceof Horse horse) { if (style != null && e instanceof Horse horse) {

View File

@ -298,7 +298,7 @@ public class Players implements DataObject, MetaDataAble {
* @param world - world * @param world - world
*/ */
public void addReset(World world) { public void addReset(World world) {
resets.merge(world.getName(), 1, Integer::sum); resets.merge(world.getName(), 1, (oldValue, newValue) -> Integer.valueOf(oldValue + newValue));
} }
/** /**