Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.15.3
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.7
# Mod Properties
mod_version=1.0-SNAPSHOT
maven_group=io.github.techstreet.dfscript
archives_base_name=DFScript
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.91.2+1.20.2
fabric_version=0.96.1+1.20.4
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 23 additions & 12 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import java.nio.charset.Charset;
import java.util.*;

import net.minecraft.text.LiteralTextContent;
import net.minecraft.text.MutableText;
import net.minecraft.text.Text;

public class ScriptAddScreen extends CScreen {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float tickDelta)
RenderUtil.renderGuiItem(context, item);
if(countText != null)
{
stack.translate(4, 4, 0);
stack.translate(4, 4, 200);
stack.scale(0.5f, 0.5f, 0.5f);
context.drawText(DFScript.MC.textRenderer, countText, 0, 0, 0xFFFFFFFF, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ private ItemStack convertIcon(ItemStack icon) {
}

if(optional() || plural()) {
lore.add(NbtString.of(Text.Serializer.toJson(
lore.add(NbtString.of(Text.Serialization.toJsonString(
Text.literal((optional() ? (plural() ? "Optional & " : "Optional") : "")
+ (plural() ? "Plural" : ""))
.fillStyle(Style.EMPTY.withItalic(false).withColor(Formatting.GRAY))
)));
}

if(!(defaultValue() instanceof ScriptUnknownValue)) {
lore.add(NbtString.of(Text.Serializer.toJson(
lore.add(NbtString.of(Text.Serialization.toJsonString(
Text.literal("Default: "+defaultValue().formatAsText())
.fillStyle(Style.EMPTY.withItalic(false).withColor(Formatting.GRAY))
)));
Expand Down Expand Up @@ -230,7 +230,7 @@ public ItemStack icon(String name) {
itemStack.setCustomName(Text.literal(name).setStyle(Style.EMPTY.withColor(Formatting.WHITE).withItalic(false)));

NbtList lore = new NbtList();
lore.add(NbtString.of(Text.Serializer.toJson(text())));
lore.add(NbtString.of(Text.Serialization.toJsonString(text())));
itemStack.getSubNbt("display").put("Lore", lore);

return itemStack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1693,28 +1693,28 @@ public ItemStack getIcon() {

if(isDeprecated())
{
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("This action is deprecated!")
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("This action is deprecated!")
.fillStyle(Style.EMPTY
.withColor(Formatting.RED)
.withItalic(false)))));
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("Use '" + deprecated.getName() + "'")
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("Use '" + deprecated.getName() + "'")
.fillStyle(Style.EMPTY
.withColor(Formatting.RED)
.withItalic(false)))));
}

for (String descriptionLine: description) {
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(descriptionLine)
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(descriptionLine)
.fillStyle(Style.EMPTY
.withColor(Formatting.GRAY)
.withItalic(false)))));
}

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(""))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(""))));

for (ScriptActionArgument arg : arguments) {
for (Text txt : arg.text()) {
lore.add(NbtString.of(Text.Serializer.toJson(txt)));
lore.add(NbtString.of(Text.Serialization.toJsonString(txt)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public enum ScriptClientValueArgument implements ScriptArgument {
.fillStyle(Style.EMPTY
.withItalic(false)));
NbtList lore = new NbtList();
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(description)
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(description)
.fillStyle(Style.EMPTY
.withColor(Formatting.GRAY)
.withItalic(false)))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public ItemStack getArgIcon() {

NbtList lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(scope.getName())));
lore.add(NbtString.of(Text.Serialization.toJsonString(scope.getName())));

icon.getSubNbt("display").put("Lore", lore);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public class ScriptBooleanSet extends ScriptParametrizedPart {

NbtList lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("Sets a variable to the result of a condition.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(""))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("Sets a variable to the result of a condition.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(""))));

MutableText t = ScriptActionArgument.ScriptActionArgumentType.VARIABLE.text();
t.append(Text.literal(" - ").fillStyle(Style.EMPTY.withItalic(false).withColor(Formatting.GRAY)))
.append(Text.literal("Result").fillStyle(Style.EMPTY.withItalic(false).withColor(Formatting.WHITE)));

lore.add(NbtString.of(Text.Serializer.toJson(t)));
lore.add(NbtString.of(Text.Serialization.toJsonString(t)));

booleanSetIcon.getSubNbt("display")
.put("Lore", lore);
Expand Down Expand Up @@ -115,18 +115,18 @@ public ItemStack getIcon() {

NbtList lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("Sets a variable to the result of a condition.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(""))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("Sets a variable to the result of a condition.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(""))));

MutableText t = ScriptActionArgument.ScriptActionArgumentType.VARIABLE.text();
t.append(Text.literal(" - ").fillStyle(Style.EMPTY.withItalic(false).withColor(Formatting.GRAY)))
.append(Text.literal("Result").fillStyle(Style.EMPTY.withItalic(false).withColor(Formatting.WHITE)));

lore.add(NbtString.of(Text.Serializer.toJson(t)));
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(""))));
lore.add(NbtString.of(Text.Serialization.toJsonString(t)));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(""))));

for (Text txt : condition.getLore()) {
lore.add(NbtString.of(Text.Serializer.toJson(txt)));
lore.add(NbtString.of(Text.Serialization.toJsonString(txt)));
}

icon.getSubNbt("display")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ScriptBranch extends ScriptParametrizedPart implements ScriptScopeP

NbtList lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("Closes the current code block.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("Closes the current code block.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));

closeBracketIcon.getSubNbt("display")
.put("Lore", lore);
Expand All @@ -51,7 +51,7 @@ public class ScriptBranch extends ScriptParametrizedPart implements ScriptScopeP

lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("Executes if the last IF condition failed.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("Executes if the last IF condition failed.").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));

elseIcon.getSubNbt("display")
.put("Lore", lore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public ItemStack getIcon(String prefix) {
NbtList lore = new NbtList();

for (Text txt : getLore()) {
lore.add(NbtString.of(Text.Serializer.toJson(txt)));
lore.add(NbtString.of(Text.Serialization.toJsonString(txt)));
}

item.getSubNbt("display")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ScriptEmptyHeader extends ScriptHeader {

NbtList lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal("Literally can never be triggered...").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal("Literally can never be triggered...").setStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false)))));

emptyIcon.getSubNbt("display")
.put("Lore", lore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public enum ScriptEventType {
.withColor(Formatting.WHITE)
.withItalic(false)));
NbtList lore = new NbtList();
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(description)
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(description)
.fillStyle(Style.EMPTY
.withColor(Formatting.GRAY)
.withItalic(false)))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ public ItemStack getIcon() {

if(description != "") {
for (String descriptionLine: description.split("\n")) {
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(descriptionLine)
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(descriptionLine)
.fillStyle(Style.EMPTY
.withColor(Formatting.GRAY)
.withItalic(false)))));
}

if(argList.size() > 0)
lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(""))));
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(""))));
}

for (ScriptActionArgument arg : argList) {
for (Text txt : arg.text()) {
lore.add(NbtString.of(Text.Serializer.toJson(txt)));
lore.add(NbtString.of(Text.Serialization.toJsonString(txt)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public ItemStack getIcon()

NbtList lore = new NbtList();

lore.add(NbtString.of(Text.Serializer.toJson(Text.literal(description)
lore.add(NbtString.of(Text.Serialization.toJsonString(Text.literal(description)
.fillStyle(Style.EMPTY.withColor(Formatting.GRAY).withItalic(false))
)));

Expand Down
Loading