Giter Site home page Giter Site logo

vazkiimods / patchouli Goto Github PK

View Code? Open in Web Editor NEW
295.0 12.0 117.0 8.15 MB

Accessible, Data-Driven, Dependency-Free Documentation for Minecraft Modders and Pack Makers

Home Page: https://vazkiimods.github.io/Patchouli/

License: Other

Java 97.11% JavaScript 1.34% CSS 0.29% Shell 1.27%

patchouli's Introduction

Patchouli

Accessible, Data-Driven, Dependency-Free Documentation for Minecraft Modders and Pack Makers

For more information, see the docs.

What does the mod's name mean???1

https://en.touhouwiki.net/wiki/Patchouli_Knowledge

Maven info

Maven artifacts are located here, each folder representing a version.

Note: As of 1.16, intermediate (non-release) Maven builds are no longer persisted. That is, you must either depend on a released version of Patchouli, e.g. 1.16-37 or 1.16-37-FABRIC, or specifically opt in to the bleeding-edge build of the next version. For example, 1.16-38-SNAPSHOT or 1.16-38-FABRIC-SNAPSHOT would be the current bleeding edge version of future version 1.16-38.

Note that -SNAPSHOT versions can be broken from time to time, and you are strongly discouraged from using them unless you are helping dogfood, test, or contribute to Patchouli. They may also be pruned from time to time to save disk space on the server. Do not rely on -SNAPSHOT versions for anything important!

In Fabric, add the following to your build.gradle

repositories {
    maven { url 'https://maven.blamejared.com' }
}

dependencies {
    modImplementation "vazkii.patchouli:Patchouli:[VERSION]"
}

In Forge, use the following:

repositories {
    maven { url 'https://maven.blamejared.com' }
}

dependencies {
    compileOnly fg.deobf("vazkii.patchouli:Patchouli:[VERSION]:api")
    runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:[VERSION]")
}

Note: Any code not located in the package vazkii.patchouli.api is strictly implementation detail, and you should not rely on it as it will change without warning.

Mixin Troubleshooting (Forge only)

Patchouli uses Mixin to implement some of its features. On Forge, the game might crash when trying to launch in-dev, as ForgeGradle does not remap the refmap by itself. This can be worked around by specifying the refmap remapping manually: add these lines to your build.gradle and regenerate your run configurations in the IDE afterwards. MixinGradle applies this fix automatically - if you are using Mixin in your project you shouldn't have to change anything.

License Information

Patchouli's original code and assets are licensed under the CC-BY-NC-SA 3.0 Unported license. We recognize that this is not ideal, and are open to changing the licensing of the code in the future.

Please note that this mod uses official Mojang mappings (Mojmap). If you depend on Patchouli as normal, or only consume Patchouli's API, there should be no licensing concerns, as the mod is remapped to Intermediary (or SRG, for Forge) on compile.

There is a license concern, however, if you bundle Patchouli with your mod using Jar-in-Jar. Building a mod which uses Mixin inserts a refmap, which for Patchouli will contain raw Mojang mappings in a JSON file. If this presents a licensing problem to you, then do not bundle Patchouli and just depend on it externally. I recommend using normal dependencies either way, as Jar-in-Jar inflates your archive sizes to store a mod that will probably be in most modpacks anyways.

Developer Info

Repository Layout

From 1.18 onwards, Patchouli is developed with Fabric and Forge in the same branch of the same repository. This is a boon for productivity as most code can be shared without tedious merging of commits back and forth between branches. All code uses Mojang mappings (MojMap).

This scheme is based on the Multi-Loader Template created by @jaredlll08 and @Darkhax. Many thanks to them!

How it works is we have three Gradle subprojects: Xplat, Forge, and Fabric. Xplat contains code that is loader-agnostic. In the IDE, we set up this subproject using Sponge's VanillaGradle plugin, which sets up a basic Mojmap-mapped game JAR to aid in auto-complete, etc. while coding. However, this subproject is not actually compiled on its own.

Instead, the loader-specific subprojects Forge and Fabric include the source of Xplat into their own sources when compiling. The loader-specific subprojects use the native loader's tools (ForgeGradle and Loom, respectively), so in nearly all respects this is the same as copying and pasting the Xplat code into the loader-specific subproject.

If a loader needs to be temporarily disabled, simply comment it out in settings.gradle.

Making a Release

  1. Pull from remote, test all changes, and commit everything.
  2. git tag -a release-<VERSION>. All Patchouli versions must follow the version format <MC-VER>-INT, so it'll probably look like git tag -a release-1.17.1-55. You can check which number is the next one by looking at gradle.properties.
  3. In the Git editor that pops up, write the changelog. Finish the tag process (usually by saving and closing the editor).
  4. Increment the build number in gradle.properties of the next release. Commit this separately.
  5. Push the branch and tag: git push origin <branch> <tag>
  6. Wait a bit and the binaries should magically be published to GitHub, CurseForge, and Modrinth for you

Signing

Releases starting from 1.19.4-79 are signed with the Violet Moon signing key, see this page for information about how to verify the artifacts.

patchouli's People

Contributors

3tusk avatar aegide avatar alcatrazescapee avatar alwinfy avatar artemissystem avatar blackshadow77 avatar chirivulpes avatar codetaylor avatar daomephsta avatar drullkus avatar emilyploszaj avatar gamma-delta avatar hubry avatar ipopstop avatar ititus avatar jaredlll08 avatar leobeliik avatar minecraftschurli avatar mrbysco avatar panszelescik avatar primetoxinz avatar shnupbups avatar stanhebben avatar therealwormbo avatar tterrag1098 avatar vazkii avatar vexatos avatar williewillus avatar zabi94 avatar zeedif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patchouli's Issues

The book fails to open when loading a world where the last viewed entry is locked

Steps to reproduce:

  1. Get a book in a world. Unlock a page. Open the page.
  2. Make another world and get the same book. Upon right click, it will make only the page turn noise, and not do anything else.

Note: This issue was originally about the book opening to the same page across worlds, but after looking into it it became apparent that was intentional.

Original issue text:

Steps to reproduce:

  1. Get a book in a world. Go to any page.
  2. Make another world and get the same book. Upon right click, it will attempt to open to the same page.

This causes the book to not be openable at all if the page you were on in the previous world is locked by advancement in the second world. It just makes the page turn sound and does nothing.

Book in non-English language fails to fallback to English version when missing translated version

Synopsis

If, for whatever reason(s), a translated book does not override a page of the English version, then that page will not be visible in that target language, and an error will be thrown.

Reproduction

  1. Environment is Forge 14.23.5.2772 and Patchouli 1.0-7.9, dev-env.
  2. assets/[modid]/patchouli_book/[book-name]/en_us/entries/preface/social.json:
{
  "name": "Talk to dev team",
  "icon": "minecraft:writable_book",
  "category": "preface",
  "pages": [
    {
      "type": "text",
      "text": "Lorem ipsum dora sit amet"
    }
  ]
}
  1. Do not put translated version of this page in any target language folders.
  2. Load the game with a non-English locale.
  3. See the following:
    image
  4. Checking the log, found the following:

debug.log excerpt

[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: java.lang.IllegalArgumentException: cuisine:patchouli_books/culinary_101/en_us/entries/preface/social.json does not exist.
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.BookContents.loadEntry(BookContents.java:191)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.BookContents.lambda$reload$1(BookContents.java:127)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at java.util.ArrayList.forEach(ArrayList.java:1249)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.BookContents.reload(BookContents.java:127)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.common.book.Book.reloadContents(Book.java:194)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.common.book.Book.reloadContentsAndExtensions(Book.java:182)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.gui.GuiBookLanding.actionPerformed(GuiBookLanding.java:187)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:494)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.gui.GuiBook.mouseClicked(GuiBook.java:244)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.gui.GuiBookLanding.mouseClicked(GuiBookLanding.java:157)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:611)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at vazkii.patchouli.client.book.gui.GuiBook.handleMouseInput(GuiBook.java:267)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1885)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.Minecraft.run(Minecraft.java:441)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.client.main.Main.main(Main.java:118)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at java.lang.reflect.Method.invoke(Method.java:498)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[11:10:15] [main/INFO] [STDERR]: [vazkii.patchouli.client.book.BookContents:reload:150]: 	at GradleStart.main(GradleStart.java:25)

Analysis

No analysis has been conducted yet.

Final words

According to the wiki page:

Note that creating an "en_us" folder means you're creating the "english" version of your book. The contents you put in the "en_us" folder are always the "main" ones loaded, so even if your book isn't meant to be natively in english, you need to put your main stuff there.

Any translators may create folders with their languages and override any files they wish. They're automatically loaded if the game language is changed. For translators: Please don't include in your folder anything you aren't overriding.

The current behavior seems to mismatch the expected behavior. Therefore, I consider this as a bug.

USER ERROR Problem with version and subtitle

I am having trouble getting the version and subtitle in my book.json working.
Here is my file

{
  "name":"ยงeRubber Duck Manual",
  "subtitle": "ยงlยง9The Compleatable Guide To Quackcraft",
  "landing_text": "LANDING TEXT",
  "version":"1.2",
  "book_texture": "quackcraft:guide/guide.png",
  "model":"quackcraft:guide",
  "text_color":"6a0000",
  "nameplate_color":"cc9900",
  "link_color":"3333cc",
  "link_hover_color":"3333ff",
  "proress_bar_color":"009933",
  "proress_bar_background":"336600",
  "open_sound":"quackcraft:squeak",
  "creative_tab":"quackcraft:quackcraft",
  "allow_extensions":true,
  "advancement_namespaces": [
    "patchouli","quackcraft"
  ],
  "advancements_tab": "quackcraft"

 
}

I am not entirely sure what I am doing wrong can I get some help?

Language not automatically change

I have book with en_us and pl_pl. I run game in English and I join to singleplayer world. Then I change language to Polish only informations from book.json (name, landing_text, subtitle) are changed but other no. After shift click editor button everything is OK.

Minecraft: 1.12.2
Forge: 2772
Patchouli: 1.0-6

[Feature Request] The ability to represent "other" crafting methods

Simple request. A way to add non-standard recipes to a book, an example of what I mean is how the Lexica Botania handles showing the Terrasteel recipe.

The main use case for this is if you've added a custom Terrestrial Agglomeration Plate recipe using CraftTweaker + Botania Tweaks, and you'd simply like to display the recipe in a visual manner, outside of JEI, rather than listing off all the items needed for the recipe. There's mostly likely a few other use cases for this if it were implemented.

Alternatively allowing us to display any items we wish in the crafting table page type could also work, as it'd still be a visual method of displaying the necessary items and the output.

Newly created book in a modpack doesn't open when clicked.

All the information is in the title. I followed the Getting Started page on the wiki after installing the mod, loaded up my single player world in a personal modpack and gave myself the new book. However, when I right click with the book, nothing happens except the hand movement.

My file structure is patchouli_books > bookname > en_us | book.json > categories | entries | templates

I wasn't able to find anything listed in the log other than things related to loading the mod, but I've included it just in case.

https://paste.ee/p/6AZDb

Thaumcraft Issue w/ Visualizing

2018-11-11_13 26 53
I had this issue when trying to visualize the tree altar.

Mods Installed:

Baubles
JEI
Nature's Aura
Patchouli
Thaumcraft
FORGE: 14.23.5.2772

Unsure if intended but recipe seems to use name of the recipe file

My recipe for an item didn't work even though i put the correct id in the recipe field, and i found that i wasn't supposed to put the id but the recipe file name instead (or both have to match). I changed the file name to match the id and it worked.

Sorry if this was in the wiki.

Multiblocks cannot show the End Portal texture

When creating a multiblock that includes the end portal 'block', said portal does not appear in the visualization. There doesn't seem to be any problem, however, in showing other portal 'blocks', such as are in Nether portals or portals to the Twilight Forest.

e.g.

{
	"name": "Test Page",
	"icon": "minecraft:stone",
	"category": "explorations",
	"pages": [
		{
			"type": "text",
			"text": "<insert content here>"
		},
		{
			"type": "multiblock",
			"name": "End Portal",
			"multiblock": {
				"pattern": [ [
					"  NNN  ",
					" WPPPE ",
					" WP0PE ",
					" WPPPE ",
					"  SSS  "
				] ],
				"mapping": {
					" ": "ANY",
					"0": "minecraft:end_portal",
					"P": "minecraft:end_portal",
					"N": "minecraft:end_portal_frame[eye=true,facing=south]",
					"S": "minecraft:end_portal_frame[eye=true,facing=north]",
					"E": "minecraft:end_portal_frame[eye=true,facing=west]",
					"W": "minecraft:end_portal_frame[eye=true,facing=east]"
				},
				"symmetrical": true
    		},
			"enable_visualize": false
		}
	]
}

Version Affected: 1.0-10

UI size option doesn't seem to be working

The UI Scale option when the game starts is "default". Clicking it once switches it to "medium" without changing anything, further clicks have no effect. Tested on both a custom book and a default test book.

I was running code from ec82535, but it had the same problem with the maven jar 1.0-7.9.
Run in Eclipse under Ubuntu.

Structure visualisation rotates around the centre in the opposite direction as the player

My structure is the following (modded items have been replaced with vanilla items for demonstration):

"mapping": {
	"O": "minecraft:obsidian",
	"E": "minecraft:iron_block",
	"B": "minecraft:iron_bars",
	"C": "minecraft:hopper",
	"0": "minecraft:crafting_table"
},
"pattern": [
	[ "E   E ", "      ", "      ", "      ", "E   E " ],
	[ "OB BO ", "B   B ", "      ", "B   B ", "OB BO " ],
	[ "OBBBO ", "BCCCB ", "BCCCB0", "BCCCB ", "OBBBO " ]
]

When visualising the structure, I expect it to always face the same direction I'm facing, but this isn't what happens. When I face north & south, it's correct, but when I face east & west, the structure is inside myself.

image

Watching the rotations of myself and the structure shows that the problem is that I'm rotating clockwise, but it's rotating anticlockwise. I'm not sure if the anticlockwise rotation in the visualisation would ever be helpful, but if it would, maybe this would be better as an option than simply changing permanently.

Support tooltips for any(?) component in a template

We currently have support for adding image components. I have an image component that's an icon that shows based on a variable given to my template. I unfortunately can't add a tooltip to them so players can see what the icon means.

It seems as though it would make sense to just support a "tooltip" property in every component, similar to "x", "y", etc. This would allow us to add tooltips to little bits of text as well.

If it's not realistic to support tooltips on everything, image components and text components would be the most helpful to have.

Text page can't handle text written in scripto continua (i.e. text without whitespace as word divider)

Synopsis

Text page can't handle scriptio continua. That said, given a entry with a single text page, if the content of that text page does not use whitespace as word divider, the page will not be able to wrap line when necessary.

Reproduction

  1. Environment is Forge 14.23.5.2772 & Patchouli 1.0-7.9.
  2. assets/[modid]/patchouli_books/[book_name]/en_us/entries/preface/preface.json - the page used for comparison:
{
  "name": "Preface",
  "icon": "minecraft:knowledge_book",
  "category": "preface",
  "pages": [
    {
      "type": "text",
      "text": "Cuisine is a Minecraft Mod about cuisine, and to a certain extent, gastronomy. In this mod, you can cook food in a realistic-esque manner. Think about how would you prepare food in your kitchen - this is what this Mod provides."
    }
  ]
}
  1. assets/[modid]/patchouli_books/[book_name]/zh_cn/entries/preface/preface.json - the translated version of the page mentioned above; it is also the page in question:
{
  "name": "ๅบ",
  "icon": "minecraft:knowledge_book",
  "category": "preface",
  "pages": [
    {
      "type": "text",
      "text": "Cuisine ๆ˜ฏไธ€ไธชๅ…ณไบŽ็ƒน้ฅชๅŠ๏ผˆๅœจๆŸ็งๆ„ไน‰ไธŠ๏ผ‰็พŽ้ฃŸๅญฆ็š„ Minecraft Modใ€‚่ฟ™ไธช Mod ๅฎž็Žฐไบ†ไธ€ๅฅ—็›ธๅฏนๅ†™ๅฎž็š„็ƒน้ฅช็Žฉๆณ•ใ€‚ๆƒณๆƒณ็œ‹ๅนณๆ—ถไฝ ๅœจๅŽจๆˆฟๆ˜ฏๆ€Žไนˆๅš่œ็š„โ€”โ€”่ฟ™ๅฐฑๆ˜ฏ่ฟ™ไธช Mod ๆไพ›็š„ๅ†…ๅฎนไบ†ใ€‚"
    }
  ]
}
  1. Adjust the json if necessary (category, ...). Set language to zh_cn (Simplified Chinese) and restart the game to reload the book. Should be able to see the following:

image

  1. As comparison, the expected behavior will look like the following (screenshot taken in English (US) locale):

image

where all text are correctly wrapped to new line, and everything is fitted into the page on the left.

Analysis

BookTextParser::parse seems to "wrap" the content string based on occurrence of whitespace:
https://github.com/Vazkii/Patchouli/blob/028953b044fbae5a31ea0ac2f5632aaa5b0f463c/src/main/java/vazkii/patchouli/client/book/text/BookTextParser.java#L169-L173
The assumption that text uses whitespace as word divider may not be true for scripts in some languages (specifically speaking, Chinese (both zh_cn and zh_tw) and Japanese (ja_jp), if only languages supported by Vanilla Minecraft are considered).

Final words

Give the complexity of BookTextParser, I am not sure how complex will a proper fix look like, but I am willing to open a Pull Request if PR is welcome.

Using Templates wiki page implies variable names can be existing page keys

* Try the edited look ingame, and you'll see your template took the "text" value from your page and put it where "#text" was. This is how you load in variable values onto your template.
    * You can have as many variables as you want, so you could have two text components in different positions with either the same "#text" value (if you want them to say the same thing), or for example, "#upper_text" and "#lower_text".

Unable to load templates from extension book

Looking through the code it seems that when entries of an extension book are being loaded it sets their book to be the book that is being extended. Therefore when they try to acquire the template they look at the original book's contents.templates list:
https://github.com/Vazkii/Patchouli/blob/68cf2e4e62af951d233a8ee737fccb5e8c4e542c/src/main/java/vazkii/patchouli/client/book/template/BookTemplate.java#L63
https://github.com/Vazkii/Patchouli/blob/aa71ea8c6feb90acb0e1021437795dacd37535a3/src/main/java/vazkii/patchouli/client/book/BookEntry.java#L153-L158

Visualization not showing with botania installed

All visualizations from Nature's Aura do not show any blocks when Botania is installed.

Full modlist:
AutoRegLib 1.3-20
Baubles-1.12.2 1.5.2
Botania r1.10-357
Nature's Aura b1
Neat 1.4-17
Patchouli 1.0-6
Quark r1.5-130
Quark Oddities

Forge version: 14.23.5.2768

Removing Botania fixes the issue

Feature request: Button to swap the visualisation anchor from block face to block center

Description:
I have had a situation where I have completed most of a multiblock structure but had to abort visualisation due to not yet having the correct materials to complete the multiblock and desiring not to render it as I did other things. When resuming my task with the visualisation, as I had placed a block where the anchor is meant to be (which was part of the multiblock structure), I had to break that block in order to place the visualisation correctly.

Current behavior:
Visualisations always use the block face to place upon which can prevent the visualisation from being placeable in some situations

Desired behavior:
Have a toggle button somewhere in the render slide of the page for switching the anchor to block center instead of block face.

Expose `isMouseInRelativeRange` in `IComponentRenderContext`

Moved from discord discussion.

We have setHoverTooltip now but no easy way to check if the mouse is actually hovering.

To check that, it currently requires this kind of thing (which shouldn't be done anyway cause GuiBook is a non-api import):

    @Override
    public void onDisplayed (IComponentRenderContext context) {
        this.parent = (GuiBook) context.getGui();
    }

    @Override
    public void render (IComponentRenderContext context, float ticks, int mouseX, int mouseY) {
        if (parent.isMouseInRelativeRange(mouseX, mouseY, iconX, iconY, 11, 11)) {
            parent.setTooltip("text");
        }
    }

Entry Index shows the filler texture on filled page

image

Description
When content is being shown on the 3rd page of the Entry Index the cube texture is also still shown. I assume it's not supposed to behave like this.

If it is I would like to make the suggestion to remove it on pages where atleast 1 entry is on in the Entry Index.

BUG Crash When Opening Entry

When I clicked on one of my new entries I got this.
Below are my crash-repot and my json file.

{
  "name": "How To Use The Guide",
  "icon": "quackcraft:rubber_duck_cyan",
  "category": "category-info",
  "sortnum": 0,
  "priority":true,
  "pages": [
    {
      "type": "text",
      "title":"How To Use The Guide",
      "text": ""
    }



  ]
}


---- Minecraft Crash Report ----
// My bad.

Time: 11/14/18 4:05 PM
Description: Updating screen events

java.lang.NullPointerException: Updating screen events
	at vazkii.patchouli.client.book.gui.GuiBookEntry.isBookmarkedAlready(GuiBookEntry.java:156)
	at vazkii.patchouli.client.book.gui.GuiBookEntry.shouldAddAddBookmarkButton(GuiBookEntry.java:152)
	at vazkii.patchouli.client.book.gui.GuiBook.addBookmarkButtons(GuiBook.java:151)
	at vazkii.patchouli.client.book.gui.GuiBook.initGui(GuiBook.java:94)
	at vazkii.patchouli.client.book.gui.GuiBookEntry.initGui(GuiBookEntry.java:34)
	at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:543)
	at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:1097)
	at vazkii.patchouli.client.book.BookContents.openLexiconGui(BookContents.java:83)
	at vazkii.patchouli.client.book.gui.GuiBookEntry.displayOrBookmark(GuiBookEntry.java:195)
	at vazkii.patchouli.client.book.gui.GuiBookEntryList.actionPerformed(GuiBookEntryList.java:142)
	at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:494)
	at vazkii.patchouli.client.book.gui.GuiBook.mouseClicked(GuiBook.java:245)
	at vazkii.patchouli.client.book.gui.GuiBookEntryList.mouseClicked(GuiBookEntryList.java:114)
	at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:611)
	at vazkii.patchouli.client.book.gui.GuiBook.handleMouseInput(GuiBook.java:268)
	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1885)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187)
	at net.minecraft.client.Minecraft.run(Minecraft.java:441)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:25)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at vazkii.patchouli.client.book.gui.GuiBookEntry.isBookmarkedAlready(GuiBookEntry.java:156)
	at vazkii.patchouli.client.book.gui.GuiBookEntry.shouldAddAddBookmarkButton(GuiBookEntry.java:152)
	at vazkii.patchouli.client.book.gui.GuiBook.addBookmarkButtons(GuiBook.java:151)
	at vazkii.patchouli.client.book.gui.GuiBook.initGui(GuiBook.java:94)
	at vazkii.patchouli.client.book.gui.GuiBookEntry.initGui(GuiBookEntry.java:34)
	at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:543)
	at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:1097)
	at vazkii.patchouli.client.book.BookContents.openLexiconGui(BookContents.java:83)
	at vazkii.patchouli.client.book.gui.GuiBookEntry.displayOrBookmark(GuiBookEntry.java:195)
	at vazkii.patchouli.client.book.gui.GuiBookEntryList.actionPerformed(GuiBookEntryList.java:142)
	at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:494)
	at vazkii.patchouli.client.book.gui.GuiBook.mouseClicked(GuiBook.java:245)
	at vazkii.patchouli.client.book.gui.GuiBookEntryList.mouseClicked(GuiBookEntryList.java:114)
	at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:611)
	at vazkii.patchouli.client.book.gui.GuiBook.handleMouseInput(GuiBook.java:268)
	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)

-- Affected screen --
Details:
	Screen name: vazkii.patchouli.client.book.gui.GuiBookEntry

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Otis_Goodman'/52, l='MpServer', x=1138.50, y=13.60, z=113.95]]
	Chunk stats: MultiplayerChunkCache: 625, 625
	Level seed: 0
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (1221,4,137), Chunk: (at 5,0,9 in 76,8; contains blocks 1216,0,128 to 1231,255,143), Region: (2,0; contains chunks 64,0 to 95,31, blocks 1024,0,0 to 1535,255,511)
	Level time: 210353 game time, 1000 day time
	Level dimension: 0
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
	Forced entities: 16 total; [EntityChicken['Chicken'/0, l='MpServer', x=1079.15, y=4.00, z=180.27], EntityDuck['Duck'/1, l='MpServer', x=1094.86, y=4.00, z=110.33], EntityDuck['Duck'/2, l='MpServer', x=1108.73, y=4.00, z=137.05], EntityItemFrame['entity.ItemFrame.name'/3, l='MpServer', x=1121.50, y=9.50, z=167.03], EntityItemFrame['entity.ItemFrame.name'/4, l='MpServer', x=1121.50, y=8.50, z=167.97], EntityVillager['Villager'/5, l='MpServer', x=1147.30, y=7.00, z=139.70], EntityDuck['Duck'/6, l='MpServer', x=1139.91, y=4.00, z=150.68], EntityChicken['Chicken'/8, l='MpServer', x=1164.89, y=4.00, z=49.60], EntityDuck['Duck'/10, l='MpServer', x=1158.47, y=15.00, z=139.35], EntityDuck['Duck'/11, l='MpServer', x=1164.88, y=5.00, z=145.48], EntityVillager['Villager'/12, l='MpServer', x=1154.16, y=4.00, z=141.36], EntityChicken['Chicken'/15, l='MpServer', x=1169.63, y=4.00, z=73.21], EntityDuck['Duck'/16, l='MpServer', x=1183.46, y=4.00, z=74.86], EntityItem['item.item.egg'/17, l='MpServer', x=1168.70, y=4.00, z=72.49], EntitySheep['Sheep'/20, l='MpServer', x=1202.33, y=4.00, z=178.65], EntityPlayerSP['Otis_Goodman'/52, l='MpServer', x=1138.50, y=13.60, z=113.95]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2888)
	at net.minecraft.client.Minecraft.run(Minecraft.java:462)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:25)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_171, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 260782232 bytes (248 MB) / 825229312 bytes (787 MB) up to 1886912512 bytes (1799 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.5.2768 8 mods loaded, 8 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID             | Version         | Source                           | Signature |
	|:--------- |:-------------- |:--------------- |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft      | 1.12.2          | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp            | 9.42            | minecraft.jar                    | None      |
	| UCHIJAAAA | FML            | 8.0.99.99       | forgeSrc-1.12.2-14.23.5.2768.jar | None      |
	| UCHIJAAAA | forge          | 14.23.5.2768    | forgeSrc-1.12.2-14.23.5.2768.jar | None      |
	| UCHIJAAAA | baubles        | 1.5.2           | Baubles-1.12-1.5.2.jar           | None      |
	| UCHIJAAAA | quackcraft     | Development 1.3 | Quack_Craft_main                 | None      |
	| UCHIJAAAA | patchouli      | 1.0-7.25        | Patchouli-1.0-7.25.jar           | None      |
	| UCHIJAAAA | custommainmenu | 2.0.8           | CustomMainMenu.jar               | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4358' Renderer: 'Intel(R) HD Graphics 4000'
	Launched Version: 1.12.2
	LWJGL: 2.9.4
	OpenGL: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 10.18.10.4358, Intel
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 4x Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz

Issues with metadata

There appear to be several odd issues when trying to use items with metadata.

  1. If you specify a block with metadata as a mapping in a multiblock, that block will not appear.
  2. If you try to display the recipe of a block or item with metadata on a crafting recipe page, the page will appear blank

Version Affected: 1.0-10

Problem Or Feature Request If Its Not A Problem.

Is there a way to use items for things with damage.

For instance, let's say I want to make a damaged item an icon for an entry.
If it exists can someone give me an example
else {
mod.add(this);
}

Typing $( in the editor text box changes the font globally

Steps to reproduce:

  1. Open the ingame editor from any Patchouli book
  2. Type $( into the text box

The font will change for not just the book, but for chat, tooltips, everything. The only way I've found to reset the font is a restart, a resource reload doesn't work.

Add ItemStack trigger for entry unlock

It would be nice to be able to unlock page entries upon pickup or craft of an item, instead of advancement unlocking. The reasoning behind this is that while modpack makers are welcome to make their own books, modpack makers have very little control over when the content gets unlocked. The only triggers they can watch for are advancements, which are rather cumbersome to make.

This is a suggested user implementation:
Instead of "advancement": "mymod:myadv", you could have "item": "mymod:myitem". Picking up that item / having the item in your inventory would unlock the entry for the player. Since the page would be permanently unlocked once the item was picked up, it would be beneficial to keep track of this data via capabilities (as you don't have advancements to watch to keep track of which entries are locked). The ability to restrict a page to be unlocked upon crafting an item in a crafting table would also be incredibly useful!

I hope this is sensible. This would be a great step forward for modpack makers.

[Feature Request] Add a book json tag to disable the display of the progress bar

We are looking to use this mod to provide manuals for the Bewitchment mod, but the inability (unless I missed it) to hide the progress bar on the main page is kind of a dealbreaker, it breaks immersion. Would it be possible to have a json tag in the book.json that disables it completely? Something along the lines of "hide_bar": true
We're using on 1.0-7.9

OPTIFINE COMPAT: In-Line Text rendering issue, incorrect spacing and placement

In-Line Text rendering issue, incorrect spacing and placement in the Nature's Aura patchouli book.
Images are characteristic of rendering issues inconsistently appearing throughout the book and in sections added by Nature's Aura addons.

  • With Optifine:

2018-11-29_04 06 43

  • Without Optifine

2018-11-29_04 28 03

My optifine options:

ofFogStart:0.8
ofMipmapType:0
ofOcclusionFancy:false
ofSmoothFps:false
ofSmoothWorld:true
ofAoLevel:1.0
ofClouds:3
ofCloudsHeight:0.0
ofTrees:0
ofDroppedItems:0
ofRain:0
ofAnimatedWater:0
ofAnimatedLava:0
ofAnimatedFire:true
ofAnimatedPortal:true
ofAnimatedRedstone:true
ofAnimatedExplosion:true
ofAnimatedFlame:true
ofAnimatedSmoke:true
ofVoidParticles:true
ofWaterParticles:true
ofPortalParticles:true
ofPotionParticles:true
ofFireworkParticles:true
ofDrippingWaterLava:true
ofAnimatedTerrain:true
ofAnimatedTextures:true
ofRainSplash:true
ofLagometer:false
ofShowFps:false
ofAutoSaveTicks:4000
ofBetterGrass:3
ofConnectedTextures:2
ofWeather:true
ofSky:true
ofStars:true
ofSunMoon:true
ofVignette:0
ofChunkUpdates:1
ofChunkUpdatesDynamic:false
ofTime:0
ofClearWater:false
ofAaLevel:0
ofAfLevel:1
ofProfiler:false
ofBetterSnow:false
ofSwampColors:true
ofRandomEntities:true
ofSmoothBiomes:true
ofCustomFonts:true
ofCustomColors:true
ofCustomItems:true
ofCustomSky:true
ofShowCapes:true
ofNaturalTextures:true
ofEmissiveTextures:true
ofLazyChunkLoading:true
ofRenderRegions:false
ofSmartAnimations:false
ofDynamicFov:false
ofAlternateBlocks:true
ofDynamicLights:2
ofScreenshotSize:1
ofCustomEntityModels:true
ofCustomGuis:true
ofShowGlErrors:true
ofFullscreenMode:Default
ofFastMath:false
ofFastRender:false
ofTranslucentBlocks:0
key_of.key.zoom:46

Fluids do not show in multiblocks

When creating a multiblock that includes fluids, said fluids do not appear in the visualization.

e.g.

{
    "name": "Getting to the Twilight Forest",
    "icon": "minecraft:grass",
    "category": "explorations",
    "pages": [
		{
        	"type": "multiblock",
        	"name": "A Twilight Portal",
        	"multiblock": {
				"pattern": [
					[ " FF ", "F  F", "F  F", " FF " ],
					[ " GG ", "G0WG", "GWWG", " GG " ]
				],
				"mapping": {
					" ": "ANY",
					"F": "minecraft:red_flower",
					"G": "minecraft:grass",
					"W": "minecraft:water",
					"0": "minecraft:water"
				},
				"symmetrical": true,
				"offset"     : [0, 1, 0],
				"view_offset": [0, 0, 0]
    		},
			"text": "You can use any kind of flower here.  Make it pretty!",
			"enable_visualize": false
		},
		{
			"type": "spotlight",
			"title": "Activate it!",
			"item": "minecraft:diamond",
			"text": "Toss a Diamond in the pool and you'll open a portal to the Twilight Forest.  Don't get lost!"
		}
    ]
}

Version Affected: 1.0-10

Add an Ingredient component

I implemented this on my end as a custom component and figured it would probably be commonly used for other modders' recipe systems as well, and should therefore be part of base Patchouli.

Allow NBT support for ItemStack icons

It would be nice to be able to use itemstack icons for items that have a different look depending on their NBT data. A good example of this would be bees from Forestry: Their looks change depending on their NBT data, but as of right now there's no way to set that. Same could be said of a Tinkers' Construct tool icon.

Edit: This could be useful for recipes that have an NBT-specific output as well.

Feature request: View multiblock layer by layer

Description:

In order to ease the process of building a complex multiblock (Houses, mob farms, etc.) the ability to render one layer at a time will be helpful.
This way, the player can focus on each layer without getting distracted or confused by the other layers.

Current behavior:

For all multi-blocks, a ghost image with all its blocks is rendered to help the player.
Multiblock completion is tracked across all layers.
This is PERFECT for simple multi-blocks, but confusing for the complex ones.

Desired behavior:

Have a flag (complex, layered, layerByLayer or something similar) that, when set to true, will alter the current behavior to show only the ghost image of the bottom-most layer, and to track competition of only that layer.
Once that layer is fully done, add the next one, and repeat until finished.

Image category icons are invisible when not hovered

Unless the mouse is over them, category icons that render images instead of itemstacks are invisible. See the attached GIF for a demonstration of the issue. The Patchouli book I discovered this issue with can be found here. I have reproduced the issue successfully in a superflat world using the void preset, so TESRs and entity renderers can't be interfering.
2018-10-29_16 36 52
spookycategory

Bold text overlaps with following non-bold text

I noticed this bug while browsing through the default books (the SCP reference page) while adding Italian localization.

I was working with commit ec82535
It was in a dev env (Eclipse in Ubuntu).

I'll attach a screenshot for clarity
2018-11-14_11 39 42

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.