Im just trying out some NMS here: Code: public class HyperSlime extends EntitySlime{ public float h; public float i; public float j; @SuppressWarnings("unused") private int jumpDelay; public HyperSlime(World world) { super(world); int i = 1 << this.random.nextInt(3); this.height = 0.0F; this.jumpDelay = this.random.nextInt(10); this.setSize(i); } } If i want the slime's jump delay to be shorter do i remove the original and add this.jumpDelay = this.random.nextInt(10); Is it possible to modify the size of the slime also. Make it bigger maybe?
I have no idea if this will work, but it might. I've never tested this out: Certain creatures (skeletons, horses, etc) have subtypes. To get them, you do: Skeleton skeleton = world.spawnCreature(loc, CreatureType.SKELETON); Then you can do skeleton.setType(). Maybe if you did: Slime slime = world.spawnCreature(loc, CreatureType.SLIME); It would work. Again, I don't understand classes much. I'm really not sure if it will work
Block34 I'm not exactly sure. Just do start typing slime.set and you might be able to find something.
net.minecraft.server.v1_7_R1.EntitySlime shoud be fully qualified, some bukkit\craftbukkit classes may shadow it with undefined results. you shoud not under any circumstances just create extended class instance, it is not registered inside netmanager and will knock client by mob with invalid network ID. you dont need class extension to edit fields, reflections will do it. if you want to edit method, you must carefully replace entity with extended version EVERYWHERE, not only in your plugin.