Skip to content

Commit

Permalink
initial working bubble columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis committed Jan 5, 2025
1 parent a5af4fb commit 7455f9d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/ganymedes01/etfuturum/blocks/BlockBubbleColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
Expand Down Expand Up @@ -100,6 +101,16 @@ public void randomDisplayTick(World worldIn, int x, int y, int z, Random random)
}
}

@Override
public void onEntityCollidedWithBlock(World worldIn, int x, int y, int z, Entity entityIn) {
if (isUp){
entityIn.motionY = Math.min(0.7D, entityIn.motionY + 0.6D);
}else {
entityIn.motionY = Math.max(-0.3D, entityIn.motionY - 0.3D);
}
entityIn.fallDistance = 0;
}

protected String getBubblingNoise(World world, int x, int y, int z, Random random) {
return Reference.MCAssetVer + ":" + "block.bubble_column." + (isUp ? "upwards" : "whirlpool") + "_ambient";
}
Expand Down

0 comments on commit 7455f9d

Please sign in to comment.