-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
81 changed files
with
1,029 additions
and
239 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
48 changes: 48 additions & 0 deletions
48
...eric/src/main/java/net/swofty/types/generic/command/commands/MinionGenerationCommand.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,48 @@ | ||
package net.swofty.types.generic.command.commands; | ||
|
||
import net.minestom.server.command.builder.arguments.ArgumentEnum; | ||
import net.swofty.types.generic.command.CommandParameters; | ||
import net.swofty.types.generic.command.SkyBlockCommand; | ||
import net.swofty.types.generic.user.categories.Rank; | ||
|
||
@CommandParameters(aliases = "handleminionspeed", | ||
description = "Handle minion speed", | ||
usage = "/handleminionspeed", | ||
permission = Rank.ADMIN, | ||
allowsConsole = false) | ||
public class MinionGenerationCommand extends SkyBlockCommand { | ||
public static int divisionFactor = 1; | ||
|
||
@Override | ||
public void registerUsage(MinestomCommand command) { | ||
ArgumentEnum<Speed> argument = new ArgumentEnum<>("speed", Speed.class); | ||
command.addSyntax((sender, context) -> { | ||
if (!permissionCheck(sender)) return; | ||
Speed speed = context.get(argument); | ||
|
||
switch (speed) { | ||
case MULTIPLY_2: | ||
divisionFactor = 2; | ||
break; | ||
case MULTIPLY_5: | ||
divisionFactor = 5; | ||
break; | ||
case MULTIPLY_10: | ||
divisionFactor = 10; | ||
break; | ||
case NORMAL: | ||
divisionFactor = 1; | ||
break; | ||
} | ||
|
||
sender.sendMessage("§aSuccessfully set minion speed to §c" + speed.name().toLowerCase()); | ||
}, argument); | ||
} | ||
|
||
enum Speed { | ||
MULTIPLY_2, | ||
MULTIPLY_5, | ||
MULTIPLY_10, | ||
NORMAL | ||
} | ||
} |
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
71 changes: 71 additions & 0 deletions
71
type.generic/src/main/java/net/swofty/types/generic/entity/mob/mobs/MobChicken.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,71 @@ | ||
package net.swofty.types.generic.entity.mob.mobs; | ||
|
||
import net.minestom.server.entity.EntityType; | ||
import net.minestom.server.entity.ai.GoalSelector; | ||
import net.minestom.server.entity.ai.TargetSelector; | ||
import net.minestom.server.entity.ai.goal.RandomStrollGoal; | ||
import net.swofty.commons.statistics.ItemStatistic; | ||
import net.swofty.commons.statistics.ItemStatistics; | ||
import net.swofty.types.generic.entity.mob.SkyBlockMob; | ||
import net.swofty.types.generic.loottable.SkyBlockLootTable; | ||
import net.swofty.types.generic.skill.SkillCategories; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class MobChicken extends SkyBlockMob { | ||
public MobChicken(EntityType entityType) { | ||
super(entityType); | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "Chicken"; | ||
} | ||
|
||
@Override | ||
public Integer getLevel() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public List<GoalSelector> getGoalSelectors() { | ||
return List.of( | ||
new RandomStrollGoal(this, 15) | ||
); | ||
} | ||
|
||
@Override | ||
public List<TargetSelector> getTargetSelectors() { | ||
return new ArrayList<>(); | ||
} | ||
|
||
@Override | ||
public ItemStatistics getBaseStatistics() { | ||
return ItemStatistics.builder() | ||
.withBase(ItemStatistic.HEALTH, 20D) | ||
.withBase(ItemStatistic.SPEED, 70D) | ||
.build(); | ||
} | ||
|
||
@Override | ||
public @Nullable SkyBlockLootTable getLootTable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public SkillCategories getSkillCategory() { | ||
return SkillCategories.FARMING; | ||
} | ||
|
||
@Override | ||
public long damageCooldown() { | ||
return 200; | ||
} | ||
|
||
@Override | ||
public long getSkillXP() { | ||
return 4; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
type.generic/src/main/java/net/swofty/types/generic/entity/mob/mobs/MobCow.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,72 @@ | ||
package net.swofty.types.generic.entity.mob.mobs; | ||
|
||
import net.minestom.server.entity.EntityType; | ||
import net.minestom.server.entity.ai.GoalSelector; | ||
import net.minestom.server.entity.ai.TargetSelector; | ||
import net.minestom.server.entity.ai.goal.RandomStrollGoal; | ||
import net.swofty.commons.statistics.ItemStatistic; | ||
import net.swofty.commons.statistics.ItemStatistics; | ||
import net.swofty.types.generic.entity.mob.SkyBlockMob; | ||
import net.swofty.types.generic.loottable.SkyBlockLootTable; | ||
import net.swofty.types.generic.skill.SkillCategories; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class MobCow extends SkyBlockMob { | ||
public MobCow(EntityType entityType) { | ||
super(entityType); | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "Cow"; | ||
} | ||
|
||
@Override | ||
public Integer getLevel() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public List<GoalSelector> getGoalSelectors() { | ||
return List.of( | ||
new RandomStrollGoal(this, 15) | ||
); | ||
} | ||
|
||
@Override | ||
public List<TargetSelector> getTargetSelectors() { | ||
return new ArrayList<>(); | ||
} | ||
|
||
@Override | ||
public ItemStatistics getBaseStatistics() { | ||
return ItemStatistics.builder() | ||
.withBase(ItemStatistic.HEALTH, 100D) | ||
.withBase(ItemStatistic.SPEED, 70D) | ||
.build(); | ||
} | ||
|
||
@Override | ||
public @Nullable SkyBlockLootTable getLootTable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public SkillCategories getSkillCategory() { | ||
return SkillCategories.FARMING; | ||
} | ||
|
||
@Override | ||
public long damageCooldown() { | ||
return 200; | ||
} | ||
|
||
@Override | ||
public long getSkillXP() { | ||
return 4; | ||
} | ||
} | ||
|
71 changes: 71 additions & 0 deletions
71
type.generic/src/main/java/net/swofty/types/generic/entity/mob/mobs/MobPig.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,71 @@ | ||
package net.swofty.types.generic.entity.mob.mobs; | ||
|
||
import net.minestom.server.entity.EntityType; | ||
import net.minestom.server.entity.ai.GoalSelector; | ||
import net.minestom.server.entity.ai.TargetSelector; | ||
import net.minestom.server.entity.ai.goal.RandomStrollGoal; | ||
import net.swofty.commons.statistics.ItemStatistic; | ||
import net.swofty.commons.statistics.ItemStatistics; | ||
import net.swofty.types.generic.entity.mob.SkyBlockMob; | ||
import net.swofty.types.generic.loottable.SkyBlockLootTable; | ||
import net.swofty.types.generic.skill.SkillCategories; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class MobPig extends SkyBlockMob { | ||
public MobPig(EntityType entityType) { | ||
super(entityType); | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "Pig"; | ||
} | ||
|
||
@Override | ||
public Integer getLevel() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public List<GoalSelector> getGoalSelectors() { | ||
return List.of( | ||
new RandomStrollGoal(this, 15) | ||
); | ||
} | ||
|
||
@Override | ||
public List<TargetSelector> getTargetSelectors() { | ||
return new ArrayList<>(); | ||
} | ||
|
||
@Override | ||
public ItemStatistics getBaseStatistics() { | ||
return ItemStatistics.builder() | ||
.withBase(ItemStatistic.HEALTH, 20D) | ||
.withBase(ItemStatistic.SPEED, 70D) | ||
.build(); | ||
} | ||
|
||
@Override | ||
public @Nullable SkyBlockLootTable getLootTable() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public SkillCategories getSkillCategory() { | ||
return SkillCategories.FARMING; | ||
} | ||
|
||
@Override | ||
public long damageCooldown() { | ||
return 200; | ||
} | ||
|
||
@Override | ||
public long getSkillXP() { | ||
return 4; | ||
} | ||
} |
Oops, something went wrong.