Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.17.1] The mining speed of my block is unaffected by the tool in use.


DireTook
 Share

Recommended Posts

Hello,

Despite setting the harvestTool, harvestLevel and strength of the block, the mining speed of my block doesn't change regardless of the level of pickaxe or if I use of a supposedly unsuitable tool instead. I get the same mining speed with fists as a netherite pick.

image.thumb.png.a6f4c6c527a20cbd348f9dc333bef303.png

The usage of destroy time did increase the mining speed but was still unaffected by tools.

I looked at the register for Diorite as it seems to be a similar block, but can't see any reason that would be affected by tools and my block isn't?

Could anyone please tell me what I'm missing? 

I've attempted to add .setRequiresTool() as it was suggested it works in this thread: 

 

but that no longer seems to be an option in 1.17 with BlockBehaviour.

Link to comment
Share on other sites

Ah right, I'm completely unfamiliar with tags so apologies. Thanks for the reply though.

I've attempted to add as you've said and ended up with two .Jsons under tags.blocks. One for mineable/pickaxe and one for needs_stone_tools both with code similar to: 

Capture.PNG.e3e21403a01e1283e085c58ab9f448a6.PNG 

However this doesn't seem to change anything yet and nothing I've found has been clear about the best way to add to blocks to vanilla block tags although custom tags and recipe stuff is talked about a lot. I figured its properly not best to just add my block to the BlockTagProvider class? Is there something I'm missing or am I just going the completely wrong direction?

Link to comment
Share on other sites

17 minutes ago, DireTook said:

However this doesn't seem to change anything yet and nothing I've found has been clear about the best way to add to blocks to vanilla block tags although custom tags and recipe stuff is talked about a lot. I figured its properly not best to just add my block to the BlockTagProvider class? Is there something I'm missing or am I just going the completely wrong direction?

show the complete path of the tags

Link to comment
Share on other sites

Its src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.mineable.pickaxe.json

and src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.needs_stone_tools.json

image.png.6c94764821f2ae5284aa8ff5d130ec51.png

for this I have replaced the "examplemod:example_object" with my names: "tutorialmod_uniqueid309:example_block" 

Edited by DireTook
Link to comment
Share on other sites

32 minutes ago, DireTook said:

Its src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.mineable.pickaxe.json

and src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.needs_stone_tools.json

this are minecraft tags, so you need to put them in data.minecraft.tags folder

  • Thanks 1
Link to comment
Share on other sites

That worked! Thank you very much!

Although the Minecraft folder didn't show in my main directory till I tried to add the tags.block folder to it in the Project and External Dependencies which I found odd. Maybe that's normal eclipse thing I've not experienced yet :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm making my own MOD using Geckolib, but when I start it as a test, it works fine, but when I put it in the Minecraft app, it doesn't start and crashes. crash report ---- Minecraft Crash Report ---- // Who set us up the TNT? Time: 22/09/27 13:38 Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed     at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:71) [?:?] {re:classloading}     at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:174) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.lambda$null$1(Minecraft.java:508) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft$$Lambda$4172/899120039.run(Unknown Source) [?:?] {}     at net.minecraft.util.Util.func_215077_a(Util.java:320) [?:?] {re:classloading}     at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:504) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft$$Lambda$3963/1223907812.accept(Unknown Source) [?:?] {}     at net.minecraft.client.gui.ResourceLoadProgressGui.func_230430_a_(ResourceLoadProgressGui.java:113) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:481) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:977) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:37) [forge-1.16.5-36.2.39.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$457/2095970915.call(Unknown Source) [forge-1.16.5-36.2.39.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at com.Kujira.minepiece.Items.SeaStoneIngot.<init>(SeaStoneIngot.java:8) ~[?:?] {re:classloading} -- MOD minepiece -- Details:     Mod File: MinePiece.jar     Failure message: MinePiece Mod (minepiece) encountered an error during the load_registries event phase         java.lang.NoSuchMethodError: net.minecraft.item.Item$Properties.tab(Lnet/minecraft/item/ItemGroup;)Lnet/minecraft/item/Item$Properties;     Mod Version: 1.0.0     Mod Issue URL: NOT PROVIDED     Exception message: java.lang.NoSuchMethodError: net.minecraft.item.Item$Properties.tab(Lnet/minecraft/item/ItemGroup;)Lnet/minecraft/item/Item$Properties; Stacktrace:     at com.Kujira.minepiece.Items.SeaStoneIngot.<init>(SeaStoneIngot.java:8) ~[?:?] {re:classloading}     at com.Kujira.minepiece.regi.MinePieceItems$Register.registerItems(MinePieceItems.java:25) ~[?:?] {re:classloading}     at net.minecraftforge.eventbus.ASMEventHandler_17_Register_registerItems_Register.invoke(.dynamic) ~[?:?] {}     at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.eventbus.EventBus$$Lambda$3476/1916974029.invoke(Unknown Source) ~[?:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:106) ~[?:36.2] {re:classloading}     at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:107) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModContainer$$Lambda$3105/752772379.run(Unknown Source) ~[?:?] {}     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:42) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:26) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:235) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:222) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:188) ~[?:?] {re:classloading}     at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$1(ClientModLoader.java:89) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraftforge.fml.client.ClientModLoader$$Lambda$2920/168398198.run(Unknown Source) ~[?:?] {}     at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:109) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraftforge.fml.client.ClientModLoader$$Lambda$2921/1088649990.run(Unknown Source) ~[?:?] {}     at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:89) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:437) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:149) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:37) [forge-1.16.5-36.2.39.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$457/2095970915.call(Unknown Source) [forge-1.16.5-36.2.39.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {} -- MOD minepiece -- Details:     Mod File: MinePiece.jar     Failure message: MinePiece Mod (minepiece) encountered an error during the error event phase         java.lang.NoSuchMethodError: net.minecraft.entity.EntityType$Builder.of(Lnet/minecraft/entity/EntityType$IFactory;Lnet/minecraft/entity/EntityClassification;)Lnet/minecraft/entity/EntityType$Builder;     Mod Version: 1.0.0     Mod Issue URL: NOT PROVIDED     Exception message: java.lang.NoSuchMethodError: net.minecraft.entity.EntityType$Builder.of(Lnet/minecraft/entity/EntityType$IFactory;Lnet/minecraft/entity/EntityClassification;)Lnet/minecraft/entity/EntityType$Builder; Stacktrace:     at com.Kujira.minepiece.entity.ModEntityTypes.lambda$static$0(ModEntityTypes.java:19) ~[?:?] {re:classloading}     at com.Kujira.minepiece.entity.ModEntityTypes$$Lambda$3118/1730752382.get(Unknown Source) ~[?:?] {}     at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:110) ~[?:?] {re:classloading}     at net.minecraftforge.registries.DeferredRegister$$Lambda$3090/1983063045.get(Unknown Source) ~[?:?] {}     at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:186) ~[?:?] {re:classloading}     at net.minecraftforge.registries.DeferredRegister.access$000(DeferredRegister.java:47) ~[?:?] {re:classloading}     at net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:158) ~[?:?] {re:classloading}     at net.minecraftforge.eventbus.ASMEventHandler_0_EventDispatcher_handleEvent_Register.invoke(.dynamic) ~[?:?] {}     at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.eventbus.EventBus$$Lambda$3476/1916974029.invoke(Unknown Source) ~[?:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}     at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:106) ~[?:36.2] {re:classloading}     at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:107) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModContainer$$Lambda$3105/752772379.run(Unknown Source) ~[?:?] {}     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:42) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:26) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:235) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:222) ~[?:?] {re:classloading}     at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:188) ~[?:?] {re:classloading}     at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$1(ClientModLoader.java:89) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraftforge.fml.client.ClientModLoader$$Lambda$2920/168398198.run(Unknown Source) ~[?:?] {}     at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:109) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraftforge.fml.client.ClientModLoader$$Lambda$2921/1088649990.run(Unknown Source) ~[?:?] {}     at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:89) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:437) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:149) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:37) [forge-1.16.5-36.2.39.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$457/2095970915.call(Unknown Source) [forge-1.16.5-36.2.39.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {} -- System Details -- Details:     Minecraft Version: 1.16.5     Minecraft Version ID: 1.16.5     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 886955560 bytes (845 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)     CPUs: 8     JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -XX:+IgnoreUnrecognizedVMOptions -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     ModLauncher: 8.1.3+8.1.3+main-8.1.x.c94d18ec     ModLauncher launch target: fmlclient     ModLauncher naming: srg     ModLauncher services:          /mixin-0.8.4.jar mixin PLUGINSERVICE          /eventbus-4.0.0.jar eventbus PLUGINSERVICE          /forge-1.16.5-36.2.39.jar object_holder_definalize PLUGINSERVICE          /forge-1.16.5-36.2.39.jar runtime_enum_extender PLUGINSERVICE          /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE          /forge-1.16.5-36.2.39.jar capability_inject_definalize PLUGINSERVICE          /forge-1.16.5-36.2.39.jar runtimedistcleaner PLUGINSERVICE          /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE          /forge-1.16.5-36.2.39.jar fml TRANSFORMATIONSERVICE      FML: 36.2     Forge: net.minecraftforge:36.2.39     FML Language Providers:          javafml@36.2         minecraft@1
    • Ok so the game has run but when I create world, after loading terrain and joining the world,  the screen went gray and after a few minutes it kicked me out and say "Invalid player data". Could you help me?
    • That is correct. But that is also not the name mentioned above. You should also try using proper logging or adding a breakpoint in a debugger instead of System.out.println().
    • I mean, you can, it would be a different forge mod loader version. I am asking mostly because I refuse to change to 1.19.x due to Microsoft's policies and decisions about the game (the in-game chat report system)
    • The main task - is to make your own gui for the inventory or just a separate gui, which will implement the basic functions for the marketplace (as in the various plugins). This needs to be implemented specifically by a mod. So far I've tried creating a class that inherits the Screen and setting as new ( minecraft.setScreen(new CustomScreen())), but the main inventory stops working (not moving things from slot to slot). Also tried overriding the InventoryScreen class, but the problem is the same as above. Decided to start simple, namely adding a button to the main inventory. Logic: listening for the ScreenEvent event, and setting the new button as a widget.  @SubscribeEvent public static void openInventoryGui(ScreenEvent e) { Minecraft minecraft = Minecraft.getInstance(); if (minecraft.screen != null) { Screen current = e.getScreen(); if (current.passEvents) { Button button = new Button(10, 10, 10, 10, Component.literal("TEST"), (a) -> { System.out.println("Press"); }); e.getScreen().renderables.add(button); } } } But so far the button does not work (should output text to the console).  Regarding ScreenEvent.InitScreenEvent - I could not do anything with it (it is not in the class, found no such event). What can I read or what guides to look at this topic? Or maybe someone has advice or experience in this matter?
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.