-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1422 from CgAu3/releases/1.21
实现了护符系统,实现了四种宝石护符
- Loading branch information
Showing
27 changed files
with
554 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/anvilcraft/models/item/emerald_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "anvilcraft:item/emerald_amulet" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/anvilcraft/models/item/ruby_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "anvilcraft:item/ruby_amulet" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/anvilcraft/models/item/sapphire_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "anvilcraft:item/sapphire_amulet" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/anvilcraft/models/item/topaz_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "anvilcraft:item/topaz_amulet" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...generated/resources/data/anvilcraft/advancement/recipe/jewel_crafting/emerald_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "anvilcraft:jewel_crafting/emerald_amulet" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"anvilcraft:jewel_crafting/emerald_amulet" | ||
] | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/anvilcraft/advancement/recipe/jewel_crafting/ruby_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "anvilcraft:jewel_crafting/ruby_amulet" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"anvilcraft:jewel_crafting/ruby_amulet" | ||
] | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...enerated/resources/data/anvilcraft/advancement/recipe/jewel_crafting/sapphire_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "anvilcraft:jewel_crafting/sapphire_amulet" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"anvilcraft:jewel_crafting/sapphire_amulet" | ||
] | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/anvilcraft/advancement/recipe/jewel_crafting/topaz_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "anvilcraft:jewel_crafting/topaz_amulet" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"anvilcraft:jewel_crafting/topaz_amulet" | ||
] | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/anvilcraft/recipe/jewel_crafting/emerald_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "anvilcraft:jewel_crafting", | ||
"ingredients": [ | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "minecraft:emerald_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:royal_steel_ingot" | ||
} | ||
], | ||
"result": { | ||
"count": 1, | ||
"id": "anvilcraft:emerald_amulet" | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/anvilcraft/recipe/jewel_crafting/ruby_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "anvilcraft:jewel_crafting", | ||
"ingredients": [ | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:ruby_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:royal_steel_ingot" | ||
} | ||
], | ||
"result": { | ||
"count": 1, | ||
"id": "anvilcraft:ruby_amulet" | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/anvilcraft/recipe/jewel_crafting/sapphire_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "anvilcraft:jewel_crafting", | ||
"ingredients": [ | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:sapphire_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:royal_steel_ingot" | ||
} | ||
], | ||
"result": { | ||
"count": 1, | ||
"id": "anvilcraft:sapphire_amulet" | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/generated/resources/data/anvilcraft/recipe/jewel_crafting/topaz_amulet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "anvilcraft:jewel_crafting", | ||
"ingredients": [ | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:silver_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:topaz_block" | ||
}, | ||
{ | ||
"item": "anvilcraft:royal_steel_ingot" | ||
} | ||
], | ||
"result": { | ||
"count": 1, | ||
"id": "anvilcraft:topaz_amulet" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/dev/dubhe/anvilcraft/event/LivingEntityEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package dev.dubhe.anvilcraft.event; | ||
|
||
import dev.dubhe.anvilcraft.AnvilCraft; | ||
import net.minecraft.tags.DamageTypeTags; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.common.EventBusSubscriber; | ||
import net.neoforged.neoforge.event.entity.living.LivingDamageEvent; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import static dev.dubhe.anvilcraft.init.ModDataAttachments.IMMUNE_TO_LIGHTNING; | ||
|
||
@EventBusSubscriber(modid = AnvilCraft.MOD_ID) | ||
public class LivingEntityEventListener { | ||
@SubscribeEvent | ||
public static void PreEntityHurt(@NotNull LivingDamageEvent.Pre event){ | ||
if(event.getSource().is(DamageTypeTags.IS_LIGHTNING) | ||
&& event.getEntity().hasData(IMMUNE_TO_LIGHTNING)){ | ||
if(event.getEntity().getData(IMMUNE_TO_LIGHTNING)){ | ||
event.getContainer().setNewDamage(0); | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.