From cba6c5500f97975cd8387b632f47a39f762a2fb1 Mon Sep 17 00:00:00 2001 From: yueh Date: Mon, 16 Oct 2017 21:41:44 +0200 Subject: [PATCH] Fixes inscriber crash with name presses. --- .../java/appeng/tile/misc/TileInscriber.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/appeng/tile/misc/TileInscriber.java b/src/main/java/appeng/tile/misc/TileInscriber.java index 3f8925da..ee754414 100644 --- a/src/main/java/appeng/tile/misc/TileInscriber.java +++ b/src/main/java/appeng/tile/misc/TileInscriber.java @@ -346,12 +346,19 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable, final InscriberProcessType type = InscriberProcessType.INSCRIBE; final IInscriberRecipeBuilder builder = AEApi.instance().registries().inscriber().builder(); - return builder.withInputs( inputs ) - .withOutput( renamedItem ) - .withTopOptional( plateA ) - .withBottomOptional( plateB ) - .withProcessType( type ) - .build(); + builder.withInputs( inputs ).withOutput( renamedItem ).withProcessType( type ); + + if( isNameA ) + { + builder.withTopOptional( plateA ); + } + + if( isNameB ) + { + builder.withBottomOptional( plateB ); + } + + return builder.build(); } }