Litematica Printer

Litematica Printer

18k Downloads

[SUGGESTION] Making the printer faster.

JackDainzh opened this issue ยท 4 comments

commented

So I've recently modified the code of a printer and made it so that non-rotating and rotating blocks are placed at different speeds. This allows for instant placing for non-rotating blocks and a relatively fast speed for all other redstone stuff.
Should I create a pull-request or rather keep it to my own fork?

commented

I that sounds like something people would be interested in and a pr would me much appreciated. Two things though: have you tried if placing non-rotating blocks fast on high ping servers produces ghost blocks? Also, I think people should be able to configure the fast printing speed separately with a slider or a checkbox (in case the ghost blocks become an issue). How have you implemented the fast printing currently?

Once those have been resolved, I'd be happy to include the feature in my repo :)

commented

I implemented it as two separate sliders of Intervals. One for rotating blocks and one not for rotating blocks. The printer itself is sped up by 10. so the default value of the Interval for rotating blocks would be 10, and 2 for non rotating blocks. I also made some modifications to how we process stuff there. The ranging and placement prep is now a separate method. Then there is filtering for if the block has a facing property at all, depending on that we add it to the corresponding array and later use it as a condition. clearQueue is also sped up to remove blocks rotating wrong between speed changes. I will make a PR tomorrow, you can see for yourself. The ghost block problem is non existent, I placed it on the server with a 80 ping, works fine, tho speed might depend on ping. So far as I know no ghost blocks were noticed. All this is made with little Java knowledge, so feel free to change anything.

commented
8mb.video-chW-wUOadF7h.mp4
commented

I've addressed this in 3.0, though I haven't done much testing on servers, so I don't know if it gets some of the rotations wrong on high speeds. If it does and you think it could be solved by modifying the placement speed of blocks requiring a look direction, reopen this issue and I will look into it.