+ Added TODO.md

+ Created some potions
+ Created a system for custom thrown  potions & drinkable potions
! Bugged throwable potions
+ Created give for potions
? Tested stuff with item modifiers, will be useful for custom weapons
This commit is contained in:
UndeadMaelys 2021-02-21 12:49:32 +01:00
parent 3a62e6d095
commit 8af1cf4fce
30 changed files with 279 additions and 6 deletions

22
TODO.md Normal file
View File

@ -0,0 +1,22 @@
Potion effects
x only done love potion & gravitation
! fix bug with throwable custom potions
x only planned so far
Do wands
x only magic misile & fire Blast
! make sure to check fire blast
Give for all melee weapon
x only netherite dagger done & vanilla sword
Give for wands
x only for magic misile
Give for trinkets
x none done
Create durability system using item modifiers
Create custom craftings using custom hidden advancements
Create vanilla weapon stats replacements via custom hidden achievements

67
custom_mode_data_guide.md Normal file
View File

@ -0,0 +1,67 @@
CUSTOM MODEL DATA NUMBERING FORMAT
"UMMXXYY"
Where:
U = Unique Project Num (For minecraft expanded, 1)
MM = Module Num (01,02,03,etc)
XX = Item Category (Melee weapon, Magic Weapon, Potion, Ranged Weapon, etc)
YY = Item Identifier (Each unique item model)
This allows for up to 100 unique items per up to 100 item categories per up to 100 modules. cool!
Each entry here will be structured as:
UMMXXYY, base_model, -> Custom Item
PROJECT EXPANDED (23)
MODULE 0 Core (00)
<emtpy>
MODULE 1 Combat (01)
> (00) MELEE WEAPONS
1010000, sword -> Scimitar
1010001, sword -> Dagger
1010002, axe -> Great Axe
1010003, sword -> Great Scimitar
1010004, shovel -> Great Hammer
1010005, sword -> Great Sword
1010006, shovel -> Halberd (Side A)
1010007, axe -> Halberd (Side B)
1010008, sword -> Katana
1010009, axe -> Pike
1010010, axe -> Pike (Forward)
1010011, shovel -> Staff
1010012, shovel -> Warhammer (Side A)
1010013, axe -> Warhammer (Side B)
> (01) RANGED WEAPONS
<emtpy>
> (02) MAGIC WEAPONS
1010200, carrot_on_a_stick -> Magic Missile Staff
1010201, carrot_on_a_stick -> Fire Blast Staff
1010202, carrot_on_a_stick -> Ice Shard Staff
1010203, carrot_on_a_stick -> Living Earth Staff
1010204, carrot_on_a_stick -> Bone Dancer Staff
> (03) POTIONS
1010300, potion -> Potion of Gender Change
1010301, potion -> Potion of Gravitation
1010302, potion -> Potion of Inferno
1010303, potion -> Potion of Ironskin
1010304, potion -> Potion of Lifeforce
1010305, splash_potion -> Potion of Love
1010306, potion -> Potion of Recall
1010307, potion -> Potion of Return
1010308, splash_potion -> Potion of Stink
1010309, potion -> Potion of Teleport
1010310, potion -> Potion of Waterwalking
> (04) TRINKETS
1010400, clock -> Zephyrian Shell
1010401, clock -> Olidia's Blessing
1010402, clock -> Bloodthirsty Amulet

View File

@ -0,0 +1,7 @@
tellraw @a[scores={me-debugging=1..}] "undeadmaelys-core:assigner/count_custom_potions"
scoreboard players set $count me-core_uid 0
execute as @e[tag=Potion,tag=PotionAssigned] run scoreboard players add $count me-core_uid 1
scoreboard players operation @s me-core_uid = $count me-core_uid
data merge entity @s {Item:{tag:{Assigned:1b}}}
execute as @e[tag=Init,tag=Potion,tag=LovePotion] run scoreboard players operation @s me-core_uid = $count me-core_uid

View File

@ -2,3 +2,4 @@ tellraw @a[scores={me-debugging=1..}] "undeadmaelys-core:assigners"
scoreboard players set $count me-core_uid 0 scoreboard players set $count me-core_uid 0
execute as @a run function undeadmaelys-core:assigner/player execute as @a run function undeadmaelys-core:assigner/player

View File

@ -27,11 +27,10 @@ function undeadm-m1:init
scoreboard players set $count me-core_uid 0 scoreboard players set $count me-core_uid 0
## player input checkers ## player input checkers
# check for right click scoreboard objectives add me-core_drinkP minecraft.used:minecraft.potion
scoreboard objectives add me-core_drinkM minecraft.used:minecraft.milk_bucket
scoreboard objectives add me-core_rc minecraft.used:minecraft.carrot_on_a_stick scoreboard objectives add me-core_rc minecraft.used:minecraft.carrot_on_a_stick
# check for shifting
scoreboard objectives add me-core_shift minecraft.custom:minecraft.sneak_time scoreboard objectives add me-core_shift minecraft.custom:minecraft.sneak_time
## custom entity trackers ## custom entity trackers
@ -44,4 +43,3 @@ function undeadm-m1:init
# to keep custom entities in check for a specific amount of time: control1 # to keep custom entities in check for a specific amount of time: control1
scoreboard objectives add me-core_entityC1 dummy scoreboard objectives add me-core_entityC1 dummy

View File

@ -15,4 +15,5 @@ execute as @e[tag=EntityTimer] if score @s me-core_entityT >= @s me-core_entityM
## clean scoreboards (these represent bool checks) ## clean scoreboards (these represent bool checks)
scoreboard players reset @a me-core_rc scoreboard players reset @a me-core_rc
scoreboard players reset @a me-core_shift scoreboard players reset @a me-core_shift
scoreboard players reset @a me-core_drinkP
scoreboard players reset @a me-core_drinkM

View File

@ -0,0 +1,40 @@
{
"replace": false,
"values": [
"#minecraft:arrows",
"#minecraft:impact_projectiles",
"minecraft:area_effect_cloud",
"minecraft:boat",
"minecraft:chest_minecart",
"minecraft:command_block_minecart",
"minecraft:dragon_fireball",
"minecraft:egg",
"minecraft:end_crystal",
"minecraft:ender_pearl",
"minecraft:evoker_fangs",
"minecraft:experience_bottle",
"minecraft:experience_orb",
"minecraft:eye_of_ender",
"minecraft:falling_block",
"minecraft:firework_rocket",
"minecraft:fishing_bobber",
"minecraft:furnace_minecart",
"minecraft:hopper_minecart",
"minecraft:item",
"minecraft:item_frame",
"minecraft:leash_knot",
"minecraft:lightning_bolt",
"minecraft:llama_spit",
"minecraft:minecart",
"minecraft:painting",
"minecraft:player",
"minecraft:potion",
"minecraft:shulker_bullet",
"minecraft:small_fireball",
"minecraft:snowball",
"minecraft:spawner_minecart",
"minecraft:tnt",
"minecraft:tnt_minecart",
"minecraft:trident"
]
}

View File

@ -0,0 +1 @@
give @s minecraft:potion{CustomPotionColor:-1,CustomModelData:2101,HideFlags:127,display:{Name:'{"text":"Potion of Gender Change","italic":"false"}'}} 1

View File

@ -0,0 +1 @@
give @s minecraft:potion{CustomPotionColor:-1,CustomModelData:2102,HideFlags:127,display:{Name:'{"text":"Potion of Gravitation","italic":"false"}',Lore:['{"text":"Gravity Control (4:00)","italic":"false","color":"blue"}','{"text":""}','{"text":"Press SHIFT to reverse gravity","italic":"false","color":"gray"}']}} 1

View File

@ -0,0 +1 @@
give @s minecraft:potion{CustomPotionColor:-1,CustomModelData:2103,HideFlags:127,display:{Name:'{"text":"Potion of Inferno","italic":"false"}',Lore:['{"text":"Circle of Fire (4:00)","italic":"false","color":"blue"}','{"text":""}','{"text":"Nearby enemies are ignited","italic":"false","color":"gray"}']}} 1

View File

@ -0,0 +1 @@
give @s minecraft:potion{CustomPotionColor:-1,CustomModelData:2104,HideFlags:127,display:{Name:'{"text":"Potion of Ironskin","italic":"false"}',Lore:['{"text":"Ironskin (4:00)","italic":"false","color":"blue"}','{"text":""}','{"text":"When Applied:","italic":"false"}','{"text":"+4 Armor","italic":"false","color":"blue"}']}} 1

View File

@ -0,0 +1 @@
give @s minecraft:potion{CustomPotionColor:-1,CustomModelData:2105,HideFlags:127,display:{Name:'{"text":"Potion of Lifeforce","italic":"false"}',Lore:['{"text":"Health Boost (4:00)","italic":"false","color":"blue"}','{"text":""}','{"text":"When Applied:","italic":"false"}','{"text":"+20% Hearts","italic":"false","color":"blue"}']}} 1

View File

@ -0,0 +1 @@
give @s minecraft:splash_potion{CustomPotionColor:313600000000,CustomModelData:2106,HideFlags:127,display:{Name:'{"text":"Potion of Love","italic":"false"}',Lore:['{"text":"Throw this to make someone fall in love","italic":"false","color":"gray"}']}} 1

View File

@ -0,0 +1 @@
give @s minecraft:potion{CustomPotionColor:-1,CustomModelData:2107,HideFlags:127,display:{Name:'{"text":"Potion of Recall","italic":"false"}',Lore:['{"text":"Teleports you home","italic":"false","color":"gray"}']}} 1

View File

@ -0,0 +1,5 @@
tellraw @a[scores={me-debugging=1..}] "undeadmaelys-m1:potion/_clear_effects"
function undeadm-m1:potion/effect_clear_gravitation
function undeadm-m1:potion/effect_clear_inferno
function undeadm-m1:potion/effect_clear_love

View File

@ -0,0 +1,4 @@
tellraw @a[scores={me-debugging=1..}] "undeadmaelys-m1:potion/_count_custom_potions"
scoreboard players set $potion_count me-core_uid 0
execute as @e[nbt={Item:{tag:{Assigned:1b}}}] run scoreboard players add $potion_count me-core_uid 1

View File

@ -0,0 +1,12 @@
# summon armor stand fake potion
execute at @s run summon minecraft:armor_stand ~ ~1 ~ {Invisible:1b,OnGround:0b,Tags:["Potion","LovePotion","Init"]}
# add one more potion to the potion counter
scoreboard players add $potion_count me-core_uid 1
scoreboard players operation @s me-core_uid = $potion_count me-core_uid
execute as @e[tag=Init,tag=Potion] run scoreboard players operation @s me-core_uid = $potion_count me-core_uid
# tell self that has an id so it can be tracked
data merge entity @s {Item:{tag:{Assigned:1b}}}
execute as @e[tag=Init,tag=Potion,tag=LovePotion] run tag @s remove Init

View File

@ -0,0 +1 @@
tag @s remove InfernoPotionEffect

View File

@ -0,0 +1 @@
tag @s remove GravitationPotionEffect

View File

@ -0,0 +1 @@
tag @s remove LovePotionEffect

View File

@ -0,0 +1,17 @@
tellraw @a[scores={me-debugging=1..}] "undeadmaelys-m1:potion/effect_do_gravitation"
particle minecraft:dust 0.47058823 0.18433137 0.78039215 1 ~ ~1 ~ 0.30 0.5 0.30 0.5 1 force
execute unless score @s me-core_shift matches 1.. run tag @s remove GravitySwitched
execute if score @s me-core_shift matches 1.. run scoreboard players add @s me-m1_stimer 1
execute if score @s me-m1_stimer matches 1.. unless score @s me-core_shift matches 1.. run scoreboard players remove @s me-m1_stimer 1
execute if score @s me-m1_stimer matches 5.. run tag @s[tag=!GravitySwitched] add GravitySwitch
execute if score @s me-m1_stimer matches 5.. run scoreboard players set @s me-m1_stimer 0
execute if score @s me-m1_stimer matches 5.. run tag @s add GravitySwitched
execute if entity @s[tag=GravityReversed,tag=GravitySwitch] run function undeadm-m1:potion/effect_switch_gravitation
execute if entity @s[tag=GravitySwitch] run tag @s add GravityReversed
tag @s remove GravitySwitch
execute as @s[tag=GravityReversed] run effect give @s[nbt={ActiveEffects:[{Id:28b}]}] minecraft:levitation 1 4 true
execute as @s[tag=GravityReversed] unless entity @s[nbt={ActiveEffects:[{Id:28b}]}] run effect give @s minecraft:levitation 1 12 true

View File

@ -0,0 +1 @@
particle minecraft:dust 1 0.43529411 0 1 ~ ~1 ~ 0.30 0.5 0.30 0.5 1 force

View File

@ -0,0 +1 @@
particle minecraft:heart ~ ~2 ~ 0.3 0 0.3 0 1

View File

@ -0,0 +1,3 @@
tag @s remove GravityReversed
effect clear @s minecraft:levitation
tag @s remove GravitySwitch

View File

@ -0,0 +1 @@
tag @s add GravitationPotionEffect

View File

@ -0,0 +1 @@
tag @s add InfernoPotionEffect

View File

@ -0,0 +1,2 @@
tag @e[distance=..3,type=!#undeadm-core:potion_unaffected,tag=!Potion] add LovePotionEffect
tag @a[distance=..3,gamemode=!spectator] add LovePotionEffect

View File

@ -0,0 +1,71 @@
tellraw @a[scores={me-debugging=1..}] "undeadmaelys-m1:potions"
## KNOWN BUGS:
# fake thrown potions (love, stink) assignation fails if assignation has dead assigners (i.e. it start at 1 instead of 0, -- cos potion 0 already died but potion 1 didnt, so summoning another will cause the new potion to also share id 1 with the already existing potion D:) maybe change the count custom to make it get the highest id?
# count potions to manage new!
function undeadm-m1:potion/_count_custom_potions
# 1 Gender Change Potion 2101
execute as @a if score @s me-core_drinkM matches 1 at @s run function undeadm-m1:potion/_clear_effects
# 2 Gravitation Potion 2102
# "Press SHIFT to reverse gravity"
# who drinks potion receives effect
execute as @e[nbt={SelectedItem:{tag:{CustomModelData:2102}}}] if score @s me-core_drinkP matches 1 run function undeadm-m1:potion/use_potion_gravitation
# do the effect for the effect carriers
execute as @e[tag=GravitationPotionEffect] at @s run function undeadm-m1:potion/effect_do_gravitation
# 3 Inferno Potion 2103
# "Nearby enemies are ignited"
# who drinks potion receives effect
execute as @e[nbt={SelectedItem:{tag:{CustomModelData:2103}}}] if score @s me-core_drinkP matches 1 run function undeadm-m1:potion/use_potion_inferno
# do the effect for the effect carriers
execute as @e[tag=InfernoPotionEffect] at @s run function undeadm-m1:potion/effect_do_inferno
# 4 Ironskin Potion 2104
# "Increase defense by 2"
# 5 Lifeforce Potion 2105
# "20% increased maximum health"
# 6 Love Potion 2106
# "Throw this to make someone fall in love"
# if a potion is thrown, create and assign a scoreboard that will propagate the custom effect
#data merge entity @s {Item:{tag:{Assigned:1b}}}
execute as @e[type=minecraft:potion,nbt={Item:{tag:{CustomModelData:2106}}}] unless entity @s[nbt={Item:{tag:{Assigned:1b}}}] run function undeadm-m1:potion/assign_potion_love
# tp potion armor stand to its vanilla potion
execute as @e[tag=Potion,tag=LovePotion] at @s as @e[type=potion] if score @s me-core_uid = @e[limit=1,sort=nearest,type=minecraft:armor_stand,tag=LovePotion] me-core_uid run tp @e[limit=1,sort=nearest,type=minecraft:armor_stand,tag=LovePotion] @s
#if potion crashes on ground, grant potion effect @e[distance=..2]
execute as @e[tag=LovePotion,type=minecraft:armor_stand] unless entity @s[nbt={OnGround:1b}] at @s run function undeadm-m1:potion/use_potion_love
#kill armor stand as potion crashed
execute as @e[tag=Potion,type=minecraft:armor_stand,nbt={OnGround:0b}] unless entity @s[nbt={OnGround:1b}] run kill @s
# do the effect for the effect carriers
execute as @e[tag=LovePotionEffect] at @s run function undeadm-m1:potion/effect_do_love
# 7 Recall Potion 2107
# "Teleports you home"
# 8 Return Potion 2108
# "This teleports you home and creates a portal"
# "Use portal to return when you are done"
# "'Good for one round trip!'"
# 9 Stink Potion 2109
# "Throw this to make someone smell terrible"
#10 Teleport Potion 2110
# "Teleports you to a random location"
#11 Water Walking Potion 2111
# "Press SHIFT to enter water"

View File

@ -17,3 +17,6 @@ execute as @e[tag=FireBlast] at @s run function undeadm-m1:entity/tick/fire_blas
# draw badass fire around the fire blast mager # draw badass fire around the fire blast mager
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2202}}}] if entity @s[nbt={OnGround:1b}] at @s run function undeadm-m1:fire_blast_figure execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2202}}}] if entity @s[nbt={OnGround:1b}] at @s run function undeadm-m1:fire_blast_figure
# do potions
function undeadm-m1:potions

View File

@ -0,0 +1,6 @@
[
{
"function": "minecraft:set_nbt",
"tag": "{uwu:1}"
}
]