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

[1.17.1] .harvestTool(ToolType.PICKAXE) not working


Noah40
 Share

Recommended Posts

.harvestTool() isnt working in the code below:110267009_ScreenShot2021-08-17at11_33_43AM.thumb.png.6fc8c9ea4aeb11ab81829ac3c4a3d635.png

The block doesnt mine any faster if i use a pickaxe and it wont drop even if i use a pickaxe. I commented out .requiresCorrectToolForDrops() and it dropped so i know that the loottable works. 

Link to comment
Share on other sites

the tag should be located in data/minecraft/tags/blocks/mineable/pickaxe and data/minecraft/tags/blocks/mineable/needs_iron_tool
the file should look like yours but remove the minecaft entrys

Edited by Luis_ST
  • Thanks 1
Link to comment
Share on other sites

the needs_iron_tool tag is in the wrong directory

On 8/17/2021 at 9:54 PM, Luis_ST said:

the tag should be located in data/minecraft/tags/blocks/mineable/pickaxe and data/minecraft/tags/blocks/mineable/needs_iron_tool

 

Edited by Luis_ST
Link to comment
Share on other sites

Oh so I create a package name minecraft.tags.blocks.mineable.pickaxe and then create a pickaxe.json file in it and another package minecraft.tags.blocks.mineable.need_iron_tool and then create a need_iron_tool.json in it ?? 

 

Link to comment
Share on other sites

ups my mistake😅, it should be:

pickaxe.json in

18 hours ago, Luis_ST said:

data/minecraft/tags/blocks/mineable/pickaxe

and need_iron_tool.json in

18 hours ago, Luis_ST said:

data/minecraft/tags/blocks/needs_iron_tool

 

Edited by Luis_ST
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.

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

    • Yes. Can you post a Git repo of your mod so I can debug this locally?
    • So as i understand the exception occurs when game tries to delete player from the chunk, but can not find it there: public void removePlayer(SectionPos p_219367_1_, ServerPlayerEntity p_219367_2_) { long i = p_219367_1_.chunk().toLong(); ObjectSet<ServerPlayerEntity> objectset = this.playersPerChunk.get(i); objectset.remove(p_219367_2_); if (objectset.isEmpty()) { this.playersPerChunk.remove(i); this.naturalSpawnChunkCounter.update(i, Integer.MAX_VALUE, false); this.playerTicketManager.update(i, Integer.MAX_VALUE, false); } }  objectset.remove(p_219367_2_) that line actually throws NullPointerException, am i right?
    • [17:29:37] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception net.minecraft.crash.ReportedException: Ticking player at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:137) ~[forge:?] {re:classloading} at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:865) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:787) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.tickServer(IntegratedServer.java:78) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:642) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:232) ~[forge:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291] {} Caused by: java.lang.NullPointerException at net.minecraft.world.server.TicketManager.removePlayer(TicketManager.java:227) ~[forge:?] {re:classloading} at net.minecraft.world.server.ChunkManager.updatePlayerStatus(ChunkManager.java:843) ~[forge:?] {re:classloading} at net.minecraft.world.server.ChunkManager.removeEntity(ChunkManager.java:982) ~[forge:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.removeEntity(ServerChunkProvider.java:454) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.removeEntityComplete(ServerWorld.java:905) ~[forge:?] {re:classloading} at net.minecraft.world.server.ServerWorld.removeEntity(ServerWorld.java:951) ~[forge:?] {re:classloading} at net.minecraft.world.server.ServerWorld.removePlayer(ServerWorld.java:968) ~[forge:?] {re:classloading} at net.minecraft.server.management.PlayerList.respawn(PlayerList.java:411) ~[forge:?] {re:classloading} at com.mclich.engmod.item.TotemOfAbyssItem.activateTotem(TotemOfAbyssItem.java:72) ~[?:?] {re:classloading} at com.mclich.engmod.item.TotemOfAbyssItem.inventoryTick(TotemOfAbyssItem.java:58) ~[?:?] {re:classloading} at net.minecraft.item.ItemStack.inventoryTick(ItemStack.java:434) ~[forge:?] {re:classloading,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack} at net.minecraft.entity.player.PlayerInventory.tick(PlayerInventory.java:238) ~[forge:?] {re:classloading} at net.minecraft.entity.player.PlayerEntity.aiStep(PlayerEntity.java:487) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2158) ~[forge:?] {re:classloading} at net.minecraft.entity.player.PlayerEntity.tick(PlayerEntity.java:223) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.entity.player.ServerPlayerEntity.doTick(ServerPlayerEntity.java:404) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.network.play.ServerPlayNetHandler.tick(ServerPlayNetHandler.java:207) ~[forge:?] {re:classloading} at net.minecraft.network.NetworkManager.tick(NetworkManager.java:226) ~[forge:?] {re:classloading} at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:134) ~[forge:?] {re:classloading} ... 6 more
    • you can search for it in the forum, as I have already answered this question in a few threads you can start at this thread:  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.