Posted May 9, 20205 yr Hi, I wanted to override Block#onBlockActivated Block#onEntityCollision But the first one doesn't exist anymore and the second one is deprecated and never called What should I do ?
May 9, 20205 yr Seriously, search first. https://www.minecraftforge.net/forum/search/?q=deprecated&type=forums_topic&updated_after=any&sortby=relevancy&search_in=titles Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 9, 20205 yr Author I already checked those links, they say you should still override them but I can't override onBlockActivated because it's not in my IDE anymore. And I did override onEntityCollision but it's never called.
May 9, 20205 yr Author OnBlockActivated: The Override is underlined @Override public void onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player) {} OnEntityCollison: The player never moves @Override public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) { entityIn.setMotion(0, 10, 0); } I'm using forge 31.1.1
May 9, 20205 yr Author 2 minutes ago, diesieben07 said: Yes, because the method signature is wrong. Use your IDE to override method, don't just blindly type random parameters in. You have an IDE for a reason. Use it! I tried but it's not in the list. I think it's because of my forge version Quote Put a breakpoint there. Is it hit? Oops you're right
May 9, 20205 yr Author 48 minutes ago, diesieben07 said: What matters is also the MCP mappings version. Update your build.gradle to use the values from latest MDK. Should I just change the Dependencies { minecraft '' } ? EDIT: I did a new project folder and it worked Edited May 9, 20205 yr by QuantumSoul Solved
May 9, 20205 yr Author 2 hours ago, diesieben07 said: And like... writing this code, seeing it not do what you want and concluding "the method must never be called" is completely bananas. That is not how you debug something. Put a breakpoint there. Is it hit? I put a breakpoint and it's never called
May 10, 20205 yr onEntityCollission is only called for blocks that the player can actually be inside of, so blocks that take up the full 1x1x1 cube (and are solid) have no space for the player to actually "enter" it. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 10, 20205 yr Author 22 hours ago, Draco18s said: onEntityCollission is only called for blocks that the player can actually be inside of, so blocks that take up the full 1x1x1 cube (and are solid) have no space for the player to actually "enter" it. What can I do then, except resizing the block ? EDIT: I guess I should use an event but I couldn't find which one Edited May 10, 20205 yr by QuantumSoul
May 10, 20205 yr 1 hour ago, QuantumSoul said: except resizing the block ? Nothing, because Minecraft does not make the check for blocks the player is rubbing their face on. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 11, 20205 yr Author 8 hours ago, Draco18s said: Nothing, because Minecraft does not make the check for blocks the player is rubbing their face on. Isn't there an event for when the player move ?
May 11, 20205 yr 1 hour ago, QuantumSoul said: Isn't there an event for when the player move ? I think we need to go back a step, and have you describe what you are trying to accomplish, from a gameplay (not programming) point of view. Then knowing what the actual question is, we can find a suitable answer
May 11, 20205 yr Author 1 hour ago, Ugdhar said: I think we need to go back a step, and have you describe what you are trying to accomplish, from a gameplay (not programming) point of view. Then knowing what the actual question is, we can find a suitable answer It's a full block and I want to use it's four sides as a ladder and it's down side as a way to "magnet" player's head to travel horizontally. It has to be a full block since it is generated by clusters Edited May 11, 20205 yr by QuantumSoul
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.