mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
Shootable glow berries
- Add glow berries as a potato cannon projectile type; Closes #2406
This commit is contained in:
parent
160e823282
commit
ed4a371fa0
1 changed files with 13 additions and 3 deletions
|
@ -98,6 +98,16 @@ public class BuiltinPotatoProjectileTypes {
|
|||
.soundPitch(1.25f)
|
||||
.registerAndAssign(Items.SWEET_BERRIES),
|
||||
|
||||
GLOW_BERRIES = create("glow_berry").damage(2)
|
||||
.reloadTicks(10)
|
||||
.knockback(0.05f)
|
||||
.velocity(1.05f)
|
||||
.renderTumbling()
|
||||
.splitInto(2)
|
||||
.soundPitch(1.2f)
|
||||
.onEntityHit(potion(MobEffects.GLOWING, 1, 200, false))
|
||||
.registerAndAssign(Items.GLOW_BERRIES),
|
||||
|
||||
CHOCOLATE_BERRIES = create("chocolate_berry").damage(4)
|
||||
.reloadTicks(10)
|
||||
.knockback(0.2f)
|
||||
|
@ -112,7 +122,7 @@ public class BuiltinPotatoProjectileTypes {
|
|||
.knockback(0.05f)
|
||||
.velocity(1.25f)
|
||||
.renderTumbling()
|
||||
.onEntityHit(potion(MobEffects.POISON, 1,160, true))
|
||||
.onEntityHit(potion(MobEffects.POISON, 1, 160, true))
|
||||
.registerAndAssign(Items.POISONOUS_POTATO),
|
||||
|
||||
CHORUS_FRUIT = create("chorus_fruit").damage(3)
|
||||
|
@ -188,7 +198,7 @@ public class BuiltinPotatoProjectileTypes {
|
|||
.soundPitch(1.5f)
|
||||
.registerAndAssign(Items.MELON_SLICE),
|
||||
|
||||
GLISTENING_MELON = create("glistening_melon").damage(5)
|
||||
GLISTERING_MELON = create("glistering_melon").damage(5)
|
||||
.reloadTicks(8)
|
||||
.knockback(0.1f)
|
||||
.velocity(1.45f)
|
||||
|
@ -283,7 +293,7 @@ public class BuiltinPotatoProjectileTypes {
|
|||
};
|
||||
}
|
||||
|
||||
public static void applyEffect(LivingEntity entity, MobEffectInstance effect) {
|
||||
private static void applyEffect(LivingEntity entity, MobEffectInstance effect) {
|
||||
if (effect.getEffect().isInstantenous())
|
||||
effect.getEffect().applyInstantenousEffect(null, null, entity, effect.getDuration(), 1.0);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue