Skip to content

Commit 88e3bbd

Browse files
committed
Init
1 parent 6520fae commit 88e3bbd

File tree

5,722 files changed

+655603
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,722 files changed

+655603
-186
lines changed

.gitignore

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
.gradle
22
build/
3-
4-
# Source code
5-
src/*
6-
7-
#Run files
83
runclient
9-
10-
# Ignore Gradle GUI config
114
gradle-app.setting
12-
13-
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
145
!gradle-wrapper.jar
15-
16-
#IDE files
176
.idea
7+
gradle
188
*.iml
19-
run/
20-
9+
.github
10+
debug/
2111
out/

MCP-License

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 80 deletions
This file was deleted.

build.gradle

Lines changed: 34 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import net.minecraftforge.gradle.common.util.Utils
2+
import net.minecraftforge.gradle.common.util.VersionJson
3+
import org.jetbrains.gradle.ext.*
4+
15
buildscript {
26
repositories {
37
mavenLocal()
@@ -11,10 +15,6 @@ buildscript {
1115
}
1216
}
1317

14-
import net.minecraftforge.gradle.common.util.Utils
15-
import net.minecraftforge.gradle.common.util.VersionJson
16-
import org.jetbrains.gradle.ext.*
17-
1818
apply plugin: 'eclipse'
1919
apply plugin: 'net.minecraftforge.gradle.patcher'
2020
apply plugin: "org.jetbrains.gradle.plugin.idea-ext"
@@ -23,7 +23,9 @@ println(' Java: ' + System.getProperty('java.version') +
2323
' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ')' +
2424
' Arch: ' + System.getProperty('os.arch'))
2525

26-
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
26+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
27+
28+
var assetsFolder = file('debug/assets')
2729

2830
configurations {
2931
shade
@@ -34,11 +36,11 @@ group = 'me.yourname'
3436
version = '1.0.0'
3537

3638
ext {
37-
minecraft_version = '1.20.2'
38-
mcp_version = '20230921.100330'
39+
minecraft_version = '1.21.4'
40+
mcp_version = '20241203.143248'
3941
mappings_channel = 'official'
40-
mappings_version = '1.20.2'
41-
spi_version = '7.0.0'
42+
mappings_version = '1.21.4'
43+
spi_version = '7.1.5'
4244
}
4345

4446
repositories {
@@ -47,40 +49,8 @@ repositories {
4749

4850
dependencies {
4951
implementation 'net.minecraftforge:forgespi:' + spi_version
50-
// Use the shade to add the lib to the jar
51-
// or use compile if you want to load the lib from the version.json
52-
// from a maven repo
53-
// shade 'package-here'
54-
// compile 'package-here'
55-
}
56-
57-
project(':mcp') {
58-
apply plugin: 'net.minecraftforge.gradle.mcp'
59-
mcp {
60-
config = minecraft_version + '-' + mcp_version
61-
pipeline = 'joined'
62-
}
63-
}
64-
65-
evaluationDependsOn(':mcp')
66-
67-
patcher {
68-
parent = project(':mcp')
69-
patchedSrc = file('src/main/java')
70-
mappings channel: mappings_channel, version: mappings_version
71-
mcVersion = minecraft_version
72-
}
73-
74-
jar {
75-
configurations.shade.each { dep ->
76-
from(project.zipTree(dep)) {
77-
exclude 'META-INF', 'META-INF/**'
78-
}
79-
}
8052
}
8153

82-
var assetsFolder = file('run/assets')
83-
8454
tasks.register('runclient', JavaExec) {
8555
group = "MCP"
8656
description = "Runs the client"
@@ -89,7 +59,7 @@ tasks.register('runclient', JavaExec) {
8959
jvmArgs '-XstartOnFirstThread'
9060
}
9161

92-
var runFolder = file('run')
62+
var runFolder = file('debug')
9363
var versionJson = Utils.loadJson(downloadAssets.getMeta().get().getAsFile(), VersionJson.class)
9464

9565
workingDir runFolder
@@ -101,45 +71,36 @@ tasks.register('runclient', JavaExec) {
10171
main 'net.minecraft.client.main.Main'
10272
}
10373

104-
105-
tasks.register('setup') {
106-
group = "MCP"
107-
description = "Setups the dev workspace"
108-
dependsOn ':extractMapped'
109-
mkdir assetsFolder
110-
copy {
111-
from downloadAssets.output.path
112-
into assetsFolder
74+
idea.project.settings {
75+
runConfigurations {
76+
"Minecraft"(Application) {
77+
mainClass = 'mcp.client.Start'
78+
workingDirectory = "$projectDir/run"
79+
moduleName = idea.module.name + '.main'
80+
}
11381
}
11482
}
11583

116-
tasks.register('copyAssets') {
117-
group = "MCP"
118-
description = "Download and place the assets into the run folder"
119-
dependsOn ':downloadAssets'
120-
mkdir 'run/assets'
121-
copy {
122-
from downloadAssets.output.path
123-
into assetsFolder
84+
project(':mcp') {
85+
apply plugin: 'net.minecraftforge.gradle.mcp'
86+
mcp {
87+
config = minecraft_version + '-' + mcp_version
88+
pipeline = 'joined'
12489
}
12590
}
91+
evaluationDependsOn(':mcp')
12692

127-
tasks.register('runserver', JavaExec) {
128-
mkdir 'runserver'
129-
group = "MCP"
130-
description = "Runs the server"
131-
standardInput = System.in
132-
classpath sourceSets.main.runtimeClasspath
133-
main 'net.minecraft.server.Main'
134-
workingDir 'runserver'
93+
patcher {
94+
parent = project(':mcp')
95+
patchedSrc = file('src/main/java')
96+
mappings channel: mappings_channel, version: mappings_version
97+
mcVersion = minecraft_version
13598
}
13699

137-
idea.project.settings {
138-
runConfigurations {
139-
"Minecraft"(Application) {
140-
mainClass = 'mcp.client.Start'
141-
workingDirectory = "$projectDir/run"
142-
moduleName = idea.module.name + '.main'
100+
jar {
101+
configurations.shade.each { dep ->
102+
from(project.zipTree(dep)) {
103+
exclude 'META-INF', 'META-INF/**'
143104
}
144105
}
145106
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.mojang.blaze3d;
2+
3+
import net.minecraftforge.api.distmarker.Dist;
4+
import net.minecraftforge.api.distmarker.OnlyIn;
5+
import org.lwjgl.glfw.GLFW;
6+
import org.lwjgl.system.MemoryUtil;
7+
8+
@OnlyIn(Dist.CLIENT)
9+
public class Blaze3D {
10+
public static void youJustLostTheGame() {
11+
MemoryUtil.memSet(0L, 0, 1L);
12+
}
13+
14+
public static double getTime() {
15+
return GLFW.glfwGetTime();
16+
}
17+
18+
private Blaze3D() {
19+
}
20+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.mojang.blaze3d;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import javax.annotation.meta.TypeQualifierDefault;
7+
import net.minecraftforge.api.distmarker.Dist;
8+
import net.minecraftforge.api.distmarker.OnlyIn;
9+
10+
@TypeQualifierDefault({ElementType.TYPE, ElementType.METHOD})
11+
@Retention(RetentionPolicy.CLASS)
12+
@OnlyIn(Dist.CLIENT)
13+
public @interface DontObfuscate {
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.mojang.blaze3d;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import javax.annotation.Nonnull;
7+
import javax.annotation.meta.TypeQualifierDefault;
8+
import net.minecraftforge.api.distmarker.Dist;
9+
import net.minecraftforge.api.distmarker.OnlyIn;
10+
11+
@Nonnull
12+
@TypeQualifierDefault({ElementType.FIELD})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@OnlyIn(Dist.CLIENT)
15+
public @interface FieldsAreNonnullByDefault {
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.mojang.blaze3d;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import javax.annotation.Nonnull;
7+
import javax.annotation.meta.TypeQualifierDefault;
8+
import net.minecraftforge.api.distmarker.Dist;
9+
import net.minecraftforge.api.distmarker.OnlyIn;
10+
11+
@Nonnull
12+
@TypeQualifierDefault({ElementType.METHOD})
13+
@Retention(RetentionPolicy.RUNTIME)
14+
@OnlyIn(Dist.CLIENT)
15+
public @interface MethodsReturnNonnullByDefault {
16+
}

0 commit comments

Comments
 (0)