[Change] Removed Canvas Support
This commit is contained in:
parent
e826dbc623
commit
d9a586741e
11 changed files with 0 additions and 552 deletions
|
@ -106,44 +106,4 @@ public class CustomModelBakery {
|
|||
BlockModel model = provider.getItemModel(modelLocation);
|
||||
models.put(modelLocation, model);
|
||||
}
|
||||
|
||||
//TODO: 1.19.3 Handled differently now
|
||||
// public static void loadEmissiveModels(Map<ResourceLocation, UnbakedModel> unbakedCache) {
|
||||
// if (!ModIntegrationAPI.hasCanvas()) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// Map<ResourceLocation, UnbakedModel> cacheCopy = new HashMap<>(unbakedCache);
|
||||
// Set<Pair<String, String>> strings = Sets.newConcurrentHashSet();
|
||||
// Registry.BLOCK.keySet().forEach(blockID -> {
|
||||
// Block block = Registry.BLOCK.get(blockID);
|
||||
// ImmutableList<BlockState> states = block.getStateDefinition().getPossibleStates();
|
||||
// boolean addBlock = false;
|
||||
//
|
||||
// for (BlockState state : states) {
|
||||
// ResourceLocation stateID = BlockModelShaper.stateToModelLocation(blockID, state);
|
||||
// UnbakedModel model = cacheCopy.get(stateID);
|
||||
// if (model == null) {
|
||||
// continue;
|
||||
// }
|
||||
// Collection<Material> materials = model.getMaterials(cacheCopy::get, strings);
|
||||
// if (materials == null) {
|
||||
// continue;
|
||||
// }
|
||||
// for (Material material : materials) {
|
||||
// if (EmissiveTextureInfo.isEmissiveTexture(material.texture())) {
|
||||
// addBlock = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (addBlock) {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (addBlock) {
|
||||
// EmissiveTextureInfo.addBlock(blockID);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
package org.betterx.bclib.client.render;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class EmissiveTextureInfo {
|
||||
private static final Set<ResourceLocation> EMISSIVE_TEXTURES = Sets.newHashSet();
|
||||
private static final Set<ResourceLocation> EMISSIVE_BLOCKS = Sets.newHashSet();
|
||||
|
||||
public static void clear() {
|
||||
EMISSIVE_TEXTURES.clear();
|
||||
EMISSIVE_BLOCKS.clear();
|
||||
}
|
||||
|
||||
public static void addTexture(ResourceLocation texture) {
|
||||
EMISSIVE_TEXTURES.add(texture);
|
||||
}
|
||||
|
||||
public static void addBlock(ResourceLocation blockID) {
|
||||
EMISSIVE_BLOCKS.add(blockID);
|
||||
}
|
||||
|
||||
public static boolean isEmissiveTexture(ResourceLocation texture) {
|
||||
return EMISSIVE_TEXTURES.contains(texture);
|
||||
}
|
||||
|
||||
public static boolean isEmissiveBlock(ResourceLocation blockID) {
|
||||
return EMISSIVE_BLOCKS.contains(blockID);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue