diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-06-02 18:46:40 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-06-02 18:46:40 +0800 |
| commit | 572ebd36c32c0248f2c826cc518eeedbc0701287 (patch) | |
| tree | e50b4c1fbc502bdca3494fe58f77c31adb3dd67c /default-plugin/src/main/java | |
| parent | fd4026dd30a2f8ba4c261f344a16b3adee9823a4 (diff) | |
| download | RoughlyEnoughItems-572ebd36c32c0248f2c826cc518eeedbc0701287.tar.gz RoughlyEnoughItems-572ebd36c32c0248f2c826cc518eeedbc0701287.tar.bz2 RoughlyEnoughItems-572ebd36c32c0248f2c826cc518eeedbc0701287.zip | |
Reformat code
Diffstat (limited to 'default-plugin/src/main/java')
2 files changed, 6 insertions, 5 deletions
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java index df07e00c4..1db8d9667 100644 --- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java +++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java @@ -80,14 +80,14 @@ public class GameModeFavoriteEntry extends FavoriteEntry { public Tooltip getTooltip(Point mouse) { return Tooltip.create(mouse, new TranslatableComponent("text.rei.gamemode_button.tooltip.dropdown")); } - + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; return hashCode() == o.hashCode(); } - + @Override public int hashCode() { return Objects.hash(getClass(), showcase); @@ -187,7 +187,7 @@ public class GameModeFavoriteEntry extends FavoriteEntry { public enum Type implements FavoriteEntryType<GameModeFavoriteEntry> { INSTANCE; - + @Override public GameModeFavoriteEntry read(CompoundTag object) { String stringValue = object.getString(KEY); @@ -199,7 +199,7 @@ public class GameModeFavoriteEntry extends FavoriteEntry { public GameModeFavoriteEntry fromArgs(Object... args) { return new GameModeFavoriteEntry((GameType) args[0]); } - + @Override public CompoundTag save(GameModeFavoriteEntry entry, CompoundTag tag) { tag.putString(KEY, entry.gameMode == null ? "NOT_SET" : entry.gameMode.name()); @@ -262,7 +262,7 @@ public class GameModeFavoriteEntry extends FavoriteEntry { } String s = text; if (disabled) { - s = ChatFormatting.STRIKETHROUGH.toString() + s; + s = ChatFormatting.STRIKETHROUGH + s; } font.draw(matrices, s, x + 2, y + 2, selected && !disabled ? 16777215 : 8947848); } diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java index 10516c2b5..18baa55ab 100644 --- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java +++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java @@ -70,6 +70,7 @@ public abstract class DefaultCraftingDisplay<C extends Recipe<?>> extends BasicD list.add(Collections.emptyList()); } for (int i = 0; i < getInputEntries().size(); i++) { + @SuppressWarnings("RedundantTypeArguments") List<ItemStack> stacks = CollectionUtils.<EntryStack<?>, ItemStack>filterAndMap(getInputEntries().get(i), stack -> stack.getType() == VanillaEntryTypes.ITEM, EntryStack::castValue); list.set(getSlotWithSize(this, i, menuInfo.getCraftingWidth(container)), stacks); |
