Skip to content

Commit

Permalink
fix: make caloric flux emitter target blockstate caching lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Oct 25, 2024
1 parent 484c19e commit cb84073
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected SelectedPoint(Level level, BlockPos blockPos, BlockState blockState) {

public void setLevel(Level level) {
this.level = level;
this.blockState = this.level.getBlockState(this.blockPos);
this.blockState = null;
}

public Level getLevel() {
Expand All @@ -41,6 +41,9 @@ public BlockPos getBlockPos() {
}

public BlockState getBlockState() {
if(this.blockState == null) {
this.refreshBlockStateCache();
}
return this.blockState;
}

Expand Down

0 comments on commit cb84073

Please sign in to comment.