generated from NeoForgeMDKs/MDK-1.21.1-ModDevGradle
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
613de0d
commit bfa2d8f
Showing
9 changed files
with
132 additions
and
38 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924
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,4 +1,5 @@ | ||
// 1.21.1 2025-01-10T20:56:41.675605318 Registries | ||
// 1.21.1 2025-01-12T01:35:51.697973695 Registries | ||
a2254160c3b757cc65c156058b73a4d7fcfee7af data/researchd/researchd/research/example.json | ||
1cdd93f8a6bb79a07d1657ef616b5bd4fbdb247d data/researchd/researchd/research_pack/end.json | ||
89ac98c63d706e87b221fe288b9947b8018976ca data/researchd/researchd/research_pack/nether.json | ||
f077b1491836c0ad25f25653e259fb15df317440 data/researchd/researchd/research_pack/overworld.json |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/researchd/researchd/research/example.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,9 @@ | ||
{ | ||
"type": "researchd:simple", | ||
"parent": {}, | ||
"icon": "minecraft:stick", | ||
"requires_parent": false, | ||
"research_points": { | ||
"researchd:overworld": 3 | ||
} | ||
} |
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
43 changes: 43 additions & 0 deletions
43
src/main/java/com/portingdeadmods/researchd/client/screens/graph/ResearchGraph.java
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,43 @@ | ||
package com.portingdeadmods.researchd.client.screens.graph; | ||
|
||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.client.gui.components.AbstractWidget; | ||
import net.minecraft.client.gui.narration.NarrationElementOutput; | ||
import net.minecraft.network.chat.Component; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class ResearchGraph extends AbstractWidget { | ||
private @Nullable ResearchNode node; | ||
private final List<ResearchNode> nodes; | ||
|
||
public ResearchGraph(int x, int y, int width, int height) { | ||
super(x, y, width, height, Component.empty()); | ||
this.nodes = new ArrayList<>(); | ||
} | ||
|
||
public void setNode(@Nullable ResearchNode node) { | ||
this.node = node; | ||
} | ||
|
||
@Override | ||
protected void renderWidget(GuiGraphics guiGraphics, int i, int i1, float v) { | ||
if (node != null) { | ||
renderNode(node, guiGraphics, i, i1, v); | ||
} | ||
} | ||
|
||
private void renderNode(ResearchNode node, GuiGraphics guiGraphics, int mouseX, int mouseY,float partialTick) { | ||
node.render(guiGraphics, mouseX, mouseY, partialTick); | ||
for (ResearchNode rNode : node.getNext()) { | ||
renderNode(rNode, guiGraphics, mouseX, mouseY, partialTick); | ||
} | ||
} | ||
|
||
@Override | ||
protected void updateWidgetNarration(NarrationElementOutput narrationElementOutput) { | ||
} | ||
|
||
} |
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
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