• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I really don't know how to do this. I've been thinking of how to do this (didn't code anything, since I didn't know what to write), but I had only an idea. Using another HOR_FACING property, but: 1) This HOR_FACING property should be null when the normal "FACING" property isn't DOWN or UP; 2) I think making another property just to check for a part of the block is completely useless. So this is what I have right now...nothing. Any kind of help would be appreciated. I'm going to bed now.
    • no this is it   [Info: 2019-12-07 22:06:18.9198558: mainWindows.cpp(111)] Triggering reopen event... [Info: 2019-12-07 22:06:18.9205611: mainWindows.cpp(114)] Success!
    • Close the Minecraft launcher. Delete the launcher_log. Reopen the launcher and try to launch the game, once. After it failed, close the launcher and post the new launcher_log.
    • Listen man. super refers to the parent class. In your case, your entity class (EntityBarbarian) extends EntityMob, therefore your entity is a "child" of EntityMob (the parent). Every method of your parent class is accessible to you, but if you want a specific implementation of those methods, you override them (the @Override annotation). In your case, you don't really need a specific implementation of "setItemStackToSlot" so you don't have to override that method. You simply have to call it with the specified parameters. You have overriden "setItemStackToSlot" to always call the super class's method with the MAINHAND slot and your BARBARIAN_SWORD as the itemstack. Now that's bad because your entity now will always call that method with your specified parameters. That's perhaps something you don't care about. You just want it to work, and the bloody thing doesn't work. The reason why It doesn't work, is because you are never calling the "setItemStackToSlot" method anywhere. How do you expect it to do anything if it is never being called. The perfect place to call this method would be at the "onInitialSpawn" method, which currently does absolutely nothing in your class. That method is called when your entity is initially spawned on the world, as the name of the method suggests. However you just return the super class's implementation of that method and do nothing else. Which actually means you are doing nothing, because your super class's "onInitialSpawn" method would have been called anyway even if you didn't override it. Before you return the super class's implementation of "onInitialSpawn", you call the "setItemStackToSlot" with the parameters that you want (Mainhand slot and a new itemstack instance of barbarian sword). So now your class has its own implementation of "onInitialSpawn" and overriding the method makes sense.
    • is this it   [Info: 2019-12-07 19:48:31.2989204: mainWindows.cpp(111)] Triggering reopen event... [Info: 2019-12-07 19:48:31.2998206: mainWindows.cpp(114)] Success!
  • Topics

  • Who's Online (See full list)