• 10/15/21 4:38 pm
- 2.3k views • 1 today
- save_alt 31 downloads
- Compatibility
- Minecraft 1.17
- Changes include
- Functions
1
View the repository at: https://github.com/jtalsby/mc-battlemod
Description
This datapack is an attempt to implement battle simulations in Minecraft, ideally for multiplayer role playing realms/servers. There are two teams, the attacking team (green) and the defending team (red). Both the attacking and defending teams consist of player spawned skeleton soldiers. However, the attacking team also consists of raiders and the defending team also consists of iron golems. The original idea of this datapack was to allow for players to create two opposing armies, with the defending team in a village and the attacking team outside the village. A raid would then be initiated on the village using the 'Bad Omen' debuff, the two armies/teams would be initialized, then both sides would begin fighting. The surviving team would then be the winner of the battle.
Instructions
Possible Improvements
I don't have any time to maintain/further improve this datapack, so if anyone wants to fork it and edit it, please feel free to do so. Here are some possible improvements that one could consider.
License
MIT License
Copyright (c) 2021 jtalsby
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Description
This datapack is an attempt to implement battle simulations in Minecraft, ideally for multiplayer role playing realms/servers. There are two teams, the attacking team (green) and the defending team (red). Both the attacking and defending teams consist of player spawned skeleton soldiers. However, the attacking team also consists of raiders and the defending team also consists of iron golems. The original idea of this datapack was to allow for players to create two opposing armies, with the defending team in a village and the attacking team outside the village. A raid would then be initiated on the village using the 'Bad Omen' debuff, the two armies/teams would be initialized, then both sides would begin fighting. The surviving team would then be the winner of the battle.
Instructions
- First, download/clone this repository, then zip it up into a `.zip` archive (e.g. `battlemod.zip`). Then, add the datapack archive to the datapack folder of your world. If in single player, open a LAN world with cheats enabled, then type `/reload` in chat.
- Execute functions in the in-game chat.
- Use `give` functions to give spawn eggs, which can be used to spawn entities for each team. `summon` functions can also be used to do the same thing, albeit slower since one has to type the command for every entity spawned.
- Use `initialize_teams` to create the attacking and defending teams, and add each skeleton to its respective team. Existing iron golems are added to the defending team. Existing raiders are automatically assigned to the attackers team every 5 seconds or so.
- Use `dissolve_teams` to kill all skeletons on either team and remove both teams.
- If you do not understand how to use Minecraft Command functions, you can get up to speed by reading the Minecraft Wiki. Similarly, any other problems/questions are usually a Google search away.
Possible Improvements
I don't have any time to maintain/further improve this datapack, so if anyone wants to fork it and edit it, please feel free to do so. Here are some possible improvements that one could consider.
- Improve the aggro mechanism. Currently, attackers and defenders trigger aggro by throwing snowballs with programmatically assigned owner IDs. Owner IDs are stored using the scoreboard and snowball IDs are stored using tags. Targets are randomly selected, with the closest enemy being triggered. However, this mechanism is not very smooth and aggros are very slow and random. It may simply be a limitation of the Minecraft Command language, but if one could figure out a better implementation, then that should replace the current one
- More entities with different banners, shields, weapons, etc.
- Particles to denote respective team
- Set AI to off when first spawning skeletons, then turn on AI when teams are initialized, to prevent skeletons from wandering around when spawned
License
MIT License
Copyright (c) 2021 jtalsby
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
More like this
5336924
119



Have something to say?