I can't string, and unboxing is weird
This commit is contained in:
@@ -1104,7 +1104,7 @@ public final class Settings {
|
||||
|
||||
try {
|
||||
meta = Short.parseShort(itemArgs[itemArgs.length-1]);
|
||||
item = String.join("", Arrays.copyOfRange(itemArgs, 0, itemArgs.length-2));
|
||||
item = String.join(":", Arrays.copyOfRange(itemArgs, 0, itemArgs.length-1));
|
||||
}catch(NumberFormatException e){ // If no metadata is specified
|
||||
meta = 0;
|
||||
item = string;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class Divination extends Spell {
|
||||
|| block instanceof BlockRedstoneOre
|
||||
|| block instanceof BlockCrystalOre
|
||||
|| Arrays.asList(Wizardry.settings.divinationOreWhitelist)
|
||||
.contains(Pair.of(block.getRegistryName(), block.getMetaFromState(world.getBlockState(b)))));
|
||||
.contains(Pair.of(block.getRegistryName(), (short)block.getMetaFromState(world.getBlockState(b)))));
|
||||
});
|
||||
|
||||
Strength strength = Strength.NOTHING;
|
||||
|
||||
@@ -82,12 +82,12 @@ public class ImbueWeapon extends Spell {
|
||||
|
||||
/** Returns true if the given item counts as a sword, i.e. it extends {@link ItemSword} or is in the whitelist. */
|
||||
public static boolean isSword(ItemStack stack){
|
||||
return stack.getItem() instanceof ItemSword || Arrays.asList(Wizardry.settings.swordItemWhitelist).contains(Pair.of(stack.getItem().getRegistryName(), stack.getMetadata()));
|
||||
return stack.getItem() instanceof ItemSword || Arrays.asList(Wizardry.settings.swordItemWhitelist).contains(Pair.of(stack.getItem().getRegistryName(), (short)stack.getMetadata()));
|
||||
}
|
||||
|
||||
/** Returns true if the given item counts as a bow, i.e. it extends {@link ItemBow} or is in the whitelist. */
|
||||
public static boolean isBow(ItemStack stack){
|
||||
return stack.getItem() instanceof ItemBow || Arrays.asList(Wizardry.settings.bowItemWhitelist).contains(Pair.of(stack.getItem().getRegistryName(), stack.getMetadata()));
|
||||
return stack.getItem() instanceof ItemBow || Arrays.asList(Wizardry.settings.bowItemWhitelist).contains(Pair.of(stack.getItem().getRegistryName(), (short)stack.getMetadata()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class PocketFurnace extends Spell {
|
||||
|
||||
if(!result.isEmpty() && !(stack.getItem() instanceof ItemTool) && !(stack.getItem() instanceof ItemSword)
|
||||
&& !(stack.getItem() instanceof ItemArmor)
|
||||
&& !Arrays.asList(Wizardry.settings.pocketFurnaceItemBlacklist).contains(Pair.of(stack.getItem().getRegistryName(), stack.getMetadata()))){
|
||||
&& !Arrays.asList(Wizardry.settings.pocketFurnaceItemBlacklist).contains(Pair.of(stack.getItem().getRegistryName(), (short)stack.getMetadata()))){
|
||||
|
||||
if(stack.getCount() <= usesLeft){
|
||||
ItemStack stack2 = new ItemStack(result.getItem(), stack.getCount(), result.getItemDamage());
|
||||
|
||||
Reference in New Issue
Block a user