rename Lazy to Memo

This commit is contained in:
dfsek
2026-01-02 21:13:24 -07:00
parent 53dafa4a2c
commit e9d30b8794
5 changed files with 22 additions and 22 deletions

View File

@@ -2,21 +2,21 @@ package com.dfsek.terra.cli.block;
import com.dfsek.terra.api.block.BlockType;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.util.generic.Lazy;
import com.dfsek.terra.api.util.generic.Memo;
public class CLIBlockType implements BlockType {
private final String value;
private final boolean solid;
private final boolean water;
private final Lazy<CLIBlockState> defaultState;
private final Memo<CLIBlockState> defaultState;
public CLIBlockType(String value) {
if(value.contains("[")) throw new IllegalArgumentException("Block Type must not contain properties");
this.value = value;
this.solid = !value.equals("minecraft:air");
this.water = value.equals("minecraft:water");
this.defaultState = Lazy.lazy(() -> new CLIBlockState(value));
this.defaultState = Memo.lazy(() -> new CLIBlockState(value));
}
@Override