public QnbFormedBakedModel( VertexFormat vertexFormat, IBakedModel baseModel, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter ) { this.vertexFormat = vertexFormat; this.baseModel = baseModel; this.linkTexture = bakedTextureGetter.apply( TEXTURE_LINK ); this.ringTexture = bakedTextureGetter.apply( TEXTURE_RING ); this.glassCableTexture = bakedTextureGetter.apply( TEXTURE_CABLE_GLASS ); this.coveredCableTexture = bakedTextureGetter.apply( TEXTURE_COVERED_CABLE ); this.lightTexture = bakedTextureGetter.apply( TEXTURE_RING_LIGHT ); this.lightCornerTexture = bakedTextureGetter.apply( TEXTURE_RING_LIGHT_CORNER ); this.linkBlock = AEApi.instance().definitions().blocks().quantumLink().maybeBlock().orElse( null ); }
private boolean isCenter() { return AEApi.instance() .definitions() .blocks() .quantumLink() .maybeBlock() .map( link -> this.getBlockType() == link ) .orElse( false ); }
public TileIOPort() { this.getProxy().setFlags( GridFlags.REQUIRE_CHANNEL ); this.manager = new ConfigManager( this ); this.manager.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE ); this.manager.registerSetting( Settings.FULLNESS_MODE, FullnessMode.EMPTY ); this.manager.registerSetting( Settings.OPERATION_MODE, OperationMode.EMPTY ); this.mySrc = new MachineSource( this ); this.lastRedstoneState = YesNo.UNDECIDED; final Block ioPortBlock = AEApi.instance().definitions().blocks().iOPort().maybeBlock().get(); this.upgrades = new BlockUpgradeInventory( ioPortBlock, this, NUMBER_OF_UPGRADE_SLOTS ); }
if( whatsThere.isReplaceable( w, hitPos ) && w.isAirBlock( hitPos ) ) AEApi.instance().definitions().blocks().paint().maybeBlock().ifPresent( paintBlock ->
private void registerInfusionRecipes() { ThEApi.instance().blocks().infusionProvider().maybeStack(1).ifPresent(stack -> ThaumcraftApi.addInfusionCraftingRecipe(new ResourceLocation(ModGlobals.MOD_ID, "infusion_provider"), new InfusionRecipe( "INFUSIONPROVIDER", stack, 2, new AspectList().add(Aspect.MECHANISM, 25).add(Aspect.MAGIC, 25).add(Aspect.EXCHANGE, 20), AEApi.instance().definitions().blocks().iface().maybeBlock().orElseThrow(() -> new NullPointerException("Missing interface block for recipe")), ThEApi.instance().items().coalescenceCore().maybeStack(1).orElse(ItemStack.EMPTY), ItemsTC.salisMundus, ThEApi.instance().items().coalescenceCore().maybeStack(1).orElse(ItemStack.EMPTY), ItemsTC.salisMundus ))); }
boolean isDeprecated = false; if (BlockEnum.ECBASEBLOCK.getItem().getUnlocalizedName().equalsIgnoreCase(name)) { ae2Name = Api.INSTANCE.definitions().blocks().fluidIface().maybeBlock().get().getLocalizedName(); isDeprecated = true; } else if (PartEnum.INTERFACE.getUnlocalizedName().equalsIgnoreCase(name)) {