Tinkers Construct

Tinkers Construct

160M Downloads

Cannot resolve method

Paul-Moura opened this issue ยท 4 comments

commented

Issue description:
I am trying to setup Tinker's project in IntelliJ. After successfully doing so, there are several calls that are broken, e.g. slimeknights.tconstruct.gadgets.item.ItemThrowball line 71: cannot resolve method 'setHeadingFromThrower' in 'EntityThrowball'. I looked through the source code and did some googling. 'setHeadingFromThrower' is suppose to be a method on 'net.minecraft.entity.projectile.EntityThrowable' but it doesn't have that method.

  • Download Forge MDK
  • Extract contents to a new folder
  • Open PowerShell and run 'gradlew setupDecompWorkspace idea'
  • Import project into IntelliJ
  • Import new project from source control (pasting link to Tinker's repo) in a new window
  • Close the Tinker's project and add to Forge project as a module
  • Add missing references to Tinker's module
  • Build Tinker's module (100 errors and 100 warnings)

Versions:

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2768 / 14.23.5.2831 / 14.23.5.2847
  • Mantle: 1.3.3.55
  • Tinkers Construct: 2.13.0
commented

You don't need the forge MDK to set up IntelliJ/Tinkers Construct Source. You need to download the source, extract it, and then run 'gradlew setupDecompWorkspace idea' from our source. We don't use the same mappings as the forge MDK and require certain methods to be made public or private.

commented

I followed the instructions on the readme and it does successfully build, but now it has no intellisense and "cannot find declaration" for inspection.

commented

After setting "src/main/java" as the source directory, the build now fails.

`BUILD FAILED in 7s
7 actionable tasks: 6 executed, 1 up-to-date

D:\Games\Minecraft\Dev\test\TinkersConstruct>gradlew build

Configure project :
This mapping 'snapshot_20170801' was designed for MC 1.12! Use at your own peril.
Found AccessTransformer: mantle_at.cfg_Mantle-1.12-1.3.3.49_at.cfg
Found AccessTransformer: top_at.cfg_TheOneProbe-1.12-1.12-1.4.12-6_at.cfg
Found AccessTransformer: tconstruct_at.cfg

Task :compileJava
D:\Games\Minecraft\Dev\test\TinkersConstruct\build\sources\main\java\slimeknights\tconstruct\gadgets\item\ItemThrowball.java:71: error: cannot find symbol
entity.setHeadingFromThrower222(player, player.rotationPitch, player.rotationYaw, 0.0F, 2.1F, 0.5F);
^
symbol: method setHeadingFromThrower222(EntityPlayer,float,float,float,float,float)
location: variable entity of type EntityThrowball
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

Task :compileJava FAILED

FAILURE: Build failed with an exception.
`

commented

I finally got it sorted out.