More auto parameter completion for modders
SirEndii opened this issue ยท 3 comments
Useful information to include:
With the cc api, we can use parameters like IArgument
or IComputerAccess
in our functions to access peripherals or arguments.
Like I do it here: https://github.com/Seniorendi/AdvancedPeripherals/blob/1.16/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java#L129
But more would be amazing. Like the usage of World
, BlockPos
(Block pos of the peripheral not the computer) or others.
Why?
I currently add cc integration for minecraft blocks like the noteblock. And the Block
class can't give me this information.
So that I could do this:
If you have any questions or something, you can also ask me on the discord.
Why not just pass BlockPos
and World
argument in-time of Peripheral creation?
You can create integration class inside AP like for TileEntityIntegration and pass BlockPos and World in time of creation
Why not just pass
BlockPos
andWorld
argument in-time of Peripheral creation?You can create integration class inside AP like for TileEntityIntegration and pass BlockPos and World in time of creation
I already thought about this
But more cc features are always better ๐
But I think I can let this open
Doing this would involve coupling dan200.computercraft.core
with Minecraft code (i.e.g in PeripheralMethod
, PeripheralAPI
, etc...) and I'd rather avoid that if possible. Makes it easier to build emulators, etc... on top of the core.
As @SirEdvin says, given you can capture this within your peripheral object itself, I think I'm going to close this.