-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
13df4a1
commit 9f5e48e
Showing
26 changed files
with
313 additions
and
125 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
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/biomancy/models/item/frenzy_serum.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": "biomancy:item/serum/frenzy_serum" | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...ata/biomancy/advancements/recipes/biomancy/bio_brewing/frenzy_serum_from_bio_brewing.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,35 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_exotic_compound": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"biomancy:exotic_compound" | ||
] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "biomancy:bio_brewing/frenzy_serum_from_bio_brewing" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_exotic_compound", | ||
"has_the_recipe" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"biomancy:bio_brewing/frenzy_serum_from_bio_brewing" | ||
] | ||
}, | ||
"sends_telemetry_event": false | ||
} |
19 changes: 19 additions & 0 deletions
19
src/generated/resources/data/biomancy/recipes/bio_brewing/frenzy_serum_from_bio_brewing.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,19 @@ | ||
{ | ||
"type": "biomancy:bio_brewing", | ||
"ingredients": [ | ||
{ | ||
"item": "biomancy:volatile_fluid" | ||
}, | ||
{ | ||
"item": "biomancy:hormone_secretion" | ||
} | ||
], | ||
"nutrientsCost": 2, | ||
"processingTime": 160, | ||
"reactant": { | ||
"item": "biomancy:exotic_compound" | ||
}, | ||
"result": { | ||
"item": "biomancy:frenzy_serum" | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...in/java/com/github/elenterius/biomancy/entity/mob/ai/goal/FrenzyAttackableTargetGoal.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 com.github.elenterius.biomancy.entity.mob.ai.goal; | ||
|
||
import com.github.elenterius.biomancy.init.ModMobEffects; | ||
import net.minecraft.world.entity.LivingEntity; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; | ||
|
||
public class FrenzyAttackableTargetGoal<T extends LivingEntity> extends NearestAttackableTargetGoal<T> { | ||
|
||
public FrenzyAttackableTargetGoal(Mob goalOwner, Class<T> targetClass) { | ||
super(goalOwner, targetClass, true); | ||
} | ||
|
||
@Override | ||
public boolean canUse() { | ||
if (!mob.hasEffect(ModMobEffects.FRENZY.get())) return false; | ||
|
||
return super.canUse(); | ||
} | ||
|
||
@Override | ||
public boolean canContinueToUse() { | ||
if (!mob.hasEffect(ModMobEffects.FRENZY.get())) { | ||
stop(); | ||
return false; | ||
} | ||
|
||
return super.canContinueToUse(); | ||
} | ||
|
||
@Override | ||
public void stop() { | ||
// setTarget(null); //immediately forget target | ||
super.stop(); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/github/elenterius/biomancy/entity/mob/ai/goal/FrenzyMeleeAttackGoal.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,27 @@ | ||
package com.github.elenterius.biomancy.entity.mob.ai.goal; | ||
|
||
import com.github.elenterius.biomancy.init.ModMobEffects; | ||
import net.minecraft.world.entity.PathfinderMob; | ||
import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; | ||
|
||
public class FrenzyMeleeAttackGoal extends MeleeAttackGoal { | ||
|
||
public FrenzyMeleeAttackGoal(PathfinderMob goalOwner, double speedModifier, boolean followingTargetEvenIfNotSeen) { | ||
super(goalOwner, speedModifier, followingTargetEvenIfNotSeen); | ||
} | ||
|
||
@Override | ||
public boolean canUse() { | ||
if (!mob.hasEffect(ModMobEffects.FRENZY.get())) return false; | ||
|
||
return super.canUse(); | ||
} | ||
|
||
@Override | ||
public boolean canContinueToUse() { | ||
if (!mob.hasEffect(ModMobEffects.FRENZY.get())) return false; | ||
|
||
return super.canContinueToUse(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.