Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Apr 29, 2024
1 parent f099942 commit 7842885
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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())
Expand Down
35 changes: 14 additions & 21 deletions src/main/java/reobf/proghatches/main/MyMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());




Expand Down

0 comments on commit 7842885

Please sign in to comment.