Jump to content

Custom block enteraction with Entitys and EntityPlayer


rainbain

Recommended Posts

Hello, I had a idea for a mod but it requires the physics between a entity and a block to be changed, and I have a decent amount of forge experience but could not think of a scalable method without using asm. I really want to stay as far away as possible from asm, so I wanted to know if there is any good ways to do it. The hopeful end result it to be able to do a transformation across the entire terrain and make it so that entitys do not glitch threw the ground when I do it. I have a working version that works graphically but not for actual game physics. This is my first time posting of these forms and I do not post on forms often so sorry for any bad formatting or categorization of the post.

Link to comment
Share on other sites

Forgive me, Idk much about changing physics, but given you've been waiting 3 hours, you deserve a reply. Hopefully someone more experienced will give advice.

Your formatting is fine, no worries. If you're willing to post your code, we can help you debug it. 

When you say it's only working graphically, do you mean the entity/block rendering obeys your new physics, but not their bounding boxes/hit boxes? Also is this affecting vanilla blocks/entities, or only ones created in your mod?

Edited by urbanxx001
  • Like 1
Link to comment
Share on other sites

Yes, I can see the change graphically but there bounding box does not follow it. In the vertex shade I have some super efficient code that warps the shape of the terrain but thats only on the gpu. I have no code currently doing the physics aspect as I want to have a method that does not use asm, so I ask for help for ways to do it without asm as I am out of ideas. I am going to implement the asm method but I really want a better method of doing it.

Edited by rainbain
Link to comment
Share on other sites

Ahh it's a Shader. I'm familiar with the terrain-warping ones, made one a long time ago for bedrock. The closest thing I can think of that physically alters blocks is the No Cubes mod, but that's a static change to the terrain, not a constantly-updating one that occurs with shaders when it's a certain radius from the player. Perhaps you can adapt that type of code to work in an event that constantly detects the radius, to mirror the hitboxes with your rendering. Although that would most likely be very laggy. Again hopefully someone else can give input, but asm might be your best bet. 

Edited by urbanxx001
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.