mirror of https://github.com/FabricMC/yarn.git
Mining Levels unpicked (#2190)
* Mining Levels unpicked Apparently unpick can't place its constants in enum constructor parameters which is the only place vanilla would use these, so I don't know but here * Update MiningLevels.java * there we go * javadoc brrr * header * @see
This commit is contained in:
parent
08746560f5
commit
4e1f244274
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* This file is free for everyone to use under the Creative Commons Zero license.
|
||||
*/
|
||||
|
||||
package net.fabricmc.yarn.constants;
|
||||
|
||||
/**
|
||||
* Constants of Mining Levels.
|
||||
* <p>Mining levels are used by blocks to determine the strength of the tools required to successfully harvest them.
|
||||
* <br>All tool materials have an assigned mining level. If a tool's mining level is equal to or greater than the block's,
|
||||
* the tool will apply its efficiency bonus and the block will drop its loot table.
|
||||
* <p>Blocks without mining levels, or items that aren't tools, use {@link MiningLevels#HAND}.
|
||||
* @see net.minecraft.item.ToolMaterial#getMiningLevel() ToolMaterial#getMiningLevel
|
||||
*/
|
||||
public final class MiningLevels {
|
||||
/**
|
||||
* Blocks with this level do not require a tool to harvest.
|
||||
* <br>This is the default level for blocks and items.
|
||||
*/
|
||||
public static final int HAND = -1;
|
||||
|
||||
/**
|
||||
* Blocks with this level require a Wooden tool or better to harvest.
|
||||
* <br>In addition to Wooden Tools, Golden Tools also use this level.
|
||||
*/
|
||||
public static final int WOOD = 0;
|
||||
|
||||
/**
|
||||
* Blocks with this level require a Stone tool or better to harvest.
|
||||
*/
|
||||
public static final int STONE = 1;
|
||||
|
||||
/**
|
||||
* Blocks with this level require an Iron tool or better to harvest.
|
||||
*/
|
||||
public static final int IRON = 2;
|
||||
|
||||
/**
|
||||
* Blocks with this level require a Diamond tool or better to harvest.
|
||||
*/
|
||||
public static final int DIAMOND = 3;
|
||||
|
||||
/**
|
||||
* Blocks with this level require a Netherite tool or better to harvest.
|
||||
*/
|
||||
public static final int NETHERITE = 4;
|
||||
|
||||
private MiningLevels() {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
v2
|
||||
|
||||
constant mining_levels net/fabricmc/yarn/constants/MiningLevels HAND
|
||||
constant mining_levels net/fabricmc/yarn/constants/MiningLevels WOOD
|
||||
constant mining_levels net/fabricmc/yarn/constants/MiningLevels STONE
|
||||
constant mining_levels net/fabricmc/yarn/constants/MiningLevels IRON
|
||||
constant mining_levels net/fabricmc/yarn/constants/MiningLevels DIAMOND
|
||||
constant mining_levels net/fabricmc/yarn/constants/MiningLevels NETHERITE
|
||||
|
||||
target_method net/minecraft/item/ToolMaterials <init> (Ljava/lang/String;IIIFFILjava/util/function/Supplier;)V
|
||||
param 2 mining_levels
|
||||
target_method net/minecraft/item/ToolMaterial getMiningLevel ()I
|
||||
return mining_levels
|
Loading…
Reference in New Issue