diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java b/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java index 9ce618b..e31e1fa 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java @@ -546,7 +546,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot() }; // final IDrawable[] special = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME }; sc.widget( - SlotGroup.ofItemHandler(inventoryHandler, 4) + SlotGroup.ofItemHandler(inventoryHandler, 5) .startFromSlot(0) .endAtSlot(this.getSizeInventory()-1) @@ -555,14 +555,14 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { ); - builder.widget(sc.setPos(3+4, 3+8).setSize(18*4, 18*2)); + builder.widget(sc.setPos(3+4, 3+8).setSize(18*5, 18*2)); sc = new Scrollable().setVerticalScroll(); final IDrawable[] background0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot() }; // final IDrawable[] special0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME }; sc.widget( - SlotGroup.ofFluidTanks(Arrays.asList(fluidTanks), 3) + SlotGroup.ofFluidTanks(Arrays.asList(fluidTanks), 2) .startFromSlot(0) .endAtSlot(fluidTanks.length-1) @@ -573,7 +573,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { ); - builder.widget(sc .setPos(3+18*4+4, 3+8).setSize(18, 18*4)); + builder.widget(sc .setPos(3+18*5+4, 3+8).setSize(18*2, 18*4)); /* builder.widget( TextWidget.dynamicString(()->getInventoryName()) diff --git a/src/main/java/reobf/proghatches/main/MyMod.java b/src/main/java/reobf/proghatches/main/MyMod.java index 76b1f59..b376e37 100644 --- a/src/main/java/reobf/proghatches/main/MyMod.java +++ b/src/main/java/reobf/proghatches/main/MyMod.java @@ -184,31 +184,24 @@ public void overrideTutorialBookClickBehaviour(PlayerInteractEvent ev){ @SubscribeEvent public void giveBook(PlayerLoggedInEvent e) { - if(e.player.getEntityData().hasKey("ProgrammableHatchesTutorialGet1")==false) + if(e.player.getEntityData().hasKey("ProgrammableHatchesTutorialGet3")==false) { e.player.getEntityData() - .setBoolean("ProgrammableHatchesTutorialGet1", true); + .setBoolean("ProgrammableHatchesTutorialGet3", true); - e.player.getEntityWorld() - .spawnEntityInWorld( - new EntityItem(e.player.getEntityWorld(), e.player.posX, e.player.posY, e.player.posZ - - , - Optional.of(tutorial()) - .map(s->{s.stackTagCompound.setString("proghatchesSpecialTag", "true"); return s;}) - .get() - - )); - e.player.getEntityWorld() - .spawnEntityInWorld( - new EntityItem(e.player.getEntityWorld(), e.player.posX, e.player.posY, e.player.posZ - - , - Optional.of(tutorial("programmable_hatches.eucreafting.tutorial")) + + + EntityItem entityitem = e.player.dropPlayerItemWithRandomChoice( Optional.of(tutorial("programmable_hatches.eucreafting.tutorial")) .map(s->{s.stackTagCompound.setString("proghatchesSpecialTag", "true"); return s;}) - .get() - - )); + .get(), false); + entityitem.delayBeforeCanPickup = 0; + entityitem.func_145797_a(e.player.getCommandSenderName()); + entityitem = e.player.dropPlayerItemWithRandomChoice( Optional.of(tutorial()) + .map(s->{s.stackTagCompound.setString("proghatchesSpecialTag", "true"); return s;}) + .get(), false); + entityitem.delayBeforeCanPickup = 0; + entityitem.func_145797_a(e.player.getCommandSenderName()); +