Make A Chicken Always Flap Its Wings

Discussion in 'Plugin Development' started by BungeeTheCookie, Jun 6, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    BungeeTheCookie

    Alright, so I am making a custom entity called a DisplayChicken (for those display things you would see on Mineplex) and I want to make it always flap its wings. I think I would use a runnable for this, but I am not sure how to make the flapping motion. How would I do such a thing? Also, how would I make it produce a custom sound? Thanks!!
    EDIT: Does PathfindergoalFloat make the entity jump?

    Code:java
    1. import bungeecookie.flappybirds.classes.ClassDisplay;
    2. import net.minecraft.server.v1_7_R3.*;
    3.  
    4. import java.lang.reflect.Field;
    5. import java.util.List;
    6.  
    7. public class DisplayChicken extends EntityChicken {
    8.  
    9. private ClassDisplay display;
    10.  
    11. public DisplayChicken(World world, ClassDisplay display){
    12. super(world);
    13. List goalB = (List)getPrivateField("b", PathfinderGoalSelector.class, goalSelector); goalB.clear();
    14. List goalC = (List)getPrivateField("c", PathfinderGoalSelector.class, goalSelector); goalC.clear();
    15. List targetB = (List)getPrivateField("b", PathfinderGoalSelector.class, targetSelector); targetB.clear();
    16. List targetC = (List)getPrivateField("c", PathfinderGoalSelector.class, targetSelector); targetC.clear();
    17. this.display = display;
    18. this.goalSelector.a(0, new PathfinderGoalFloat(this));
    19. this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
    20. this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
    21. }
    22.  
    23. public ClassDisplay getDisplay(){
    24. return display;
    25. }
    26.  
    27. public static Object getPrivateField(String fieldName, Class clazz, Object object){
    28. Field field;
    29. Object o = null;
    30. try{
    31. field = clazz.getDeclaredField(fieldName);
    32. field.setAccessible(true);
    33. o = field.get(object);
    34. }
    35. e.printStackTrace();
    36. }
    37. e.printStackTrace();
    38. }
    39. return o;
    40. }
    41. }
    42.  
     
  2. Offline

    L33m4n123

    About the flapping part. My Idea would be to set it like half a block in the air or so as they flap if they are in the air. There's probably an NMS way to do it without setting it constantly in the air
     
  3. Offline

    BungeeTheCookie

    I would like the NMS way to do it please :)
    Also, how would you prevent the entity from being pushed?
     
  4. Offline

    fireblast709

    I think it would be the Navigation & ControllerJump that handle the jumping BungeeTheCookie
     
  5. Offline

    BungeeTheCookie

    There are no ControllerJump or Navigation.java classes in net.minecraft.server (Unless I am just really that noobish with NMS and it is a field ;)

    fireblast709
    But does PathfindergoalFloat make the entity jump?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 30, 2016
  6. Offline

    fireblast709

    BungeeTheCookie my decompiler disagreed :3. Regarding the second post, yes.
     
  7. Offline

    L33m4n123

  8. Offline

    BungeeTheCookie

    :3 Ok, I should remove that Entity Attribute. Lemme look into the pathfinderfloatclass and see if that has anything to do with it.
    L33m4n123 Thanks!

    L33m4n123 fireblast709
    I only found a bunch of letters, but I think the flapping of the wings would be found inside the EntityChicken class or a class that is referred to in EntityChicken, since wings flapping is something only used with EntityChicken.
    EDIT: I think this would be more solvable, preventing the entity from being pushed?

    L33m4n123 fireblast709
    Alright, I think I found the code that does this, could be completely wrong ;)
    Code:
    public void e() {
            // CraftBukkit start
            if (this.bZ()) { // should be isChickenJockey
                this.persistent = !this.isTypeNotPersistent();
            }
            // CraftBukkit end
            super.e();
            this.bs = this.bp;
            this.br = this.bq;
            this.bq = (float) ((double) this.bq + (double) (this.onGround ? -1 : 4) * 0.3D);
            if (this.bq < 0.0F) {
                this.bq = 0.0F;
            }
     
            if (this.bq > 1.0F) {
                this.bq = 1.0F;
            }
     
            if (!this.onGround && this.bt < 1.0F) {
                this.bt = 1.0F;
            }
     
            this.bt = (float) ((double) this.bt * 0.9D);
            if (!this.onGround && this.motY < 0.0D) {
                this.motY *= 0.6D;
            }
     
            this.bp += this.bt * 2.0F;
            if (!this.world.isStatic && !this.isBaby() && !this.bZ() && --this.bu <= 0) {
                this.makeSound("mob.chicken.plop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
                this.a(Items.EGG, 1);
                this.bu = this.random.nextInt(6000) + 6000;
            }
        }
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 30, 2016
    L33m4n123 likes this.
  9. Offline

    L33m4n123

  10. Offline

    fireblast709

    BungeeTheCookie Doesn't seem that you can trigger the flapping server-side. Also, to prevent the entity from being pushed, you need to override some NMS methods as seen in the last thread this was discussed.
     
  11. Offline

    BungeeTheCookie

    L33m4n123 fireblast709
    How is the flapping not triggered server-side? Doesn't the sever tell the client to cause the chicken to flap its wings when the chicken is in the air? Otherwise, would running a BukkitRunnable of location.add(0, 0.0003D, 0)work?
    Also, thanks for the thread about unpushability!
     
  12. Offline

    fireblast709

    BungeeTheCookie I'm not entirely sure since I don't know when the client sees it as flapping :p. Your best bet would be playing around with it, I guess.
     
  13. Offline

    BungeeTheCookie

    I dunno where to start :p
     
  14. Offline

    L33m4n123

    Well. Not played too much arround with nms but yea. I think keeping it in the air should be a good start
     
  15. I'll follow this thread mostly out of interest on the coding part of it. If you get it to work, don't forget to share BungeeTheCookie :p
     
  16. Offline

    BungeeTheCookie

    fireblast709 L33m4n123
    Well, I solved my unpushable thing. Thank you so much for that!

    L33m4n123 Alright, that's a good start! Hopefully it doesn't look too glitchy, or lag the server too much. :p RAFA_GATO_FOFO Don't worry, I will

    fireblast709 L33m4n123
    My client crashed.

    The Crash Report:
    PHP:
    [17:35:32 INFO]: Client> [17:35:32] [Client thread/FATAL]: Unreported exception thrown!
    [
    17:35:32 INFO]: Clientjava.lang.NullPointerException
    [17:35:32 INFO]: Client>    at net.minecraft.client.network.NetHandlerPlayClient.func_147281_a(NetHandlerPlayClient.java:730) ~[biv.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.play.server.S0FPacketSpawnMob.func_148833_a(SourceFile:97) ~[fq.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.play.server.S0FPacketSpawnMob.func_148833_a(SourceFile:15) ~[fq.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:197) ~[ef.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273) ~[biy.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1541) ~[azd.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:916) ~[azd.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835) [azd.class:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]
    [
    17:35:32 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
    [
    17:35:32 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0]
    [
    17:35:32 INFO]: Client>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0]
    [
    17:35:32 INFO]: Client>    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0]
    [
    17:35:32 INFO]: Client>    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
    [
    17:35:32 INFO]: Client>    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
    [
    17:35:32 INFO]: Client> ---- Minecraft Crash Report ----
    [
    17:35:32 INFO]: Client// Ooh. Shiny.
    [17:35:32 INFO]: Client>
    [
    17:35:32 INFO]: ClientTime6/6/14 5:35 PM
    [17:35:32 INFO]: ClientDescriptionUnexpected error
    [17:35:32 INFO]: Client>
    [
    17:35:32 INFO]: Clientjava.lang.NullPointerExceptionUnexpected error
    [17:35:32 INFO]: Client>    at net.minecraft.client.network.NetHandlerPlayClient.func_147281_a(NetHandlerPlayClient.java:730)
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.play.server.S0FPacketSpawnMob.func_148833_a(SourceFile:97)
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.play.server.S0FPacketSpawnMob.func_148833_a(SourceFile:15)
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:197)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1541)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:916)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.main.Main.main(SourceFile:103)
    [
    17:35:32 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [
    17:35:32 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [
    17:35:32 INFO]: Client>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [
    17:35:32 INFO]: Client>    at java.lang.reflect.Method.invoke(Unknown Source)
    [
    17:35:32 INFO]: Client>    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    [
    17:35:32 INFO]: Client>    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    [
    17:35:32 INFO]: Client>
    [
    17:35:32 INFO]: Client>
    [
    17:35:32 INFO]: ClientA detailed walkthrough of the errorits code path and all known details is as follows:
    [
    17:35:32 INFO]: Client> ---------------------------------------------------------------------------------------
    [
    17:35:32 INFO]: Client>
    [
    17:35:32 INFO]: Client> -- Head --
    [
    17:35:32 INFO]: ClientStacktrace:
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.network.NetHandlerPlayClient.func_147281_a(NetHandlerPlayClient.java:730)
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.play.server.S0FPacketSpawnMob.func_148833_a(SourceFile:97)
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.play.server.S0FPacketSpawnMob.func_148833_a(SourceFile:15)
    [
    17:35:32 INFO]: Client>    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:197)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273)
    [
    17:35:32 INFO]: Client>
    [
    17:35:32 INFO]: Client> -- Affected level --
    [
    17:35:32 INFO]: ClientDetails:
    [
    17:35:32 INFO]: Client>    Level nameMpServer
    [17:35:32 INFO]: Client>    All players1 total; [EntityClientPlayerMP['Bungeecookie'/6256l='MpServer'x=-172.80y=131.12z=-679.31]]
    [
    17:35:32 INFO]: Client>    Chunk statsMultiplayerChunkCache441441
    [17:35:32 INFO]: Client>    Level seed0
    [17:35:32 INFO]: Client>    Level generatorID 00 - default, ver 1. Features enabledfalse
    [17:35:32 INFO]: Client>    Level generator options:
    [
    17:35:32 INFO]: Client>    Level spawn locationWorld: (-418,106,-292), Chunk: (at 14,6,12 in -27,-19contains blocks -432,0,-304 to -417,255,-289), Region: (-1,-1contains chunks -32,-32 to -1,-1blocks -512,0,-512 to -1,255,-1)
    [
    17:35:32 INFO]: Client>    Level time6224605 game time778101 day time
    [17:35:32 INFO]: Client>    Level dimension0
    [17:35:32 INFO]: Client>    Level storage version0x00000 Unknown?
    [
    17:35:32 INFO]: Client>    Level weatherRain time(nowfalse), thunder time(nowfalse)
    [
    17:35:32 INFO]: Client>    Level game modeGame modecreative (ID 1). HardcorefalseCheatsfalse
    [17:35:32 INFO]: Client>    Forced entities34 total; [EntitySheep['Sheep'/8469l='MpServer'x=-214.16y=71.00z=-727.78], EntitySheep['Sheep'/8472l='MpServer'x=-209.16y=66.00z=-723.13], EntitySheep['Sheep'/8475l='MpServer'x=-194.50y=71.00z=-727.50], EntitySheep['Sheep'/8476l='MpServer'x=-183.97y=69.00z=-713.03], EntityChicken['Chicken'/8477l='MpServer'x=-189.53y=68.00z=-723.53], EntityChicken['Chicken'/8478l='MpServer'x=-182.69y=69.00z=-725.81], EntityChicken['Chicken'/8479l='MpServer'x=-185.63y=69.00z=-723.41], EntityChicken['Chicken'/8480l='MpServer'x=-207.47y=65.00z=-726.56], EntityCreeper['Creeper'/11040l='MpServer'x=-159.50y=38.00z=-659.50], EntityMinecartChest['entity.MinecartChest.name'/8481l='MpServer'x=-218.50y=29.50z=-743.50], EntitySheep['Sheep'/8482l='MpServer'x=-152.13y=69.00z=-691.38], EntitySheep['Sheep'/8483l='MpServer'x=-167.75y=71.00z=-690.63], EntitySheep['Sheep'/8484l='MpServer'x=-155.84y=72.00z=-699.88], EntitySheep['Sheep'/8485l='MpServer'x=-174.50y=71.00z=-685.28], EntitySpider['Spider'/11304l='MpServer'x=-147.50y=68.00z=-687.50], EntityZombie['Zombie'/11317l='MpServer'x=-187.52y=69.00z=-689.70], EntitySkeleton['Skeleton'/10322l='MpServer'x=-214.50y=42.00z=-689.50], EntityCreeper['Creeper'/10323l='MpServer'x=-163.50y=36.00z=-659.50], EntityClientPlayerMP['Bungeecookie'/6256l='MpServer'x=-172.80y=131.12z=-679.31], EntitySkeleton['Skeleton'/10075l='MpServer'x=-200.69y=33.00z=-673.22], EntityZombie['Zombie'/9819l='MpServer'x=-164.50y=67.00z=-667.50], EntitySkeleton['Skeleton'/10603l='MpServer'x=-173.75y=36.00z=-660.31], EntityCreeper['Creeper'/10097l='MpServer'x=-186.50y=31.00z=-660.50], EntityCreeper['Creeper'/10098l='MpServer'x=-183.50y=31.00z=-662.50], EntityCreeper['Creeper'/10618l='MpServer'x=-201.50y=16.00z=-646.50], EntityZombie['Zombie'/10881l='MpServer'x=-129.50y=67.00z=-644.50], EntityItem['item.tile.sapling.spruce'/10899l='MpServer'x=-147.59y=66.13z=-672.13], EntityItem['item.tile.flower2.poppy'/10387l='MpServer'x=-143.88y=67.13z=-663.88], EntityCreeper['Creeper'/10647l='MpServer'x=-183.50y=31.00z=-660.50], EntityCreeper['Creeper'/10648l='MpServer'x=-185.50y=31.00z=-663.50], EntityCreeper['Creeper'/11427l='MpServer'x=-137.50y=26.00z=-664.50], EntityCreeper['Creeper'/9912l='MpServer'x=-213.22y=38.00z=-726.69], EntitySpider['Spider'/10454l='MpServer'x=-216.78y=39.00z=-703.06], EntitySkeleton['Skeleton'/10478l='MpServer'x=-210.50y=30.00z=-646.50]]
    [
    17:35:32 INFO]: Client>    Retry entities0 total; []
    [
    17:35:32 INFO]: ClientStacktrace:
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:368)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2382)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:864)
    [
    17:35:32 INFO]: Client>    at net.minecraft.client.main.Main.main(SourceFile:103)
    [
    17:35:32 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [
    17:35:32 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [
    17:35:32 INFO]: Client>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [
    17:35:32 INFO]: Client>    at java.lang.reflect.Method.invoke(Unknown Source)
    [
    17:35:32 INFO]: Client>    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
    [
    17:35:32 INFO]: Client>    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    The Entity Class:
    Code:java
    1. import net.minecraft.server.v1_7_R3.*;
    2. import org.bukkit.Bukkit;
    3. import org.bukkit.Location;
    4. import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
    5. import org.bukkit.scheduler.BukkitRunnable;
    6.  
    7. import java.lang.reflect.Field;
    8. import java.util.List;
    9.  
    10. public class DisplayChicken extends EntityChicken {
    11.  
    12. private ClassDisplay display;
    13.  
    14. public DisplayChicken(World world, ClassDisplay display){
    15. super(world);
    16. List goalB = (List)getPrivateField("b", PathfinderGoalSelector.class, goalSelector); goalB.clear();
    17. List goalC = (List)getPrivateField("c", PathfinderGoalSelector.class, goalSelector); goalC.clear();
    18. List targetB = (List)getPrivateField("b", PathfinderGoalSelector.class, targetSelector); targetB.clear();
    19. List targetC = (List)getPrivateField("c", PathfinderGoalSelector.class, targetSelector); targetC.clear();
    20. this.display = display;
    21. this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
    22. this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
    23. this.fireProof = true;
    24. }
    25.  
    26. public ClassDisplay getDisplay(){
    27. return display;
    28. }
    29.  
    30. public static Object getPrivateField(String fieldName, Class clazz, Object object){
    31. Field field;
    32. Object o = null;
    33. try{
    34. field = clazz.getDeclaredField(fieldName);
    35. field.setAccessible(true);
    36. o = field.get(object);
    37. }
    38. e.printStackTrace();
    39. }
    40. e.printStackTrace();
    41. }
    42. return o;
    43. }
    44.  
    45. @Override
    46. protected void aC(){
    47. super.aC();
    48. this.getAttributeInstance(GenericAttributes.a).setValue(100000.0D);
    49. this.getAttributeInstance(GenericAttributes.b).setValue(0.000D);
    50. this.getAttributeInstance(GenericAttributes.c).setValue(100000.D);
    51. this.getAttributeInstance(GenericAttributes.d).setValue(0.000D);
    52. }
    53.  
    54. @Override
    55. public void collide(Entity entity){
    56.  
    57. }
    58.  
    59. @Override
    60. public void g(double d0, double d1, double d2){
    61.  
    62. }
    63.  
    64. public void spawn(final Location l){
    65. setLocation(l.getX(), l.getY(), l.getZ(), 0F, 0F);
    66. ((CraftWorld) l.getWorld()).getHandle().addEntity(this);
    67. Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Bukkit.getServer().getPluginManager().getPlugin("FlappyBirds"), new BukkitRunnable(){
    68. public void run() {
    69. getBukkitEntity().teleport(l.add(0.0D, 0.1D, 0.0D));
    70. }
    71. }, 0L, 5L);
    72. }
    73. }
    74.  


    The Class For Registering The Entities:
    Code:java
    1. public class NMSHandler {
    2.  
    3. @SuppressWarnings("unchecked")
    4. public static void registerEntity(String name, int id, Class<? extends EntityInsentient> customClass) {
    5. try {
    6. List<Map<?, ?>> dataMaps = new ArrayList<Map<?, ?>>();
    7. for (Field f : EntityTypes.class.getDeclaredFields()) {
    8. if (f.getType().getSimpleName().equals(Map.class.getSimpleName())) {
    9. f.setAccessible(true);
    10. dataMaps.add((Map<?, ?>) f.get(null));
    11. }
    12. }
    13.  
    14. ((Map<Class<? extends EntityInsentient>, String>) dataMaps.get(1)).put(customClass, name);
    15. ((Map<Class<? extends EntityInsentient>, Integer>) dataMaps.get(3)).put(customClass, id);
    16.  
    17. } catch (Exception e) {
    18. e.printStackTrace();
    19. }
    20. }
    21. }
    22.  


    The Registration:
    Code:java
    1. NMSHandler.registerEntity("DisplayChicken", 76, DisplayChicken.class);


    Class That Uses The Display Chicken:
    Code:java
    1. public void spawnDisplayChicken(ClassBase base, Location l){
    2. ClassDisplay display = new ClassDisplay(base, l);
    3. ConfigurationSection s = getSection("classDisplays").createSection(display.getClassBase().getName());
    4. LocationUtil.setLocation(s, l);
    5. LobbyConfig.saveLobbyConfig(plugin);
    6. classDisplays.add(display);
    7. DisplayChicken chicken = new DisplayChicken(((CraftWorld)l.getWorld()).getHandle(), display);
    8. chicken.spawn(l);
    9. }
    10.  
    11. public ClassDisplay getClassDisplay(String className){
    12. try{
    13. Location l = LocationUtil.getLocation(getSection("classDisplays." + className));
    14. ClassDisplay display = new ClassDisplay(ClassManager.getInstance().getClass(className), l);
    15. return display;
    16. }catch(Exception e){
    17. e.printStackTrace();
    18. return null;
    19. }
    20. }
    21.  
    22. private void loadClassDisplays(){
    23. try{
    24. isClassDisplaysLoaded = true;
    25. for(String key : getSection("classDisplays").getKeys(false)){
    26. ClassDisplay display = getClassDisplay(key);
    27. classDisplays.add(display);
    28. Location l = display.getLocation();
    29. DisplayChicken chicken = new DisplayChicken(((CraftWorld)l.getWorld()).getHandle(), display);
    30. chicken.spawn(l);
    31. }
    32. }catch(Exception e){
    33.  
    34. }
    35. }

    bigteddy98 xTrollxDudex Cirno (I tag the same people every time :p)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 30, 2016
  17. Offline

    Garris0n

    Not everything is in /craftbukkit, only classes related to the actual modification. /mc-dev has all server classes (but none related to the modification).
     
  18. Offline

    BungeeTheCookie

    I now know that, but now I have a different issue on my hands.
     
  19. Offline

    Plo124

    That goal makes the chicken float IN WATER, so no
    Why dont you just set it to have a slightward up velocity on a runnable?
     
  20. Offline

    BungeeTheCookie

    What do you mean? I don't want it to "appear" to be floating. I just want to make it so it constantly flap its wings. And the only way possible is to teleport it every 5 ticks...
     
  21. Offline

    Plo124

    BungeeTheCookie
    I think the chicken flaps its wing as it falls, and may be handled client side, Ill look under the packets list for you.
     
  22. Offline

    BungeeTheCookie

    Thank you so much! It would be so much better if I used packets.
     
  23. Offline

    Plo124

    BungeeTheCookie
    No luck, unless its under Entity Status,

    I think its handled client-side based on if the chicken is falling or not.

    I would as a last resort test if setting the chicken distance falled to something more than 0, and see if the wings flap.
     
  24. Offline

    BungeeTheCookie

    Well my client crashes every time I log in so I can't test this...
     
  25. Offline

    xTigerRebornx

  26. Offline

    BungeeTheCookie

Thread Status:
Not open for further replies.

Share This Page