Skip to content

Commit

Permalink
chore: update to latest modonomicon
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jan 21, 2024
1 parent bec5c2b commit cc9c29e
Show file tree
Hide file tree
Showing 16 changed files with 1,012 additions and 1,492 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ smartbrainlib_version=1.13
smartbrainlib_version_range=[1.13,)
almost_unified_version=0.5.0
almost_unified_version_range=[0.5.0,)
modonomicon_version=1.54.4
modonomicon_version=1.56.0
modonomicon_version_range=[1.52.0,)
theurgy_version=1.13.0
theurgy_version_range=[1.11.0,)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"entry_textures": "modonomicon:textures/gui/entry_textures.png",
"icon": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"entry_textures": "modonomicon:textures/gui/entry_textures.png",
"icon": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"entry_textures": "modonomicon:textures/gui/entry_textures.png",
"icon": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"condition": {
"type": "modonomicon:entry_read",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"entry_textures": "modonomicon:textures/gui/entry_textures.png",
"icon": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"condition": {
"type": "modonomicon:entry_read",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"entry_textures": "modonomicon:textures/gui/entry_textures.png",
"icon": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"condition": {
"type": "modonomicon:entry_read",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"background": "modonomicon:textures/gui/dark_slate_seamless.png",
"background_height": 512,
"background_parallax_layers": [],
"background_texture_zoom_multiplier": 1.0,
"background_width": 512,
"entry_textures": "modonomicon:textures/gui/entry_textures.png",
"icon": {
Expand Down
1,991 changes: 814 additions & 1,177 deletions src/main/java/com/klikli_dev/occultism/datagen/OccultismBookProvider.java

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public DemonicPartnerEntry(CategoryProvider parent) {
protected void generatePages() {


this.page("description", () -> BookTextPageModel.builder()
this.page("description", () -> BookTextPageModel.create()
.withTitle(this.context().pageTitle())
.withText(this.context().pageText())
.build());
);
this.pageTitle("Demonic Partner");
this.pageText("""
Magicians practicing the occult are a diverse crowd, coming from all creeds and all corners of the world. However one thing unites them all - they are as lonely as any human without a partner.
Expand All @@ -35,29 +35,29 @@ protected void generatePages() {
Of course being a magician, there is a way to solve this problem once and for all.
""");

this.page("description2", () -> BookTextPageModel.builder()
this.page("description2", () -> BookTextPageModel.create()
.withTitle(this.context().pageTitle())
.withText(this.context().pageText())
.build());
);
this.pageTitle("Demonic Partner");
this.pageText("""
As beings of immense powers Demons can have it all ... except love.\\
No demon will freely admit this, but at times they are impressed by the power and strength that some mortal occultists acquire. And in such cases, the impossible can happen - the demon can fall in love with a mortal.
""");

this.page("description3", () -> BookTextPageModel.builder()
this.page("description3", () -> BookTextPageModel.create()
.withTitle(this.context().pageTitle())
.withText(this.context().pageText())
.build());
);
this.pageTitle("Demonic Partner");
this.pageText("""
Demons, of course, deal in contracts, and what better contract than a marriage contract?
""");

this.page("about", () -> BookTextPageModel.builder()
this.page("about", () -> BookTextPageModel.create()
.withTitle(this.context().pageTitle())
.withText(this.context().pageText())
.build());
);
this.pageTitle("Demonic Partner");
this.pageText("""
The Demonic Partner - a Husband or Wife - can fight for you and help with household chores.
Expand All @@ -69,44 +69,40 @@ protected void generatePages() {
Right-Click with a potion to get the effect for a significantly longer time.
""");

this.page("familiar", () -> BookTextPageModel.builder()
this.page("familiar", () -> BookTextPageModel.create()
.withTitle(this.context().pageTitle())
.withText(this.context().pageText())
.build());
);
this.pageTitle("Not a Familiar");
this.pageText("""
The Demonic Partner Chapter is part of the Familiar Category of this book because of the similarities, however a Partner is obviously not a familiar.
\\
\\
As such, they also cannot be stored in a {0}. You can, however, use a {1} as for any other being.
""",
The Demonic Partner Chapter is part of the Familiar Category of this book because of the similarities, however a Partner is obviously not a familiar.
\\
\\
As such, they also cannot be stored in a {0}. You can, however, use a {1} as for any other being.
""",
this.itemLink(OccultismItems.FAMILIAR_RING.get()),
this.itemLink(OccultismItems.SOUL_GEM_ITEM.get())
);

this.page("wife", () -> BookEntityPageModel.builder()
this.page("wife", () -> BookEntityPageModel.create()
.withEntityId("occultism:demonic_wife")
.withEntityName(this.context().pageTitle())
.build()
);
this.pageTitle("Demonic Wife");


this.page("ritual1", () -> BookRitualRecipePageModel.builder()
this.page("ritual1", () -> BookRitualRecipePageModel.create()
.withRecipeId1(this.modLoc("ritual/summon_demonic_wife"))
.build()
);

this.page("husband", () -> BookEntityPageModel.builder()
this.page("husband", () -> BookEntityPageModel.create()
.withEntityId("occultism:demonic_husband")
.withEntityName(this.context().pageTitle())
.build()
);
this.pageTitle("Demonic Husband");

this.page("ritual2", () -> BookRitualRecipePageModel.builder()
this.page("ritual2", () -> BookRitualRecipePageModel.create()
.withRecipeId1(this.modLoc("ritual/summon_demonic_husband"))
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,34 @@
import com.klikli_dev.occultism.integration.modonomicon.OccultismModonomiconConstants;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.NotNull;

public class BookRitualRecipePageModel extends BookRecipePageModel {
protected BookRitualRecipePageModel(@NotNull String anchor) {
super(OccultismModonomiconConstants.Page.RITUAL_RECIPE, anchor);
public class BookRitualRecipePageModel extends BookRecipePageModel<BookRitualRecipePageModel> {
protected BookRitualRecipePageModel() {
super(OccultismModonomiconConstants.Page.RITUAL_RECIPE);
}

public static Builder builder() {
return new Builder();
public static BookRitualRecipePageModel create() {
return new BookRitualRecipePageModel();
}

public static class Builder extends BookRecipePageModel.Builder<Builder> {
protected Builder() {
super();
}

public BookRitualRecipePageModel build() {
var model = new BookRitualRecipePageModel(this.anchor);
model.title1 = this.title1;
model.recipeId1 = this.recipeId1;
model.title2 = this.title2;
model.recipeId2 = this.recipeId2;
model.text = this.text;
return model;
}

@Override
public Builder withTitle2(String title) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}

@Override
public Builder withTitle2(Component title) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}
@Override
public BookRitualRecipePageModel withTitle2(String title) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}

@Override
public Builder withRecipeId2(String recipeId) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}
@Override
public BookRitualRecipePageModel withTitle2(Component title) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}

@Override
public Builder withRecipeId2(ResourceLocation recipeId) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}
@Override
public BookRitualRecipePageModel withRecipeId2(String recipeId) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}

@Override
public Builder getThis() {
return this;
}
@Override
public BookRitualRecipePageModel withRecipeId2(ResourceLocation recipeId) {
throw new RuntimeException("Ritual recipe pages do not support a second recipe!");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,13 @@

import com.klikli_dev.modonomicon.api.datagen.book.page.BookRecipePageModel;
import com.klikli_dev.occultism.integration.modonomicon.OccultismModonomiconConstants;
import org.jetbrains.annotations.NotNull;

public class BookSpiritFireRecipePageModel extends BookRecipePageModel {
protected BookSpiritFireRecipePageModel(@NotNull String anchor) {
super(OccultismModonomiconConstants.Page.SPIRIT_FIRE_RECIPE, anchor);
public class BookSpiritFireRecipePageModel extends BookRecipePageModel<BookSpiritFireRecipePageModel> {
protected BookSpiritFireRecipePageModel() {
super(OccultismModonomiconConstants.Page.SPIRIT_FIRE_RECIPE);
}

public static Builder builder() {
return new Builder();
}

public static class Builder extends BookRecipePageModel.Builder<Builder> {
protected Builder() {
super();
}

public BookSpiritFireRecipePageModel build() {
var model = new BookSpiritFireRecipePageModel(this.anchor);
model.title1 = this.title1;
model.recipeId1 = this.recipeId1;
model.title2 = this.title2;
model.recipeId2 = this.recipeId2;
model.text = this.text;
return model;
}

@Override
public Builder getThis() {
return this;
}
public static BookSpiritFireRecipePageModel create() {
return new BookSpiritFireRecipePageModel();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,13 @@
import com.klikli_dev.occultism.integration.modonomicon.OccultismModonomiconConstants;
import org.jetbrains.annotations.NotNull;

public class BookSpiritTradeRecipePageModel extends BookRecipePageModel {
protected BookSpiritTradeRecipePageModel(@NotNull String anchor) {
super(OccultismModonomiconConstants.Page.SPIRIT_TRADE_RECIPE, anchor);
public class BookSpiritTradeRecipePageModel extends BookRecipePageModel<BookSpiritTradeRecipePageModel> {
protected BookSpiritTradeRecipePageModel() {
super(OccultismModonomiconConstants.Page.SPIRIT_TRADE_RECIPE);
}

public static Builder builder() {
return new Builder();
public static BookSpiritTradeRecipePageModel create() {
return new BookSpiritTradeRecipePageModel();
}

public static class Builder extends BookRecipePageModel.Builder<Builder> {
protected Builder() {
super();
}

public BookSpiritTradeRecipePageModel build() {
var model = new BookSpiritTradeRecipePageModel(this.anchor);
model.title1 = this.title1;
model.recipeId1 = this.recipeId1;
model.title2 = this.title2;
model.recipeId2 = this.recipeId2;
model.text = this.text;
return model;
}

@Override
public Builder getThis() {
return this;
}
}
}

0 comments on commit cc9c29e

Please sign in to comment.