CC: Tweaked

CC: Tweaked

57M Downloads

IPeripheral.getType() collides with upsteam TileEntity.getType()

LemADEC opened this issue ยท 2 comments

commented

Useful information to include:

  • Minecraft version 1.15.2
  • CC: Tweaked version 1.15.2-1.89.1.
  • Detailed reproduction steps:
    Since at least Minecraft 1.14, TileEntity class has an existing getType() method that crashes with CC IPeripheral getType() method.
    Historically, this method name is pretty generic and "sub-optimal"; it should probably be called getPeripheralType() or getPeripheralName().

Currently, the API still says it's a valid option to implement IPeripheral at the tile level (through it's no longer recommended). Above issue makes it impossible.

Since no other mods are depending on CC for 1.15+, I suggest to rename getType() to something more specific.

commented

On similar note, the MethodResult methods are taking arguments parameters that are actually results. I suggest to rename them for clarify.

commented

See #398.