-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
713 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
{ | ||
"ae2.guidebook.Close": "Close", | ||
"ae2.guidebook.ContentFrom": "Content from", | ||
"ae2.guidebook.HideAnnotations": "Hide Annotations", | ||
"ae2.guidebook.HistoryGoBack": "Go back one page", | ||
"ae2.guidebook.HistoryGoForward": "Go forward one page", | ||
"ae2.guidebook.HoldToShow": "Hold [%s] to open guide", | ||
"ae2.guidebook.ResetView": "Reset View", | ||
"ae2.guidebook.Search": "Search", | ||
"ae2.guidebook.ShowAnnotations": "Show Annotations", | ||
"ae2.guidebook.ZoomIn": "Zoom In", | ||
"ae2.guidebook.ZoomOut": "Zoom Out" | ||
"guideme.guidebook.Close": "Close", | ||
"guideme.guidebook.ContentFrom": "Content from", | ||
"guideme.guidebook.HideAnnotations": "Hide Annotations", | ||
"guideme.guidebook.HistoryGoBack": "Go back one page", | ||
"guideme.guidebook.HistoryGoForward": "Go forward one page", | ||
"guideme.guidebook.HoldToShow": "Hold [%s] to open guide", | ||
"guideme.guidebook.ItemInvalidGuideId": "Invalid guide id set: %s", | ||
"guideme.guidebook.ItemNoGuideId": "No guide id set", | ||
"guideme.guidebook.ResetView": "Reset View", | ||
"guideme.guidebook.Search": "Search", | ||
"guideme.guidebook.ShowAnnotations": "Show Annotations", | ||
"guideme.guidebook.ZoomIn": "Zoom In", | ||
"guideme.guidebook.ZoomOut": "Zoom Out", | ||
"item.guideme.guide": "Guide" | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/guideme/models/item/guide.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"loader": "guideme:guide_item_dispatcher" | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/guideme/models/item/guide_base.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "guideme:item/guide" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package guideme; | ||
|
||
import com.mojang.serialization.Codec; | ||
import com.mojang.serialization.codecs.RecordCodecBuilder; | ||
import java.util.List; | ||
import java.util.Optional; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.network.chat.ComponentSerialization; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
/** | ||
* Configuration settings for the automatically generated guide item. | ||
*/ | ||
public record GuideItemSettings(Optional<Component> displayName, | ||
List<Component> tooltipLines, | ||
Optional<ResourceLocation> itemModel) { | ||
public static GuideItemSettings DEFAULT = new GuideItemSettings(Optional.empty(), List.of(), Optional.empty()); | ||
|
||
public static Codec<GuideItemSettings> CODEC = RecordCodecBuilder.create( | ||
builder -> builder.group( | ||
ComponentSerialization.CODEC.optionalFieldOf("display_name") | ||
.forGetter(GuideItemSettings::displayName), | ||
ComponentSerialization.CODEC.listOf().optionalFieldOf("tooltip_lines", List.of()) | ||
.forGetter(GuideItemSettings::tooltipLines), | ||
ResourceLocation.CODEC.optionalFieldOf("model").forGetter(GuideItemSettings::itemModel)) | ||
.apply(builder, GuideItemSettings::new)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.