-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70f68f8
commit ba678ae
Showing
17 changed files
with
195 additions
and
8 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
projects/pswg_gadgets/src/main/generated/assets/pswg_gadgets/items/nerve_gas_grenade.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 @@ | ||
{ | ||
"model": { | ||
"type": "minecraft:model", | ||
"model": "pswg_gadgets:item/nerve_gas_grenade" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
projects/pswg_gadgets/src/main/generated/assets/pswg_gadgets/lang/en_us.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
6 changes: 6 additions & 0 deletions
6
...ts/pswg_gadgets/src/main/generated/assets/pswg_gadgets/models/item/nerve_gas_grenade.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": "pswg:item/wizard" | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
projects/pswg_gadgets/src/main/generated/data/pswg_gadgets/tags/item/grenades.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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"values": [ | ||
"pswg_gadgets:thermal_detonator", | ||
"pswg_gadgets:fragmentation_grenade" | ||
"pswg_gadgets:fragmentation_grenade", | ||
"pswg_gadgets:nerve_gas_grenade" | ||
] | ||
} |
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
37 changes: 37 additions & 0 deletions
37
projects/pswg_gadgets/src/main/java/dev/pswg/entity/effects/IntoxicatedEffect.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,37 @@ | ||
package dev.pswg.entity.effects; | ||
|
||
import dev.pswg.Gadgets; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.attribute.EntityAttributeModifier; | ||
import net.minecraft.entity.attribute.EntityAttributes; | ||
import net.minecraft.entity.effect.StatusEffect; | ||
import net.minecraft.entity.effect.StatusEffectCategory; | ||
import net.minecraft.server.world.ServerWorld; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class IntoxicatedEffect extends StatusEffect | ||
{ | ||
public IntoxicatedEffect() | ||
{ | ||
super(StatusEffectCategory.HARMFUL, 100000); | ||
} | ||
|
||
@Override | ||
public boolean canApplyUpdateEffect(int duration, int amplifier) | ||
{ | ||
return true; | ||
} | ||
|
||
@Override | ||
public void onApplied(LivingEntity entity, int amplifier) | ||
{ | ||
addAttributeModifier(EntityAttributes.MOVEMENT_SPEED, Identifier.of("intoxicated"), -amplifier / 100f, EntityAttributeModifier.Operation.ADD_VALUE); | ||
super.onApplied(entity, amplifier); | ||
} | ||
|
||
@Override | ||
public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) | ||
{ | ||
return entity.damage(world, Gadgets.create(world, Gadgets.NERVE_GAS_DAMAGE_TYPE), (amplifier) / 8f); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
projects/pswg_gadgets/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": [ | ||
"pswg_gadgets:nerve_gas" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
projects/pswg_gadgets/src/main/resources/data/minecraft/tags/damage_type/no_knockback.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": [ | ||
"pswg_gadgets:nerve_gas" | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
projects/pswg_gadgets/src/main/resources/data/pswg/tags/damage_type/ignores_damage_tilt.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,7 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"pswg_gadgets:nerve_gas" | ||
] | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
...wg_gadgets/src/main/resources/data/pswg/tags/damage_type/ignores_invulnerable_frames.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,7 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"pswg_gadgets:nerve_gas" | ||
] | ||
} | ||
|
6 changes: 6 additions & 0 deletions
6
projects/pswg_gadgets/src/main/resources/data/pswg_gadgets/damage_type/nerve_gas.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 @@ | ||
{ | ||
"exhaustion" : 0, | ||
"death_message_type" : "default", | ||
"message_id": "nerve_gas", | ||
"scaling": "never" | ||
} |
17 changes: 17 additions & 0 deletions
17
...swg_gadgets/src/main/resources/data/pswg_gadgets/tags/damage_type/ignites_explosives.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,17 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:campfire", | ||
"minecraft:dragon_breath", | ||
"minecraft:explosion", | ||
"minecraft:fireball", | ||
"minecraft:fireworks", | ||
"minecraft:hot_floor", | ||
"minecraft:in_fire", | ||
"minecraft:lava", | ||
"minecraft:lightning_bolt", | ||
"minecraft:on_fire", | ||
"minecraft:sonic_boom" | ||
] | ||
} | ||
|