CC: Tweaked

CC: Tweaked

57M Downloads

More auto parameter completion for modders

SirEndii opened this issue ยท 3 comments

commented

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:
image

If you have any questions or something, you can also ask me on the discord.

commented

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

commented

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

I already thought about this
But more cc features are always better ๐Ÿ˜‰

Yeah, I just did that now
image

But I think I can let this open

commented

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.