Various mods with boards that are not so busy. Ones that get busy may get promoted to their own multi-board section, or dead ones will be removed.
No posts here yet
577 topics in this forum
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.
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.
Who's Online (See full list)