Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
a76d9835
Commit
a76d9835
authored
May 07, 2024
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.20-minecraft-support' into 'develop'
1.20 to 1.20.4 Build Support See merge request
!1
parents
56e15a43
e6f6b2a9
Pipeline
#12136
passed with stage
in 1 minute 40 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
20 deletions
+49
-20
.gitlab-ci.yml
.gitlab-ci.yml
+33
-12
CHANGELOG.md
CHANGELOG.md
+8
-0
ClientPackets.java
src/client/java/com/owlmaddie/network/ClientPackets.java
+2
-2
BubbleRenderer.java
src/client/java/com/owlmaddie/ui/BubbleRenderer.java
+2
-2
ChatDataManager.java
src/main/java/com/owlmaddie/chat/ChatDataManager.java
+1
-1
CreatureChatCommands.java
...ain/java/com/owlmaddie/commands/CreatureChatCommands.java
+1
-1
ServerPackets.java
src/main/java/com/owlmaddie/network/ServerPackets.java
+2
-2
No files found.
.gitlab-ci.yml
View file @
a76d9835
variables
:
GRADLE_OPTS
:
"
-Dorg.gradle.daemon=false"
JAVA_HOME
:
"
/home/jonathan/.jdks/openjdk-22.0.1"
cache
:
paths
:
...
...
@@ -11,18 +12,39 @@ stages:
build_mod
:
stage
:
build
before_script
:
-
export PATH=$JAVA_HOME/bin:$PATH
-
java -version
script
:
-
./gradlew build
-
find build/libs -type f -name '*sources*.jar' -exec rm {} \;
-
mv build/libs/creaturechat-*.jar .
-
export FABRIC_VERSION=$(grep 'fabric_version' gradle.properties | cut -d'=' -f2)
-
export FABRIC_API_JAR="fabric-api-${FABRIC_VERSION}.jar"
-
echo Detected Fabric API version from gradle.properties $FABRIC_API_JAR
-
export DOWNLOAD_URL="https://github.com/FabricMC/fabric/releases/download/${FABRIC_VERSION//+/%2B}/${FABRIC_API_JAR}"
-
echo Download Fabric API from $DOWNLOAD_URL
-
wget -q -O "${FABRIC_API_JAR}" $DOWNLOAD_URL
-
ls . -la
-
|
declare -a versions=("1.20" "1.20.1" "1.20.2" "1.20.3" "1.20.4")
declare -a mappings=("1.20+build.1" "1.20.1+build.10" "1.20.2+build.4" "1.20.3+build.1" "1.20.4+build.3")
declare -a fabric_versions=("0.83.0+1.20" "0.92.1+1.20.1" "0.91.6+1.20.2" "0.91.1+1.20.3" "0.97.0+1.20.4")
for i in "${!versions[@]}"; do
minecraft_version="${versions[$i]}"
yarn_mappings="${mappings[$i]}"
fabric_version="${fabric_versions[$i]}"
echo "****"
echo "Building for Minecraft Version $minecraft_version with Fabric $fabric_version\n"
echo "****"
# Replace versions before build attempt
sed -i "s/minecraft_version=.*/minecraft_version=$minecraft_version/" gradle.properties
sed -i "s/yarn_mappings=.*/yarn_mappings=$yarn_mappings/" gradle.properties
sed -i "s/loader_version=.*/loader_version=0.15.11/" gradle.properties
sed -i "s/fabric_version=.*/fabric_version=$fabric_version/" gradle.properties
./gradlew build
find build/libs -type f -name '*sources*.jar' -exec rm {} \;
mv build/libs/creaturechat-*.jar .
FABRIC_API_JAR="fabric-api-${fabric_version}.jar"
DOWNLOAD_URL="https://github.com/FabricMC/fabric/releases/download/${fabric_version//+/%2B}/${FABRIC_API_JAR}"
wget -q -O "${FABRIC_API_JAR}" $DOWNLOAD_URL
ls . -la
done
artifacts
:
paths
:
-
creaturechat-*.jar
...
...
@@ -30,4 +52,4 @@ build_mod:
only
:
-
develop
tags
:
-
minecraft
\ No newline at end of file
-
minecraft
CHANGELOG.md
View file @
a76d9835
...
...
@@ -4,6 +4,14 @@ All notable changes to **CreatureChat** are documented in this file. The format
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
, and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## [Unreleased]
### Added
-
Added support for Minecraft 1.20, 1.20.1, 1.20.2, 1.20.3, and 1.20.4 (new build pipeline)
### Changed
-
Replaced calls to getLiteralString() with getString() for wider compatability
## [1.0.1] - 2024-05-06
### Added
...
...
src/client/java/com/owlmaddie/network/ClientPackets.java
View file @
a76d9835
...
...
@@ -33,7 +33,7 @@ public class ClientPackets {
public
static
void
sendGenerateGreeting
(
Entity
entity
)
{
// Get user language
String
userLanguageCode
=
MinecraftClient
.
getInstance
().
getLanguageManager
().
getLanguage
();
String
userLanguageName
=
MinecraftClient
.
getInstance
().
getLanguageManager
().
getLanguage
(
userLanguageCode
).
getDisplayText
().
get
Literal
String
();
String
userLanguageName
=
MinecraftClient
.
getInstance
().
getLanguageManager
().
getLanguage
(
userLanguageCode
).
getDisplayText
().
getString
();
PacketByteBuf
buf
=
new
PacketByteBuf
(
Unpooled
.
buffer
());
buf
.
writeString
(
entity
.
getUuidAsString
());
...
...
@@ -79,7 +79,7 @@ public class ClientPackets {
public
static
void
sendChat
(
Entity
entity
,
String
message
)
{
// Get user language
String
userLanguageCode
=
MinecraftClient
.
getInstance
().
getLanguageManager
().
getLanguage
();
String
userLanguageName
=
MinecraftClient
.
getInstance
().
getLanguageManager
().
getLanguage
(
userLanguageCode
).
getDisplayText
().
get
Literal
String
();
String
userLanguageName
=
MinecraftClient
.
getInstance
().
getLanguageManager
().
getLanguage
(
userLanguageCode
).
getDisplayText
().
getString
();
PacketByteBuf
buf
=
new
PacketByteBuf
(
Unpooled
.
buffer
());
buf
.
writeString
(
entity
.
getUuidAsString
());
...
...
src/client/java/com/owlmaddie/ui/BubbleRenderer.java
View file @
a76d9835
...
...
@@ -243,11 +243,11 @@ public class BubbleRenderer {
if
(
entity
instanceof
MobEntity
)
{
// Custom Name Tag (MobEntity)
if
(
entity
.
getCustomName
()
!=
null
)
{
nameText
=
entity
.
getCustomName
().
get
Literal
String
();
nameText
=
entity
.
getCustomName
().
getString
();
}
}
else
if
(
entity
instanceof
PlayerEntity
)
{
// Player Name
nameText
=
entity
.
getName
().
get
Literal
String
();
nameText
=
entity
.
getName
().
getString
();
}
// Truncate long names
...
...
src/main/java/com/owlmaddie/chat/ChatDataManager.java
View file @
a76d9835
...
...
@@ -191,7 +191,7 @@ public class ChatDataManager {
if
(
entity
.
getCustomName
()
==
null
)
{
contextData
.
put
(
"entity_name"
,
""
);
}
else
{
contextData
.
put
(
"entity_name"
,
entity
.
getCustomName
().
get
Literal
String
());
contextData
.
put
(
"entity_name"
,
entity
.
getCustomName
().
getString
());
}
contextData
.
put
(
"entity_type"
,
entity
.
getType
().
getName
().
getString
());
contextData
.
put
(
"entity_health"
,
entity
.
getHealth
()
+
"/"
+
entity
.
getMaxHealth
());
...
...
src/main/java/com/owlmaddie/commands/CreatureChatCommands.java
View file @
a76d9835
...
...
@@ -66,7 +66,7 @@ public class CreatureChatCommands {
Text
feedbackMessage
=
Text
.
literal
(
settingDescription
+
" Set Successfully!"
).
formatted
(
Formatting
.
GREEN
);;
source
.
sendFeedback
(()
->
feedbackMessage
,
false
);
LOGGER
.
info
(
"Command executed: "
+
feedbackMessage
.
get
Literal
String
());
LOGGER
.
info
(
"Command executed: "
+
feedbackMessage
.
getString
());
return
1
;
}
...
...
src/main/java/com/owlmaddie/network/ServerPackets.java
View file @
a76d9835
...
...
@@ -244,8 +244,8 @@ public class ServerPackets {
StringBuilder
userMessageBuilder
=
new
StringBuilder
();
userMessageBuilder
.
append
(
"Please generate a "
+
randomFrequency
+
" "
+
randomAdjective
);
userMessageBuilder
.
append
(
" character "
);
if
(
entity
.
getCustomName
()
!=
null
&&
!
entity
.
getCustomName
().
get
Literal
String
().
equals
(
"N/A"
))
{
userMessageBuilder
.
append
(
"named '"
).
append
(
entity
.
getCustomName
().
get
Literal
String
()).
append
(
"' "
);
if
(
entity
.
getCustomName
()
!=
null
&&
!
entity
.
getCustomName
().
getString
().
equals
(
"N/A"
))
{
userMessageBuilder
.
append
(
"named '"
).
append
(
entity
.
getCustomName
().
getString
()).
append
(
"' "
);
}
else
{
userMessageBuilder
.
append
(
"whose name starts with the letter '"
).
append
(
Randomizer
.
RandomLetter
()).
append
(
"' "
);
userMessageBuilder
.
append
(
"and uses "
).
append
(
Randomizer
.
RandomNumber
(
4
)
+
1
).
append
(
" syllables "
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment