UVLightMap loader now works again (needs another pass).
This commit is contained in:
@@ -194,6 +194,7 @@ public final class AppEng
|
||||
addBuiltInModel("paint_splotches", PaintSplotchesModel::new);
|
||||
addBuiltInModel("quantum_bridge_formed", QnbFormedModel::new);
|
||||
ModelLoaderRegistry.registerLoader(new ResourceLocation(AppEng.MOD_ID, "crafting_cube"), CraftingCubeModelLoader.INSTANCE);
|
||||
ModelLoaderRegistry.registerLoader(new ResourceLocation(AppEng.MOD_ID, "uvlightmap"), UVLModelLoader.INSTANCE);
|
||||
}
|
||||
|
||||
private static <T extends IModelGeometry<T>> void addBuiltInModel(String id, Supplier<T> modelFactory) {
|
||||
|
||||
@@ -19,17 +19,12 @@
|
||||
package appeng.core;
|
||||
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IBlocks;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
import appeng.api.definitions.IItems;
|
||||
import appeng.api.definitions.IMaterials;
|
||||
|
||||
|
||||
public final class CreativeTab
|
||||
@@ -43,36 +38,12 @@ public final class CreativeTab
|
||||
|
||||
@Override
|
||||
public ItemStack createIcon()
|
||||
{
|
||||
return this.getIconItemStack();
|
||||
}
|
||||
|
||||
private ItemStack getIconItemStack()
|
||||
{
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IBlocks blocks = definitions.blocks();
|
||||
final IItems items = definitions.items();
|
||||
final IMaterials materials = definitions.materials();
|
||||
|
||||
return findFirst(blocks.quartzOre());
|
||||
|
||||
// FIXME return this.findFirst( blocks.controller(), blocks.chest(), blocks.cellWorkbench(), blocks.fluixBlock(), items.cell1k(), items.networkTool(),
|
||||
// FIXME materials.fluixCrystal(), materials.certusQuartzCrystal(), materials.skyDust() );
|
||||
return blocks.controller().stack(1);
|
||||
}
|
||||
|
||||
private ItemStack findFirst( final IItemDefinition... choices )
|
||||
{
|
||||
for( final IItemDefinition definition : choices )
|
||||
{
|
||||
Optional<ItemStack> maybeIs = definition.maybeStack( 1 );
|
||||
if( maybeIs.isPresent() )
|
||||
{
|
||||
return maybeIs.get();
|
||||
}
|
||||
}
|
||||
|
||||
return new ItemStack( net.minecraft.block.Blocks.CHEST );
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -179,6 +179,13 @@ public final class ApiBlocks implements IBlocks
|
||||
.build();
|
||||
this.quartzOreCharged = registry.block( "charged_quartz_ore", () -> new BlockChargedQuartzOre(QUARTZ_PROPERTIES) )
|
||||
.features( AEFeature.CERTUS_ORE, AEFeature.CHARGED_CERTUS_ORE )
|
||||
.rendering(new BlockRenderingCustomizer() {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(IBlockRendering rendering, IItemRendering itemRendering) {
|
||||
rendering.renderType(RenderType.getCutout());
|
||||
}
|
||||
})
|
||||
.build();
|
||||
this.matrixFrame = registry.block( "matrix_frame", BlockMatrixFrame::new )
|
||||
.features( AEFeature.SPATIAL_IO )
|
||||
|
||||
Reference in New Issue
Block a user