diff --git a/elements/AlchemyCraftBlockBlockAdded.mod.json b/elements/AlchemyCraftBlockBlockAdded.mod.json index d7e6cf87..fb51552d 100644 --- a/elements/AlchemyCraftBlockBlockAdded.mod.json +++ b/elements/AlchemyCraftBlockBlockAdded.mod.json @@ -2,6 +2,6 @@ "_fv": 43, "_type": "procedure", "definition": { - "procedurexml": "no_ext_triggersummon minecraft:armor_stand ~ ~ ~ {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,Small:true,DisabledSlots:4144959,Tags:[\"minecraft_armor_weapon_alchemy_craft_block_mahouzinn\"]}ADD0.5clearCUSTOM:AlchemyCraftBlockEntity00000" + "procedurexml": "no_ext_triggersummon minecraft:armor_stand ~ ~ ~ {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,Small:true,DisabledSlots:4144959,Tags:[\"minecraft_armor_weapon_alchemy_craft_block_mahouzinn\"]}ADD0.5ADD1ADD0.5clearCUSTOM:AlchemyCraftBlockEntity00000" } } \ No newline at end of file diff --git a/elements/AlchemyCraftBlockEffect.mod.json b/elements/AlchemyCraftBlockEffect.mod.json new file mode 100644 index 00000000..6a56d14d --- /dev/null +++ b/elements/AlchemyCraftBlockEffect.mod.json @@ -0,0 +1,20 @@ +{ + "_fv": 43, + "_type": "potioneffect", + "definition": { + "effectName": "Alchemy Craft Block Effect", + "icon": "attack_in_guard.png", + "color": { + "value": -1, + "falpha": 0.0 + }, + "isInstant": false, + "isBad": false, + "isBenefitical": false, + "renderStatusInInventory": false, + "renderStatusInHUD": false, + "onActiveTick": { + "name": "AlchemyCraftBlockEffectOnEffectActiveTick" + } + } +} \ No newline at end of file diff --git a/elements/AlchemyCraftBlockEffectOnEffectActiveTick.mod.json b/elements/AlchemyCraftBlockEffectOnEffectActiveTick.mod.json new file mode 100644 index 00000000..7d5c4eb4 --- /dev/null +++ b/elements/AlchemyCraftBlockEffectOnEffectActiveTick.mod.json @@ -0,0 +1,7 @@ +{ + "_fv": 43, + "_type": "procedure", + "definition": { + "procedurexml": "no_ext_triggerEntityArmorStandtp @s ~ ~ ~ ~-.5 ~MINUS0.5CUSTOM:AlchemyCraftBlock" + } +} \ No newline at end of file diff --git a/elements/MukoukaGuard.mod.json b/elements/MukoukaGuard.mod.json index 5f61d19f..043b7c75 100644 --- a/elements/MukoukaGuard.mod.json +++ b/elements/MukoukaGuard.mod.json @@ -2,6 +2,6 @@ "_fv": 43, "_type": "procedure", "definition": { - "procedurexml": "entity_attackedCUSTOM:BlackholeCUSTOM:KillotiruCUSTOM:OtiruyoCUSTOM:AlchemyCraftBlockEntityCUSTOM:GuardDEFAULTDEFAULTCUSTOM:Guard" + "procedurexml": "entity_attackedCUSTOM:BlackholeCUSTOM:KillotiruCUSTOM:OtiruyoCUSTOM:GuardCUSTOM:AlchemyCraftBlockEntityDEFAULTDEFAULTCUSTOM:Guard" } } \ No newline at end of file diff --git a/elements/SkinOfDragonTick.mod.json b/elements/SkinOfDragonTick.mod.json index 2604d3fa..56f014b7 100644 --- a/elements/SkinOfDragonTick.mod.json +++ b/elements/SkinOfDragonTick.mod.json @@ -2,6 +2,6 @@ "_fv": 43, "_type": "procedure", "definition": { - "procedurexml": "EQTRUECUSTOM:TestBowtagNameplayer_ticksEntityPlayerteam join minecraft_armor_weapon_dark_purple @e[type=item,limit=1,sort=nearest,nbt={Item:{id:\"minecraft_armor_weapon:skin_of_dragon\"}}]ANDEQglobal:aaa5CUSTOM:LokiTheTricksterCUSTOM:Killminecraft_armor_weapon:armor_stand_tobasu_tick_killminecraft_armor_weapon:armor_stand_tobasu_tickminecraft_armor_weapon:test_bow_tick/kill @e[type=minecraft_armor_weapon:projectile_test_bow]CUSTOM:TestBowEQglobal:aaa2global:ddd普通の矢EQglobal:aaa3global:ddd直線の矢EQglobal:aaa4global:ddd同じ高さEQglobal:aaa5global:ddd拡散EQglobal:aaa6global:ddd速めの矢EQglobal:aaa7global:ddd彗星GTEglobal:aaa8global:aaa2global:ddd普通の矢execute as @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_item_stand_amor_stand] if entity @s[nbt=!{HandItems:[{id:\"minecraft_armor_weapon:luna\"}]}] run kill @sexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft:bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_functionexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft_armor_weapon:wither_bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_function_wither_skeletonexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft_armor_weapon:stray_bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_function_strayexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft_armor_weapon:stray_bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_function_strayANDANDCUSTOM:TunderbolteffrctEQCustomModelData1ORORCUSTOM:KurikarakenCUSTOM:KurikarakenswordCUSTOM:KurikarakenutigatanaCustomModelData0execute at @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run tp @s ~ ~ ~ ~-.5 ~execute at @e[tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run function minecraft_armor_weapon:alchemymod1clearexecute at @e[type=minecraft:armor_stand,tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run tp @e[type=minecraft:armor_stand,tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] ~ ~ ~ ~-.5 ~execute at @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] if block ~ ~ ~ minecraft_armor_weapon:alchemy_craft_block run function minecraft_armor_weapon:alchemymod1" + "procedurexml": "EQTRUECUSTOM:TestBowtagNameplayer_ticksEntityPlayerteam join minecraft_armor_weapon_dark_purple @e[type=item,limit=1,sort=nearest,nbt={Item:{id:\"minecraft_armor_weapon:skin_of_dragon\"}}]ANDEQglobal:aaa5CUSTOM:LokiTheTricksterCUSTOM:Killminecraft_armor_weapon:armor_stand_tobasu_tick_killminecraft_armor_weapon:armor_stand_tobasu_tickminecraft_armor_weapon:test_bow_tick/kill @e[type=minecraft_armor_weapon:projectile_test_bow]CUSTOM:TestBowEQglobal:aaa2global:ddd普通の矢EQglobal:aaa3global:ddd直線の矢EQglobal:aaa4global:ddd同じ高さEQglobal:aaa5global:ddd拡散EQglobal:aaa6global:ddd速めの矢EQglobal:aaa7global:ddd彗星GTEglobal:aaa8global:aaa2global:ddd普通の矢execute as @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_item_stand_amor_stand] if entity @s[nbt=!{HandItems:[{id:\"minecraft_armor_weapon:luna\"}]}] run kill @sexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft:bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_functionexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft_armor_weapon:wither_bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_function_wither_skeletonexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft_armor_weapon:stray_bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_function_strayexecute at @e[type=item,nbt={Item:{id:\"minecraft:nether_star\"}}] if entity @e[type=item,nbt={Item:{id:\"minecraft_armor_weapon:stray_bone\",Count:16b}},distance=..1.5] if entity @e[type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}},distance=..1.5] run function minecraft_armor_weapon:hardentity_function_strayANDANDCUSTOM:TunderbolteffrctEQCustomModelData1ORORCUSTOM:KurikarakenCUSTOM:KurikarakenswordCUSTOM:KurikarakenutigatanaCustomModelData0execute at @e[tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run function minecraft_armor_weapon:alchemymod1execute as @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run effect give @s minecraft_armor_weapon:alchemy_craft_block_effect 1 1 trueexecute at @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run tp @s ~ ~ ~ ~-.5 ~clearexecute at @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] if block ~ ~ ~ minecraft_armor_weapon:alchemy_craft_block run function minecraft_armor_weapon:alchemymod1" } } \ No newline at end of file diff --git a/elements/SwordStandLuna.mod.json b/elements/SwordStandLuna.mod.json index c80fe0c4..54fee2ac 100644 --- a/elements/SwordStandLuna.mod.json +++ b/elements/SwordStandLuna.mod.json @@ -2,7 +2,7 @@ "_fv": 43, "_type": "function", "definition": { - "code": "summon minecraft:armor_stand ~-0.3 ~-0.5 ~0.025 {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,ShowArms:true,DisabledSlots:65537,Pose:{RightArm:[90f,90f,0f]},HandItems:[{id:\"minecraft_armor_weapon:luna\",Count:1},{}],Tags:[\"minecraft_armor_weapon_item_stand_amor_stand\"]}\nparticle minecraft:cloud ~ ~1.5 ~ 1 1 1 0.1 200 normal\nparticle minecraft:end_rod ~ ~1.5 ~ 0.4 5 0.4 0.0 200 normal", + "code": "summon minecraft:armor_stand ~-0.3 ~-0.5 ~0.025 {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,ShowArms:true,DisabledSlots:65537,Pose:{RightArm:[90f,90f,0f]},HandItems:[{id:\"minecraft_armor_weapon:luna\",Count:1},{}],Tags:[\"minecraft_armor_weapon_item_stand_amor_stand\"]}\nkill @e[sort=nearest,limit=1,type=item,nbt={Item:{id:\"minecraft_armor_weapon:iron_katana\",Count:1b}}]\nkill @e[sort=nearest,limit=1,type=item,nbt={Item:{id:\"minecraft:beacon\",Count:16b}}]\nkill @e[sort=nearest,limit=1,type=item,nbt={Item:{id:\"minecraft:iron_block\",Count:64b}}]\nparticle minecraft:cloud ~ ~1.5 ~ 1 1 1 0.1 200 normal\nparticle minecraft:end_rod ~ ~1.5 ~ 0.4 5 0.4 0.0 200 normal", "name": "sword_stand_luna", "namespace": "mod" } diff --git a/minecraft_armor_weapon.mcreator b/minecraft_armor_weapon.mcreator index 734f9495..8285a96b 100644 --- a/minecraft_armor_weapon.mcreator +++ b/minecraft_armor_weapon.mcreator @@ -9025,6 +9025,42 @@ } ] } + }, + { + "name": "AlchemyCraftBlockEffectOnEffectActiveTick", + "type": "procedure", + "sortid": 593, + "compiles": true, + "locked_code": false, + "registry_name": "alchemy_craft_block_effect_on_effect_active_tick", + "metadata": { + "files": [ + "src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockEffectOnEffectActiveTickProcedure.java" + ], + "dependencies": [ + { + "name": "entity", + "type": "entity" + }, + { + "name": "world", + "type": "world" + } + ] + } + }, + { + "name": "AlchemyCraftBlockEffect", + "type": "potioneffect", + "sortid": 594, + "compiles": true, + "locked_code": false, + "registry_name": "alchemy_craft_block_effect", + "metadata": { + "files": [ + "src/main/java/minecraftarmorweapon/potion/AlchemyCraftBlockEffectMobEffect.java" + ] + } } ], "variable_elements": [ @@ -9254,19 +9290,19 @@ "itemGroup.tabmagic_books": "Magic Books", "itemGroup.tabyopkeinamono": "建築とかに", "effect.minecraft_armor_weapon.syugeki": "aa", - "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_helmet": "das herz einer fee armor helmet", + "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.ruami_284_spawn_egg": "ruami284 Spawn Egg", "entity.minecraft_armor_weapon.comet": "Comet", - "entity.minecraft_armor_weapon.comet_kill": "Comet", - "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", "item.minecraft_armor_weapon.darkness": "§5Darkness", + "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", + "entity.minecraft_armor_weapon.comet_kill": "Comet", "block.minecraft_armor_weapon.stone_katana_block": "Netherite Katana Block", "item.minecraft_armor_weapon.blackhole_spawn_egg": "Blackhole Spawn Egg", "entity.minecraft_armor_weapon.blackhole": "Blackhole", "advancements.magical_swordsman_achievements.descr": "§eGet Magisches feen katana", - "effect.minecraft_armor_weapon.suityuu": "suityuu", "entity.minecraft_armor_weapon.ruami_284": "ruami284", + "effect.minecraft_armor_weapon.suityuu": "suityuu", "advancements.you_have_become_a_vampire.descr": "You have become a vampire.", "effect.minecraft_armor_weapon.bakuhatu": "explosion", "effect.minecraft_armor_weapon.aaaa": "bunnsinn", @@ -9286,8 +9322,8 @@ "block.minecraft_armor_weapon.stone_bricks_trap_door": "Stone Bricks Trap Door", "item.minecraft_armor_weapon.stone_katana": "§7Stone Katana", "item.minecraft_armor_weapon.dragon_black_armor_helmet": "§8Dragon black helmet", - "item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword", "item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣", + "item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword", "item.minecraft_armor_weapon.scythe": "Scythe", "item.minecraft_armor_weapon.wind_step": "§2Windstep", "item.minecraft_armor_weapon.a": "A", @@ -9298,8 +9334,9 @@ "effect.minecraft_armor_weapon.long_range_weapon_cut": "遠距離武器斬る", "item.minecraft_armor_weapon.bogged_outer_chestplate": "Bogged Outer Chestplate", "item.minecraft_armor_weapon.dragon_green_armor_boots": "§2Dragon green boots", - "item.minecraft_armor_weapon.magicwand": "Magicwand", "item.minecraft_armor_weapon.rivers_of_blood": "§4§lRivers of Blood", + "item.minecraft_armor_weapon.magicwand": "Magicwand", + "effect.minecraft_armor_weapon.alchemy_craft_block_effect": "Alchemy Craft Block Effect", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_boots": "das herz einer fee armor boots", "entity.minecraft_armor_weapon.killotiru": "Otiruyo", "effect.minecraft_armor_weapon.kitterukitteru": "subetekirisuteru", @@ -9516,19 +9553,19 @@ "itemGroup.tabmagic_books": "Magic Books", "itemGroup.tabyopkeinamono": "建築とかに", "effect.minecraft_armor_weapon.syugeki": "aa", - "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_helmet": "das herz einer fee armor helmet", + "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.ruami_284_spawn_egg": "ruami284 Spawn Egg", "entity.minecraft_armor_weapon.comet": "Comet", - "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", - "item.minecraft_armor_weapon.darkness": "§5Darkness", "entity.minecraft_armor_weapon.comet_kill": "Comet", + "item.minecraft_armor_weapon.darkness": "§5Darkness", + "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", "block.minecraft_armor_weapon.stone_katana_block": "Netherite Katana Block", "item.minecraft_armor_weapon.blackhole_spawn_egg": "Blackhole Spawn Egg", "entity.minecraft_armor_weapon.blackhole": "Blackhole", "advancements.magical_swordsman_achievements.descr": "Magisches feen katanaを得る", - "effect.minecraft_armor_weapon.suityuu": "suityuu", "entity.minecraft_armor_weapon.ruami_284": "ruami284", + "effect.minecraft_armor_weapon.suityuu": "suityuu", "advancements.you_have_become_a_vampire.descr": "吸血鬼になったよ", "effect.minecraft_armor_weapon.bakuhatu": "explosion", "effect.minecraft_armor_weapon.aaaa": "bunnsinn", @@ -9548,8 +9585,8 @@ "block.minecraft_armor_weapon.stone_bricks_trap_door": "Stone Bricks Trap Door", "item.minecraft_armor_weapon.dragon_black_armor_helmet": "§8Dragon black helmet", "item.minecraft_armor_weapon.stone_katana": "§7石の刀", - "item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣", "item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword", + "item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣", "item.minecraft_armor_weapon.wind_step": "§2Windstep", "item.minecraft_armor_weapon.scythe": "Scythe", "item.minecraft_armor_weapon.a": "A", @@ -9560,8 +9597,9 @@ "item.minecraft_armor_weapon.bogged_outer_chestplate": "Bogged Outer Chestplate", "effect.minecraft_armor_weapon.long_range_weapon_cut": "遠距離武器斬る", "item.minecraft_armor_weapon.dragon_green_armor_boots": "§2Dragon green boots", - "item.minecraft_armor_weapon.magicwand": "Magicwand", "item.minecraft_armor_weapon.rivers_of_blood": "§4§lRivers of Blood", + "item.minecraft_armor_weapon.magicwand": "Magicwand", + "effect.minecraft_armor_weapon.alchemy_craft_block_effect": "Alchemy Craft Block Effect", "entity.minecraft_armor_weapon.killotiru": "Otiruyo", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_boots": "das herz einer fee armor boots", "effect.minecraft_armor_weapon.kitterukitteru": "subetekirisuteru", diff --git a/src/main/java/minecraftarmorweapon/init/MinecraftArmorWeaponModMobEffects.java b/src/main/java/minecraftarmorweapon/init/MinecraftArmorWeaponModMobEffects.java index eaaecada..a14ae93b 100644 --- a/src/main/java/minecraftarmorweapon/init/MinecraftArmorWeaponModMobEffects.java +++ b/src/main/java/minecraftarmorweapon/init/MinecraftArmorWeaponModMobEffects.java @@ -72,6 +72,7 @@ import minecraftarmorweapon.potion.Arrow1MobEffect; import minecraftarmorweapon.potion.ArmorstandtobasueffectkillMobEffect; import minecraftarmorweapon.potion.ArmorStandTobasuEffectMobEffect; +import minecraftarmorweapon.potion.AlchemyCraftBlockEffectMobEffect; import minecraftarmorweapon.potion.AaaaMobEffect; import minecraftarmorweapon.potion.AaMobEffect; @@ -143,4 +144,5 @@ public class MinecraftArmorWeaponModMobEffects { public static final RegistryObject ONAZITAKASA_ARROW = REGISTRY.register("onazitakasa_arrow", () -> new OnazitakasaArrowMobEffect()); public static final RegistryObject TEST_BOW_KILL_EFFECT = REGISTRY.register("test_bow_kill_effect", () -> new TestBowKillEffectMobEffect()); public static final RegistryObject BAKUHATU = REGISTRY.register("bakuhatu", () -> new BakuhatuMobEffect()); + public static final RegistryObject ALCHEMY_CRAFT_BLOCK_EFFECT = REGISTRY.register("alchemy_craft_block_effect", () -> new AlchemyCraftBlockEffectMobEffect()); } diff --git a/src/main/java/minecraftarmorweapon/potion/AlchemyCraftBlockEffectMobEffect.java b/src/main/java/minecraftarmorweapon/potion/AlchemyCraftBlockEffectMobEffect.java new file mode 100644 index 00000000..5dc2e765 --- /dev/null +++ b/src/main/java/minecraftarmorweapon/potion/AlchemyCraftBlockEffectMobEffect.java @@ -0,0 +1,55 @@ + +package minecraftarmorweapon.potion; + +import net.minecraftforge.client.extensions.common.IClientMobEffectExtensions; + +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffectCategory; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.client.gui.screens.inventory.EffectRenderingInventoryScreen; + +import minecraftarmorweapon.procedures.AlchemyCraftBlockEffectOnEffectActiveTickProcedure; + +import com.mojang.blaze3d.vertex.PoseStack; + +public class AlchemyCraftBlockEffectMobEffect extends MobEffect { + public AlchemyCraftBlockEffectMobEffect() { + super(MobEffectCategory.NEUTRAL, -1); + } + + @Override + public String getDescriptionId() { + return "effect.minecraft_armor_weapon.alchemy_craft_block_effect"; + } + + @Override + public void applyEffectTick(LivingEntity entity, int amplifier) { + AlchemyCraftBlockEffectOnEffectActiveTickProcedure.execute(entity.level, entity); + } + + @Override + public boolean isDurationEffectTick(int duration, int amplifier) { + return true; + } + + @Override + public void initializeClient(java.util.function.Consumer consumer) { + consumer.accept(new IClientMobEffectExtensions() { + @Override + public boolean isVisibleInInventory(MobEffectInstance effect) { + return false; + } + + @Override + public boolean renderInventoryText(MobEffectInstance instance, EffectRenderingInventoryScreen screen, PoseStack poseStack, int x, int y, int blitOffset) { + return false; + } + + @Override + public boolean isVisibleInGui(MobEffectInstance effect) { + return false; + } + }); + } +} diff --git a/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockBlockAddedProcedure.java b/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockBlockAddedProcedure.java index 3afb4c77..51fd615c 100644 --- a/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockBlockAddedProcedure.java +++ b/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockBlockAddedProcedure.java @@ -11,7 +11,7 @@ public class AlchemyCraftBlockBlockAddedProcedure { public static void execute(LevelAccessor world, double x, double y, double z) { if (world instanceof ServerLevel _level) - _level.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, new Vec3(x, (y + 0.5), z), Vec2.ZERO, _level, 4, "", Component.literal(""), _level.getServer(), null).withSuppressedOutput(), + _level.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, new Vec3((x + 0.5), (y + 1), (z + 0.5)), Vec2.ZERO, _level, 4, "", Component.literal(""), _level.getServer(), null).withSuppressedOutput(), "summon minecraft:armor_stand ~ ~ ~ {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,Small:true,DisabledSlots:4144959,Tags:[\"minecraft_armor_weapon_alchemy_craft_block_mahouzinn\"]}"); } } diff --git a/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockEffectOnEffectActiveTickProcedure.java b/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockEffectOnEffectActiveTickProcedure.java new file mode 100644 index 00000000..a7963410 --- /dev/null +++ b/src/main/java/minecraftarmorweapon/procedures/AlchemyCraftBlockEffectOnEffectActiveTickProcedure.java @@ -0,0 +1,31 @@ +package minecraftarmorweapon.procedures; + +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.entity.decoration.ArmorStand; +import net.minecraft.world.entity.Entity; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.core.BlockPos; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.CommandSource; + +import minecraftarmorweapon.init.MinecraftArmorWeaponModBlocks; + +public class AlchemyCraftBlockEffectOnEffectActiveTickProcedure { + public static void execute(LevelAccessor world, Entity entity) { + if (entity == null) + return; + if (entity instanceof ArmorStand) { + { + Entity _ent = entity; + if (!_ent.level.isClientSide() && _ent.getServer() != null) { + _ent.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, _ent.position(), _ent.getRotationVector(), _ent.level instanceof ServerLevel ? (ServerLevel) _ent.level : null, 4, + _ent.getName().getString(), _ent.getDisplayName(), _ent.level.getServer(), _ent), "tp @s ~ ~ ~ ~-.5 ~"); + } + } + if (!((world.getBlockState(new BlockPos(entity.getX(), entity.getY() - 0.5, entity.getZ()))).getBlock() == MinecraftArmorWeaponModBlocks.ALCHEMY_CRAFT_BLOCK.get())) { + if (!entity.level.isClientSide()) + entity.discard(); + } + } + } +} diff --git a/src/main/java/minecraftarmorweapon/procedures/MukoukaGuardProcedure.java b/src/main/java/minecraftarmorweapon/procedures/MukoukaGuardProcedure.java index 93498bf9..df66c23a 100644 --- a/src/main/java/minecraftarmorweapon/procedures/MukoukaGuardProcedure.java +++ b/src/main/java/minecraftarmorweapon/procedures/MukoukaGuardProcedure.java @@ -10,7 +10,6 @@ import minecraftarmorweapon.entity.OtiruyoEntity; import minecraftarmorweapon.entity.KillotiruEntity; import minecraftarmorweapon.entity.BlackholeEntity; -import minecraftarmorweapon.entity.AlchemyCraftBlockEntityEntity; import javax.annotation.Nullable; @@ -45,10 +44,5 @@ private static void execute(@Nullable Event event, Entity entity) { event.setCanceled(true); } } - if (entity instanceof AlchemyCraftBlockEntityEntity) { - if (event != null && event.isCancelable()) { - event.setCanceled(true); - } - } } } diff --git a/src/main/java/minecraftarmorweapon/procedures/SkinOfDragonTickProcedure.java b/src/main/java/minecraftarmorweapon/procedures/SkinOfDragonTickProcedure.java index 90bb016b..2c4a741a 100644 --- a/src/main/java/minecraftarmorweapon/procedures/SkinOfDragonTickProcedure.java +++ b/src/main/java/minecraftarmorweapon/procedures/SkinOfDragonTickProcedure.java @@ -181,9 +181,9 @@ private static void execute(@Nullable Event event, LevelAccessor world, double x } if (world instanceof ServerLevel _level) _level.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, new Vec3(x, y, z), Vec2.ZERO, _level, 4, "", Component.literal(""), _level.getServer(), null).withSuppressedOutput(), - "execute at @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run tp @s ~ ~ ~ ~-.5 ~"); + "execute at @e[tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run function minecraft_armor_weapon:alchemymod1"); if (world instanceof ServerLevel _level) _level.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, new Vec3(x, y, z), Vec2.ZERO, _level, 4, "", Component.literal(""), _level.getServer(), null).withSuppressedOutput(), - "execute at @e[tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run function minecraft_armor_weapon:alchemymod1"); + "execute as @e[type=minecraft:armor_stand, tag=minecraft_armor_weapon_alchemy_craft_block_mahouzinn] run effect give @s minecraft_armor_weapon:alchemy_craft_block_effect 1 1 true"); } } diff --git a/src/main/resources/assets/minecraft_armor_weapon/lang/en_us.json b/src/main/resources/assets/minecraft_armor_weapon/lang/en_us.json index d74e03fd..7e79167e 100644 --- a/src/main/resources/assets/minecraft_armor_weapon/lang/en_us.json +++ b/src/main/resources/assets/minecraft_armor_weapon/lang/en_us.json @@ -5,19 +5,19 @@ "itemGroup.tabmagic_books": "Magic Books", "itemGroup.tabyopkeinamono": "建築とかに", "effect.minecraft_armor_weapon.syugeki": "aa", - "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_helmet": "das herz einer fee armor helmet", + "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.ruami_284_spawn_egg": "ruami284 Spawn Egg", "entity.minecraft_armor_weapon.comet": "Comet", - "entity.minecraft_armor_weapon.comet_kill": "Comet", - "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", "item.minecraft_armor_weapon.darkness": "§5Darkness", + "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", + "entity.minecraft_armor_weapon.comet_kill": "Comet", "block.minecraft_armor_weapon.stone_katana_block": "Netherite Katana Block", "item.minecraft_armor_weapon.blackhole_spawn_egg": "Blackhole Spawn Egg", "entity.minecraft_armor_weapon.blackhole": "Blackhole", "advancements.magical_swordsman_achievements.descr": "§eGet Magisches feen katana", - "effect.minecraft_armor_weapon.suityuu": "suityuu", "entity.minecraft_armor_weapon.ruami_284": "ruami284", + "effect.minecraft_armor_weapon.suityuu": "suityuu", "advancements.you_have_become_a_vampire.descr": "You have become a vampire.", "effect.minecraft_armor_weapon.bakuhatu": "explosion", "effect.minecraft_armor_weapon.aaaa": "bunnsinn", @@ -37,8 +37,8 @@ "block.minecraft_armor_weapon.stone_bricks_trap_door": "Stone Bricks Trap Door", "item.minecraft_armor_weapon.stone_katana": "§7Stone Katana", "item.minecraft_armor_weapon.dragon_black_armor_helmet": "§8Dragon black helmet", - "item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword", "item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣", + "item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword", "item.minecraft_armor_weapon.scythe": "Scythe", "item.minecraft_armor_weapon.wind_step": "§2Windstep", "item.minecraft_armor_weapon.a": "A", @@ -49,8 +49,9 @@ "effect.minecraft_armor_weapon.long_range_weapon_cut": "遠距離武器斬る", "item.minecraft_armor_weapon.bogged_outer_chestplate": "Bogged Outer Chestplate", "item.minecraft_armor_weapon.dragon_green_armor_boots": "§2Dragon green boots", - "item.minecraft_armor_weapon.magicwand": "Magicwand", "item.minecraft_armor_weapon.rivers_of_blood": "§4§lRivers of Blood", + "item.minecraft_armor_weapon.magicwand": "Magicwand", + "effect.minecraft_armor_weapon.alchemy_craft_block_effect": "Alchemy Craft Block Effect", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_boots": "das herz einer fee armor boots", "entity.minecraft_armor_weapon.killotiru": "Otiruyo", "effect.minecraft_armor_weapon.kitterukitteru": "subetekirisuteru", diff --git a/src/main/resources/assets/minecraft_armor_weapon/lang/ja_jp.json b/src/main/resources/assets/minecraft_armor_weapon/lang/ja_jp.json index 4850c601..05bcab3f 100644 --- a/src/main/resources/assets/minecraft_armor_weapon/lang/ja_jp.json +++ b/src/main/resources/assets/minecraft_armor_weapon/lang/ja_jp.json @@ -5,19 +5,19 @@ "itemGroup.tabmagic_books": "Magic Books", "itemGroup.tabyopkeinamono": "建築とかに", "effect.minecraft_armor_weapon.syugeki": "aa", - "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_helmet": "das herz einer fee armor helmet", + "item.minecraft_armor_weapon.illusioner_armor_boots": "Illusioner Armor Boots", "item.minecraft_armor_weapon.ruami_284_spawn_egg": "ruami284 Spawn Egg", "entity.minecraft_armor_weapon.comet": "Comet", - "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", - "item.minecraft_armor_weapon.darkness": "§5Darkness", "entity.minecraft_armor_weapon.comet_kill": "Comet", + "item.minecraft_armor_weapon.darkness": "§5Darkness", + "effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect", "block.minecraft_armor_weapon.stone_katana_block": "Netherite Katana Block", "item.minecraft_armor_weapon.blackhole_spawn_egg": "Blackhole Spawn Egg", "entity.minecraft_armor_weapon.blackhole": "Blackhole", "advancements.magical_swordsman_achievements.descr": "Magisches feen katanaを得る", - "effect.minecraft_armor_weapon.suityuu": "suityuu", "entity.minecraft_armor_weapon.ruami_284": "ruami284", + "effect.minecraft_armor_weapon.suityuu": "suityuu", "advancements.you_have_become_a_vampire.descr": "吸血鬼になったよ", "effect.minecraft_armor_weapon.bakuhatu": "explosion", "effect.minecraft_armor_weapon.aaaa": "bunnsinn", @@ -37,8 +37,8 @@ "block.minecraft_armor_weapon.stone_bricks_trap_door": "Stone Bricks Trap Door", "item.minecraft_armor_weapon.dragon_black_armor_helmet": "§8Dragon black helmet", "item.minecraft_armor_weapon.stone_katana": "§7石の刀", - "item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣", "item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword", + "item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣", "item.minecraft_armor_weapon.wind_step": "§2Windstep", "item.minecraft_armor_weapon.scythe": "Scythe", "item.minecraft_armor_weapon.a": "A", @@ -49,8 +49,9 @@ "item.minecraft_armor_weapon.bogged_outer_chestplate": "Bogged Outer Chestplate", "effect.minecraft_armor_weapon.long_range_weapon_cut": "遠距離武器斬る", "item.minecraft_armor_weapon.dragon_green_armor_boots": "§2Dragon green boots", - "item.minecraft_armor_weapon.magicwand": "Magicwand", "item.minecraft_armor_weapon.rivers_of_blood": "§4§lRivers of Blood", + "item.minecraft_armor_weapon.magicwand": "Magicwand", + "effect.minecraft_armor_weapon.alchemy_craft_block_effect": "Alchemy Craft Block Effect", "entity.minecraft_armor_weapon.killotiru": "Otiruyo", "item.minecraft_armor_weapon.das_herz_einer_fee_armor_boots": "das herz einer fee armor boots", "effect.minecraft_armor_weapon.kitterukitteru": "subetekirisuteru", diff --git a/src/main/resources/assets/minecraft_armor_weapon/textures/mob_effect/alchemy_craft_block_effect.png b/src/main/resources/assets/minecraft_armor_weapon/textures/mob_effect/alchemy_craft_block_effect.png new file mode 100644 index 00000000..462b6083 Binary files /dev/null and b/src/main/resources/assets/minecraft_armor_weapon/textures/mob_effect/alchemy_craft_block_effect.png differ diff --git a/src/main/resources/data/minecraft_armor_weapon/functions/sword_stand_luna.mcfunction b/src/main/resources/data/minecraft_armor_weapon/functions/sword_stand_luna.mcfunction index dd44b4c6..2f888158 100644 --- a/src/main/resources/data/minecraft_armor_weapon/functions/sword_stand_luna.mcfunction +++ b/src/main/resources/data/minecraft_armor_weapon/functions/sword_stand_luna.mcfunction @@ -1,3 +1,6 @@ summon minecraft:armor_stand ~-0.3 ~-0.5 ~0.025 {Invisible:true,Invulnerable:true,PersistenceRequired:true,NoBasePlate:true,NoGravity:true,ShowArms:true,DisabledSlots:65537,Pose:{RightArm:[90f,90f,0f]},HandItems:[{id:"minecraft_armor_weapon:luna",Count:1},{}],Tags:["minecraft_armor_weapon_item_stand_amor_stand"]} +kill @e[sort=nearest,limit=1,type=item,nbt={Item:{id:"minecraft_armor_weapon:iron_katana",Count:1b}}] +kill @e[sort=nearest,limit=1,type=item,nbt={Item:{id:"minecraft:beacon",Count:16b}}] +kill @e[sort=nearest,limit=1,type=item,nbt={Item:{id:"minecraft:iron_block",Count:64b}}] particle minecraft:cloud ~ ~1.5 ~ 1 1 1 0.1 200 normal particle minecraft:end_rod ~ ~1.5 ~ 0.4 5 0.4 0.0 200 normal \ No newline at end of file diff --git a/src/main/resources/data/minecraft_armor_weapon/structures/mahouzin.nbt b/src/main/resources/data/minecraft_armor_weapon/structures/mahouzin.nbt new file mode 100644 index 00000000..b454e720 Binary files /dev/null and b/src/main/resources/data/minecraft_armor_weapon/structures/mahouzin.nbt differ