Data Packs Mob

Anti-Wither Griefing

  • 3.6k views 6 today
  • save_alt 166 downloads
Compatibility
Minecraft 1.17
Changes include
  • Functions
  • 2
  • 2
Swarmee
Lvl 25Expert System
2

AWG - Anti-Wither Griefing
1.17.1


BEFORE DOWNLOADING THIS DATAPACK, PLEASE READ AND UNDERSTAND THE FOLLOWING


This datapack is NOT universal and REQUIRES configuration prior to operation in your world. Due to how Mojang has implemented the Wither (as of 1.17), it is not possible to have a fully automated and all encompassing Anti-Wither Griefing datapack, but some mods/plugins can perform this task more comprehensively due to their ability to manipulate game functionality outside of vanilla commands.

Please be sure you're aware of this limitation before downloading or commenting below because the datapack "doesn't work" or doesn't fit your requirements. This datapack was created specifically for 1 server to meet their specific needs and is provided on Planet Minecraft because it can possibly be customized to fit your needs as well following the instructions provided. If your needs are too different than depicted here then you may be better served by another solution.

If you understand the statements above, please continue reading below for information and instructions on how the datapack works and how to implement it in your world.

This datapack has not been tested on any version other than Java 1.17.1 but should work from Java version 1.13+ as there are only 3 basic commands ("execute in *dimension* run kill..." and "schedule *function*...".

Please enjoy!! If you like the datapack, please consider favoriting or giving the datapack a Diamond on Planet MC and/or subscribing on YouTube!

Description

This is a simple datapack that experienced players/server admins must modify for their specific worlds in order to stop Wither griefing in specific locations. Only the following locations are preset in the datapack but as many as you want can be added following the command structure provided. The included locations are:
  • 200 block radius from 0 63 0 in the 'End' dimension (for wither cheesing)
  • 200 block radius from Worldspawn in the Overworld to catch any errant 'wither_skull' projectiles that escape through the end portal from Wither cheesing (coords must be configured within the datapack for each world after downloading the datapack)
The datapack can operate at the default tick interval (every 5 ticks) or at a custom tick interval to ensure faster killing of 'wither_skull' entities if desired (eg. every tick), or slower if necessary. This is a small datapack with only 1 function and 3 commands which should not contribute any tick lag to your world, but greater tick intervals will reduce this potential further if needed.

This datapack kills both "regular" wither_skull attacks (the black skulls that the Wither shoots when targeting any mob) and "dangerous" wither_skull attacks (the blue skulls that are randomly fired and can destroy obsidian). This datapack DOES NOT mitigate damage when the Wither is spawned and explodes (the spawning explosion that happens after the Wither's health bar is filled).

To configure the datapack to meet your needs:
  1. Download and extract the datapack to the "Datapacks" directory for your save/world
  2. Using a text editor, edit the 'init.mcfunction file located within the datapack's 'functions' directory (\AWG\data\awg\functions)
  3. Replace the coordinates on line 30 with your Worldspawn coordinates
  4. Replace the coordinates on line 33 with your desired 'End' dimension coordinates (should not be necessary)
  5. (optional) Modify the "Schedule" command on line 36 to have the datapack kill wither_skull entities at a faster or slower interval (default value is every 5 ticks: change '5t' to '1t' to kill wither_skulls every tick, or '20t' to kill them every 20 ticks)
  6. Save your changes to the file then launch your world and the datapack will be enabled and running (if you already had your world open/running, either use the /reload command to reload the datapack or restart your world to load the datapack.

Examples:

If your worldspawn coords are 50 63 -127, you would follow step 3 above and edit line 30 in the 'init.mcfunction' file as shown below:

execute in minecraft:overworld run kill @e[type=wither_skull,x=50,y=63,z=-127,distance=..200]

If you wanted the datapack function to execute every 1 tick instead of every 5 ticks you would follow step 5 above and edit line 36 as shown below:

schedule function awg:init 1t

For every 1 second: (remember: 1 second == 20 ticks)

schedule function awg:init 1s
--OR--

schedule function awg:init 20t
Remember to save your edits to the 'init.mcfunction' file in the text editor, then /reload your game to apply the changes!

TROUBLESHOOTING

If you've followed the instructions above but are running into issues:

  • Download an unaltered copy of the datapack, create a NEW TEST WORLD with cheats enabled and extract the datapack into the new test world Datapacks directory. Launch the new test world, enter creative mode, then summon a wither and other mobs for it to attack to see if the datapack is functioning. Using the /function command you should see the awg:init function listed in the command autocomplete options. Repeat these steps replacing the freshly downloaded init.mcfunction file with your edited copy, then use the /reload command to reload the datapack, and then the /function command to ensure the awg:init function is listed and the datapack functions as expected with your edits applied.

  • After you've edited the 'init.mcfunction' file, copy/paste the commands from line 30, 33, and 36 one at a time into the in game chat window (with a 'forward slash' / in front of the command in the chat window) to see if your edits to the commands are valid (invalid command syntax will cause the text to turn red in the chat window indicating a typographical error)

  • If wither_skulls are not being killed fast enough to prevent griefing in your world, lower the interval value in line 36 to execute every 1 tick as described in the examples above. If game/server performance is worse or wither_skulls are still not being killed in the expected time frame then it's possible that your world is lagging too much to keep up and this datapack would not be able to function

  • If you still have issues, please leave a comment with your Overworld spawn and Dragon Alter (at the center End island) XYZ coordinates, as well as your 'init.mcfunction' commands provided and I'd be glad to provide correct commands when I am able. If you're running mods/plugins in your world, or it's a server and you are not an OP, I will not provide additional troubleshooting as there could be too many variables (conflicting mod/plugin behavior, lag, etc.) or an inability to effect the changes needed (if you don't have access to the server's console) to resolve issues. Thank you for understanding!

More like this

  Have something to say?

Welcome