Skip to content

Commit

Permalink
version up
Browse files Browse the repository at this point in the history
  • Loading branch information
hrmcngs committed Dec 21, 2024
1 parent b49111f commit ffa31fc
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 54 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion elements/NannkasouNightVisionEffectExpires.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"_fv": 43,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"entity_remove_specific_potion_effect\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"wait\"><value name=\"ticks\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><statement name=\"do\"><block type=\"entity_add_potion_advanced\"><field name=\"potion\">NIGHT_VISION</field><value name=\"level\"><block type=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_lavel</field></block></value></block></value><value name=\"duration\"><block type=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_tick</field></block></value></block></value><value name=\"ambient\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value><value name=\"particles\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></statement></block></next></block></next></block></xml>"
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"wait\" x=\"-198\" y=\"-82\"><value name=\"ticks\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value></block><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"entity_add_potion\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"duration\"><block type=\"entity_nbt_num_get\" collapsed=\"true\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_tick</field></block></value></block></value><value name=\"level\"><block type=\"entity_nbt_num_get\" collapsed=\"true\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_lavel</field></block></value></block></value></block></next></block><block type=\"entity_add_potion_advanced\" x=\"-519\" y=\"342\"><field name=\"potion\">CUSTOM:NannkasouNightVision</field><value name=\"level\"><block type=\"math_number\"><field name=\"NUM\">255</field></block></value><value name=\"duration\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"ambient\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value><value name=\"particles\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></xml>"
}
}
2 changes: 1 addition & 1 deletion elements/NannkasouNightVisionEffectStartedapplied.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"_fv": 43,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"entity_haspotioneffect\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><statement name=\"DO0\"><block type=\"entity_nbt_num_set\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_tick</field></block></value><value name=\"tagValue\"><block type=\"entity_potioneffectremaining\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><next><block type=\"entity_nbt_num_set\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_lavel</field></block></value><value name=\"tagValue\"><block type=\"entity_potioneffectlevel\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></next></block></statement></block></next></block><block type=\"math_number\" x=\"510\" y=\"512\"><field name=\"NUM\">0</field></block></xml>"
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"entity_haspotioneffect\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><statement name=\"DO0\"><block type=\"entity_nbt_num_set\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_tick</field></block></value><value name=\"tagValue\"><block type=\"entity_potioneffectremaining\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><next><block type=\"entity_nbt_num_set\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">minecraft_armor_weapon_sword_night_vision_lavel</field></block></value><value name=\"tagValue\"><block type=\"entity_potioneffectlevel\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></next></block></statement><next><block type=\"wait\"><value name=\"ticks\"><block type=\"entity_potioneffectremaining\"><field name=\"potion\">CUSTOM:NannkasouNightVision</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><statement name=\"do\"><block type=\"entity_remove_specific_potion_effect\"><field name=\"potion\">NIGHT_VISION</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></statement></block></next></block></next></block><block type=\"entity_add_potion_advanced\" x=\"221\" y=\"394\"><field name=\"potion\"></field><value name=\"level\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"duration\"><block type=\"math_number\"><field name=\"NUM\">60</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"ambient\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value><value name=\"particles\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block><block type=\"entity_potioneffectlevel\" x=\"353\" y=\"469\"><field name=\"potion\"></field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block><block type=\"math_number\" x=\"510\" y=\"512\"><field name=\"NUM\">0</field></block></xml>"
}
}
2 changes: 1 addition & 1 deletion elements/NannkasouNightVisionOnEffectActiveTick.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"_fv": 43,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"entity_add_potion_advanced\"><field name=\"potion\">NIGHT_VISION</field><value name=\"level\"><block type=\"math_number\"><field name=\"NUM\">255</field></block></value><value name=\"duration\"><block type=\"math_number\"><field name=\"NUM\">200</field></block></value><value name=\"ambient\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value><value name=\"particles\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></next></block></xml>"
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"entity_add_potion_advanced\"><field name=\"potion\">NIGHT_VISION</field><value name=\"level\"><block type=\"math_number\"><field name=\"NUM\">255</field></block></value><value name=\"duration\"><block type=\"math_number\"><field name=\"NUM\">250</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"ambient\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value><value name=\"particles\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></next></block></xml>"
}
}
2 changes: 1 addition & 1 deletion elements/SkinOfDragonTick.mod.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion elements/SwordStandLuna.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"]}\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",
"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}}]\nplaysound minecraft:block.beacon.activate block @a ~ ~ ~ 5 2\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"
}
Expand Down
32 changes: 16 additions & 16 deletions minecraft_armor_weapon.mcreator
Original file line number Diff line number Diff line change
Expand Up @@ -9089,6 +9089,10 @@
{
"name": "entity",
"type": "entity"
},
{
"name": "world",
"type": "world"
}
]
}
Expand All @@ -9108,10 +9112,6 @@
{
"name": "entity",
"type": "entity"
},
{
"name": "world",
"type": "world"
}
]
}
Expand Down Expand Up @@ -9376,13 +9376,13 @@
"itemGroup.tabmagic_books": "Magic Books",
"itemGroup.tabyopkeinamono": "建築とかに",
"effect.minecraft_armor_weapon.syugeki": "aa",
"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.das_herz_einer_fee_armor_helmet": "das herz einer fee armor helmet",
"item.minecraft_armor_weapon.ruami_284_spawn_egg": "ruami284 Spawn Egg",
"entity.minecraft_armor_weapon.comet": "Comet",
"item.minecraft_armor_weapon.darkness": "§5Darkness",
"effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect",
"entity.minecraft_armor_weapon.comet_kill": "Comet",
"effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect",
"item.minecraft_armor_weapon.darkness": "§5Darkness",
"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",
Expand All @@ -9408,8 +9408,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.kurikarakensword": "§5倶利伽羅剣",
"item.minecraft_armor_weapon.kaminari_kurikaraken_sword": "Kaminari Kurikaraken Sword",
"item.minecraft_armor_weapon.kurikarakensword": "§5倶利伽羅剣",
"item.minecraft_armor_weapon.scythe": "Scythe",
"item.minecraft_armor_weapon.wind_step": "§2Windstep",
"item.minecraft_armor_weapon.a": "A",
Expand All @@ -9420,9 +9420,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.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.magicwand": "Magicwand",
"item.minecraft_armor_weapon.rivers_of_blood": "§4§lRivers of Blood",
"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",
Expand Down Expand Up @@ -9640,13 +9640,13 @@
"itemGroup.tabmagic_books": "Magic Books",
"itemGroup.tabyopkeinamono": "建築とかに",
"effect.minecraft_armor_weapon.syugeki": "aa",
"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.das_herz_einer_fee_armor_helmet": "das herz einer fee armor helmet",
"item.minecraft_armor_weapon.ruami_284_spawn_egg": "ruami284 Spawn Egg",
"entity.minecraft_armor_weapon.comet": "Comet",
"entity.minecraft_armor_weapon.comet_kill": "Comet",
"item.minecraft_armor_weapon.darkness": "§5Darkness",
"effect.minecraft_armor_weapon.bow_attack": "illusioner_armor_effect",
"item.minecraft_armor_weapon.darkness": "§5Darkness",
"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",
Expand All @@ -9672,8 +9672,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.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.wind_step": "§2Windstep",
"item.minecraft_armor_weapon.scythe": "Scythe",
"item.minecraft_armor_weapon.a": "A",
Expand All @@ -9684,9 +9684,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.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.magicwand": "Magicwand",
"item.minecraft_armor_weapon.rivers_of_blood": "§4§lRivers of Blood",
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public String getDescriptionId() {

@Override
public void addAttributeModifiers(LivingEntity entity, AttributeMap attributeMap, int amplifier) {
NannkasouNightVisionEffectStartedappliedProcedure.execute(entity);
NannkasouNightVisionEffectStartedappliedProcedure.execute(entity.level, entity);
}

@Override
Expand All @@ -39,7 +39,7 @@ public void applyEffectTick(LivingEntity entity, int amplifier) {
@Override
public void removeAttributeModifiers(LivingEntity entity, AttributeMap attributeMap, int amplifier) {
super.removeAttributeModifiers(entity, attributeMap, amplifier);
NannkasouNightVisionEffectExpiresProcedure.execute(entity.level, entity);
NannkasouNightVisionEffectExpiresProcedure.execute(entity);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ Comparator<Entity> compareDistOf(double _x, double _y, double _z) {
}
}
if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == MinecraftArmorWeaponModItems.LUNA.get()) {
if (entity instanceof LivingEntity _entity && !_entity.level.isClientSide())
_entity.addEffect(new MobEffectInstance(MinecraftArmorWeaponModMobEffects.NANNKASOU_NIGHT_VISION.get(), 1, 255, true, false));
if (EnchantmentHelper.getItemEnchantmentLevel(MinecraftArmorWeaponModEnchantments.DEMONIZED.get(), (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY)) != 0) {
if (entity instanceof LivingEntity _entity && !_entity.level.isClientSide())
_entity.addEffect(new MobEffectInstance(MinecraftArmorWeaponModMobEffects.ARROW_1.get(), 2, 1, true, false));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
package minecraftarmorweapon.procedures;

import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.effect.MobEffectInstance;

import minecraftarmorweapon.MinecraftArmorWeaponMod;

public class NannkasouNightVisionEffectExpiresProcedure {
public static void execute(LevelAccessor world, Entity entity) {
public static void execute(Entity entity) {
if (entity == null)
return;
if (entity instanceof LivingEntity _entity)
_entity.removeEffect(MobEffects.NIGHT_VISION);
MinecraftArmorWeaponMod.queueServerWork(2, () -> {
if (entity instanceof LivingEntity _entity && !_entity.level.isClientSide())
_entity.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, (int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_tick"),
(int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_lavel"), false, false));
});
if (entity instanceof LivingEntity _entity && !_entity.level.isClientSide())
_entity.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, (int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_tick"),
(int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_lavel")));
}
}
Loading

0 comments on commit ffa31fc

Please sign in to comment.