Change models loading (yes, still WIP)

This commit is contained in:
Aleksey 2021-05-19 17:58:06 +03:00
parent 52fc329a0a
commit 2ece809541
21 changed files with 122 additions and 51 deletions

View file

@ -6,6 +6,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.client.color.block.BlockColor;
import net.minecraft.client.color.item.ItemColor;
import net.minecraft.client.renderer.block.model.BlockModel;
import net.minecraft.client.resources.model.UnbakedModel;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.Vec3i;
@ -74,7 +75,7 @@ public class StoneLanternBlock extends EndLanternBlock implements IColorProvider
}
@Override
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
public @Nullable UnbakedModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
String blockName = resourceLocation.getPath();
Optional<String> pattern = blockState.getValue(IS_FLOOR) ?
Patterns.createJson(Patterns.BLOCK_STONE_LANTERN_FLOOR, blockName, blockName) :