1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Throw out variables

This commit is contained in:
svr333 2020-10-06 01:26:23 +02:00
parent 8c44c583cf
commit 37242fe64a

View File

@ -82,19 +82,16 @@ public class TableSaw extends MultiBlockMachine {
@Nullable @Nullable
private ItemStack getItemsToOutput(@Nonnull ItemStack item) { private ItemStack getItemsToOutput(@Nonnull ItemStack item) {
boolean itemIsAPlank = Tag.PLANKS.isTagged(item.getType()); if (Tag.LOGS.isTagged(item.getType())) {
boolean itemIsALog = Tag.LOGS.isTagged(item.getType());
ItemStack output = null;
if (itemIsALog) {
Optional<Material> planks = MaterialConverter.getPlanksFromLog(item.getType()); Optional<Material> planks = MaterialConverter.getPlanksFromLog(item.getType());
output = new ItemStack(planks.get(), 8); return new ItemStack(planks.get(), 8);
} }
else if (itemIsAPlank){ else if (Tag.PLANKS.isTagged(item.getType())) {
output = new ItemStack(Material.STICK, 4); return new ItemStack(Material.STICK, 4);
}
else {
return null;
} }
return output;
} }
private void outputItems(@Nonnull Block b, @Nonnull ItemStack output) { private void outputItems(@Nonnull Block b, @Nonnull ItemStack output) {