minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.46k stars 180 forks source link

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

Open RuochenFu21 opened 1 year ago

RuochenFu21 commented 1 year ago

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 commented 1 year ago

Second one is preferred

RuochenFu21 commented 1 year ago

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

Earthcomputer commented 1 year ago

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.

RuochenFu21 commented 1 year ago

Yeah true, it always hurts me when committing.