Skip to content

Commit

Permalink
Syncing source files to a new repository
Browse files Browse the repository at this point in the history
  • Loading branch information
akoimeexx authored Dec 28, 2018
1 parent bf69d41 commit 61bbe0d
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/akoimeexx/functions/better_drowned/init.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scoreboard objectives add bd_timer dummy {"text": "Better Drowned Conversion Timer"}
scoreboard players set better_drowned_watchdog bd_timer 0
8 changes: 8 additions & 0 deletions data/akoimeexx/functions/better_drowned/replace.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
summon drowned ~ ~ ~
playsound entity.zombie.converted_to_drowned hostile @a[distance=..16]
#execute if entity @s[nbt={ArmorItems:[]}] data modify entity @e[type=drowned,limit=1,sort=nearest] ArmorItems set from entity @s ArmorItems
#data modify entity @e[type=drowned,limit=1,sort=nearest] IsBaby set from entity @s IsBaby
execute at @s[nbt={IsBaby:1b}] store result entity @e[type=minecraft:drowned,distance=..1,limit=1] IsBaby byte 1 run data get entity @s IsBaby
effect give @s minecraft:invisibility 5 1 true
tp @s ~ -128 ~
kill @s
2 changes: 2 additions & 0 deletions data/akoimeexx/functions/better_drowned/search.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute as @e[type=zombie,nbt=!{DrownedConversionTime:-1}] at @s run function akoimeexx:better_drowned/replace
scoreboard players set better_drowned_watchdog bd_timer 0
2 changes: 2 additions & 0 deletions data/akoimeexx/functions/better_drowned/timer.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
scoreboard players add better_drowned_watchdog bd_timer 1
execute if score better_drowned_watchdog bd_timer matches 20.. run function akoimeexx:better_drowned/search
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scoreboard objectives remove bd_timer
5 changes: 5 additions & 0 deletions data/minecraft/tags/functions/load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"akoimeexx:better_drowned/init"
]
}
5 changes: 5 additions & 0 deletions data/minecraft/tags/functions/tick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"akoimeexx:better_drowned/timer"
]
}
22 changes: 22 additions & 0 deletions notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Datapack notes
`notes.md` is used as a catch-basin of interesting tidbits and ideas for my
datapack projects, as well as notes on specific files/functions needed.

This file is not required in the datapack zip file, but may be included with no
ill effects.

## `akoimeexx:better_drowned/replace` and 1.14-pre+

Included in the `data/akoimeexx/functions/better_drowned/replace.mcfunction`
file are two commented out lines. These lines enable the datapack to copy the
armor from the zombie being replaced onto the drowned that has been summoned in
without losing the trident; as well as provide a better way to set the newly
summoned drowned's `IsBaby` nbt value based on the source zombie.

In practice, the 1.13 IsBaby method has not been 100% reliable and sometimes
produces baby drowned. I believe this to be an issue with copying the value
from a zombie that doesn't have it set causing the game mechanics to randomly
set it. Not ideal, but I'm not terribly worried about it.

A release file will be provided with the 1.14 changes already; but should be
considered unsupported until 1.14 has been fully released.
7 changes: 7 additions & 0 deletions pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"pack": {
"pack_format": 1,
"description": "Better Drowned Datapack for Minecraft 1.13, allows zombies converted to drowned to drop drowned-specific loot",
"url": "http://blocks.akoimeexx.com/datapacks/better-drowned/"
}
}
39 changes: 39 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Better Drowned Datapack
A minecraft 1.13+ datapack that reintroduces pre-release behavior of converted
drowned mobs being able to spawn with a trident.

This datapack was written to alleviate the issue of natural drowned with
tridents being prohibitively rare on a multiplayer server, and allows for the
building of trident farms using zombies as your starting mob. Drop rate for
tridents have been unaffected.

`readme.md` is not required in the datapack zip file, but may be included with
no ill effects.

## Usage
Find loads of zombies. Stick their heads in water. Wait for conversion. Profit.

## Structure
* `data`
* `akoimeexx`
* `functions`
* `better_drowned`
* `init.mcfunction`
Sets up scoreboard "timer" objective during `#minecraft:load`
* `replace.mcfunction`
Summons a new drowned to take the place of and then kill `@s`
* `search.mcfunction`
Runs `akoimeexx:better_drowned/replace` as
`@e[type=zombie,nbt=!{DrownedConversionTime:-1}]` and resets the
scoreboard "timer" objective
* `timer.mcfunction`
Increases scoreboard "timer" objective during `#minecraft:tick` and
runs `akoimeexx:better_drowned/search` on matching `20..`
* `uninstall.mcfunction`
Removes scoreboard "timer" objective
* `minecraft`
* `tags`
* `functions`
* `load.json`
* `tick.json`
* `pack.mcmeta`

0 comments on commit 61bbe0d

Please sign in to comment.