Skip to content

Commit

Permalink
feat: add step up and speed buff to deer
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Aug 21, 2023
1 parent 3cb4140 commit 8336322
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ dependencies {

//theurgy
compileOnly fg.deobf("com.klikli_dev:theurgy-${minecraft_version}:${theurgy_version}"){transitive=false}
// runtimeOnly fg.deobf("com.klikli_dev:theurgy-${minecraft_version}:${theurgy_version}"){transitive=false}
runtimeOnly fg.deobf("com.klikli_dev:theurgy-${minecraft_version}:${theurgy_version}"){transitive=false}

//runtime only helper mods for dev env, placed in ./runtime-mods, example: Hwyla-forge-1.10.11-B78_1.16.2.jar
//runtimeOnly fg.deobf("ignoredvalue:Hwyla:forge-1.10.11-B78_1.16.2")
Expand Down
1 change: 1 addition & 0 deletions src/generated/resources/assets/occultism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@
"effect.occultism.double_jump": "Multi Jump",
"effect.occultism.dragon_greed": "Dragon's Greed",
"effect.occultism.mummy_dodge": "Dodge",
"effect.occultism.step_height": "Step Height",
"effect.occultism.third_eye": "Third Eye",
"entity.occultism.afrit": "Afrit",
"entity.occultism.afrit_wild": "Unbound Afrit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.google.common.collect.ImmutableList;
import com.klikli_dev.occultism.common.advancement.FamiliarTrigger;
import com.klikli_dev.occultism.registry.OccultismAdvancements;
import com.klikli_dev.occultism.registry.OccultismEffects;
import com.klikli_dev.occultism.registry.OccultismItems;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerPlayer;
Expand Down Expand Up @@ -124,7 +125,12 @@ public void ate() {

@Override
public Iterable<MobEffectInstance> getFamiliarEffects() {
return ImmutableList.of(new MobEffectInstance(MobEffects.JUMP, 300, 0, false, false));
return ImmutableList.of(
new MobEffectInstance(MobEffects.JUMP, 300, 0, false, true),
new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 300, 0, false, true),
new MobEffectInstance(OccultismEffects.STEP_HEIGHT.get(), 300, 0, false, true)

);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ private void addMiscTranslations() {
this.add("effect.occultism.mummy_dodge", "Dodge");
this.add("effect.occultism.bat_lifesteal", "Lifesteal");
this.add("effect.occultism.beaver_harvest", "Beaver Harvest");
this.add("effect.occultism.step_height", "Step Height");

//Sounds
this.add("occultism.subtitle.chalk", "Chalk");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
import com.klikli_dev.occultism.common.effect.ThirdEyeEffect;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
Expand All @@ -36,12 +39,16 @@ public class OccultismEffects {

public static final RegistryObject<ThirdEyeEffect> THIRD_EYE = EFFECTS.register("third_eye", ThirdEyeEffect::new);
public static final RegistryObject<DoubleJumpEffect> DOUBLE_JUMP = EFFECTS.register("double_jump", DoubleJumpEffect::new);
public static final RegistryObject<ModEffect> DRAGON_GREED = EFFECTS.register("dragon_greed", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0xFFD700));
public static final RegistryObject<ModEffect> MUMMY_DODGE = EFFECTS.register("mummy_dodge", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0xe4d8a7));
public static final RegistryObject<ModEffect> BAT_LIFESTEAL = EFFECTS.register("bat_lifesteal", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0x960201));
public static final RegistryObject<ModEffect> BEAVER_HARVEST = EFFECTS.register("beaver_harvest", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0x603613));
public static final RegistryObject<MobEffect> DRAGON_GREED = EFFECTS.register("dragon_greed", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0xFFD700));
public static final RegistryObject<MobEffect> MUMMY_DODGE = EFFECTS.register("mummy_dodge", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0xe4d8a7));
public static final RegistryObject<MobEffect> BAT_LIFESTEAL = EFFECTS.register("bat_lifesteal", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0x960201));
public static final RegistryObject<MobEffect> BEAVER_HARVEST = EFFECTS.register("beaver_harvest", () -> new ModEffect(MobEffectCategory.BENEFICIAL, 0x603613));

private static class ModEffect extends MobEffect {
public static final RegistryObject<MobEffect> STEP_HEIGHT = EFFECTS.register("step_height", () ->
new ModEffect(MobEffectCategory.BENEFICIAL, 3402751)
.addAttributeModifier(ForgeMod.STEP_HEIGHT_ADDITION.get(), "748e2cfd-8db4-4b55-ba07-014fdf0f74da", 2, AttributeModifier.Operation.ADDITION));

public static class ModEffect extends MobEffect {

private ModEffect(MobEffectCategory category, int color) {
super(category, color);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8336322

Please sign in to comment.