Skip to content

Commit

Permalink
hacky fix for #2
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolMineman committed Nov 25, 2020
1 parent 11cdc91 commit 7df7994
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.16.4+build.7
loader_version=0.10.8

# Mod Properties
mod_version = 1.1.4
mod_version = 1.1.5
maven_group = io.github.coolmineman
archives_base_name = bitsandchisels

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import net.fabricmc.fabric.api.renderer.v1.model.ModelHelper;
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.client.render.model.ModelBakeSettings;
Expand All @@ -25,6 +23,7 @@
import net.minecraft.client.render.model.json.ModelOverrideList;
import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.client.util.SpriteIdentifier;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
Expand All @@ -34,6 +33,7 @@
import net.minecraft.world.BlockRenderView;

public class BitsBlockModel implements UnbakedModel, BakedModel, FabricBakedModel {
public static final SpriteIdentifier SPRITE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, new Identifier("bitsandchisels", "block/null"));

// *Important Stuff

Expand Down Expand Up @@ -70,7 +70,7 @@ public Collection<Identifier> getModelDependencies() {
@Override
public Collection<SpriteIdentifier> getTextureDependencies(Function<Identifier, UnbakedModel> unbakedModelGetter,
Set<Pair<String, String>> unresolvedTextureReferences) {
return Collections.emptySet();
return Collections.singletonList(SPRITE);
}

@Override
Expand Down Expand Up @@ -107,7 +107,7 @@ public boolean isBuiltin() {

@Override
public Sprite getSprite() {
return MinecraftClient.getInstance().getBlockRenderManager().getModel(Blocks.AIR.getDefaultState()).getSprite();
return SPRITE.getSprite();
}

@Override
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7df7994

Please sign in to comment.