ComputerCraft

ComputerCraft

21M Downloads

[Suggestion] Turtles get buffs when in range of (vanilla) beacons

Lupus590 opened this issue ยท 8 comments

commented

Suggested by @SquidDev here on #274 .

Basically, allow turtles to get benefits from beacon effects (and maybe potions?).

Haste (or whatever the speed boost one is called) could either make turtles move faster or reduce the fuel cost (which would make fuel values floats which might cause issues. Maybe this isn't the best example).

commented

Copying an extract from my follow up comment:

I'm more interested in exposing the functionality to allow those sorts of features than implementing the features themselves. This way you give other peripheral developers the same power and flexibility as the mod itself.

Detecting beacons and responding to them requires some rather ugly hacks and I'm not entirely sure how efficient it would be - something which would have to be investigated before jumping in.

There are two solutions I can think of:

  • Iterating over the World.tickableTileEntities set and determining whether they are within range and are beacons.
  • Getting all loaded chunks within a 24 chunk radius (max radius of a beacon), and looping through their TEs determining whether they are a beacon and within range

Neither are especially appealing, but I guess are still worth looking into.

commented

I am not sure how much it fits with turtles lore wise given they are machine rather than living, plus they are missing a few of the stats beacons boost. Might make more sense to have something dedicated to turtles instead boosting them.

commented

So having them equip a beacon block gives boosts?

commented

reduce the fuel cost (which would make fuel values floats which might cause issues. Maybe this isn't the best example).

You could keep fuel integer and just have random chance proportional to haste level for movement event not to use fuel.

commented

I was thinking closer to turtle beacon like block to increase efficiency of turtles in the area. Easier to code since it is our own block, but probably would not fit best in base CC.

commented

Random idea, in my opinion definitely not fitting to CC, turtles 'worship' this beacon block by spending their fuel points and give a boost to themselves and other nearby turtles.

Another idea, vanilla beacon but replace the metal blocks with computers/turtles/redstone blocks.

commented

I feel this is very quickly becoming a separate add-on mod, and not something which really fits within CC itself.

commented

@SquidDev agreed, closing

Perhaps if someone wants to make a CC based magic addon mod, you have permission to use my ideas.