Start work on Phantom, write specification, fix sex.
This commit is contained in:
parent
b9b15ffb73
commit
a68178d0a8
|
@ -7,6 +7,8 @@ Doubleclicking shift you will float (levitation 5 for 1 second), allowing for be
|
|||
You take significantly less damage when falling (5 hearts). You can still die, don't count on your cat-powers catching you every time. **Your superfood is all types of eatable fish.**
|
||||
3. Fox
|
||||
You do more damage to mobs (25%). **Your superfood is all types of berry.**
|
||||
4. Phantom
|
||||
You can use elytras, however you burn in daylight and your elytra speed is capped at half of the normal one. **Your superfoods are all uncooked meats.**
|
||||
|
||||
## **Chat**
|
||||
Chat while you are a animal is very different. When you speak, your words will become furry-ified and every time you talk you'll have animal sounds come out of you.
|
||||
|
|
|
@ -113,7 +113,7 @@ public class AnimalRP extends JavaPlugin {
|
|||
animals.put("cat", new Cat());
|
||||
animals.put("fox", new Fox());
|
||||
animals.put("bee", new Bee());
|
||||
|
||||
// animals.put("phantom", new Phantom()); // finish Phantom
|
||||
animals.forEach((z,b) -> {
|
||||
pm.registerEvents(b, this);
|
||||
});
|
||||
|
|
50
src/main/java/lv/pi/animalrp/animals/Phantom.java
Normal file
50
src/main/java/lv/pi/animalrp/animals/Phantom.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
package lv.pi.animalrp.animals;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
|
||||
import lv.pi.animalrp.util.Mood;
|
||||
import lv.pi.animalrp.util.TextDestroyer;
|
||||
|
||||
public class Phantom extends Animal {
|
||||
TextDestroyer destroyer = new TextDestroyer(new String[]{
|
||||
"*shows wings*",
|
||||
"*flap flap*",
|
||||
"*screech*",
|
||||
":3"
|
||||
}, new String[][]{
|
||||
{"you", "u"},
|
||||
{"o", "sho"},
|
||||
{"i", "ish"},
|
||||
{"!", "! "},
|
||||
{"?", "? "}
|
||||
});
|
||||
Random rand = new Random();
|
||||
|
||||
public Phantom() {
|
||||
super("phantom", "~screech~", "#FF8000");
|
||||
this.moodSounds.put(Mood.HAPPY, Sound.ENTITY_PHANTOM_FLAP);
|
||||
this.moodSounds.put(Mood.CUTE, Sound.ENTITY_PHANTOM_SWOOP);
|
||||
this.moodSounds.put(Mood.SAD, Sound.ENTITY_PHANTOM_SWOOP);
|
||||
this.moodSounds.put(Mood.STRESSED, Sound.ENTITY_PHANTOM_HURT);
|
||||
this.moodSounds.put(Mood.ANGRY, Sound.ENTITY_PHANTOM_BITE);
|
||||
|
||||
this.superfoods.add(Material.CHICKEN);
|
||||
this.superfoods.add(Material.BEEF);
|
||||
this.superfoods.add(Material.PORKCHOP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String chatTransformations(String message) {
|
||||
return this.destroyer.destroy(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location movementTransformations(Location location) {
|
||||
return location;
|
||||
}
|
||||
|
||||
}
|
|
@ -58,9 +58,11 @@ class SexModel {
|
|||
asl.add(SexCommand.getVector(this.yaw, 0.2));
|
||||
as.teleport(asl);
|
||||
}
|
||||
|
||||
if(this.sexTicks == 30) {
|
||||
player.sendMessage(AnimalRP.mm.deserialize("<#FFC0CB>I'm about to.."));
|
||||
}
|
||||
|
||||
if(this.sexTicks == 50) {
|
||||
player.sendMessage(AnimalRP.mm.deserialize("<#FFC0CB>cum!!"));
|
||||
player.getWorld().spawnParticle(Particle.END_ROD, player.getLocation(), 999, 0, 0, 0);
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import lv.pi.animalrp.AnimalRP;
|
||||
import lv.pi.animalrp.animals.Animal;
|
||||
|
||||
public class AntiElytra implements Listener {
|
||||
|
||||
|
@ -53,6 +54,12 @@ public class AntiElytra implements Listener {
|
|||
}
|
||||
|
||||
private void dequipElytra(Player player) {
|
||||
Animal animal = AnimalRP.users.get(player.getUniqueId());
|
||||
|
||||
if(animal != null) {
|
||||
if(animal.name == "phantom") return; // phantom-ians can use elytra
|
||||
}
|
||||
|
||||
PlayerInventory i = player.getInventory();
|
||||
if (!( (i.getChestplate() != null) && i.getChestplate().getType().equals(Material.ELYTRA))) return;
|
||||
if(player.getGameMode() == GameMode.CREATIVE) return;
|
||||
|
|
Loading…
Reference in a new issue