generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add damagesource and delete unused Portals.java
- Loading branch information
Showing
12 changed files
with
61 additions
and
55 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
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
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
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
src/main/java/net/ugi/sculk_depths/util/ModDamageTypes.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,21 @@ | ||
package net.ugi.sculk_depths.util; | ||
|
||
import net.minecraft.entity.damage.DamageSource; | ||
import net.minecraft.entity.damage.DamageType; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.world.World; | ||
import net.ugi.sculk_depths.SculkDepths; | ||
|
||
public class ModDamageTypes { | ||
|
||
/* | ||
* Store the RegistryKey of our DamageType into a new constant called CUSTOM_DAMAGE_TYPE | ||
* The Identifier in use here points to our JSON file we created earlier. | ||
*/ | ||
public static final RegistryKey<DamageType> INFECTED_DAMAGE_TYPE = RegistryKey.of(RegistryKeys.DAMAGE_TYPE, SculkDepths.identifier( "infected_damage_type")); | ||
|
||
public static DamageSource of(World world, RegistryKey<DamageType> key) { | ||
return new DamageSource(world.getRegistryManager().get(RegistryKeys.DAMAGE_TYPE).entryOf(key)); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/minecraft/tags/damage_type/bypasses_armor.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 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"sculk_depths:infected_damage_type" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/minecraft/tags/damage_type/bypasses_enchantments.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 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"sculk_depths:infected_damage_type" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/minecraft/tags/damage_type/no_impact.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 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"sculk_depths:infected_damage_type" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/sculk_depths/damage_type/infected_damage_type.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 @@ | ||
{ | ||
"message_id": "infected", | ||
"exhaustion": 0, | ||
"scaling": "never", | ||
"death_message_type": "default" | ||
} |