Part models

This commit is contained in:
Sebastian Hartte
2020-06-09 00:53:40 +02:00
parent 4b11b8857b
commit 97e065ea1f
154 changed files with 578 additions and 839 deletions
@@ -314,7 +314,7 @@ public class CableBusBakedModel implements IBakedModel
// If a part sub-model has no particle texture (indicated by it being the missing texture),
// don't add it, so we don't get ugly missing texture break particles.
if( isMissingTexture(particleTexture) )
if( !isMissingTexture(particleTexture) )
{
result.add( particleTexture );
}
@@ -25,6 +25,7 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import appeng.core.AELog;
import com.google.common.collect.ImmutableMap;
import com.mojang.datafixers.util.Pair;
@@ -76,7 +77,12 @@ public class CableBusModel implements IModelGeometry<CableBusModel>
for( ResourceLocation location : this.partModels.getModels() )
{
result.put( location, bakery.getBakedModel( location, transformIn, spriteGetterIn ) );
IBakedModel bakedModel = bakery.getBakedModel(location, transformIn, spriteGetterIn);
if (bakedModel == null) {
AELog.warn("Failed to bake part model {}", location);
} else {
result.put(location, bakedModel);
}
}
return result.build();
@@ -62,12 +62,12 @@ public class QuadRotator
CachedFormat format = CachedFormat.lookup( DefaultVertexFormats.BLOCK );
BakedPipeline pipeline = pipelines.get();
Quad collector = collectors.get();
pipeline.reset( format );
collector.reset( format );
QuadMatrixTransformer transformer = pipeline.getElement( "transformer", QuadMatrixTransformer.class );
for( BakedQuad quad : quads )
{
pipeline.reset( format );
collector.reset( format );
transformer.setMatrix( rotation.getMat() );
pipeline.prepare( collector );
quad.pipe( pipeline );