mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-16 13:23:07 +00:00
rename Lazy to Memo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user