Skip to content

Commit 9ce4e31

Browse files
committed
Add Gemini Compatibility
1 parent 6e5bb63 commit 9ce4e31

26 files changed

+82
-67
lines changed

gm4_lavish_livestock/data/gm4_lavish_livestock/templates/function/modify_baby.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
scoreboard players operation @s gm4_lavish_livestock_size = $size gm4_lavish_livestock_size
88
execute if score @s gm4_lavish_livestock_size matches 0..1 if predicate {condition:"minecraft:random_chance",chance:0.05} run scoreboard players add @s gm4_lavish_livestock_size 1
99

10-
# if non-vanilla size: add loot table and tag entity (tag is for future-proofing only, it is not currently read)
11-
execute if score @s gm4_lavish_livestock_size matches 1.. run tag @s add gm4_lavish_livestock_{{ entity_id }}
10+
# if non-vanilla size: add loot table and tag entity (for diagnostics and to read for other modules, currently used by gemini)
11+
execute if score @s gm4_lavish_livestock_size matches 1.. run tag @s add gm4_lavish_livestock.livestock
1212
execute if score @s gm4_lavish_livestock_size matches 1.. run data modify entity @s DeathLootTable set value "gm4_lavish_livestock:{{ entity_id }}/lavish_death"
1313

1414
# set scale attribute

gm4_metallurgy/data/gm4_gemini_shamir/function/baby/pick_type.mcfunction

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# determine type
22
# run from gm4_gemini_shamir:baby/find_baby
33

4+
data remove storage gm4_gemini_shamir:temp source
45
execute if entity @s[tag=gm4_gemini_axolotl] as @e[type=axolotl,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_axolotl
56
execute if entity @s[tag=gm4_gemini_cat] as @e[type=cat,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_cat
67
execute if entity @s[tag=gm4_gemini_chicken] as @e[type=chicken,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_chicken
@@ -10,6 +11,7 @@ execute if entity @s[tag=gm4_gemini_fox] as @e[type=fox,distance=..10,nbt={Age:-
1011
execute if entity @s[tag=gm4_gemini_goat] as @e[type=goat,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_goat
1112
execute if entity @s[tag=gm4_gemini_horse] as @e[type=horse,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_horse
1213
execute if entity @s[tag=gm4_gemini_llama] as @e[type=llama,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_llama
14+
execute if entity @s[tag=gm4_gemini_mooshroom] as @e[type=mooshroom,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_mooshroom
1315
execute if entity @s[tag=gm4_gemini_mule] as @e[type=mule,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_mule
1416
execute if entity @s[tag=gm4_gemini_ocelot] as @e[type=ocelot,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_ocelot
1517
execute if entity @s[tag=gm4_gemini_panda] as @e[type=panda,distance=..10,nbt={Age:-24000},limit=1,sort=nearest] at @s run function gm4_gemini_shamir:baby/spawn_panda
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred axolotl
33

4-
summon axolotl ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=axolotl,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] Variant set from entity @s Variant
6-
data modify entity @e[type=axolotl,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] PersistenceRequired set value 1b
7-
tag @e[type=axolotl,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.variant set from entity @s variant
6+
data modify storage gm4_gemini_shamir:temp natural_baby.PersistenceRequired set value 1b
7+
execute summon axolotl run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred cat
33

4-
summon cat ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=cat,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] variant set from entity @s variant
6-
data modify entity @e[type=cat,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] Owner set from entity @s Owner
7-
data modify entity @e[type=cat,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] PersistenceRequired set value 1b
8-
tag @e[type=cat,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.variant set from entity @s variant
6+
data modify storage gm4_gemini_shamir:temp natural_baby.Owner set from entity @s Owner
7+
data modify storage gm4_gemini_shamir:temp natural_baby.PersistenceRequired set value 1b
8+
execute summon cat run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred chicken
33

4-
summon chicken ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=chicken,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] variant set from entity @s variant
6-
tag @e[type=chicken,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.variant set from entity @s variant
6+
execute if entity @s[tag=gm4_lavish_livestock.livestock] run data modify storage gm4_gemini_shamir:temp natural_baby.variant set from entity @s attributes[{id:"minecraft:scale"}].modifiers[{id:"gm4_lavish_livestock:size"}]
7+
execute summon chicken run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred cow
33

4-
summon cow ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=cow,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] variant set from entity @s variant
6-
tag @e[type=cow,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.variant set from entity @s variant
6+
execute if entity @s[tag=gm4_lavish_livestock.livestock] run data modify storage gm4_gemini_shamir:temp natural_baby.variant set from entity @s attributes[{id:"minecraft:scale"}].modifiers[{id:"gm4_lavish_livestock:size"}]
7+
execute summon cow run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred donkey
33

4-
summon donkey ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=donkey,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] Owner set from entity @s Owner
6-
tag @e[type=donkey,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.Owner set from entity @s Owner
6+
execute summon donkey run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred fox
33

4-
summon fox ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=fox,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] Trusted set from entity @s Trusted
6-
data modify entity @e[type=fox,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] Type set from entity @s Type
7-
tag @e[type=fox,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.Trusted set from entity @s Trusted
6+
data modify storage gm4_gemini_shamir:temp natural_baby.Type set from entity @s Type
7+
execute summon fox run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred goat
33

4-
summon goat ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=goat,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] IsScreamingGoat set from entity @s IsScreamingGoat
6-
tag @e[type=goat,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.IsScreamingGoat set from entity @s IsScreamingGoat
6+
execute summon goat run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# run from gm4_gemini_shamir:baby/pick_type
22
# @s = recently bred horse
33

4-
summon horse ~ ~ ~ {Tags:["gm4_gemini_baby"],Age:-23999}
5-
data modify entity @e[type=horse,tag=gm4_gemini_baby,distance=..2,sort=nearest,limit=1] Variant set from entity @s Variant
6-
tag @e[type=horse,tag=gm4_gemini_baby,sort=nearest,limit=1] remove gm4_gemini_baby
4+
data modify storage gm4_gemini_shamir:temp natural_baby set value {Tags:["gm4_gemini_baby"],Age:-23999}
5+
data modify storage gm4_gemini_shamir:temp natural_baby.Variant set from entity @s Variant
6+
execute summon horse run data modify entity @s {} merge from storage gm4_gemini_shamir:temp source

0 commit comments

Comments
 (0)