Migrate the Carpet codebase to Mojang Mappings
This commit is contained in:
346 files changed
+8353
-8492
No files matched your search
@@ -1,31 +1,31 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.MiningToolItem;
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.world.item.DiggerItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.PickaxeItem;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
//import org.spongepowered.asm.mixin.injection.At;
|
||||
//import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(PickaxeItem.class)
|
||||
public class PickaxeItem_missingToolsMixin extends MiningToolItem
|
||||
public class PickaxeItem_missingToolsMixin extends DiggerItem
|
||||
{
|
||||
|
||||
protected PickaxeItem_missingToolsMixin(float attackDamage, float attackSpeed, ToolMaterial material, Tag<Block> tag, Settings settings) {
|
||||
protected PickaxeItem_missingToolsMixin(float attackDamage, float attackSpeed, Tier material, Tag<Block> tag, Properties settings) {
|
||||
super(attackDamage, attackSpeed, material, tag, settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
||||
Material material = state.getMaterial();
|
||||
if (CarpetSettings.missingTools && material == Material.GLASS)
|
||||
return miningSpeed;
|
||||
return super.getMiningSpeedMultiplier(stack, state);
|
||||
return speed;
|
||||
return super.getDestroySpeed(stack, state);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user