mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-11-30 06:33:27 +01:00
.
This commit is contained in:
parent
50be26152e
commit
45fc9be373
@ -9,8 +9,7 @@ public class JeffChestSortOrganizer {
|
|||||||
|
|
||||||
static String getSortableString(ItemStack item) {
|
static String getSortableString(ItemStack item) {
|
||||||
return item.getType().name()
|
return item.getType().name()
|
||||||
+ ","
|
+ "," + String.valueOf(item.hashCode());
|
||||||
+ String.valueOf(item.hashCode());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sortInventory(Inventory inv) {
|
static void sortInventory(Inventory inv) {
|
||||||
@ -47,6 +46,7 @@ public class JeffChestSortOrganizer {
|
|||||||
|
|
||||||
// put everything back in the inventory
|
// put everything back in the inventory
|
||||||
for (String s : shortenedArray) {
|
for (String s : shortenedArray) {
|
||||||
|
// System.out.println(s);
|
||||||
for (ItemStack item : items) {
|
for (ItemStack item : items) {
|
||||||
if (item != null && s != null) {
|
if (item != null && s != null) {
|
||||||
if (item.hashCode() == Integer.parseInt(s.split(",")[1])) {
|
if (item.hashCode() == Integer.parseInt(s.split(",")[1])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user