EntityFallingSand issues.

Discussion in 'Plugin Development' started by Taco, Dec 13, 2011.

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

    Taco

    It seems net.minecraft.server.EntityFallingSand is no longer a part of CraftBukkit, so I'm looking for an alternative. Does anyone know of one?

    Here's the error I'm getting spat at me if I'm simply being an idiot:

    Code:
    19:57:45 [SEVERE] Could not load 'plugins\MorePhysics.jar' in folder 'plugins':
    
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:175)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:215)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:136)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:151)
            at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:127)
            at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:52)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/EntityFallingSan
    d
            at com.FriedTaco.taco.MorePhysics.MorePhysics.<init>(MorePhysics.java:35
    )
            ... 13 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.server.EntityFallingS
    and
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    I've found the FallingSand class, but since it's just an interface, I can't create a new FallingSand object. I'm also not sure how to make it apply to gravel since this class seems to only affect sand. Any and all help is appreciated.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  2. Offline

    md_5

    Add
    org.bukkit.minecraft-server
    As a library and then you can
    import net.minecraft.server.entityfallingsand;
     
  3. Offline

    Taco

    Not to be rude, but if you read the first post here, you'd see that I can't use entityFallingSand anymore as it seems to have been renamed. I've found the issue, which is that it was renamed to entityFallingBlock and the mechanics of it changed a bit. Now my issue is with setting the block's velocity; they seem to only accept velocity changes once every 30-ish piston extend events. I know that the code is being reached, though I can't say I know why it wont have a consistent effect.
     
  4. Offline

    md_5

    Mind posting your code.
    Im not at my computer and wont be untill tomorrow morning, but the general gist is to cast it into the CraftEnrity or whatever it is for falling sand and then call the velocity methods there.
    That sounds like what you have done already but if you post the code in question ill take a proper look at this entire thread tomorrow. I assume you want to stop pistom duplication. You gotta remember its only an entity when in between blocks.
     
  5. Offline

    Taco

    Look at the block listener for MorePhysics on my github, link is in my sig. That should give you a general idea of what it's supposed to do. It used to use EntityFallingSand, but it seems the replacement, EntityFallingBlock, is a little more finicky when its CraftEntity counterpart is used. The current code isn't on my github, but the previous code that used EntityFallingSand that worked is there.
     
  6. Offline

    md_5

    Will do, very busy atm
     
Thread Status:
Not open for further replies.

Share This Page