Use newer Java features in places where it makes sense and more (#1009)

This commit is contained in:
altrisi authored and GitHub committed 2021-08-03 07:32:40 -03:00
1 parent 28cb136c6b
commit 7fb5e47da5
34 files changed
+338 -399

No files matched your search

@@ -633,26 +633,12 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
return false;
}
public static class InventoryLocator
public static record InventoryLocator(Object owner, BlockPos position, Inventory inventory, int offset, boolean isEnder)
{
public Object owner;
public BlockPos position;
public Inventory inventory;
public int offset;
public boolean isEnder;
InventoryLocator(Object owner, BlockPos pos, Inventory i, int o)
{
this(owner, pos, i, o, false);
}
InventoryLocator(Object owner, BlockPos pos, Inventory i, int o, boolean isEnder)
{
this.owner = owner;
position = pos;
inventory = i;
offset = o;
this.isEnder = isEnder;
}
}
private static Map<String, NbtPathArgumentType.NbtPath> pathCache = new HashMap<>();