Jump to content




[MC 1.7] [CC 1.74] Chunky Peripherals: Turtle chunkloaders! Mining chunkloaders! (CRMod)

peripheral turtle

69 replies to this topic

#1 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 16 April 2014 - 10:54 PM

Posted Image


Chunky Peripherals(previously known as CRMod) is a computercraft addon that focuses on chunkloaders!



CHUNKY MODULE:

This is the basic chunkloader module, it's crafted this way:

Posted Image

Every turtle that has this upgrade equipped will keep it's chunk loaded.
(technically it keeps loaded the turtle's chunk, the one behind it, and the one in front of it)

MINY CHUNKY MODULE:

Posted Image

This turtle upgrade keeps the chunks loaded like the chunky module and also mines
like a diamond pickaxe.
To mine you have to use the peripheral's methods dig, digUp and digDown.
To call them you have to wrap the peripheral:

p=peripheral.wrap("left")
or
p=peripheral.wrap("right")

and then you can call the method on the p object:

p.dig()
p.digUp()
p.digDown()


CHUNKY PERIPHERAL

Posted Image

This is a computer peripheral that acts as a chunk loader. By default (even if not attached to a computer) it will keep loaded the chunk it's in. By connecting it to a computer you can change the shape of the loaded area. The possible shapes are: a circle centered on the peripheral, a square centered on the peripheral a rectangle centered on the peripheral and a generic rectangle around the peripheral. The shapes sizes are expressed in blocks not chunks, so if you set for example a circle of radius 19 all the blocks that are less than 20 blocks away from the peripheral will be kept loaded.
Here's peripheral's methods documentation:
Spoiler
Remember you can use the peripheral's help command to get the documentation of a method in-game.


WIRELESS CHUNKY MODEM

Posted Image
This upgrade is a wireless modem that keeps the chunks loaded like the chunky module.
peripheral.getType(...) will return "modem" like the wireless modem, you can distinguish it from the wireless modem by the presence the method isChunky() (that will return true)



CHUNKY DETECTOR

Posted Image

The chunky detector is a handheld tool to chek if a specific block is kept loaded by Chunky Peripherals. By right-clicking on a block you will see on the chat if it's loaded or not.





SERVER COMMANDS
The command /CRModListLoadedChunks will print on the console the list of the chunks loaded by this mod. Each ticket corresponds to a turtle, it'll print between square brackets the chunk's coordinates and then the corresponding normal world coordinates at which the chunk starts.

The command /CRModToggleInfoLogging enables or disables the logging of debugging information messages on the console

CONFIG
In the config file you can change the item ids, the upgrade ids, enabling an alternative recipe for the chunky module that uses a diamond instead of the ender pearl, and activate the debug logging.
The most important config is maxChunkLoadingRadiusInBlocks: it indicates the max size of the shapes of the chunky peripheral. Circles will have at most that radius, Squares will have at most a side double the radius. Rectangles will have at most the area of the max square ((north+south)*(east+west)<(maxChunkLoadingRadiusInBlocks*2)^2)



LICENSE & MODPACKS
Chunky Peripherals is released under the MIT license, you can use it freely and put it in all the modpacks you want. Only thing: if it's a public mod pack please tell me, there's no particular reason for this but I'd like to know it :)


SOURCES
The sources can be found on gitHub:
https://github.com/9...unkyPeripherals



DOWNLOADS
The latest version can be downloaded at:
https://github.com/9...releases/latest

All versions since 1.1.0.9 are hosted on gitHub at:
https://github.com/9...herals/releases

The last release for minecraft 1.6.4, CRMod v1.1.0.6 is at:
https://github.com/9...es/tag/v1.1.0.6

Edited by _CR_, 28 April 2017 - 09:49 PM.


#2 apemanzilla

  • Members
  • 1,421 posts

Posted 17 April 2014 - 12:35 PM

Ooh, nice! Would it be possible for you to make a second peripheral that takes a chunky loader and wireless modem to make a chunk loading turtle modem? That way I don't have to sacrafice a peripheral slot for my wireless mining turtles :P

#3 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 17 April 2014 - 06:57 PM

I already thought of doing that but honestly I don't know how to do it. In the computercraft's api i don't see anything about wireless so it isn't be simple to interact with it. A solution is that with computercraft 1.63 you should be able to switch the attached peripheral using the turtle.equipLeft() and turtle.equipRight() methods.

#4 apemanzilla

  • Members
  • 1,421 posts

Posted 17 April 2014 - 07:35 PM

View Post_CR_, on 17 April 2014 - 06:57 PM, said:

I already thought of doing that but honestly I don't know how to do it. In the computercraft's api i don't see anything about wireless so it isn't be simple to interact with it. A solution is that with computercraft 1.63 you should be able to switch the attached peripheral using the turtle.equipLeft() and turtle.equipRight() methods.
True, but it seems a bit clunky and wasteful...

I'll figure something out :P

#5 Sebra

  • Members
  • 726 posts

Posted 18 April 2014 - 03:49 PM

It seems unequip chunky module would be risky.
And modem's function quite restricted if unequipped.

#6 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 18 April 2014 - 04:38 PM

that's true. I'll think about it but without a something in the apis to interface to computercraft network I'm not sure it's possible to recreate a wireless modem. I'll try to understand how it works

#7 ninnghazad

  • Members
  • 8 posts

Posted 26 May 2014 - 10:45 AM

thanks for you work CR.
writing rather extensive turtle-progs i have been looking for a good chunkloading-solution for quite a while.
while i am happy that someone has taken another approach at this, i have to agree with Sebra, in that
a chunk-loading-peripheral is kinda dangerous, and with apemanzilla in that having to drop another peripheral for
a chunkloading one is unpractical too.
so i wanted to ask you if you might consider changing your chunky-peripheral into a chunky-upgrade, or replacement-turtle,
so that there would be advanced-chunky-turtles which would be able to function exactly like the advanced turtles but
with chunkloading built in. can't say if development would be easier then chunky-wireless-modem, i would however
appreciate if you thought about it.
good chunk loading is one of the last few puzzle-pieces towards finishing my turtle-swarm-progs, which feature client/server-model
with distributed/shared-pathfinding, memory-mapping, turtle-awareness, reentrant system for crash safety, efficient quarrying functions...
sadly, without chunk-loading, turtles which can go anywhere by themselfes are quite restricted by players placing a ton of static loaders,
which at 20 turtles and up becomes rather unmanagable. especially as players tend to forget the loaders on the finished digging sites.

#8 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 01 June 2014 - 06:38 PM

the problem is that, from what I understand, the only way to extend the turtles the api provides is creating turtle upgrades (so I can't create a new type of turtle with two free slots) and I can't extend the existing modem upgrade because it isn't included in the api. So I would have to make my module capable of using the wireless, but also this isn't in the api. Not following the apis would be a big mess.
I was thinking making a method that sets the radius of the loaded area, so you could use a single turtle to load the mining area for all the turtles
Anyway if I do this I'll probabily do it at the end of june because now I have to study for some exams...

#9 sci4me

  • Members
  • 218 posts
  • LocationEarth

Posted 14 June 2014 - 09:01 AM

This mod has a HUGE bug which is causing me EXTREME lag. My console is getting uberspammed with
"[SEVERE] [ForgeModLoader] The mod CRMod attempted to force load a chunk with an invalid ticket. This is not permitted."
Your tickets aren't valid...

#10 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 14 June 2014 - 10:03 AM

That's strange, it never happened to me and I tested it a lot... Which version are you using? It happened after some time you installed the mod or from the first time? It's only a turtle that do this or it's all of them?

#11 ninnghazad

  • Members
  • 8 posts

Posted 16 June 2014 - 09:35 AM

heho again,
i gave it some more thought and looked into some CC-mods' sources. how about making chunk-loading pickaxes (aso) instead of re-implementing modems or turtles. it seemed to me that the standard tools that turtles can use would be the simplest form of peripheral, their workings are known. may sound a bit silly to have a chunkyloading-pickaxe, and i got no clue if behaviour of a pickaxe for players and turtles could conflict. but it would take away that 'closed-source'-problem with modem/turtle-chunkloaders.
for recipes your chunky-modules and a diamond tool would give diamond-chunky-tool, maybe with a nice texture like the module's one as a bonus.

#12 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 17 June 2014 - 05:17 PM

nice, nice, I didn't think of that! simple and useful! I'll work on that!

#13 gronkdamage

  • Members
  • 115 posts

Posted 19 June 2014 - 01:48 PM

Have you done any work with 1.64 (MC 1.7.2) as of yet? I was just looking around for something like this and was very pleased to see it. :)

#14 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 19 June 2014 - 02:39 PM

No, nothing yet. Now I'm working on the mining chunkloader (miny chunky module), and solving some bugs. Then I'll probably start working on the upgrade to mc1.7.2 and cc1.64. I expect to finish the new version in a few days! :)

Edited by _CR_, 19 June 2014 - 02:58 PM.


#15 gronkdamage

  • Members
  • 115 posts

Posted 19 June 2014 - 03:01 PM

Sweet! I'll keep my eyes open :)

#16 Sebra

  • Members
  • 726 posts

Posted 27 June 2014 - 09:37 AM

View Post_CR_, on 01 June 2014 - 06:38 PM, said:

I was thinking making a method that sets the radius of the loaded area, so you could use a single turtle to load the mining area for all the turtles
Set chunkloading range in meters with corresponding fuel demand.

View Post_CR_, on 19 June 2014 - 02:39 PM, said:

...Then I'll probably start working on the upgrade to mc1.7.2 and cc1.64. I expect to finish the new version in a few days! :)
I'm waiting for 1.72 version. Good luck.

#17 ninnghazad

  • Members
  • 8 posts

Posted 27 June 2014 - 12:33 PM

Hey _CR_,
you just made my day. Well, in fact, you probably just made my whole weekend. After some updating, the mod works smoothly on my server, which is a 1.6.4 cauldron-server with about 120 mods.
I had to update Cauldron, Mobius and Waila to latest version to have the chunky module not detach upon player leaving the circumference.
(I don't think that was a problem with your mod - other stuff was behaving weird too).

Upon first tests everything works as expected, the wrapped peri digs nicely, and the test-turtle has moved through unloaded terrain a ton of times without incidents.
I will spend some time this weekend making the LUA of my turtle-system a bit more presentable, and see if it works well enough to publish.

Thank you!


PS0: Found a problem, when disconnecting the owning player, the miny-module will still detach (and stop working):
Spoiler

On rejoin:
Spoiler

Other chunkloaders will continue to work at that point. MinyMod will not detach if player just moves away but is still online.
ChickenChunks allowOffline is set:
Spoiler
However it seems the MinyModule does not really use ChickenChunks tickets (however those work), as /chunkloaders shows the chunks with miny-turtle in it as loaded, but not as forced/ticketed - as it is with all other chunkloaders i have available.

Edited by ninnghazad, 04 July 2014 - 09:15 AM.


#18 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 27 June 2014 - 05:06 PM

Thanks to you! :)

About the bug:
That doesn't happen on my test server (its a simple server with only computercraft and my mod so it could be quite different from a 120 mods server...). I don't use chickenChunks I directly use the forgeChunkManager from the forge api (that uses forgeChunkLoading.cfg in the config folder). It's strange the peripheral gets detached because the ticket shouldn't be bound to the player. The turtle was in the area loaded by the player when you rejoined? it re-attaches also if you are far from it?

#19 ninnghazad

  • Members
  • 8 posts

Posted 29 June 2014 - 07:09 PM

Heho _CR_,
after trying some more i can say the problem is pretty random so it's hard to figure out whats actually going on.
it happens upon disconnecting and porting away, most of the time, sometimes not. I can't say if it is dependend
on distance, it seems to make no difference how far i am when dis/reconnecting, or if another player is around.
however, after enabling some more logging-functionality i receive a *lot* of these:
Spoiler
can't say if actually related or comorbidity though. if working, the turtle leaves a trail of loaded chunks, which stay loaded as far as i can see.
i fear i might have something installed that messes with the fml-chunking, maybe trying to provide improved unloading, that won't go along with the minys.
will keep trying to get it to work correctly.

Edited by ninnghazad, 04 July 2014 - 09:12 AM.


#20 _CR_

  • Members
  • 39 posts
  • LocationMestre, Italy

Posted 06 July 2014 - 10:51 AM

the fact is that the ticket that keeps the chunks loaded isn't in any way bound to the player, it doesn't have an owner. So when the player disconnect it shouldn't change anything. I asked about the distance to understand if the turtle gets loaded because it's in the chunks loaded by the player or because it's bound to him in some way. And those errors... I don't know what they are, java.lang.Throwable is the most generic error possible, it could be anything and I can't find anythig about those cauldronhooks classes (googling it I find this same thread....). also the stacktrace doesn't even pass through my mod classes. So, I'm sorry but I don't know.
ps: From what I see that error is generated by computercraft, when the turtle moves

Edited by _CR_, 06 July 2014 - 11:54 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users