Datapack Prototype: Time Stop Grenades!
This is a project that I've been mulling over for a while, and although it's still quite buggy, I feel like it's good enough to show off. There's a few things happening when time "stops":
- Using the 3D Grid Scan I created a bit ago, the projectile scans the surrounding 5x5x5 area for blocks. All blocks that it finds are given a Marker.
- From there, it gets muddy. I have to get the block ID of every block that was just scanned so that I can replace them all with Grey Concrete, then put them all back later. However, it's not as simple as doing "data get block ~ ~-1 ~ id". See, "data get block" only works on what are known as Block Entities, or blocks with complex NBT that are stored internally. Things like Chests, Signs, Shulker Boxes, and Command Blocks are all Block Entities. If you try to get the data of anything else, it won't work.
- So where do we go from there? Well, the loot command works well up to a certain point, so it was used instead, summoning a temporary invisible Armor Stand, and replacing its head with the block.
- After we have the block in an obtainable space, all of them are inserted into an Array in data storage called "Contents[]". They will be grabbed later, but for now, the temporary Armor Stands are deleted, and the blocks are replaced by Grey Concrete.
- During the duration of the Time Stop, all non-player entities within will be frozen, and their previous Motion values are stored. I'd like to do the same with players, but player NBT cannot be directly modified, so it would be extremely jittery at best, and impossible at worst.
- When the duration ends, all frozen entities are unfrozen, and their Motion values are reset. Then, the Markers grab the data from Contents[] one by one, emptying out the array, continuing as such until every block has been returned.
- Now comes Problem #2. The setblock command cannot take data as an argument, so like before, we're going to need another way in. Luckily, Falling Blocks can take in data, so we'll use those instead. The Armor Stands pass the stored block to the Falling Blocks, and each of them are frozen in place until needed.
- If they were allowed to freefall, they would clump up and only about half of the blocks would land where they were needed, so a conditional execute command re-enables gravity for all of the Falling Blocks that don't have air underneath, allowing them to fall line by line.
- Unfortunately, there are some problems with this method:
- First and foremost, there is an issue with the reconstruction of the ground. I'm not sure if it's related to the way that Contents[] is generated, or perhaps related to how it is emptied back out, but regardless, it is destructive, and not recommended for interior use.
- Next, fireballs and other projectiles that are in a similar class (Dragon Fireballs and Wither Skulls) are not stopped by the time field. Again, it's not certain if it's because of its power values as opposed to its Motion values, but something is definitely wrong.
- Additionally, blocks that do not give blocks when mined with Silk Touch and blocks that are normally unmineable cannot be processed by the algorithm and give either the wrong block or Sand/adjacent blocks for invalid block types (e.g.: Tall Grass giving Seeds as a drop). It is fixable, but it would require a ton of conditional statements.
- Finally, Falling Blocks summoned above open air, such as from a ceiling or bridge-structure, will never be able to fall. I believe this can be fixed by changing the conditionals around, but I haven't tested it extensively.
I have included a link to download the datapack for viewing, as well as for if anyone wants to try and fix it. I personally think I'm done looking at this project for the foreseeable future, but maybe I'll come back to it someday.
Here's the link for those interested: https://drive.google.com/file/d/1knMTdppHpR_MUkuex7XW-R0F9dGgTd9K/view?usp=sharing
Thanks for tuning in!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Datapack Prototype: Time Stop Grenades!», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.