Skip to content

Commit

Permalink
Update to 1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Mar 25, 2023
1 parent fb45d6d commit 90cbb99
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import net.fabricmc.loom.task.RemapJarTask

plugins {
id 'fabric-loom' version "1.0.+"
id 'io.github.ladysnake.chenille' version '0.9.0'
id 'io.github.ladysnake.chenille' version '0.10.1'
id 'io.github.juuxel.loom-quiltflower' version "1.6.0"
}

Expand Down Expand Up @@ -66,15 +66,17 @@ remapJar {
addNestedDependencies.set(false)
}

task standaloneJar(type: Jar, dependsOn: project.classes) {
tasks.register("standaloneJar", Jar) {
from sourceSets.main.output
archiveClassifier.set('standalone-dev')
dependsOn project.classes
}

task remapStandaloneJar(type: RemapJarTask, dependsOn: project.standaloneJar) {
tasks.register("remapStandaloneJar", RemapJarTask) {
archiveClassifier.set('standalone')
inputFile.set(standaloneJar.archiveFile)
addNestedDependencies.set(true)
dependsOn project.standaloneJar
}

assemble.dependsOn(remapStandaloneJar)
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
------------------------------------------------------
Version 0.6.0
------------------------------------------------------
Updated to MC 1.19.4

------------------------------------------------------
Version 0.5.1
------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.14
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17
java_version=17

# Mod Properties
mod_version = 0.5.1
mod_version = 0.6.0
maven_group = io.github.ladysnake
archives_base_name = blabber

# Dependencies
fabric_version=0.75.1+1.19.3
fabric_version=0.76.0+1.19.4

# Publishing
license_header = LGPL
curseforge_id = 565396
curseforge_versions = 1.19.3
curseforge_versions = 1.19.4
cf_requirements = fabric-api
cf_embeddeds = cardinal-components
release_type = beta
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float tickDelta
this.renderBackground(matrices);
int y = MIN_RENDER_Y;
Text title = this.handler.getCurrentText();
this.textRenderer.drawTrimmed(title, 10, y, MAX_TEXT_WIDTH, 0xFFFFFF);
this.textRenderer.drawTrimmed(matrices, title, 10, y, MAX_TEXT_WIDTH, 0xFFFFFF);
y += this.getTextBoundedHeight(title, MAX_TEXT_WIDTH) + TITLE_GAP;
List<Text> choices = this.handler.getCurrentChoices();

for (int i = 0; i < choices.size(); i++) {
Text choice = choices.get(i);
int strHeight = this.getTextBoundedHeight(choice, MAX_TEXT_WIDTH);
this.textRenderer.drawTrimmed(choice, 10, y, MAX_TEXT_WIDTH, i == this.selectedChoice ? 0xE0E044 : 0xA0A0A0);
this.textRenderer.drawTrimmed(matrices, choice, 10, y, MAX_TEXT_WIDTH, i == this.selectedChoice ? 0xE0E044 : 0xA0A0A0);
y += strHeight + CHOICE_GAP;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private static DataResult<DialogueTemplate> validateStructure(DialogueTemplate d
if (state.getValue().type().equals(ChoiceResult.END_DIALOGUE)) {
waitList.add(state.getKey());
} else if (dialogue.states().get(state.getKey()).choices().isEmpty()) {
return DataResult.error("(Blabber) %s has no available choices but is not an end state".formatted(state.getKey()));
return DataResult.error(() -> "(Blabber) %s has no available choices but is not an end state".formatted(state.getKey()));
} else {
unvalidated.add(state.getKey());
for (DialogueState.Choice choice : state.getValue().choices()) {
Expand Down Expand Up @@ -125,7 +125,7 @@ private static DataResult<DialogueTemplate> validateStructure(DialogueTemplate d
// Unreachable states do not cause infinite loops, but we still want to be aware of them
Blabber.LOGGER.warn("{} is unreachable", bad);
} else {
return DataResult.error("(Blabber) %s does not have any path to the end of the dialogue".formatted(bad));
return DataResult.error(() -> "(Blabber) %s does not have any path to the end of the dialogue".formatted(bad));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;

public final class PlayerDialogueTracker implements ServerTickingComponent {
public static final ComponentKey<PlayerDialogueTracker> KEY = ComponentRegistry.getOrCreate(Blabber.id("dialogue_tracker"), PlayerDialogueTracker.class);

private final PlayerEntity player;
private DialogueStateMachine currentDialogue;
private @Nullable DialogueStateMachine currentDialogue;

public PlayerDialogueTracker(PlayerEntity player) {
this.player = player;
Expand All @@ -59,7 +60,7 @@ public void endDialogue() {
this.currentDialogue = null;

if (this.player instanceof ServerPlayerEntity sp && this.player.currentScreenHandler instanceof DialogueScreenHandler) {
sp.closeScreenHandler();
sp.closeHandledScreen();
}
}

Expand Down

0 comments on commit 90cbb99

Please sign in to comment.