Adressed PR comments
This commit is contained in:
@@ -164,8 +164,8 @@ public class CoverManager {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static Block getBlock(@Nullable ItemStack item) {
|
||||
if (item == null) {
|
||||
public static Block getBlock(ItemStack item) {
|
||||
if (item.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ public class CoverManager {
|
||||
|
||||
@Nullable
|
||||
@SuppressWarnings("deprecation")
|
||||
public static BlockState getBlockState(@Nullable ItemStack item) {
|
||||
public static BlockState getBlockState(ItemStack item) {
|
||||
Block block = getBlock(item);
|
||||
|
||||
if (block == null) {
|
||||
|
||||
@@ -111,7 +111,7 @@ public class CubeBuilder {
|
||||
}
|
||||
|
||||
private BakedQuad bakeFace(Direction facing, Face cubeFace) {
|
||||
BakedQuadBuilder builder = new BakedQuadBuilder(cubeFace.sprite); //TODO See if can change the vertex format
|
||||
BakedQuadBuilder builder = new BakedQuadBuilder(cubeFace.sprite);
|
||||
|
||||
builder.setQuadOrientation(facing);
|
||||
builder.setQuadTint(-1);
|
||||
|
||||
@@ -373,7 +373,9 @@ public final class RenderUtils {
|
||||
}
|
||||
|
||||
if (sprite == null) {
|
||||
sprite = null; //TODO Get missing sprite
|
||||
for (BakedQuad quad : Minecraft.getInstance().getModelManager().getMissingModel().getQuads(coverState, facing, rand)) {
|
||||
return quad.getSprite();
|
||||
}
|
||||
}
|
||||
|
||||
return sprite;
|
||||
|
||||
Reference in New Issue
Block a user