Change loading models (WIP)

This commit is contained in:
Aleksey 2021-05-11 17:55:20 +03:00
parent ce98c5857e
commit 1e6451e375
9 changed files with 86 additions and 23 deletions

View file

@ -2,13 +2,12 @@ package ru.betterend.patterns;
import java.io.Reader;
import net.minecraft.client.resources.model.UnbakedModel;
import net.minecraft.client.renderer.block.model.BlockModel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.NotNull;
public interface BlockPatterned extends Patterned {
String getStatesPattern(Reader data);
ResourceLocation statePatternId();
@NotNull UnbakedModel getBlockModel(BlockState blockState);
BlockModel getBlockModel(BlockState blockState);
}

View file

@ -1,9 +1,8 @@
package ru.betterend.patterns;
import net.minecraft.client.renderer.block.model.BlockModel;
import org.jetbrains.annotations.NotNull;
public interface Patterned {
String getModelString(String name);
@NotNull BlockModel getItemModel();
BlockModel getItemModel();
}

View file

@ -14,6 +14,7 @@ import com.google.common.collect.Maps;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;
import org.jetbrains.annotations.Nullable;
import ru.betterend.BetterEnd;
public class Patterns {
@ -156,7 +157,7 @@ public class Patterns {
}
return json;
} catch (Exception ex) {
return null;
return "";
}
}
}