Cleaned up imports and removed unnecessary .toString() calls

This commit is contained in:
Németh Noel 2021-02-28 20:35:10 +01:00
parent 7abf6ba9e7
commit 10ece83d75
3 changed files with 2 additions and 5 deletions

View File

@ -19,7 +19,6 @@ import net.minestom.server.inventory.PlayerInventory;
import net.minestom.server.item.ItemStack;
import net.minestom.server.item.Material;
import net.minestom.server.network.packet.client.play.ClientPlayerBlockPlacementPacket;
import net.minestom.server.network.packet.client.play.ClientPlayerDiggingPacket;
import net.minestom.server.network.packet.server.play.BlockChangePacket;
import net.minestom.server.utils.BlockPosition;
import net.minestom.server.utils.Direction;

View File

@ -11,7 +11,6 @@ import net.minestom.server.instance.block.CustomBlock;
import net.minestom.server.inventory.PlayerInventory;
import net.minestom.server.item.ItemStack;
import net.minestom.server.item.StackingRule;
import net.minestom.server.item.attribute.ItemAttribute;
import net.minestom.server.network.packet.client.play.ClientPlayerDiggingPacket;
import net.minestom.server.network.packet.server.play.AcknowledgePlayerDiggingPacket;
import net.minestom.server.network.packet.server.play.EntityEffectPacket;
@ -19,7 +18,6 @@ import net.minestom.server.network.packet.server.play.RemoveEntityEffectPacket;
import net.minestom.server.potion.Potion;
import net.minestom.server.potion.PotionEffect;
import net.minestom.server.utils.BlockPosition;
import net.minestom.server.utils.NamespaceID;
import org.jetbrains.annotations.NotNull;
import java.util.List;

View File

@ -387,7 +387,7 @@ public final class NBTUtils {
Set<String> canDestroy = itemStack.getCanDestroy();
if (canDestroy.size() > 0) {
NBTList<NBTString> list = new NBTList<>(NBTTypes.TAG_String);
canDestroy.forEach(x -> list.add(new NBTString(x.toString())));
canDestroy.forEach(x -> list.add(new NBTString(x)));
itemNBT.set("CanDestroy", list);
}
}
@ -397,7 +397,7 @@ public final class NBTUtils {
Set<String> canPlaceOn = itemStack.getCanPlaceOn();
if (canPlaceOn.size() > 0) {
NBTList<NBTString> list = new NBTList<>(NBTTypes.TAG_String);
canPlaceOn.forEach(x -> list.add(new NBTString(x.toString())));
canPlaceOn.forEach(x -> list.add(new NBTString(x)));
itemNBT.set("CanPlaceOn", list);
}
}