Skip to content

Commit

Permalink
Render cauldron water levels and update its model (#584)
Browse files Browse the repository at this point in the history
* Update the cauldron model.

* Render water levels of cauldrons.
  • Loading branch information
leMaik authored May 10, 2020
1 parent cec82a6 commit 5dc674d
Show file tree
Hide file tree
Showing 2 changed files with 344 additions and 109 deletions.
9 changes: 5 additions & 4 deletions chunky/src/java/se/llbit/chunky/block/Cauldron.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import se.llbit.chunky.resources.Texture;
import se.llbit.math.Ray;

// TODO: render water level
public class Cauldron extends MinecraftBlockTranslucent {
private final int level;

Expand All @@ -15,11 +14,13 @@ public Cauldron(int level) {
localIntersect = true;
}

@Override public boolean intersect(Ray ray, Scene scene) {
return CauldronModel.intersect(ray);
@Override
public boolean intersect(Ray ray, Scene scene) {
return CauldronModel.intersect(ray, scene.stillWaterEnabled(), level);
}

@Override public String description() {
@Override
public String description() {
return "level=" + level;
}
}
Loading

0 comments on commit 5dc674d

Please sign in to comment.