resource pack !
This commit is contained in:
unurled 2022-05-24 18:00:40 +02:00
parent 0cf90ea696
commit cace53df3d
14 changed files with 180 additions and 9 deletions

View file

@ -16,8 +16,8 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static gq.unurled.raxen.utils.Items.customModelData;
import static gq.unurled.raxen.utils.Utils.*;
public class CustomModelDataCommand implements TabExecutor {
/**
@ -95,11 +95,4 @@ public class CustomModelDataCommand implements TabExecutor {
}
return completions;
}
private ItemStack customModelData(ItemStack it, Integer in) {
ItemMeta itm = it.getItemMeta();
itm.setCustomModelData(in);
it.setItemMeta(itm);
return it;
}
}

View file

@ -108,7 +108,7 @@ public class Items {
public static @NotNull String itemStackSerialize(ItemStack it, @NotNull Integer slot) {
String str = "";
str = itemTo64(it);
str = str + "@#SLOT#" + slot.toString();
str = str + "@#SLOT#" + (slot-1);
return str;
}
@ -413,4 +413,11 @@ public class Items {
it.setItemMeta(itm);
return it;
}
public static ItemStack customModelData(ItemStack it, Integer in) {
ItemMeta itm = it.getItemMeta();
itm.setCustomModelData(in);
it.setItemMeta(itm);
return it;
}
}