MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Automatically @SuppressWarnings("deprecation") for some special class/method, eg. BlockBehavior$canSurvive

Open RuochenFu21 opened this issue 1 year ago • 4 comments

Minecraft Development for IntelliJ plugin version

2022.3-1.6.3

Description of the feature request

SuppressWarnings for some special class/method, eg. BlockBehavior$canSurvive

This can be accomplish by 2 ways though

  1. Don't show warning is when overriding those special methods
  2. Automatically put @SuppressWarnings("deprecation") when overriding those special methods

Both will be a good idea!

RuochenFu21 avatar Apr 18 '23 10:04 RuochenFu21

Second one is preferred

RuochenFu21 avatar Apr 18 '23 10:04 RuochenFu21

Also you can determine if it's a real "deprecation" by if it's @Deprecated or @Deprecated(forRemoval = true)

RuochenFu21 avatar Apr 18 '23 10:04 RuochenFu21

I think a better solution would be for annotations to be changed by build tools (e.g. ForgeGradle and Loom), based on mappings, a little bit like how unpick works. Mojang misuses nullable as well.

Earthcomputer avatar Apr 19 '23 20:04 Earthcomputer

Yeah true, it always hurts me when committing.

RuochenFu21 avatar Apr 27 '23 13:04 RuochenFu21