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
91133dbd
Unverified
Commit
91133dbd
authored
Jun 07, 2023
by
modmuss
Committed by
GitHub
Jun 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to 1.20
Now uses split-sourceset's
parent
38f93b4e
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
88 additions
and
36 deletions
+88
-36
build.yml
.github/workflows/build.yml
+0
-0
build.gradle
build.gradle
+17
-6
gradle.properties
gradle.properties
+9
-8
settings.gradle
settings.gradle
+0
-0
ExampleModClient.java
src/client/java/com/example/ExampleModClient.java
+11
-0
ExampleClientMixin.java
...ent/java/com/example/mixin/client/ExampleClientMixin.java
+16
-0
modid.client.mixins.json
src/client/resources/modid.client.mixins.json
+12
-0
ExampleMod.java
src/main/java/com/example/ExampleMod.java
+2
-1
ExampleMixin.java
src/main/java/com/example/mixin/ExampleMixin.java
+6
-6
fabric.mod.json
src/main/resources/fabric.mod.json
+14
-11
modid.mixins.json
src/main/resources/modid.mixins.json
+1
-4
No files found.
.github/workflows/build.yml
View file @
91133dbd
build.gradle
View file @
91133dbd
...
...
@@ -6,6 +6,10 @@ plugins {
version
=
project
.
mod_version
group
=
project
.
maven_group
base
{
archivesName
=
project
.
archives_base_name
}
repositories
{
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
...
...
@@ -14,6 +18,18 @@ repositories {
// for more information about repositories.
}
loom
{
splitEnvironmentSourceSets
()
mods
{
"modid"
{
sourceSet
sourceSets
.
main
sourceSet
sourceSets
.
client
}
}
}
dependencies
{
// To change the versions see the gradle.properties file
minecraft
"com.mojang:minecraft:${project.minecraft_version}"
...
...
@@ -29,10 +45,6 @@ dependencies {
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
}
base
{
archivesName
=
project
.
archives_base_name
}
processResources
{
inputs
.
property
"version"
,
project
.
version
...
...
@@ -42,7 +54,6 @@ processResources {
}
tasks
.
withType
(
JavaCompile
).
configureEach
{
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it
.
options
.
release
=
17
}
...
...
@@ -58,7 +69,7 @@ java {
jar
{
from
(
"LICENSE"
)
{
rename
{
"${it}_${
base.archivesName.get()
}"
}
rename
{
"${it}_${
project.archivesBaseName
}"
}
}
}
...
...
gradle.properties
View file @
91133dbd
...
...
@@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel
=
true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version
=
1.19.4
yarn_mappings
=
1.19.4+build.2
loader_version
=
0.14.19
# check these on https://fabricmc.net/develop
minecraft_version
=
1.20
yarn_mappings
=
1.20+build.1
loader_version
=
0.14.21
# Mod Properties
mod_version
=
1.0.0
maven_group
=
com.example
archives_base_name
=
fabric-example-mo
d
mod_version
=
1.0.0
maven_group
=
com.example
archives_base_name
=
modi
d
# Dependencies
fabric_version
=
0.79.0+1.19.4
fabric_version
=
0.83.0+1.20
\ No newline at end of file
settings.gradle
View file @
91133dbd
src/client/java/com/example/ExampleModClient.java
0 → 100644
View file @
91133dbd
package
com
.
example
;
import
net.fabricmc.api.ClientModInitializer
;
public
class
ExampleModClient
implements
ClientModInitializer
{
@Override
public
void
onInitializeClient
()
{
// This entrypoint is suitable for setting up client-specific logic, such as rendering.
}
}
\ No newline at end of file
src/client/java/com/example/mixin/client/ExampleClientMixin.java
0 → 100644
View file @
91133dbd
package
com
.
example
.
mixin
.
client
;
import
net.minecraft.client.MinecraftClient
;
import
org.spongepowered.asm.mixin.Mixin
;
import
org.spongepowered.asm.mixin.injection.At
;
import
org.spongepowered.asm.mixin.injection.Inject
;
import
org.spongepowered.asm.mixin.injection.callback.CallbackInfo
;
@Mixin
(
MinecraftClient
.
class
)
public
class
ExampleClientMixin
{
@Inject
(
at
=
@At
(
"HEAD"
),
method
=
"run"
)
private
void
run
(
CallbackInfo
info
)
{
// This code is injected into the start of MinecraftClient.run()V
}
}
\ No newline at end of file
src/client/resources/modid.client.mixins.json
0 → 100644
View file @
91133dbd
{
"required"
:
true
,
"package"
:
"com.example.mixin.client"
,
"compatibilityLevel"
:
"JAVA_17"
,
"client"
:
[
"ExampleClientMixin"
],
"injectors"
:
{
"defaultRequire"
:
1
}
}
\ No newline at end of file
src/main/java/
net/fabricmc
/example/ExampleMod.java
→
src/main/java/
com
/example/ExampleMod.java
View file @
91133dbd
package
net
.
fabricmc
.
example
;
package
com
.
example
;
import
net.fabricmc.api.ModInitializer
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
src/main/java/
net/fabricmc
/example/mixin/ExampleMixin.java
→
src/main/java/
com
/example/mixin/ExampleMixin.java
View file @
91133dbd
package
net
.
fabricmc
.
example
.
mixin
;
package
com
.
example
.
mixin
;
import
net.fabricmc.example.ExampleMod
;
import
net.minecraft.client.gui.screen.TitleScreen
;
import
net.minecraft.server.MinecraftServer
;
import
org.spongepowered.asm.mixin.Mixin
;
import
org.spongepowered.asm.mixin.injection.At
;
import
org.spongepowered.asm.mixin.injection.Inject
;
import
org.spongepowered.asm.mixin.injection.callback.CallbackInfo
;
@Mixin
(
TitleScreen
.
class
)
@Mixin
(
MinecraftServer
.
class
)
public
class
ExampleMixin
{
@Inject
(
at
=
@At
(
"HEAD"
),
method
=
"
init()V
"
)
@Inject
(
at
=
@At
(
"HEAD"
),
method
=
"
loadWorld
"
)
private
void
init
(
CallbackInfo
info
)
{
ExampleMod
.
LOGGER
.
info
(
"This line is printed by an example mod mixin!"
);
// This code is injected into the start of MinecraftServer.loadWorld()V
}
}
\ No newline at end of file
src/main/resources/fabric.mod.json
View file @
91133dbd
...
...
@@ -2,8 +2,7 @@
"schemaVersion"
:
1
,
"id"
:
"modid"
,
"version"
:
"${version}"
,
"name"
:
"Example Mod"
,
"name"
:
"Example mod"
,
"description"
:
"This is an example description! Tell everyone what your mod is about!"
,
"authors"
:
[
"Me!"
...
...
@@ -12,25 +11,29 @@
"homepage"
:
"https://fabricmc.net/"
,
"sources"
:
"https://github.com/FabricMC/fabric-example-mod"
},
"license"
:
"CC0-1.0"
,
"icon"
:
"assets/modid/icon.png"
,
"environment"
:
"*"
,
"entrypoints"
:
{
"main"
:
[
"net.fabricmc.example.ExampleMod"
"com.example.ExampleMod"
],
"client"
:
[
"com.example.ExampleModClient"
]
},
"mixins"
:
[
"modid.mixins.json"
"modid.mixins.json"
,
{
"config"
:
"modid.client.mixins.json"
,
"environment"
:
"client"
}
],
"depends"
:
{
"fabricloader"
:
">=0.14.19
"
,
"fabric-api"
:
"*
"
,
"minecraft"
:
"~1.19.4
"
,
"java"
:
">=17
"
"fabricloader"
:
">=0.14.21
"
,
"minecraft"
:
"~1.20
"
,
"java"
:
">=17
"
,
"fabric-api"
:
"*
"
},
"suggests"
:
{
"another-mod"
:
"*"
...
...
src/main/resources/modid.mixins.json
View file @
91133dbd
{
"required"
:
true
,
"minVersion"
:
"0.8"
,
"package"
:
"net.fabricmc.example.mixin"
,
"package"
:
"com.example.mixin"
,
"compatibilityLevel"
:
"JAVA_17"
,
"mixins"
:
[
],
"client"
:
[
"ExampleMixin"
],
"injectors"
:
{
...
...
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