More client side annotations
This commit is contained in:
parent
2686089835
commit
425458f0bd
37 changed files with 151 additions and 4 deletions
|
@ -10,6 +10,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.renderer.block.model.MultiVariant;
|
||||
import net.minecraft.client.renderer.block.model.Variant;
|
||||
|
@ -109,11 +111,13 @@ public class TripleTerrainBlock extends BaseTerrainBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||
return getBlockModel(blockId, defaultBlockState());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation blockId, BlockState blockState) {
|
||||
String path = blockId.getPath();
|
||||
Optional<String> pattern;
|
||||
|
@ -131,6 +135,7 @@ public class TripleTerrainBlock extends BaseTerrainBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
boolean isMiddle = isMiddle(blockState);
|
||||
String middle = isMiddle ? "_middle" : "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue