Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breakByTool(net.minecraft.tag.Tag<net.minecraft.item.Item>, int)' is deprecated and marked for removal #4

Open
SirEnder125 opened this issue Nov 7, 2021 · 2 comments

Comments

@SirEnder125
Copy link

SirEnder125 commented Nov 7, 2021

Hello. While following one of your tutorials, I ran into a deprecated function. In the FabricBlockSettings class, the breakByTool method is deprecated and marked for removal.

From IntelliJ IDEA:

net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings
@Deprecated(forRemoval = true) 
public FabricBlockSettings breakByTool(net.minecraft.tag.Tag<net.minecraft.item.Item> tag,
                                       int miningLevel)

gradle.properties:

# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
	# check these on https://fabricmc.net/versions.html
	minecraft_version=1.17.1
	yarn_mappings=1.17.1+build.63
	loader_version=0.12.5

# Mod Properties
	mod_version = 1.17.1-v1.0.0
	maven_group = io.github.sirender125.epicentities
	archives_base_name = epic-entities-mod

# Dependencies
	fabric_version=0.42.1+1.17

I would make a pull-request, but I haven't tried the solution yet. IntelliJ IDEA tells me this:

Deprecated
Replaced by mineable tags. See fabric-mining-level-api-v1 for further details.
Gradle: net_fabricmc_yarn_1_17_1_1_17_1_build_63_v2.net.fabricmc.fabric-api:fabric-object-builder-api-v1:1.10.11+6d0fac4218

@Kaupenjoe
Copy link
Member

Hey SirEnder,
ye I have seen this also! Easily fixed by not using the method and simply adding the blocks to the relevant tags. Will make an updated video, but it won't reach youtube until end of the year as I have recorded everything before already!
You could also revert back to fabric 0.40.1
Sorry for the inconvenience though :)

@JayrajSinvhal
Copy link

Hey,
I am really sorry to interrupt you sir, but can you please upload the video now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants