24w12a
This commit is contained in:
1 parent
68511ad735
commit
1f05a6ebc1
5 files changed
+12
-8
No files matched your search
@@ -102,7 +102,7 @@ public abstract class MinecraftServer_scarpetMixin extends ReentrantBlockableEve
|
||||
@Override
|
||||
public void reloadAfterReload(RegistryAccess newRegs)
|
||||
{
|
||||
resources.managers().updateRegistryTags(newRegs);
|
||||
resources.managers().updateRegistryTags();
|
||||
getPlayerList().saveAll();
|
||||
getPlayerList().reloadResources();
|
||||
functionManager.replaceLibrary(this.resources.managers().getFunctionLibrary());
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.tags.TagKey;
|
||||
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.item.component.Tool;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -23,7 +26,8 @@ public class PickaxeItem_missingToolsMixin extends DiggerItem
|
||||
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
||||
if (CarpetSettings.missingTools && state.getSoundType() == SoundType.GLASS)
|
||||
{
|
||||
return speed;
|
||||
final Tool tool = stack.get(DataComponents.TOOL);
|
||||
return tool != null ? tool.getMiningSpeed(Blocks.STONE.defaultBlockState()) : super.getDestroySpeed(stack, state);
|
||||
}
|
||||
return super.getDestroySpeed(stack, state);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user