- check_circle Functions
Published Jun 20th, 2021, 6/20/21 7:19 pm
- 5,503 views, 7 today
- 534 downloads, 1 today
66
I created this little project where you can create items that, when held, generate a repulsing or attracting field for entities nearby.
--Craft--
Force Field: Throw 10 lapis blocks and 32 lightning rods on the ground.
Inverted Force Field: Throw 10 redstone blocks and 32 lightning rods on the ground.
These can be used to protect yourself from mobs or simply move them around.
Note: Force fields will only affect entities on the actual border of the field itself and not inside the field.
--Craft--
Force Field: Throw 10 lapis blocks and 32 lightning rods on the ground.
Inverted Force Field: Throw 10 redstone blocks and 32 lightning rods on the ground.
These can be used to protect yourself from mobs or simply move them around.
Note: Force fields will only affect entities on the actual border of the field itself and not inside the field.
Compatibility | Minecraft 1.17 |
Tags |
tools/tracking
5177292
119
personal-force-fields
Create an account or sign in to comment.
If you ever need to optimize this pack, I would recommend using a predicate to read the player's selected item, and maybe only check the other things if the player throws an item on the ground. You could set up a hidden advancement that triggers a function when the player's inventory changes, then immediately look for any new, dropped items. If it finds one, then you read the nbt. If that nbt matches the nbt you're searching for, give it a /tag. It's WAY faster to use the tag= selector than it is to use nbt= because any time you read or write nbt to or from an entity, the game has to do some disgustingly slow serialization, so you want to minimize it as much as possible.
If you're not worried about datapack execution speed, ignore all this. If you are worried, hmu I've been fixing a lot of my own mistakes recently