mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Use doubles in config.yml where appropriate. Change item IDs to item names
in light of upcoming Minecraft changes that will remove access to item IDs.
This commit is contained in:
@ -318,9 +318,9 @@ public final class BlockUtils {
|
||||
* @return true if the block is an mcMMO anvil, false otherwise
|
||||
*/
|
||||
public static boolean isMcMMOAnvil(BlockState blockState) {
|
||||
int blockId = blockState.getTypeId();
|
||||
Material type = blockState.getType();
|
||||
|
||||
return blockId == Repair.repairAnvilId || blockId == Repair.salvageAnvilId;
|
||||
return type == Repair.repairAnvilMaterial || type == Repair.salvageAnvilMaterial;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,7 +142,7 @@ public final class ChimaeraWing {
|
||||
}
|
||||
|
||||
public static ItemStack getChimaeraWing(int amount) {
|
||||
ItemStack itemStack = new ItemStack(Config.getInstance().getChimaeraItemId(), amount);
|
||||
ItemStack itemStack = new ItemStack(Config.getInstance().getChimaeraItem(), amount);
|
||||
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
itemMeta.setDisplayName(ChatColor.GOLD + LocaleLoader.getString("Item.ChimaeraWing.Name"));
|
||||
@ -157,7 +157,7 @@ public final class ChimaeraWing {
|
||||
}
|
||||
|
||||
public static ShapelessRecipe getChimaeraWingRecipe() {
|
||||
Material ingredient = Material.getMaterial(Config.getInstance().getChimaeraItemId());
|
||||
Material ingredient = Config.getInstance().getChimaeraItem();
|
||||
int amount = Config.getInstance().getChimaeraRecipeCost();
|
||||
if (amount < 1 || amount > 9) {
|
||||
amount = 9;
|
||||
|
@ -449,15 +449,15 @@ public class SpoutUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendRepairNotifications(Player player, int anvilId) {
|
||||
public static void sendRepairNotifications(Player player, Material anvilType) {
|
||||
SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
|
||||
|
||||
if (spoutPlayer.isSpoutCraftEnabled()) {
|
||||
String[] spoutMessages = Repair.getSpoutAnvilMessages(anvilId);
|
||||
spoutPlayer.sendNotification(spoutMessages[0], spoutMessages[1], Material.getMaterial(anvilId));
|
||||
String[] spoutMessages = Repair.getSpoutAnvilMessages(anvilType);
|
||||
spoutPlayer.sendNotification(spoutMessages[0], spoutMessages[1], anvilType);
|
||||
}
|
||||
else {
|
||||
player.sendMessage(Repair.getAnvilMessage(anvilId));
|
||||
player.sendMessage(Repair.getAnvilMessage(anvilType));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user