Conditional Passthrough

Started by madminegan on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Conditional Passthrough

Hi guys, 
So I am attempting to make a block that the player can only walk on while they have boots with a certain enchantment. Otherwise the player should slowly sink into the block or be able to "swim/climb" out of the block with the 'ladder' mechanic.

I'm currently trying to create this feature using a procedure that sets the players Y motion vector to 0 or some miniscule number when the player is colliding with or walking on the block. but this doesnt seem to work. Can anyone suggest an alternative method of accomplishing this? I am a pretty experienced programmer so technical details arent beyond me either.

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That ultimately limits my x…
Wed, 08/12/2020 - 18:03

That ultimately limits my x and z velocity.  I basically have a "cloud" block that I want players to only be able to walk on if they have boots with  custom enchantment. The ladder mechanic works for most of what I need to do but its staying at the top of blocks that is the hard part. Currently I am pushing the player, using Yvelocity, up slowly out of the cloud block when they have the enchantment... but this results in them having this bounce, as they fall between ticks.  I was able to curb some of this by setting the player to flying while they are touching cloud blocks. but then maintaining the right elevation becomes a problem.... 

If I remember correctly from manually modding MC, collidability is something that is established beforehand correct? is there any way to alter block's collidability at runtime?