mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
064ae6961b | ||
|
|
22d609ed6c | ||
|
|
315bbb74ff | ||
|
|
4e4d31b68c | ||
|
|
1a17fa6129 | ||
|
|
ca9df21258 | ||
|
|
93d7fa54fc | ||
|
|
f235d80d9f | ||
|
|
be34dd89a9 | ||
|
|
6663f23e13 | ||
|
|
f9f7ef2580 | ||
|
|
86352e9c19 | ||
|
|
8c8b31435b | ||
|
|
16b3e2780e | ||
|
|
1121f18413 | ||
|
|
96804fb4df | ||
|
|
03a6dbb405 | ||
|
|
77e8c72589 | ||
|
|
043e49a694 | ||
|
|
5169f1f6fe | ||
|
|
2bd83b26aa | ||
|
|
e6c1814122 | ||
|
|
7f2892de7e | ||
|
|
439ba462d6 | ||
|
|
7c6ae3e61e | ||
|
|
f9b894ecbf | ||
|
|
df53db351e | ||
|
|
9aa04c8036 | ||
|
|
626496cec0 | ||
|
|
022482a3bd | ||
|
|
dd228a9ac1 | ||
|
|
a6d1646591 | ||
|
|
39f9f393db | ||
|
|
d35784eb14 | ||
|
|
31fb15c88d | ||
|
|
29f175743b | ||
|
|
33499db93f | ||
|
|
84381553a9 | ||
|
|
2a7dde3d2e | ||
|
|
aa4f24c915 | ||
|
|
1d87831773 | ||
|
|
65e99f9b58 | ||
|
|
b98991dc70 | ||
|
|
435e65eb18 | ||
|
|
8211a5048a | ||
|
|
167f14f4a1 | ||
|
|
f332642409 | ||
|
|
77d41023b5 | ||
|
|
da2594289c | ||
|
|
6f3da80b5a | ||
|
|
474b47ea51 | ||
|
|
b6ce4fb066 | ||
|
|
1406f2bf1f | ||
|
|
5125775992 | ||
|
|
929c7b7a0b | ||
|
|
7bf02e7dcd | ||
|
|
9d0d249eaf | ||
|
|
c4b1df1fc7 | ||
|
|
b3f253df61 | ||
|
|
dc099069fa | ||
|
|
e80c785563 | ||
|
|
1f9611204f | ||
|
|
0120f6274d | ||
|
|
c0e74bc8a8 | ||
|
|
80feb0aeb2 | ||
|
|
f47429717d | ||
|
|
0239a736ec | ||
|
|
5c488c9007 | ||
|
|
53c039680c | ||
|
|
7379e8b9a4 | ||
|
|
2a0d9e8dac | ||
|
|
aacba8e38e | ||
|
|
f4fd1c2f16 | ||
|
|
813f3d630d | ||
|
|
76cea5a7da | ||
|
|
e33f794298 | ||
|
|
72d05d17a9 | ||
|
|
19f9b309a6 | ||
|
|
5b53616a47 | ||
|
|
5f9e6f3b56 | ||
|
|
0ad8e2c27f | ||
|
|
55f29764f8 | ||
|
|
a4f7087b92 | ||
|
|
a95b968c13 | ||
|
|
802298d99d | ||
|
|
5363dc5d99 | ||
|
|
9602c22083 | ||
|
|
17500032ae | ||
|
|
65bc41281f | ||
|
|
ba15737fe3 | ||
|
|
58f93263e2 | ||
|
|
d97f28141c | ||
|
|
0340664dbf | ||
|
|
d2cfda3fb4 | ||
|
|
48225e1bea | ||
|
|
37ea725749 | ||
|
|
733b812c7b | ||
|
|
9ab29ea8fe | ||
|
|
fe26b77e3b | ||
|
|
b8eca88f75 | ||
|
|
e039531497 | ||
|
|
9017e24b40 | ||
|
|
75570079ae | ||
|
|
e2167140db | ||
|
|
a89ce2d6f1 | ||
|
|
007cd42ec6 | ||
|
|
d16a8d6d5d | ||
|
|
69321a363e | ||
|
|
0e1ee4b1d2 | ||
|
|
cc1a9be2b4 | ||
|
|
1d7da4c595 | ||
|
|
1ac432c594 | ||
|
|
276871d5a3 | ||
|
|
8460227ddf | ||
|
|
f450d4025d | ||
|
|
93a815957d | ||
|
|
84b7cdc1cd | ||
|
|
83fee0b3d4 | ||
|
|
aeaebf5785 | ||
|
|
d88e660cbb | ||
|
|
ab949c7cca | ||
|
|
7728dde36b | ||
|
|
004ab59e6f | ||
|
|
7bfd2b8f34 | ||
|
|
f169c99348 | ||
|
|
d3d3bdc769 | ||
|
|
0a0f3232ea | ||
|
|
50d75a27e1 | ||
|
|
19f8d2a793 | ||
|
|
f173bde812 | ||
|
|
dd10933ab0 | ||
|
|
9ffa44f254 | ||
|
|
d8f41adf39 | ||
|
|
c3e84646db | ||
|
|
2094f99640 | ||
|
|
94f3bdaa69 | ||
|
|
7220e9d0b0 | ||
|
|
020102d87f | ||
|
|
f101700969 | ||
|
|
c4b148b84b | ||
|
|
b6a9274870 | ||
|
|
830d9699e3 | ||
|
|
fc68b81b21 | ||
|
|
2904772b16 | ||
|
|
e120b57032 | ||
|
|
b86b56260d | ||
|
|
b222b23557 | ||
|
|
8ec4253068 | ||
|
|
74ca88b7be | ||
|
|
a1119cd77a | ||
|
|
545723dc8c | ||
|
|
b64f4780c5 | ||
|
|
1c98b29087 | ||
|
|
33880331d2 | ||
|
|
74a43877e4 | ||
|
|
7542fbea48 | ||
|
|
2d9a1bc6f9 | ||
|
|
a57a240c13 | ||
|
|
b7fb6484d7 | ||
|
|
1a539ffebc | ||
|
|
27220a5ad8 | ||
|
|
e975fc8252 | ||
|
|
d85ea5a3b0 | ||
|
|
ccb7345084 | ||
|
|
93c00b67d9 | ||
|
|
cd393bbfdc | ||
|
|
fd045d4628 | ||
|
|
47e076071b | ||
|
|
a73e003dd3 | ||
|
|
949984268d | ||
|
|
114acfca3b | ||
|
|
56e538e8a9 | ||
|
|
fa46f3dd49 | ||
|
|
6ec5a8f2c1 | ||
|
|
49b596dda3 | ||
|
|
0c5ced1bbf | ||
|
|
4a09a2420d | ||
|
|
0ff8a596fc | ||
|
|
bca20ace4e | ||
|
|
f3b53001c9 | ||
|
|
15bac0eeaa | ||
|
|
1782973a29 | ||
|
|
9a4a501a95 | ||
|
|
9bbfbd5479 | ||
|
|
8c68731838 | ||
|
|
0d7f507f4e | ||
|
|
f78b943bdf | ||
|
|
160f3f88f9 | ||
|
|
45e38859ed | ||
|
|
38a5400a8c | ||
|
|
acd18455c2 | ||
|
|
5a7facc20f | ||
|
|
f54998a6b7 | ||
|
|
7d00d015f3 | ||
|
|
fed7beab89 | ||
|
|
cf3e9d1e0c | ||
|
|
749c9063af | ||
|
|
1af6632a29 | ||
|
|
7e79243bca | ||
|
|
36f9c804d9 | ||
|
|
06fe9ccda0 | ||
|
|
53eedb0f10 | ||
|
|
6e0e67b14d | ||
|
|
22f7f4649b | ||
|
|
8a77681574 | ||
|
|
6982c5dd56 | ||
|
|
7205c30ece | ||
|
|
80baad974e | ||
|
|
ae160cad12 | ||
|
|
6ff6277efa | ||
|
|
74f9ef838a | ||
|
|
395f89c973 | ||
|
|
8536521b7b | ||
|
|
b1659300e0 | ||
|
|
93226bbcff | ||
|
|
51fa230e7b | ||
|
|
5f292895cb | ||
|
|
9cfe741cea | ||
|
|
bed38d4253 | ||
|
|
37f226eda5 | ||
|
|
59b4affbe7 | ||
|
|
5477a36656 | ||
|
|
5648336893 | ||
|
|
f5b53d5d10 | ||
|
|
10448c1ac9 | ||
|
|
5243275db2 | ||
|
|
3041c2022b | ||
|
|
09be003d61 | ||
|
|
3fe5ddd68f | ||
|
|
935cb6782d | ||
|
|
9b421b54a7 | ||
|
|
6e23030595 | ||
|
|
78d69db79e | ||
|
|
9177ac1b2e | ||
|
|
248d207dbc | ||
|
|
03082c361a | ||
|
|
65372e3123 | ||
|
|
0f923fa51f | ||
|
|
d1e3567c6b | ||
|
|
af75547d37 | ||
|
|
37be3aff2d | ||
|
|
b9b17d8331 | ||
|
|
2a433a5c8c | ||
|
|
e344fd08a5 | ||
|
|
0484f695fb | ||
|
|
e55bd86dff | ||
|
|
b1247df4dc | ||
|
|
91dda36b08 | ||
|
|
ac19d1bf2b | ||
|
|
e0e0302ece | ||
|
|
6eb3e20abb | ||
|
|
738491c25d | ||
|
|
2686b7a9ab | ||
|
|
4b93e3a224 | ||
|
|
873c490470 | ||
|
|
11e3281b3f | ||
|
|
ce6c664acd | ||
|
|
c75eb9e7cf | ||
|
|
2353cd982a | ||
|
|
dbcf8bd075 | ||
|
|
9f3141ea16 | ||
|
|
c382527ba2 | ||
|
|
45f8dc5245 | ||
|
|
43391c009c | ||
|
|
15733a18e4 | ||
|
|
f68344cd7c | ||
|
|
e421ea164c | ||
|
|
178e3d244a | ||
|
|
bd5e107628 | ||
|
|
a477671c03 | ||
|
|
887bc37209 | ||
|
|
47f05a4fcd | ||
|
|
47ba5b7a89 | ||
|
|
05480843cd | ||
|
|
0e1ed8c936 | ||
|
|
edf41bda19 | ||
|
|
051416b823 | ||
|
|
84fe2cbcc4 | ||
|
|
4ff0d246ce | ||
|
|
9051021474 | ||
|
|
cc473be332 | ||
|
|
b1f73a0760 | ||
|
|
de03eb6e3c | ||
|
|
bef8c2da3d | ||
|
|
3820d1b66f | ||
|
|
7dbae7ea4a | ||
|
|
be5885155c | ||
|
|
5dac065994 | ||
|
|
1d7db95539 | ||
|
|
de24783152 | ||
|
|
bfeec0c7bd | ||
|
|
2e42340dfa | ||
|
|
16b82bb97b | ||
|
|
d76ee4edd7 | ||
|
|
cf09f3eeb9 | ||
|
|
d8eaeabf3c | ||
|
|
600e68cace | ||
|
|
625cd746ef | ||
|
|
fc000fe913 | ||
|
|
e3db429763 | ||
|
|
e803006360 | ||
|
|
07ffc890e5 | ||
|
|
5a20705f05 | ||
|
|
aaa1deeef2 | ||
|
|
50197b1fa5 | ||
|
|
797791c2af | ||
|
|
c2de232703 | ||
|
|
9118c3dd24 | ||
|
|
c6d512afe8 | ||
|
|
5037adede9 | ||
|
|
a5aca97e31 | ||
|
|
edca0c7293 | ||
|
|
132cc3659d | ||
|
|
680c4062f4 | ||
|
|
e1efab0452 | ||
|
|
bd428de4fa | ||
|
|
978b3c7fb1 | ||
|
|
ff752ab14b | ||
|
|
19a38f5cb9 |
No files matched your search
@@ -39,8 +39,6 @@ changelog.txt
|
||||
*.7z
|
||||
/logs/
|
||||
|
||||
gradle.properties
|
||||
!/mdk/gradle.properties
|
||||
/projects/forge/rejects/
|
||||
|
||||
# Srg2Source causes import bugs on these patches. If you intentionnally change these, remove the ignore.
|
||||
|
||||
Vendored
+17
-6
@@ -36,9 +36,11 @@ pipeline {
|
||||
}
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
|
||||
}
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "version:" | awk \'{print $2}\'').trim()
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "^version:" | cut -d" " -f2').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,15 +61,22 @@ pipeline {
|
||||
}
|
||||
}
|
||||
environment {
|
||||
FORGE_MAVEN = credentials('forge-maven-forge-user')
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
KEYSTORE = credentials('forge-jenkins-keystore-old')
|
||||
KEYSTORE_KEYPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
KEYSTORE_STOREPASS = credentials('forge-jenkins-keystore-old-keypass')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW} -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
sh 'curl --user ${FORGE_MAVEN} http://files.minecraftforge.net/maven/manage/promote/latest/net.minecraftforge.forge/${MYVERSION}'
|
||||
withCredentials([usernamePassword(credentialsId: 'maven-forge-user', usernameVariable: 'MAVEN_USER', passwordVariable: 'MAVEN_PASSWORD')]) {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PkeystoreKeyPass=${KEYSTORE_KEYPASS} -PkeystoreStorePass=${KEYSTORE_STOREPASS} -Pkeystore=${KEYSTORE} -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
build job: 'filegenerator', parameters: [string(name: 'COMMAND', value: "promote net.minecraftforge:forge ${env.MYVERSION} latest")], propagate: false, wait: false
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('test_publish_pr') { //Publish to local repo to test full process, but don't include credentials so it can't sign/publish to maven
|
||||
@@ -78,7 +87,9 @@ pipeline {
|
||||
CROWDIN = credentials('forge-crowdin')
|
||||
}
|
||||
steps {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PcrowdinKey=${CROWDIN}'
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} :forge:publish -PcrowdinKey=${CROWDIN}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Minecraft Forge
|
||||
Copyright (c) 2016-2020.
|
||||
Copyright (c) 2016-${year}.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
+277
-687
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
repositories {
|
||||
maven { url = 'https://maven.minecraftforge.net/' }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
implementation 'org.ow2.asm:asm:9.1'
|
||||
implementation 'org.ow2.asm:asm-tree:9.1'
|
||||
implementation 'net.minecraftforge:srgutils:0.4.+'
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.objectweb.asm.ClassReader
|
||||
import org.objectweb.asm.Opcodes
|
||||
import org.objectweb.asm.tree.ClassNode
|
||||
import org.objectweb.asm.tree.FieldNode
|
||||
import org.objectweb.asm.tree.MethodNode
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
abstract class BytecodeFinder extends DefaultTask {
|
||||
@InputFile abstract RegularFileProperty getJar()
|
||||
@OutputFile abstract RegularFileProperty getOutput()
|
||||
|
||||
BytecodeFinder() {
|
||||
output.convention(project.layout.buildDirectory.dir(name).map { it.file("output.json") })
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
|
||||
def outputFile = output.get().asFile
|
||||
if (outputFile.exists())
|
||||
outputFile.delete()
|
||||
|
||||
pre()
|
||||
|
||||
jar.get().asFile.withInputStream { i ->
|
||||
new ZipInputStream(i).withCloseable { zin ->
|
||||
ZipEntry zein
|
||||
while ((zein = zin.nextEntry) != null) {
|
||||
if (zein.name.endsWith('.class')) {
|
||||
def node = new ClassNode(Opcodes.ASM9)
|
||||
new ClassReader(zin).accept(node, 0)
|
||||
process(node)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post()
|
||||
outputFile.text = new JsonBuilder(getData()).toPrettyString()
|
||||
}
|
||||
|
||||
|
||||
protected process(ClassNode node) {
|
||||
if (node.fields != null) node.fields.each { process(node, it) }
|
||||
if (node.methods != null) node.methods.each { process(node, it) }
|
||||
}
|
||||
|
||||
protected pre() {}
|
||||
protected process(ClassNode parent, FieldNode node) {}
|
||||
protected process(ClassNode parent, MethodNode node) {}
|
||||
protected post() {}
|
||||
protected abstract Object getData()
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import net.minecraftforge.srgutils.IMappingFile
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.ConfigurableFileCollection
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.Optional
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.objectweb.asm.Opcodes
|
||||
|
||||
abstract class CheckATs extends DefaultTask {
|
||||
@InputFile abstract RegularFileProperty getInheritance()
|
||||
@InputFiles abstract ConfigurableFileCollection getAts()
|
||||
@InputFile @Optional abstract RegularFileProperty getMappings()
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
def mappings = mappings.map { IMappingFile.load(it.asFile) }.getOrNull()
|
||||
Util.init()
|
||||
def parse = { line ->
|
||||
def idx = line.indexOf('#')
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
def (modifier, cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
def key = cls + (desc.isEmpty() ? '' : ' ' + desc)
|
||||
return [modifier, cls, desc, comment, key]
|
||||
}
|
||||
def accessLevel = { access ->
|
||||
if ((access & Opcodes.ACC_PUBLIC) != 0) return 3
|
||||
if ((access & Opcodes.ACC_PROTECTED) != 0) return 2
|
||||
if ((access & Opcodes.ACC_PRIVATE) != 0) return 0
|
||||
return 1
|
||||
}
|
||||
def accessStr = { access ->
|
||||
if (access.endsWith('-f') || access.endsWith('+f'))
|
||||
return 4
|
||||
switch (access.toLowerCase()) {
|
||||
case 'public': return 3
|
||||
case 'protected': return 2
|
||||
case 'default': return 1
|
||||
case 'private': return 0
|
||||
default: return -1
|
||||
}
|
||||
}
|
||||
def json = inheritance.get().asFile.json()
|
||||
|
||||
ats.each { f ->
|
||||
TreeMap lines = [:]
|
||||
def group = null
|
||||
for (def line : f.readLines()) {
|
||||
if (line.isEmpty()) continue
|
||||
if (line.startsWith('#group ')) {
|
||||
def (modifier, cls, desc, comment, key) = parse.call(line.substring(7))
|
||||
|
||||
if (desc != '*' && desc != '*()' && desc != '<init>')
|
||||
throw new IllegalStateException('Invalid group: ' + line)
|
||||
|
||||
group = [modifier: modifier, cls: cls, desc: desc, comment: comment,
|
||||
existing: [] as Set,
|
||||
children: [] as TreeSet,
|
||||
group: true
|
||||
]
|
||||
if (lines.containsKey(key))
|
||||
throw new IllegalStateException('Duplicate group: ' + line)
|
||||
|
||||
lines[key] = group
|
||||
} else if (group != null) {
|
||||
if (line.startsWith('#endgroup')) {
|
||||
group = null
|
||||
} else {
|
||||
def (modifier, cls, desc, comment, key) = parse.call(line)
|
||||
group['existing'].add(key)
|
||||
}
|
||||
} else if (line.startsWith('#endgroup')) {
|
||||
throw new IllegalStateException('Invalid group ending: ' + line)
|
||||
} else if (line.startsWith('#')) {
|
||||
//Nom
|
||||
} else {
|
||||
def (modifier, cls, desc, comment, key) = parse.call(line)
|
||||
if (lines.containsKey(key)) {
|
||||
println('Duplicate: ' + line)
|
||||
continue
|
||||
}
|
||||
lines[key] = [modifier: modifier, cls: cls, desc: desc, comment: comment, group: false]
|
||||
}
|
||||
}
|
||||
|
||||
// Process Groups, this will remove any entries outside the group that is covered by the group
|
||||
for (def key : new ArrayList<>(lines.keySet())) {
|
||||
def entry = lines.get(key)
|
||||
if (entry != null && entry['group']) {
|
||||
def cls = entry['cls']
|
||||
def jcls = json.get(cls.replaceAll('\\.', '/'))
|
||||
if (jcls == null) {
|
||||
lines.remove(key)
|
||||
println('Invalid Group: ' + key)
|
||||
} else if ('*' == entry['desc']) {
|
||||
if (!jcls.containsKey('fields')) {
|
||||
lines.remove(key)
|
||||
println('Invalid Group, Class has no fields: ' + key)
|
||||
} else {
|
||||
jcls['fields'].each { field, value ->
|
||||
def fkey = cls + ' ' + field
|
||||
if (accessLevel.call(value['access']) < accessStr.call(entry['modifier'])) {
|
||||
if (lines.containsKey(fkey)) {
|
||||
lines.remove(fkey)
|
||||
} else if (!entry['existing'].contains(fkey)) {
|
||||
println('Added: ' + fkey)
|
||||
}
|
||||
entry['children'].add(fkey)
|
||||
} else if (lines.containsKey(fkey)) {
|
||||
lines.remove(fkey)
|
||||
println('Removed: ' + fkey)
|
||||
}
|
||||
}
|
||||
entry['existing'].stream().findAll{ !entry['children'].contains(it) }.each{ println('Removed: ' + it) }
|
||||
}
|
||||
} else if ('*()' == entry['desc']) {
|
||||
if (!jcls.containsKey('methods')) {
|
||||
lines.remove(key)
|
||||
println('Invalid Group, Class has no methods: ' + key)
|
||||
} else {
|
||||
jcls['methods'].each{ mtd, value ->
|
||||
if (mtd.startsWith('<clinit>') || mtd.startsWith('lambda$'))
|
||||
return
|
||||
key = cls + ' ' + mtd.replace(' ', '')
|
||||
if (accessLevel.call(value['access']) < accessStr.call(entry['modifier'])) {
|
||||
if (lines.containsKey(key)) {
|
||||
lines.remove(key)
|
||||
} else if (!entry['existing'].contains(key)) {
|
||||
println('Added: ' + key)
|
||||
}
|
||||
entry['children'].add(key)
|
||||
} else if (lines.containsKey(key)) {
|
||||
lines.remove(key)
|
||||
println('Removed: ' + key)
|
||||
}
|
||||
}
|
||||
entry['existing'].stream().findAll{ !entry['children'].contains(it) }.each{ println('Removed: ' + it) }
|
||||
}
|
||||
} else if ('<init>' == entry['desc']) { //Make all public non-abstract subclasses
|
||||
json.each{ tcls,value ->
|
||||
if (!value.containsKey('methods') || ((value['access'] & Opcodes.ACC_ABSTRACT) != 0))
|
||||
return
|
||||
def parents = [] as Set
|
||||
def parent = tcls
|
||||
while (parent != null && json.containsKey(parent)) {
|
||||
parents.add(parent)
|
||||
def p = json[parent]
|
||||
parent = p == null ? null : p['superName']
|
||||
}
|
||||
if (parents.contains(cls.replaceAll('\\.', '/'))) {
|
||||
value['methods'].each{ mtd, v ->
|
||||
if (mtd.startsWith('<init>')) {
|
||||
def child = tcls.replaceAll('/', '\\.') + ' ' + mtd.replace(' ', '')
|
||||
if (accessLevel.call(v['access']) < 3) {
|
||||
if (lines.containsKey(child)) {
|
||||
lines.remove(child)
|
||||
} else if (!entry['existing'].contains(child)) {
|
||||
println('Added: ' + child)
|
||||
}
|
||||
entry['children'].add(child)
|
||||
} else if (lines.containsKey(child)) {
|
||||
lines.remove(child)
|
||||
println('Removed: ' + child)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
entry['existing'].stream().findAll{ !entry['children'].contains(it) }.each{ println('Removed: ' + it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Process normal lines, remove invalid and remove narrowing
|
||||
for (def key : new ArrayList<>(lines.keySet())) {
|
||||
def entry = lines.get(key)
|
||||
if (entry != null && !entry['group']) {
|
||||
def cls = entry['cls']
|
||||
def jcls = json.get(cls.replaceAll('\\.', '/'))
|
||||
if (jcls == null) {
|
||||
lines.remove(key)
|
||||
println('Invalid: ' + key)
|
||||
} else if (entry['desc'] == '') {
|
||||
if (accessLevel.call(jcls['access']) > accessStr.call(entry['modifier']) && (entry.comment == null || !entry.comment.startsWith('#force '))) {
|
||||
lines.remove(key)
|
||||
println('Invalid Narrowing: ' + key)
|
||||
}
|
||||
} else if (!entry['desc'].contains('(')) {
|
||||
if (!jcls.containsKey('fields') || !jcls['fields'].containsKey(entry['desc'])) {
|
||||
lines.remove(key)
|
||||
println('Invalid: ' + key)
|
||||
} else {
|
||||
def value = jcls['fields'][entry['desc']]
|
||||
if (accessLevel.call(value['access']) > accessStr.call(entry['modifier']) && (entry.comment == null || !entry.comment.startsWith('#force '))) {
|
||||
lines.remove(key)
|
||||
println('Invalid Narrowing: ' + key)
|
||||
println(entry.comment)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
def jdesc = entry['desc'].replace('(', ' (')
|
||||
if (!jcls.containsKey('methods') || !jcls['methods'].containsKey(jdesc)) {
|
||||
lines.remove(key)
|
||||
println('Invalid: ' + key)
|
||||
} else {
|
||||
def value = jcls['methods'][jdesc]
|
||||
if (accessLevel.call(value['access']) > accessStr.call(entry['modifier']) && (entry.comment == null || !entry.comment.startsWith('#force '))) {
|
||||
lines.remove(key)
|
||||
println('Invalid Narrowing: ' + key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def data = []
|
||||
def remapComment = { entry ->
|
||||
if (!mappings || !entry || !entry.desc) return null
|
||||
def comment = entry.comment?.substring(1)?.trim()
|
||||
def jsonCls = json.get(entry.cls.replaceAll('\\.', '/'))
|
||||
def mappingsClass = mappings?.getClass(jsonCls.name)
|
||||
if (!mappingsClass) return entry.comment
|
||||
def idx = entry.desc.indexOf('(')
|
||||
def mappedName = idx == -1
|
||||
? mappingsClass.remapField(entry.desc)
|
||||
: mappingsClass.remapMethod(entry.desc.substring(0, idx), entry.desc.substring(idx))
|
||||
if (!mappedName) return entry.comment
|
||||
if (mappedName == '<init>')
|
||||
mappedName = 'constructor'
|
||||
|
||||
if (comment?.startsWith(mappedName))
|
||||
return '# ' + comment
|
||||
if (comment && comment.indexOf(' ') != -1) {
|
||||
def split = comment.split(" - ").toList()
|
||||
if (split[0].indexOf(' ') != -1)
|
||||
// The first string is more than one word, so append before it
|
||||
return "# ${mappedName} - ${comment}"
|
||||
split.remove(0)
|
||||
return "# ${mappedName} - ${String.join(' - ', split)}"
|
||||
}
|
||||
return '# ' + mappedName
|
||||
}
|
||||
lines.each { key,value ->
|
||||
if (!value.group) {
|
||||
def comment = remapComment.call(value)
|
||||
data.add(value.modifier + ' ' + key + (comment ? ' ' + comment : ''))
|
||||
} else {
|
||||
data.add('#group ' + value.modifier + ' ' + key + (value.comment == null ? '' : ' ' + value.comment))
|
||||
value.children.each {
|
||||
def line = value.modifier + ' ' + it
|
||||
def (modifier, cls, desc, comment) = parse.call(line)
|
||||
comment = remapComment.call([modifier: modifier, cls: cls, desc: desc, comment: comment])
|
||||
data.add(line + (comment ? ' ' + comment : ''))
|
||||
}
|
||||
data.add('#endgroup')
|
||||
}
|
||||
}
|
||||
f.text = data.join('\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.ConfigurableFileCollection
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.objectweb.asm.*
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
abstract class CheckExcs extends DefaultTask {
|
||||
@InputFile abstract RegularFileProperty getBinary()
|
||||
@InputFiles abstract ConfigurableFileCollection getExcs()
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
def known = []
|
||||
binary.get().asFile.withInputStream { i ->
|
||||
new ZipInputStream(i).withCloseable { zin ->
|
||||
def visitor = new ClassVisitor(Opcodes.ASM9) {
|
||||
private String cls
|
||||
@Override
|
||||
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
|
||||
this.cls = name
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
|
||||
known.add(this.cls + '.' + name + descriptor)
|
||||
super.visitMethod(access, name, descriptor, signature, exceptions)
|
||||
}
|
||||
}
|
||||
ZipEntry zein
|
||||
while ((zein = zin.nextEntry) != null) {
|
||||
if (zein.name.endsWith('.class')) {
|
||||
ClassReader reader = new ClassReader(zin)
|
||||
reader.accept(visitor, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
excs.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
|
||||
if (!line.contains('=')) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def (key, value) = line.split('=', 2)
|
||||
if (!known.contains(key)) {
|
||||
println('Unknown: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def (cls, desc) = key.split('\\.', 2)
|
||||
if (!desc.contains('(')) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
def name = desc.split('\\(', 2)[0]
|
||||
desc = '(' + desc.split('\\(', 2)[1]
|
||||
|
||||
def (exceptions, args) = value.contains('|') ? value.split('|', 2) : [value, '']
|
||||
|
||||
if (args.split(',').length != Type.getArgumentTypes(desc).length) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
lines.add(line)
|
||||
}
|
||||
f.text = lines.sort().join('\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
@@ -9,8 +10,8 @@ import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.util.regex.Pattern
|
||||
|
||||
public class CheckPatches extends DefaultTask {
|
||||
@InputDirectory File patchDir
|
||||
abstract class CheckPatches extends DefaultTask {
|
||||
@InputDirectory abstract DirectoryProperty getPatchDir()
|
||||
@Input boolean autoFix = false
|
||||
|
||||
@TaskAction
|
||||
@@ -21,7 +22,7 @@ public class CheckPatches extends DefaultTask {
|
||||
]
|
||||
|
||||
def verified = true;
|
||||
project.fileTree(patchDir).each { patch ->
|
||||
patchDir.get().asFileTree.each { patch ->
|
||||
def patchPath = project.rootDir.toPath().relativize(patch.toPath())
|
||||
verified &= verifyPatch(patch, autoFix, patchPath.toString(), hasS2SArtifact.contains(patchPath))
|
||||
}
|
||||
@@ -31,7 +32,7 @@ public class CheckPatches extends DefaultTask {
|
||||
}
|
||||
|
||||
def verifyPatch(patch, fix, patchPath, hasS2SArtifact) {
|
||||
def hunk_start_pattern = Pattern.compile('^@@ -[0-9,]* \\+[0-9,]* @@$')
|
||||
def hunk_start_pattern = Pattern.compile('^@@ -[0-9,]* \\+[0-9,_]* @@$')
|
||||
def white_space_pattern = Pattern.compile('^[+\\-]\\s*$')
|
||||
def import_pattern = Pattern.compile('^[+\\-]\\s*import.*')
|
||||
def field_pattern = Pattern.compile('^[+\\-][\\s]*((public|protected|private)[\\s]*)?(static[\\s]*)?(final)?([^=;]*)(=.*)?;\\s*$')
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.ConfigurableFileCollection
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
abstract class CheckSAS extends DefaultTask {
|
||||
@InputFile abstract RegularFileProperty getInheritance()
|
||||
@InputFiles abstract ConfigurableFileCollection getSass()
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
def json = inheritance.get().asFile.json()
|
||||
|
||||
sass.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
if (line[0] == '\t') return //Skip any tabbed lines, those are ones we add
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
lines.add(line)
|
||||
return
|
||||
}
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
cls = cls.replaceAll('\\.', '/')
|
||||
desc = desc.replace('(', ' (')
|
||||
|
||||
if (json[cls] == null || (!desc.isEmpty() && (json[cls]['methods'] == null || json[cls]['methods'][desc] == null))) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
//Class SAS
|
||||
if (desc.isEmpty()) {
|
||||
lines.add(cls + (comment == null ? '' : ' ' + comment))
|
||||
if (json[cls]['methods'] != null)
|
||||
(json[cls]['methods'] as TreeMap).each {
|
||||
findChildMethods(json, cls, it.key).each { lines.add('\t' + it) }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//Method SAS
|
||||
lines.add(cls + ' ' + desc.replace(' ', '') + (comment == null ? '' : ' ' + comment))
|
||||
findChildMethods(json, cls, desc).each { lines.add('\t' + it) }
|
||||
}
|
||||
f.text = lines.join('\n')
|
||||
}
|
||||
}
|
||||
|
||||
protected static findChildMethods(json, cls, desc)
|
||||
{
|
||||
return json.values().findAll{ it.methods != null && it.methods[desc] != null && it.methods[desc].override == cls}
|
||||
.collect { it.name + ' ' + desc.replace(' ', '') } as TreeSet
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import java.util.function.BiConsumer
|
||||
|
||||
public class ClosureHelper {
|
||||
BiConsumer<String, Closure> callback
|
||||
|
||||
public ClosureHelper(Closure cl, BiConsumer<String, Closure> callback) {
|
||||
this.callback = callback
|
||||
apply(this, cl)
|
||||
}
|
||||
|
||||
|
||||
def methodMissing(String name, Object args) {
|
||||
if (!args.class.isArray()) return
|
||||
Object[] aargs = (Object[])args
|
||||
|
||||
if (aargs.length == 1 && aargs[0] instanceof Closure) {
|
||||
this.callback.accept(name, (Closure)aargs[0])
|
||||
} else {
|
||||
throw new IllegalArgumentException('Unknown method: "' + name + '" with arguments ' + args + ' for ' + this)
|
||||
}
|
||||
}
|
||||
|
||||
static <T> T apply(T obj, Closure cl) {
|
||||
cl.delegate = obj
|
||||
cl.resolveStrategy = Closure.DELEGATE_FIRST
|
||||
cl()
|
||||
return obj
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Optional
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
abstract class Crowdin extends DefaultTask {
|
||||
@Input abstract Property<String> getId()
|
||||
@Input @Optional abstract Property<String> getKey()
|
||||
@Input boolean json = true
|
||||
@OutputFile abstract RegularFileProperty getOutput()
|
||||
@OutputFile abstract RegularFileProperty getExport()
|
||||
|
||||
Crowdin() {
|
||||
outputs.upToDateWhen{ false }
|
||||
id.convention('minecraft-forge')
|
||||
output.convention(project.layout.buildDirectory.dir(name).map {it.file("output.zip") })
|
||||
export.convention(project.layout.buildDirectory.dir(name).map {it.file("export.json") })
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
def run() {
|
||||
File outputFile = output.get().asFile
|
||||
File exportFile = export.get().asFile
|
||||
if (outputFile.exists())
|
||||
outputFile.delete()
|
||||
|
||||
if (!key.isPresent())
|
||||
return
|
||||
String key = this.key.get()
|
||||
String id = this.id.get()
|
||||
|
||||
// Force an export
|
||||
new URL("https://api.crowdin.com/api/project/${id}/export?key=${key}").withInputStream { i ->
|
||||
exportFile.withOutputStream { it << i }
|
||||
}
|
||||
|
||||
if (!exportFile.text.contains('success')) {
|
||||
throw new RuntimeException("Crowdin export failed, see ${exportFile} for more info")
|
||||
}
|
||||
|
||||
new URL("https://api.crowdin.com/api/project/${id}/download/all.zip?key=${key}").withInputStream { i ->
|
||||
new ZipInputStream(i).withCloseable { zin ->
|
||||
outputFile.withOutputStream { out ->
|
||||
new ZipOutputStream(out).withCloseable { zout ->
|
||||
ZipEntry zein
|
||||
while ((zein = zin.nextEntry) != null) {
|
||||
if (zein.isDirectory()) {
|
||||
zout.putNextEntry(new ZipEntry(zein.name))
|
||||
} else {
|
||||
// 1.13+ uses json
|
||||
if (zein.name.endsWith('.json') == json) {
|
||||
ZipEntry zeout = new ZipEntry(json ? zein.name.toLowerCase() : zein.name)
|
||||
zeout.time = 1
|
||||
zout.putNextEntry(zeout)
|
||||
zout << zin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
import java.nio.file.Files
|
||||
|
||||
abstract class DownloadLibraries extends DefaultTask {
|
||||
@InputFile abstract RegularFileProperty getInput()
|
||||
@OutputDirectory abstract DirectoryProperty getOutput()
|
||||
@OutputFile abstract RegularFileProperty getLibrariesOutput()
|
||||
|
||||
DownloadLibraries() {
|
||||
output.convention(project.layout.buildDirectory.dir(name))
|
||||
librariesOutput.convention(project.layout.buildDirectory.dir(name).map(d -> d.file('libraries.txt')))
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
def run() {
|
||||
Util.init()
|
||||
File outputDir = output.get().asFile
|
||||
def libraries = new ArrayList()
|
||||
|
||||
def json = input.get().asFile.json().libraries.each { lib ->
|
||||
//TODO: Thread?
|
||||
def artifacts = [lib.downloads.artifact] + lib.downloads.get('classifiers', [:]).values()
|
||||
artifacts.each{ art ->
|
||||
def target = new File(outputDir, art.path)
|
||||
libraries.add(target.absolutePath)
|
||||
if (!target.exists() || !art.sha1.equals(target.sha1())) {
|
||||
project.logger.lifecycle("Downloading ${art.url}")
|
||||
if (!target.parentFile.exists()) {
|
||||
target.parentFile.mkdirs()
|
||||
}
|
||||
new URL(art.url).withInputStream { i ->
|
||||
target.withOutputStream { it << i }
|
||||
}
|
||||
if (!art.sha1.equals(target.sha1())) {
|
||||
throw new IllegalStateException("Failed to download ${art.url} to ${target.canonicalPath} SHA Mismatch")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Files.write(librariesOutput.get().asFile.toPath(), libraries)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.transform.EqualsAndHashCode
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.Nested
|
||||
import org.gradle.api.tasks.Optional
|
||||
import org.objectweb.asm.tree.ClassNode
|
||||
import org.objectweb.asm.tree.MethodNode
|
||||
|
||||
import static org.objectweb.asm.Opcodes.*
|
||||
|
||||
abstract class FieldCompareFinder extends BytecodeFinder {
|
||||
@Nested
|
||||
Map<String, Search> fields = [:] as HashMap
|
||||
@Internal
|
||||
Map<Search, String> fieldsReverse = [:] as HashMap
|
||||
@Internal
|
||||
Map<String, Set<ObjectTarget>> targets = [:] as TreeMap
|
||||
|
||||
@Override
|
||||
protected pre() {
|
||||
//fields.each{ k,v -> logger.lifecycle("Fields: " + k + ' ' + v) }
|
||||
}
|
||||
|
||||
@Override
|
||||
protected process(ClassNode parent, MethodNode node) {
|
||||
def last = null
|
||||
def parentInstance = new ObjectTarget(owner: parent.name, name: '', desc: '')
|
||||
for (int x = 0; x < node.instructions.size(); x++) {
|
||||
def current = node.instructions.get(x)
|
||||
if (current.opcode == IF_ACMPEQ || current.opcode == IF_ACMPNE) {
|
||||
if (last != null && (last.opcode == GETSTATIC || last.opcode == GETFIELD)) {
|
||||
def target = new Search(cls: last.owner, name: last.name)
|
||||
def wanted = fieldsReverse.get(target)
|
||||
def original = fields.get(wanted)
|
||||
def instance = new ObjectTarget(owner: parent.name, name: node.name, desc: node.desc)
|
||||
if (wanted != null && (original.blacklist == null || (!original.blacklist.contains(instance) && !original.blacklist.contains(parentInstance)))) {
|
||||
targets.computeIfAbsent(wanted, { k -> new TreeSet() }).add(instance)
|
||||
}
|
||||
}
|
||||
}
|
||||
last = current
|
||||
}
|
||||
}
|
||||
|
||||
@Internal
|
||||
@Override
|
||||
protected Object getData() {
|
||||
def ret = [:] as HashMap
|
||||
targets.forEach{ k, v ->
|
||||
def e = fields.get(k)
|
||||
ret[k] = [
|
||||
cls: e.cls,
|
||||
name: e.name,
|
||||
replacement: e.replacement,
|
||||
targets: v
|
||||
]
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
@EqualsAndHashCode(excludes = ['replacement', 'blacklist'])
|
||||
public static class Search {
|
||||
@Input
|
||||
String cls
|
||||
|
||||
@Input
|
||||
String name
|
||||
|
||||
@Input
|
||||
String replacement
|
||||
|
||||
@Nested
|
||||
@Optional
|
||||
Set<ObjectTarget> blacklist
|
||||
|
||||
@Override
|
||||
String toString() {
|
||||
return cls + '.' + name
|
||||
}
|
||||
|
||||
def blacklist(def owner, def name, def desc) {
|
||||
if (blacklist == null)
|
||||
blacklist = new HashSet()
|
||||
blacklist.add(new ObjectTarget(owner: owner, name: name, desc: desc))
|
||||
}
|
||||
def blacklist(def owner) {
|
||||
blacklist(owner, '', '')
|
||||
}
|
||||
}
|
||||
|
||||
def fields(Closure cl) {
|
||||
new ClosureHelper(cl, {name, ccl ->
|
||||
def search = ClosureHelper.apply(new Search(), ccl)
|
||||
this.fields.put(name, search)
|
||||
this.fieldsReverse.put(search, name)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.transform.EqualsAndHashCode
|
||||
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Nested
|
||||
import org.gradle.api.tasks.Optional
|
||||
|
||||
@EqualsAndHashCode
|
||||
public class ObjectTarget implements Comparable<ObjectTarget> {
|
||||
@Input
|
||||
String owner
|
||||
|
||||
@Input
|
||||
String name
|
||||
|
||||
@Input
|
||||
@Optional
|
||||
String desc
|
||||
|
||||
@Override
|
||||
String toString() {
|
||||
if (desc == null)
|
||||
return owner + '.' + name
|
||||
return owner + '.' + name + desc
|
||||
}
|
||||
|
||||
@Override
|
||||
int compareTo(ObjectTarget o) {
|
||||
return toString().compareTo(o.toString())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
import java.security.MessageDigest
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
public class Util {
|
||||
static void init() {
|
||||
File.metaClass.sha1 = { ->
|
||||
MessageDigest md = MessageDigest.getInstance('SHA-1')
|
||||
delegate.eachByte 4096, {bytes, size ->
|
||||
md.update(bytes, 0, size)
|
||||
}
|
||||
return md.digest().collect {String.format "%02x", it}.join()
|
||||
}
|
||||
|
||||
File.metaClass.json = { -> new JsonSlurper().parseText(delegate.text) }
|
||||
|
||||
Date.metaClass.iso8601 = { ->
|
||||
def format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
def result = format.format(delegate)
|
||||
return result[0..21] + ':' + result[22..-1]
|
||||
}
|
||||
|
||||
String.metaClass.rsplit = { String del, int limit = -1 ->
|
||||
def lst = new ArrayList()
|
||||
def x = 0, idx
|
||||
def tmp = delegate
|
||||
while ((idx = tmp.lastIndexOf(del)) != -1 && (limit == -1 || x++ < limit)) {
|
||||
lst.add(0, tmp.substring(idx + del.length(), tmp.length()))
|
||||
tmp = tmp.substring(0, idx)
|
||||
}
|
||||
lst.add(0, tmp)
|
||||
return lst
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] getClasspath(project, libs, artifact) {
|
||||
def ret = []
|
||||
artifactTree(project, artifact).each { key, lib ->
|
||||
libs[lib.name] = lib
|
||||
if (lib.name != artifact)
|
||||
ret.add(lib.name)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
public static def getArtifacts(project, config, classifiers) {
|
||||
def ret = [:]
|
||||
config.resolvedConfiguration.resolvedArtifacts.each {
|
||||
def art = [
|
||||
group: it.moduleVersion.id.group,
|
||||
name: it.moduleVersion.id.name,
|
||||
version: it.moduleVersion.id.version,
|
||||
classifier: it.classifier,
|
||||
extension: it.extension,
|
||||
file: it.file
|
||||
]
|
||||
def key = art.group + ':' + art.name
|
||||
def folder = "${art.group.replace('.', '/')}/${art.name}/${art.version}/"
|
||||
def filename = "${art.name}-${art.version}"
|
||||
if (art.classifier != null)
|
||||
filename += "-${art.classifier}"
|
||||
filename += ".${art.extension}"
|
||||
def path = "${folder}${filename}"
|
||||
def url = "https://libraries.minecraft.net/${path}"
|
||||
if (!checkExists(url)) {
|
||||
url = "https://maven.minecraftforge.net/${path}"
|
||||
}
|
||||
//TODO remove when Mojang launcher is updated
|
||||
if (!classifiers && art.classifier != null) {
|
||||
//Mojang launcher doesn't currently support classifiers, so... move it to part of the version, and force the extension to 'jar'
|
||||
// However, keep the path normal so that our mirror system works.
|
||||
art.version = "${art.version}-${art.classifier}"
|
||||
art.classifier = null
|
||||
art.extension = 'jar'
|
||||
}
|
||||
ret[key] = [
|
||||
name: "${art.group}:${art.name}:${art.version}" + (art.classifier == null ? '' : ":${art.classifier}") + (art.extension == 'jar' ? '' : "@${art.extension}"),
|
||||
downloads: [
|
||||
artifact: [
|
||||
path: path,
|
||||
url: url,
|
||||
sha1: sha1(art.file),
|
||||
size: art.file.length()
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
public static def iso8601Now() { new Date().iso8601() }
|
||||
|
||||
public static def sha1(file) {
|
||||
MessageDigest md = MessageDigest.getInstance('SHA-1')
|
||||
file.eachByte 4096, {bytes, size ->
|
||||
md.update(bytes, 0, size)
|
||||
}
|
||||
return md.digest().collect {String.format "%02x", it}.join()
|
||||
}
|
||||
|
||||
private static def artifactTree(project, artifact) {
|
||||
if (!project.ext.has('tree_resolver'))
|
||||
project.ext.tree_resolver = 1
|
||||
def cfg = project.configurations.create('tree_resolver_' + project.ext.tree_resolver++)
|
||||
def dep = project.dependencies.create(artifact)
|
||||
cfg.dependencies.add(dep)
|
||||
def files = cfg.resolve()
|
||||
return getArtifacts(project, cfg, true)
|
||||
}
|
||||
|
||||
private static boolean checkExists(url) {
|
||||
try {
|
||||
def code = new URL(url).openConnection().with {
|
||||
requestMethod = 'HEAD'
|
||||
connect()
|
||||
responseCode
|
||||
}
|
||||
return code == 200
|
||||
} catch (Exception e) {
|
||||
if (e.toString().contains('unable to find valid certification path to requested target'))
|
||||
throw new RuntimeException('Failed to connect to ' + url + ': Missing certificate root authority, try updating java')
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
<img src="assets/Forge_logo.svg">
|
||||

|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
|
||||
@@ -1,5 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
@@ -66,6 +82,7 @@ esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
@@ -109,10 +126,11 @@ if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
@@ -138,19 +156,19 @@ if $cygwin ; then
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -159,14 +177,9 @@ save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+24
-19
@@ -1,3 +1,19 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -35,7 +54,7 @@ goto fail
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
@@ -45,28 +64,14 @@ echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
+22
-29
@@ -1,53 +1,46 @@
|
||||
-------------------------------------------
|
||||
|
||||
Source installation information for modders
|
||||
-------------------------------------------
|
||||
This code follows the Minecraft Forge installation methodology. It will apply
|
||||
some small patches to the vanilla MCP source code, giving you and it access
|
||||
to some of the data and functions you need to build a successful mod.
|
||||
|
||||
Note also that the patches are built against "unrenamed" MCP source code (aka
|
||||
srgnames) - this means that you will not be able to read them directly against
|
||||
Note also that the patches are built against "un-renamed" MCP source code (aka
|
||||
SRG Names) - this means that you will not be able to read them directly against
|
||||
normal code.
|
||||
|
||||
Source pack installation information:
|
||||
|
||||
Standalone source installation
|
||||
Setup Process:
|
||||
==============================
|
||||
|
||||
See the Forge Documentation online for more detailed instructions:
|
||||
http://mcforge.readthedocs.io/en/latest/gettingstarted/
|
||||
|
||||
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
|
||||
|
||||
Step 2: You're left with a choice.
|
||||
If you prefer to use Eclipse:
|
||||
1. Run the following command: "gradlew genEclipseRuns" (./gradlew genEclipseRuns if you are on Mac/Linux)
|
||||
1. Run the following command: `gradlew genEclipseRuns` (`./gradlew genEclipseRuns` if you are on Mac/Linux)
|
||||
2. Open Eclipse, Import > Existing Gradle Project > Select Folder
|
||||
or run "gradlew eclipse" to generate the project.
|
||||
(Current Issue)
|
||||
4. Open Project > Run/Debug Settings > Edit runClient and runServer > Environment
|
||||
5. Edit MOD_CLASSES to show [modid]%%[Path]; 2 times rather then the generated 4.
|
||||
or run `gradlew eclipse` to generate the project.
|
||||
|
||||
If you prefer to use IntelliJ:
|
||||
1. Open IDEA, and import project.
|
||||
2. Select your build.gradle file and have it import.
|
||||
3. Run the following command: "gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux)
|
||||
3. Run the following command: `gradlew genIntellijRuns` (`./gradlew genIntellijRuns` if you are on Mac/Linux)
|
||||
4. Refresh the Gradle Project in IDEA if required.
|
||||
|
||||
If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again.
|
||||
If at any point you are missing libraries in your IDE, or you've run into problems you can
|
||||
run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything
|
||||
{this does not affect your code} and then start the process again.
|
||||
|
||||
Should it still not work,
|
||||
Refer to #ForgeGradle on EsperNet for more information about the gradle environment.
|
||||
or the Forge Project Discord discord.gg/UvedJ9m
|
||||
Mapping Names:
|
||||
=============================
|
||||
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields
|
||||
in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this
|
||||
license, if you do not agree with it you can change your mapping names to other crowdsourced names in your
|
||||
build.gradle. For the latest license text, refer to the mapping file itself, or the reference copy here:
|
||||
https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||
|
||||
Forge source installation
|
||||
Additional Resources:
|
||||
=========================
|
||||
MinecraftForge ships with this code and installs it as part of the forge
|
||||
installation process, no further action is required on your part.
|
||||
|
||||
LexManos' Install Video
|
||||
=======================
|
||||
https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be
|
||||
|
||||
For more details update more often refer to the Forge Forums:
|
||||
http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
|
||||
Community Documentation: http://mcforge.readthedocs.io/en/latest/gettingstarted/
|
||||
LexManos' Install Video: https://www.youtube.com/watch?v=8VEdtQLuLO0
|
||||
Forge Forum: https://forums.minecraftforge.net/
|
||||
Forge Discord: https://discord.gg/UvedJ9m
|
||||
+38
-11
@@ -1,11 +1,10 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = 'https://maven.minecraftforge.net' }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
@@ -17,13 +16,19 @@ version = '1.0'
|
||||
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'modid'
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
minecraft {
|
||||
// The mappings can be changed at any time, and must be in the following format.
|
||||
// snapshot_YYYYMMDD Snapshot are built nightly.
|
||||
// stable_# Stables are built at the discretion of the MCP team.
|
||||
// Channel: Version:
|
||||
// snapshot YYYYMMDD Snapshot are built nightly.
|
||||
// stable # Stables are built at the discretion of the MCP team.
|
||||
// official MCVersion Official field/method names from Mojang mapping files
|
||||
//
|
||||
// You must be aware of the Mojang license when using the 'official' mappings.
|
||||
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||
//
|
||||
// Use non-default mappings at your own risk. they may not always work.
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
mappings channel: '@MAPPING_CHANNEL@', version: '@MAPPING_VERSION@'
|
||||
@@ -38,9 +43,15 @@ minecraft {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
// The markers can be changed as needed.
|
||||
// "SCAN": For mods scan.
|
||||
// "REGISTRIES": For firing of registry events.
|
||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
// Recommended logging level for the console
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
@@ -54,9 +65,15 @@ minecraft {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
// The markers can be changed as needed.
|
||||
// "SCAN": For mods scan.
|
||||
// "REGISTRIES": For firing of registry events.
|
||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
// Recommended logging level for the console
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
@@ -70,12 +87,19 @@ minecraft {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
// The markers can be changed as needed.
|
||||
// "SCAN": For mods scan.
|
||||
// "REGISTRIES": For firing of registry events.
|
||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
||||
property 'forge.logging.markers', 'REGISTRIES'
|
||||
|
||||
// Recommended logging level for the console
|
||||
// You can set various levels here.
|
||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
|
||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
||||
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
@@ -86,6 +110,9 @@ minecraft {
|
||||
}
|
||||
}
|
||||
|
||||
// Include resources generated by data generators.
|
||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||
|
||||
dependencies {
|
||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||
@@ -144,4 +171,4 @@ publishing {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class ExampleMod
|
||||
|
||||
private void doClientStuff(final FMLClientSetupEvent event) {
|
||||
// do something that can only be done on the client
|
||||
LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings);
|
||||
LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().options);
|
||||
}
|
||||
|
||||
private void enqueueIMC(final InterModEnqueueEvent event)
|
||||
|
||||
@@ -6,24 +6,26 @@
|
||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||
modLoader="javafml" #mandatory
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||
loaderVersion="[32,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
loaderVersion="[@FORGE_SPEC_VERSION@,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
||||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||
license="All rights reserved"
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
issueTrackerURL="http://my.issue.tracker/" #optional
|
||||
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId="examplemod" #mandatory
|
||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
||||
# see the associated build.gradle script for how to populate this completely automatically during a build
|
||||
version="${file.jarVersion}" #mandatory
|
||||
# A display name for the mod
|
||||
displayName="Example Mod" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
||||
updateJSONURL="http://myurl.me/" #optional
|
||||
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
||||
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||
displayURL="http://example.com/" #optional
|
||||
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
|
||||
# A file name (in the root of the mod JAR) containing a logo for display
|
||||
logoFile="examplemod.png" #optional
|
||||
# A text field displayed in the mod UI
|
||||
@@ -45,7 +47,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory=true #mandatory
|
||||
# The version range of the dependency
|
||||
versionRange="[32,)" #mandatory
|
||||
versionRange="[@FORGE_SPEC_VERSION@,)" #mandatory
|
||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||
ordering="NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||
@@ -54,6 +56,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.16.1]"
|
||||
# This version range declares a minimum of the current minecraft version up to but not including the next major version
|
||||
versionRange="[@MC_VERSION@,@MC_NEXT_VERSION@)"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "examplemod resources",
|
||||
"pack_format": 5,
|
||||
"_comment": "A pack_format of 5 requires json lang files and some texture changes from 1.15. Note: we require v5 pack meta for all mods."
|
||||
"pack_format": 6,
|
||||
"_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods."
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -556,10 +556,17 @@
|
||||
@@ -572,10 +_,17 @@
|
||||
GL13.glClientActiveTexture(p_227747_0_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/vertex/IVertexBuilder.java
|
||||
+++ b/com/mojang/blaze3d/vertex/IVertexBuilder.java
|
||||
@@ -18,7 +18,7 @@
|
||||
@@ -18,7 +_,7 @@
|
||||
import org.lwjgl.system.MemoryStack;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -9,7 +9,7 @@
|
||||
Logger field_227884_f_ = LogManager.getLogger();
|
||||
|
||||
IVertexBuilder func_225582_a_(double p_225582_1_, double p_225582_3_, double p_225582_5_);
|
||||
@@ -96,11 +96,12 @@
|
||||
@@ -96,11 +_,12 @@
|
||||
f5 = p_227890_3_[k] * p_227890_6_;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
|
||||
+++ b/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
|
||||
@@ -63,6 +63,15 @@
|
||||
@@ -63,6 +_,15 @@
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/advancements/Advancement.java
|
||||
+++ b/net/minecraft/advancements/Advancement.java
|
||||
@@ -309,6 +309,7 @@
|
||||
@@ -309,6 +_,7 @@
|
||||
}
|
||||
|
||||
public static Advancement.Builder func_241043_a_(JsonObject p_241043_0_, ConditionArrayParser p_241043_1_) {
|
||||
+ if (!net.minecraftforge.common.crafting.ConditionalAdvancement.processConditions(p_241043_0_)) return null;
|
||||
+ if ((p_241043_0_ = net.minecraftforge.common.crafting.ConditionalAdvancement.processConditional(p_241043_0_)) == null) return null;
|
||||
ResourceLocation resourcelocation = p_241043_0_.has("parent") ? new ResourceLocation(JSONUtils.func_151200_h(p_241043_0_, "parent")) : null;
|
||||
DisplayInfo displayinfo = p_241043_0_.has("display") ? DisplayInfo.func_192294_a(JSONUtils.func_152754_s(p_241043_0_, "display")) : null;
|
||||
AdvancementRewards advancementrewards = p_241043_0_.has("rewards") ? AdvancementRewards.func_241096_a_(JSONUtils.func_152754_s(p_241043_0_, "rewards")) : AdvancementRewards.field_192114_a;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/AdvancementList.java
|
||||
+++ b/net/minecraft/advancements/AdvancementList.java
|
||||
@@ -96,6 +96,7 @@
|
||||
@@ -96,6 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/AdvancementManager.java
|
||||
+++ b/net/minecraft/advancements/AdvancementManager.java
|
||||
@@ -36,6 +36,10 @@
|
||||
@@ -36,6 +_,10 @@
|
||||
try {
|
||||
JsonObject jsonobject = JSONUtils.func_151210_l(p_240923_3_, "advancement");
|
||||
Advancement.Builder advancement$builder = Advancement.Builder.func_241043_a_(jsonobject, new ConditionArrayParser(p_240923_2_, this.field_240922_d_));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/AdvancementRewards.java
|
||||
+++ b/net/minecraft/advancements/AdvancementRewards.java
|
||||
@@ -39,7 +39,7 @@
|
||||
@@ -39,7 +_,7 @@
|
||||
|
||||
public void func_192113_a(ServerPlayerEntity p_192113_1_) {
|
||||
p_192113_1_.func_195068_e(this.field_192115_b);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/advancements/PlayerAdvancements.java
|
||||
@@ -159,6 +159,10 @@
|
||||
@@ -159,6 +_,10 @@
|
||||
}
|
||||
|
||||
this.func_240920_c_(p_240921_1_);
|
||||
@@ -11,7 +11,7 @@
|
||||
this.func_192752_d();
|
||||
this.func_240919_b_(p_240921_1_);
|
||||
}
|
||||
@@ -192,6 +196,8 @@
|
||||
@@ -192,6 +_,8 @@
|
||||
}
|
||||
|
||||
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_) {
|
||||
@@ -20,7 +20,7 @@
|
||||
boolean flag = false;
|
||||
AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_);
|
||||
boolean flag1 = advancementprogress.func_192105_a();
|
||||
@@ -204,6 +210,7 @@
|
||||
@@ -204,6 +_,7 @@
|
||||
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223620_w)) {
|
||||
this.field_240917_e_.func_232641_a_(new TranslationTextComponent("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()), ChatType.SYSTEM, Util.field_240973_b_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/criterion/ItemPredicate.java
|
||||
+++ b/net/minecraft/advancements/criterion/ItemPredicate.java
|
||||
@@ -26,6 +26,8 @@
|
||||
@@ -26,6 +_,8 @@
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class ItemPredicate {
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final ItemPredicate field_192495_a = new ItemPredicate();
|
||||
@Nullable
|
||||
private final ITag<Item> field_200018_b;
|
||||
@@ -105,6 +107,11 @@
|
||||
@@ -105,6 +_,11 @@
|
||||
public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) {
|
||||
if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) {
|
||||
JsonObject jsonobject = JSONUtils.func_151210_l(p_192492_0_, "item");
|
||||
@@ -21,18 +21,18 @@
|
||||
MinMaxBounds.IntBound minmaxbounds$intbound = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("count"));
|
||||
MinMaxBounds.IntBound minmaxbounds$intbound1 = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("durability"));
|
||||
if (jsonobject.has("data")) {
|
||||
@@ -204,6 +211,14 @@
|
||||
@@ -202,6 +_,14 @@
|
||||
} else {
|
||||
return new ItemPredicate[0];
|
||||
}
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public static void register(ResourceLocation name, java.util.function.Function<JsonObject, ItemPredicate> deserializer) {
|
||||
+ custom_predicates.put(name, deserializer);
|
||||
+ }
|
||||
+
|
||||
+ public static Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> getPredicates() {
|
||||
+ return unmod_predicates;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
|
||||
private final List<EnchantmentPredicate> field_226657_b_ = Lists.newArrayList();
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractBlock.java
|
||||
+++ b/net/minecraft/block/AbstractBlock.java
|
||||
@@ -60,7 +60,8 @@
|
||||
@@ -60,7 +_,8 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
protected static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
|
||||
protected final Material field_149764_J;
|
||||
protected final boolean field_235688_at_;
|
||||
@@ -87,6 +88,8 @@
|
||||
@@ -87,6 +_,8 @@
|
||||
this.field_226887_g_ = p_i241196_1_.field_226894_k_;
|
||||
this.field_208621_p = p_i241196_1_.field_208772_j;
|
||||
this.field_235684_aB_ = p_i241196_1_;
|
||||
@@ -19,16 +19,16 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -129,7 +132,7 @@
|
||||
@@ -129,7 +_,7 @@
|
||||
|
||||
@Deprecated
|
||||
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
|
||||
- if (this.func_235695_q_() && !p_196243_1_.func_203425_a(p_196243_4_.func_177230_c())) {
|
||||
+ if (p_196243_1_.hasTileEntity() && (p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c() || !p_196243_4_.hasTileEntity())) {
|
||||
+ if (p_196243_1_.hasTileEntity() && (!p_196243_1_.func_203425_a(p_196243_4_.func_177230_c()) || !p_196243_4_.hasTileEntity())) {
|
||||
p_196243_2_.func_175713_t(p_196243_3_);
|
||||
}
|
||||
|
||||
@@ -191,7 +194,7 @@
|
||||
@@ -191,7 +_,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -294,8 +297,8 @@
|
||||
@@ -294,8 +_,8 @@
|
||||
if (f == -1.0F) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,14 +324,14 @@
|
||||
@@ -321,14 +_,14 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -65,10 +65,14 @@
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -346,6 +349,10 @@
|
||||
@@ -346,6 +_,14 @@
|
||||
return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P());
|
||||
}
|
||||
|
||||
+ protected boolean isAir(BlockState state) {
|
||||
+ return ((AbstractBlockState)state).field_235702_f_;
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE START ===================================== */
|
||||
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
+ /* ========================================= FORGE END ====================================== */
|
||||
@@ -76,25 +80,33 @@
|
||||
public abstract static class AbstractBlockState extends StateHolder<Block, BlockState> {
|
||||
private final int field_215708_d;
|
||||
private final boolean field_215709_e;
|
||||
@@ -428,6 +435,8 @@
|
||||
@@ -424,18 +_,24 @@
|
||||
return this.field_215709_e;
|
||||
}
|
||||
|
||||
+ /** @deprecated use {@link BlockState#getLightValue(IBlockReader, BlockPos)} */
|
||||
+ @Deprecated
|
||||
public int func_185906_d() {
|
||||
return this.field_215708_d;
|
||||
}
|
||||
|
||||
+ /** @deprecated use {@link BlockState#isAir(IBlockReader, BlockPos) */
|
||||
+ /** @deprecated use {@link BlockState#isAir(IBlockReader, BlockPos)} until 1.17, at which point this method will be undreprecated. See https://github.com/MinecraftForge/MinecraftForge/issues/7409 for more details */
|
||||
+ @Deprecated
|
||||
public boolean func_196958_f() {
|
||||
return this.field_235702_f_;
|
||||
- return this.field_235702_f_;
|
||||
+ return this.func_177230_c().isAir((BlockState)this);
|
||||
}
|
||||
@@ -436,6 +445,8 @@
|
||||
|
||||
public MaterialColor func_185909_g(IBlockReader p_185909_1_, BlockPos p_185909_2_) {
|
||||
return this.field_235704_h_;
|
||||
}
|
||||
|
||||
+ /** @deprecated use {@link BlockState#rotate(IWorld, BlockPos, Rotation) */
|
||||
+ /** @deprecated use {@link BlockState#rotate(IWorld, BlockPos, Rotation)} */
|
||||
+ @Deprecated
|
||||
public BlockState func_185907_a(Rotation p_185907_1_) {
|
||||
return this.func_177230_c().func_185499_a(this.func_230340_p_(), p_185907_1_);
|
||||
}
|
||||
@@ -802,6 +813,9 @@
|
||||
@@ -802,8 +_,11 @@
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_226895_m_ = true;
|
||||
private boolean field_235813_o_;
|
||||
@@ -102,9 +114,12 @@
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
private AbstractBlock.IExtendedPositionPredicate<EntityType<?>> field_235814_p_ = (p_235832_0_, p_235832_1_, p_235832_2_, p_235832_3_) -> {
|
||||
return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.func_185906_d() < 14;
|
||||
- return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.func_185906_d() < 14;
|
||||
+ return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.getLightValue(p_235832_1_, p_235832_2_) < 14;
|
||||
};
|
||||
@@ -863,6 +877,8 @@
|
||||
private AbstractBlock.IPositionPredicate field_235815_q_ = (p_235853_0_, p_235853_1_, p_235853_2_) -> {
|
||||
return p_235853_0_.func_185904_a().func_76218_k() && p_235853_0_.func_235785_r_(p_235853_1_, p_235853_2_);
|
||||
@@ -863,6 +_,8 @@
|
||||
abstractblock$properties.field_226895_m_ = p_200950_0_.field_235684_aB_.field_226895_m_;
|
||||
abstractblock$properties.field_235813_o_ = p_200950_0_.field_235684_aB_.field_235813_o_;
|
||||
abstractblock$properties.field_235806_h_ = p_200950_0_.field_235684_aB_.field_235806_h_;
|
||||
@@ -113,7 +128,7 @@
|
||||
return abstractblock$properties;
|
||||
}
|
||||
|
||||
@@ -877,6 +893,24 @@
|
||||
@@ -877,6 +_,24 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -138,12 +153,20 @@
|
||||
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
|
||||
this.field_200961_i = p_200941_1_;
|
||||
return this;
|
||||
@@ -933,7 +967,7 @@
|
||||
@@ -932,9 +_,15 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
+ @Deprecated // FORGE: Use the variant that takes a Supplier below
|
||||
public AbstractBlock.Properties func_222379_b(Block p_222379_1_) {
|
||||
- this.field_222381_j = p_222379_1_.func_220068_i();
|
||||
+ this.lootTableSupplier = () -> p_222379_1_.delegate.get().func_220068_i();
|
||||
return this;
|
||||
+ }
|
||||
+
|
||||
+ public AbstractBlock.Properties lootFrom(java.util.function.Supplier<? extends Block> blockIn) {
|
||||
+ this.lootTableSupplier = () -> blockIn.get().func_220068_i();
|
||||
+ return this;
|
||||
}
|
||||
|
||||
public AbstractBlock.Properties func_235859_g_() {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractFireBlock.java
|
||||
+++ b/net/minecraft/block/AbstractFireBlock.java
|
||||
@@ -124,6 +124,7 @@
|
||||
@@ -124,6 +_,7 @@
|
||||
if (!p_220082_4_.func_203425_a(p_220082_1_.func_177230_c())) {
|
||||
if (func_242649_a(p_220082_2_)) {
|
||||
Optional<PortalSize> optional = PortalSize.func_242964_a(p_220082_2_, p_220082_3_, Direction.Axis.X);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractRailBlock.java
|
||||
+++ b/net/minecraft/block/AbstractRailBlock.java
|
||||
@@ -13,7 +13,7 @@
|
||||
@@ -13,7 +_,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
protected static final VoxelShape field_185590_a = Block.func_208617_a(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D);
|
||||
protected static final VoxelShape field_190959_b = Block.func_208617_a(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
|
||||
private final boolean field_196277_c;
|
||||
@@ -37,6 +37,7 @@
|
||||
@@ -37,6 +_,7 @@
|
||||
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
RailShape railshape = p_220053_1_.func_203425_a(this) ? p_220053_1_.func_177229_b(this.func_176560_l()) : null;
|
||||
+ RailShape railShape2 = p_220053_1_.func_177230_c() == this ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null;
|
||||
+ RailShape railShape2 = p_220053_1_.func_203425_a(this) ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null;
|
||||
return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a;
|
||||
}
|
||||
|
||||
@@ -61,7 +62,7 @@
|
||||
@@ -61,7 +_,7 @@
|
||||
|
||||
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
|
||||
if (!p_220069_2_.field_72995_K && p_220069_2_.func_180495_p(p_220069_3_).func_203425_a(this)) {
|
||||
@@ -26,7 +26,7 @@
|
||||
if (func_235328_a_(p_220069_3_, p_220069_2_, railshape)) {
|
||||
func_220075_c(p_220069_1_, p_220069_2_, p_220069_3_);
|
||||
p_220069_2_.func_217377_a(p_220069_3_, p_220069_6_);
|
||||
@@ -110,7 +111,7 @@
|
||||
@@ -110,7 +_,7 @@
|
||||
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
|
||||
if (!p_196243_5_) {
|
||||
super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_);
|
||||
@@ -35,7 +35,7 @@
|
||||
p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this);
|
||||
}
|
||||
|
||||
@@ -129,5 +130,20 @@
|
||||
@@ -129,5 +_,20 @@
|
||||
return blockstate.func_206870_a(this.func_176560_l(), flag ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/AbstractTopPlantBlock.java
|
||||
+++ b/net/minecraft/block/AbstractTopPlantBlock.java
|
||||
@@ -32,10 +32,11 @@
|
||||
@@ -32,10 +_,11 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
--- a/net/minecraft/block/BambooBlock.java
|
||||
+++ b/net/minecraft/block/BambooBlock.java
|
||||
@@ -102,8 +102,9 @@
|
||||
@@ -100,10 +_,11 @@
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
if (p_225542_1_.func_177229_b(field_220266_f) == 0) {
|
||||
if (p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
|
||||
- if (p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
|
||||
+ if (p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
|
||||
int i = this.func_220260_b(p_225542_2_, p_225542_3_) + 1;
|
||||
- if (i < 16) {
|
||||
+ if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9)) {
|
||||
+ if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt(3) == 0)) {
|
||||
this.func_220258_a(p_225542_1_, p_225542_2_, p_225542_3_, p_225542_4_, i);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/block/BeehiveBlock.java
|
||||
+++ b/net/minecraft/block/BeehiveBlock.java
|
||||
@@ -65,6 +_,9 @@
|
||||
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) {
|
||||
return p_180641_1_.func_177229_b(field_226873_c_);
|
||||
}
|
||||
+ // Forge: Fixed MC-227255 Beehives and bee nests do not rotate/mirror correctly in structure blocks
|
||||
+ @Override public BlockState func_185499_a(BlockState blockState, net.minecraft.util.Rotation rotation) { return (BlockState)blockState.func_206870_a(field_226872_b_, rotation.func_185831_a(blockState.func_177229_b(field_226872_b_))); }
|
||||
+ @Override public BlockState func_185471_a(BlockState blockState, net.minecraft.util.Mirror mirror) { return blockState.func_185907_a(mirror.func_185800_a(blockState.func_177229_b(field_226872_b_))); }
|
||||
|
||||
public void func_180657_a(World p_180657_1_, PlayerEntity p_180657_2_, BlockPos p_180657_3_, BlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
|
||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
|
||||
@@ -85,6 +_,7 @@
|
||||
List<BeeEntity> list = p_226881_1_.func_217357_a(BeeEntity.class, (new AxisAlignedBB(p_226881_2_)).func_72314_b(8.0D, 6.0D, 8.0D));
|
||||
if (!list.isEmpty()) {
|
||||
List<PlayerEntity> list1 = p_226881_1_.func_217357_a(PlayerEntity.class, (new AxisAlignedBB(p_226881_2_)).func_72314_b(8.0D, 6.0D, 8.0D));
|
||||
+ if (list1.isEmpty()) return; //Forge: Prevent Error when no players are around.
|
||||
int i = list1.size();
|
||||
|
||||
for(BeeEntity beeentity : list) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/Block.java
|
||||
+++ b/net/minecraft/block/Block.java
|
||||
@@ -54,9 +54,10 @@
|
||||
@@ -54,9 +_,10 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() {
|
||||
public Boolean load(VoxelShape p_load_1_) {
|
||||
return !VoxelShapes.func_197879_c(VoxelShapes.func_197868_b(), p_load_1_, IBooleanFunction.field_223236_g_);
|
||||
@@ -151,6 +152,8 @@
|
||||
@@ -151,6 +_,8 @@
|
||||
super(p_i48440_1_);
|
||||
StateContainer.Builder<Block, BlockState> builder = new StateContainer.Builder<>(this);
|
||||
this.func_206840_a(builder);
|
||||
@@ -22,7 +22,7 @@
|
||||
this.field_176227_L = builder.func_235882_a_(Block::func_176223_P, BlockState::new);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b());
|
||||
}
|
||||
@@ -261,7 +264,7 @@
|
||||
@@ -261,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
|
||||
@@ -31,7 +31,7 @@
|
||||
float f = 0.5F;
|
||||
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
|
||||
@@ -273,7 +276,7 @@
|
||||
@@ -273,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_180637_b(ServerWorld p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
|
||||
@@ -40,7 +40,7 @@
|
||||
while(p_180637_3_ > 0) {
|
||||
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
|
||||
p_180637_3_ -= i;
|
||||
@@ -283,6 +286,7 @@
|
||||
@@ -283,6 +_,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
public float func_149638_a() {
|
||||
return this.field_235689_au_;
|
||||
}
|
||||
@@ -332,6 +336,7 @@
|
||||
@@ -332,6 +_,7 @@
|
||||
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
@@ -363,6 +368,7 @@
|
||||
@@ -363,6 +_,7 @@
|
||||
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
public boolean func_149659_a(Explosion p_149659_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -382,6 +388,7 @@
|
||||
@@ -382,6 +_,7 @@
|
||||
return this.field_196275_y;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
public SoundType func_220072_p(BlockState p_220072_1_) {
|
||||
return this.field_149762_H;
|
||||
}
|
||||
@@ -391,7 +398,7 @@
|
||||
@@ -391,7 +_,7 @@
|
||||
this.field_220086_i = Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
}
|
||||
|
||||
public boolean func_208619_r() {
|
||||
@@ -399,7 +406,7 @@
|
||||
@@ -399,7 +_,7 @@
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@@ -90,21 +90,17 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -410,6 +417,83 @@
|
||||
@@ -409,6 +_,78 @@
|
||||
protected Block func_230328_p_() {
|
||||
return this;
|
||||
}
|
||||
|
||||
+
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ protected Random RANDOM = new Random();
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private int harvestLevel;
|
||||
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Block> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, BlockTags::func_199896_a);
|
||||
+
|
||||
+ @Override
|
||||
+ public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) {
|
||||
+ return this.field_149765_K;
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.ToolType getHarvestTool(BlockState state) {
|
||||
@@ -170,7 +166,6 @@
|
||||
+ });
|
||||
+ }
|
||||
+ /* ========================================= FORGE END ======================================*/
|
||||
+
|
||||
|
||||
public static final class RenderSideCacheKey {
|
||||
private final BlockState field_212164_a;
|
||||
private final BlockState field_212165_b;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/BlockState.java
|
||||
+++ b/net/minecraft/block/BlockState.java
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -6,7 +_,7 @@
|
||||
import net.minecraft.state.Property;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/Blocks.java
|
||||
+++ b/net/minecraft/block/Blocks.java
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -25,6 +_,7 @@
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
public class Blocks {
|
||||
public static final Block field_150350_a = func_222382_a("air", new AirBlock(AbstractBlock.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e().func_235859_g_()));
|
||||
public static final Block field_150348_b = func_222382_a("stone", new Block(AbstractBlock.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_235861_h_().func_200948_a(1.5F, 6.0F)));
|
||||
@@ -119,7 +120,7 @@
|
||||
@@ -119,7 +_,7 @@
|
||||
public static final Block field_196601_az = func_222382_a("green_bed", func_235422_a_(DyeColor.GREEN));
|
||||
public static final Block field_196550_aA = func_222382_a("red_bed", func_235422_a_(DyeColor.RED));
|
||||
public static final Block field_196551_aB = func_222382_a("black_bed", func_235422_a_(DyeColor.BLACK));
|
||||
@@ -17,10 +17,11 @@
|
||||
public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(AbstractBlock.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
|
||||
public static final Block field_150320_F = func_222382_a("sticky_piston", func_235432_a_(true));
|
||||
public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(AbstractBlock.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_235861_h_().func_200943_b(4.0F)));
|
||||
@@ -937,15 +938,4 @@
|
||||
@@ -936,16 +_,5 @@
|
||||
|
||||
public static void func_235419_a_() {
|
||||
Block.field_176229_d.forEach(AbstractBlock.AbstractBlockState::func_215692_c);
|
||||
}
|
||||
- }
|
||||
-
|
||||
- static {
|
||||
- for(Block block : Registry.field_212618_g) {
|
||||
@@ -31,5 +32,5 @@
|
||||
- block.func_220068_i();
|
||||
- }
|
||||
-
|
||||
- }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/BushBlock.java
|
||||
+++ b/net/minecraft/block/BushBlock.java
|
||||
@@ -7,7 +7,7 @@
|
||||
@@ -7,7 +_,7 @@
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public BushBlock(AbstractBlock.Properties p_i48437_1_) {
|
||||
super(p_i48437_1_);
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
@@ -22,6 +_,8 @@
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
BlockPos blockpos = p_196260_3_.func_177977_b();
|
||||
@@ -18,15 +18,16 @@
|
||||
return this.func_200014_a_(p_196260_2_.func_180495_p(blockpos), p_196260_2_, blockpos);
|
||||
}
|
||||
|
||||
@@ -32,4 +34,11 @@
|
||||
@@ -31,5 +_,12 @@
|
||||
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return p_196266_4_ == PathType.AIR && !this.field_235688_at_ ? true : super.func_196266_a(p_196266_1_, p_196266_2_, p_196266_3_, p_196266_4_);
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
|
||||
+ BlockState state = world.func_180495_p(pos);
|
||||
+ if (state.func_177230_c() != this) return func_176223_P();
|
||||
+ return state;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/CactusBlock.java
|
||||
+++ b/net/minecraft/block/CactusBlock.java
|
||||
@@ -19,7 +19,7 @@
|
||||
@@ -19,7 +_,7 @@
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final IntegerProperty field_176587_a = BlockStateProperties.field_208171_X;
|
||||
protected static final VoxelShape field_196400_b = Block.func_208617_a(1.0D, 0.0D, 1.0D, 15.0D, 15.0D, 15.0D);
|
||||
protected static final VoxelShape field_196401_c = Block.func_208617_a(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -30,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
@@ -17,7 +17,7 @@
|
||||
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
|
||||
p_225534_2_.func_175655_b(p_225534_3_, true);
|
||||
}
|
||||
@@ -45,6 +46,7 @@
|
||||
@@ -45,6 +_,7 @@
|
||||
|
||||
if (i < 3) {
|
||||
int j = p_225542_1_.func_177229_b(field_176587_a);
|
||||
@@ -25,7 +25,7 @@
|
||||
if (j == 15) {
|
||||
p_225542_2_.func_175656_a(blockpos, this.func_176223_P());
|
||||
BlockState blockstate = p_225542_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
|
||||
@@ -53,7 +55,8 @@
|
||||
@@ -53,7 +_,8 @@
|
||||
} else {
|
||||
p_225542_2_.func_180501_a(p_225542_3_, p_225542_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +87,7 @@
|
||||
@@ -84,7 +_,7 @@
|
||||
}
|
||||
|
||||
BlockState blockstate1 = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
@@ -44,10 +44,11 @@
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
@@ -98,4 +101,14 @@
|
||||
@@ -97,5 +_,15 @@
|
||||
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return false;
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
@@ -57,5 +58,5 @@
|
||||
+ @Override
|
||||
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
|
||||
+ return func_176223_P();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/CampfireBlock.java
|
||||
+++ b/net/minecraft/block/CampfireBlock.java
|
||||
@@ -181,7 +181,7 @@
|
||||
@@ -181,7 +_,7 @@
|
||||
public void func_220066_a(World p_220066_1_, BlockState p_220066_2_, BlockRayTraceResult p_220066_3_, ProjectileEntity p_220066_4_) {
|
||||
if (!p_220066_1_.field_72995_K && p_220066_4_.func_70027_ad()) {
|
||||
Entity entity = p_220066_4_.func_234616_v_();
|
||||
@@ -9,3 +9,12 @@
|
||||
if (flag && !p_220066_2_.func_177229_b(field_220101_b) && !p_220066_2_.func_177229_b(field_220103_d)) {
|
||||
BlockPos blockpos = p_220066_3_.func_216350_a();
|
||||
p_220066_1_.func_180501_a(blockpos, p_220066_2_.func_206870_a(BlockStateProperties.field_208190_q, Boolean.valueOf(true)), 11);
|
||||
@@ -208,7 +_,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
- boolean flag = VoxelShapes.func_197879_c(field_226912_f_, blockstate.func_215685_b(p_235474_0_, p_235474_1_, ISelectionContext.func_216377_a()), IBooleanFunction.field_223238_i_);
|
||||
+ boolean flag = VoxelShapes.func_197879_c(field_226912_f_, blockstate.func_215685_b(p_235474_0_, blockpos, ISelectionContext.func_216377_a()), IBooleanFunction.field_223238_i_);//Forge fix: MC-201374
|
||||
if (flag) {
|
||||
BlockState blockstate1 = p_235474_0_.func_180495_p(blockpos.func_177977_b());
|
||||
return func_226915_i_(blockstate1);
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/block/ChestBlock.java
|
||||
+++ b/net/minecraft/block/ChestBlock.java
|
||||
@@ -325,7 +_,8 @@
|
||||
}
|
||||
|
||||
public BlockState func_185471_a(BlockState p_185471_1_, Mirror p_185471_2_) {
|
||||
- return p_185471_1_.func_185907_a(p_185471_2_.func_185800_a(p_185471_1_.func_177229_b(field_176459_a)));
|
||||
+ BlockState rotated = p_185471_1_.func_185907_a(p_185471_2_.func_185800_a(p_185471_1_.func_177229_b(field_176459_a)));
|
||||
+ return p_185471_2_ == Mirror.NONE ? rotated : rotated.func_206870_a(field_196314_b, rotated.func_177229_b(field_196314_b).func_208081_a()); // Forge: Fixed MC-134110 Structure mirroring breaking apart double chests
|
||||
}
|
||||
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/ChorusFlowerBlock.java
|
||||
+++ b/net/minecraft/block/ChorusFlowerBlock.java
|
||||
@@ -40,7 +40,7 @@
|
||||
@@ -40,7 +_,7 @@
|
||||
BlockPos blockpos = p_225542_3_.func_177984_a();
|
||||
if (p_225542_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) {
|
||||
int i = p_225542_1_.func_177229_b(field_185607_a);
|
||||
@@ -9,7 +9,7 @@
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
BlockState blockstate = p_225542_2_.func_180495_p(p_225542_3_.func_177977_b());
|
||||
@@ -65,7 +65,7 @@
|
||||
@@ -65,7 +_,7 @@
|
||||
if (j < 2 || j <= p_225542_4_.nextInt(flag1 ? 5 : 4)) {
|
||||
flag = true;
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
@@ -97,7 +_,7 @@
|
||||
} else {
|
||||
this.func_185605_c(p_225542_2_, p_225542_3_);
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@
|
||||
@@ -133,7 +_,7 @@
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
if (blockstate.func_177230_c() != this.field_196405_b && !blockstate.func_203425_a(Blocks.field_150377_bs)) {
|
||||
@@ -36,7 +36,7 @@
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = false;
|
||||
@@ -146,7 +146,7 @@
|
||||
@@ -146,7 +_,7 @@
|
||||
}
|
||||
|
||||
flag = true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/CocoaBlock.java
|
||||
+++ b/net/minecraft/block/CocoaBlock.java
|
||||
@@ -35,10 +35,11 @@
|
||||
@@ -35,10 +_,11 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/ComparatorBlock.java
|
||||
+++ b/net/minecraft/block/ComparatorBlock.java
|
||||
@@ -154,4 +154,16 @@
|
||||
@@ -154,4 +_,16 @@
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/CropsBlock.java
|
||||
+++ b/net/minecraft/block/CropsBlock.java
|
||||
@@ -61,12 +61,14 @@
|
||||
@@ -61,12 +_,14 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,9 +97,9 @@
|
||||
@@ -95,9 +_,9 @@
|
||||
for(int j = -1; j <= 1; ++j) {
|
||||
float f1 = 0.0F;
|
||||
BlockState blockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
|
||||
@@ -28,7 +28,7 @@
|
||||
f1 = 3.0F;
|
||||
}
|
||||
}
|
||||
@@ -133,7 +135,7 @@
|
||||
@@ -133,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DeadBushBlock.java
|
||||
+++ b/net/minecraft/block/DeadBushBlock.java
|
||||
@@ -5,7 +5,7 @@
|
||||
@@ -5,7 +_,7 @@
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DetectorRailBlock.java
|
||||
+++ b/net/minecraft/block/DetectorRailBlock.java
|
||||
@@ -131,6 +131,8 @@
|
||||
@@ -131,6 +_,8 @@
|
||||
}
|
||||
|
||||
List<AbstractMinecartEntity> list1 = this.func_200878_a(p_180641_2_, p_180641_3_, AbstractMinecartEntity.class, EntityPredicates.field_96566_b);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DoublePlantBlock.java
|
||||
+++ b/net/minecraft/block/DoublePlantBlock.java
|
||||
@@ -51,6 +51,7 @@
|
||||
@@ -51,6 +_,7 @@
|
||||
return super.func_196260_a(p_196260_1_, p_196260_2_, p_196260_3_);
|
||||
} else {
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/DropperBlock.java
|
||||
+++ b/net/minecraft/block/DropperBlock.java
|
||||
@@ -37,7 +37,7 @@
|
||||
@@ -37,7 +_,7 @@
|
||||
p_176439_1_.func_217379_c(1001, p_176439_2_, 0);
|
||||
} else {
|
||||
ItemStack itemstack = dispensertileentity.func_70301_a(i);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/EnchantingTableBlock.java
|
||||
+++ b/net/minecraft/block/EnchantingTableBlock.java
|
||||
@@ -54,7 +54,7 @@
|
||||
@@ -54,7 +_,7 @@
|
||||
if (p_180655_4_.nextInt(16) == 0) {
|
||||
for(int k = 0; k <= 1; ++k) {
|
||||
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/FallingBlock.java
|
||||
+++ b/net/minecraft/block/FallingBlock.java
|
||||
@@ -30,7 +30,7 @@
|
||||
@@ -30,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
|
||||
@@ -9,7 +9,7 @@
|
||||
FallingBlockEntity fallingblockentity = new FallingBlockEntity(p_225534_2_, (double)p_225534_3_.func_177958_n() + 0.5D, (double)p_225534_3_.func_177956_o(), (double)p_225534_3_.func_177952_p() + 0.5D, p_225534_2_.func_180495_p(p_225534_3_));
|
||||
this.func_149829_a(fallingblockentity);
|
||||
p_225534_2_.func_217376_c(fallingblockentity);
|
||||
@@ -59,7 +59,7 @@
|
||||
@@ -59,7 +_,7 @@
|
||||
public void func_180655_c(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) {
|
||||
if (p_180655_4_.nextInt(16) == 0) {
|
||||
BlockPos blockpos = p_180655_3_.func_177977_b();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/FarmlandBlock.java
|
||||
+++ b/net/minecraft/block/FarmlandBlock.java
|
||||
@@ -77,7 +77,7 @@
|
||||
@@ -77,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) {
|
||||
@@ -9,7 +9,7 @@
|
||||
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
|
||||
}
|
||||
|
||||
@@ -88,9 +88,10 @@
|
||||
@@ -88,9 +_,10 @@
|
||||
p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
|
||||
@@ -100,7 +101,7 @@
|
||||
@@ -100,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/FireBlock.java
|
||||
+++ b/net/minecraft/block/FireBlock.java
|
||||
@@ -92,13 +92,13 @@
|
||||
@@ -92,13 +_,13 @@
|
||||
protected BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
|
||||
BlockPos blockpos = p_196448_2_.func_177977_b();
|
||||
BlockState blockstate = p_196448_1_.func_180495_p(blockpos);
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
@@ -121,7 +_,7 @@
|
||||
}
|
||||
|
||||
BlockState blockstate = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
|
||||
@@ -25,7 +25,7 @@
|
||||
int i = p_225534_1_.func_177229_b(field_176543_a);
|
||||
if (!flag && p_225534_2_.func_72896_J() && this.func_176537_d(p_225534_2_, p_225534_3_) && p_225534_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
@@ -142,7 +142,7 @@
|
||||
@@ -142,7 +_,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
p_225534_2_.func_217377_a(p_225534_3_, false);
|
||||
return;
|
||||
}
|
||||
@@ -150,12 +150,12 @@
|
||||
@@ -150,12 +_,12 @@
|
||||
|
||||
boolean flag1 = p_225534_2_.func_180502_D(p_225534_3_);
|
||||
int k = flag1 ? -50 : 0;
|
||||
@@ -53,7 +53,7 @@
|
||||
BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable();
|
||||
|
||||
for(int l = -1; l <= 1; ++l) {
|
||||
@@ -193,16 +193,18 @@
|
||||
@@ -193,16 +_,18 @@
|
||||
return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d());
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if (p_176536_4_.nextInt(p_176536_3_) < i) {
|
||||
BlockState blockstate = p_176536_1_.func_180495_p(p_176536_2_);
|
||||
if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) {
|
||||
@@ -212,11 +214,7 @@
|
||||
@@ -212,11 +_,7 @@
|
||||
p_176536_1_.func_217377_a(p_176536_2_, false);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -228,7 +226,7 @@
|
||||
@@ -228,7 +_,7 @@
|
||||
|
||||
private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) {
|
||||
for(Direction direction : Direction.values()) {
|
||||
@@ -96,7 +96,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -244,13 +242,14 @@
|
||||
@@ -244,13 +_,14 @@
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction));
|
||||
@@ -112,15 +112,15 @@
|
||||
protected boolean func_196446_i(BlockState p_196446_1_) {
|
||||
return this.func_220275_r(p_196446_1_) > 0;
|
||||
}
|
||||
@@ -269,10 +268,23 @@
|
||||
@@ -269,8 +_,21 @@
|
||||
}
|
||||
|
||||
private void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) {
|
||||
+ if (p_180686_1_ == Blocks.field_150350_a) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
|
||||
this.field_149849_a.put(p_180686_1_, p_180686_2_);
|
||||
this.field_149848_b.put(p_180686_1_, p_180686_3_);
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Side sensitive version that calls the block function.
|
||||
+ *
|
||||
@@ -131,8 +131,6 @@
|
||||
+ */
|
||||
+ public boolean canCatchFire(IBlockReader world, BlockPos pos, Direction face) {
|
||||
+ return world.func_180495_p(pos).isFlammable(world, pos, face);
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
public static void func_149843_e() {
|
||||
FireBlock fireblock = (FireBlock)Blocks.field_150480_ab;
|
||||
fireblock.func_180686_a(Blocks.field_196662_n, 5, 20);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/FlowerPotBlock.java
|
||||
+++ b/net/minecraft/block/FlowerPotBlock.java
|
||||
@@ -24,12 +24,35 @@
|
||||
@@ -24,10 +_,33 @@
|
||||
protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D);
|
||||
private final Block field_196452_c;
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
+ if (Blocks.field_150457_bL != null) {
|
||||
+ ((FlowerPotBlock)Blocks.field_150457_bL).addPlant(p_i48395_1_.getRegistryName(), () -> this);
|
||||
+ }
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * For mod use, eliminates the need to extend this class, and prevents modded
|
||||
+ * flower pots from altering vanilla behavior.
|
||||
+ *
|
||||
+ * @param emptyPot The empty pot for this pot, or null for self.
|
||||
+ * @param p_i48395_1_ The flower block.
|
||||
+ * @param block The flower block.
|
||||
+ * @param properties
|
||||
+ */
|
||||
+ public FlowerPotBlock(@javax.annotation.Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, AbstractBlock.Properties properties) {
|
||||
@@ -34,12 +34,10 @@
|
||||
+ this.fullPots = java.util.Collections.emptyMap();
|
||||
+ this.emptyPot = emptyPot;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
return field_196450_a;
|
||||
}
|
||||
@@ -41,7 +64,7 @@
|
||||
|
||||
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
|
||||
@@ -41,7 +_,7 @@
|
||||
public ActionResultType func_225533_a_(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) {
|
||||
ItemStack itemstack = p_225533_4_.func_184586_b(p_225533_5_);
|
||||
Item item = itemstack.func_77973_b();
|
||||
@@ -48,7 +46,7 @@
|
||||
boolean flag = block == Blocks.field_150350_a;
|
||||
boolean flag1 = this.field_196452_c == Blocks.field_150350_a;
|
||||
if (flag != flag1) {
|
||||
@@ -59,7 +82,7 @@
|
||||
@@ -59,7 +_,7 @@
|
||||
p_225533_4_.func_71019_a(itemstack1, false);
|
||||
}
|
||||
|
||||
@@ -57,7 +55,7 @@
|
||||
}
|
||||
|
||||
return ActionResultType.func_233537_a_(p_225533_2_.field_72995_K);
|
||||
@@ -77,10 +100,27 @@
|
||||
@@ -77,10 +_,27 @@
|
||||
}
|
||||
|
||||
public Block func_220276_d() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/FlowingFluidBlock.java
|
||||
+++ b/net/minecraft/block/FlowingFluidBlock.java
|
||||
@@ -29,10 +29,11 @@
|
||||
@@ -29,10 +_,11 @@
|
||||
|
||||
public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
|
||||
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
|
||||
@@ -13,14 +13,14 @@
|
||||
public FlowingFluidBlock(FlowingFluid p_i49014_1_, AbstractBlock.Properties p_i49014_2_) {
|
||||
super(p_i49014_2_);
|
||||
this.field_204517_c = p_i49014_1_;
|
||||
@@ -45,8 +46,21 @@
|
||||
@@ -45,6 +_,19 @@
|
||||
|
||||
this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true));
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ supplier = p_i49014_1_.delegate;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @param supplier A fluid supplier such as {@link net.minecraftforge.fml.RegistryObject<Fluid>}
|
||||
+ */
|
||||
@@ -30,12 +30,10 @@
|
||||
+ this.field_212565_c = Lists.newArrayList();
|
||||
+ this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
|
||||
+ this.supplier = supplier;
|
||||
+ }
|
||||
+
|
||||
public VoxelShape func_220071_b(BlockState p_220071_1_, IBlockReader p_220071_2_, BlockPos p_220071_3_, ISelectionContext p_220071_4_) {
|
||||
return p_220071_4_.func_216378_a(field_235510_c_, p_220071_3_, true) && p_220071_1_.func_177229_b(field_176367_b) == 0 && p_220071_4_.func_230426_a_(p_220071_2_.func_204610_c(p_220071_3_.func_177984_a()), this.field_204517_c) ? field_235510_c_ : VoxelShapes.func_197880_a();
|
||||
}
|
||||
@@ -69,6 +83,7 @@
|
||||
|
||||
public VoxelShape func_220071_b(BlockState p_220071_1_, IBlockReader p_220071_2_, BlockPos p_220071_3_, ISelectionContext p_220071_4_) {
|
||||
@@ -69,6 +_,7 @@
|
||||
|
||||
public FluidState func_204507_t(BlockState p_204507_1_) {
|
||||
int i = p_204507_1_.func_177229_b(field_176367_b);
|
||||
@@ -43,7 +41,7 @@
|
||||
return this.field_212565_c.get(Math.min(i, 8));
|
||||
}
|
||||
|
||||
@@ -120,13 +135,13 @@
|
||||
@@ -120,13 +_,13 @@
|
||||
BlockPos blockpos = p_204515_2_.func_177972_a(direction);
|
||||
if (p_204515_1_.func_204610_c(blockpos).func_206884_a(FluidTags.field_206959_a)) {
|
||||
Block block = p_204515_1_.func_204610_c(p_204515_2_).func_206889_d() ? Blocks.field_150343_Z : Blocks.field_150347_e;
|
||||
@@ -59,10 +57,12 @@
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
@@ -153,4 +168,23 @@
|
||||
@@ -151,6 +_,25 @@
|
||||
return this.field_204517_c;
|
||||
} else {
|
||||
return Fluids.field_204541_a;
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Forge start
|
||||
+ private final java.util.function.Supplier<? extends Fluid> supplier;
|
||||
@@ -80,6 +80,6 @@
|
||||
+
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8, true));
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/ITileEntityProvider.java
|
||||
+++ b/net/minecraft/block/ITileEntityProvider.java
|
||||
@@ -4,6 +4,7 @@
|
||||
@@ -4,6 +_,7 @@
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/net/minecraft/block/LadderBlock.java
|
||||
+++ b/net/minecraft/block/LadderBlock.java
|
||||
@@ -93,6 +93,11 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
public BlockState func_185499_a(BlockState p_185499_1_, Rotation p_185499_2_) {
|
||||
return p_185499_1_.func_206870_a(field_176382_a, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176382_a)));
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/LeavesBlock.java
|
||||
+++ b/net/minecraft/block/LeavesBlock.java
|
||||
@@ -19,7 +19,7 @@
|
||||
@@ -19,7 +_,7 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/MushroomBlock.java
|
||||
+++ b/net/minecraft/block/MushroomBlock.java
|
||||
@@ -64,7 +64,7 @@
|
||||
@@ -64,7 +_,7 @@
|
||||
if (blockstate.func_235714_a_(BlockTags.field_242171_aD)) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/NetherWartBlock.java
|
||||
+++ b/net/minecraft/block/NetherWartBlock.java
|
||||
@@ -35,9 +35,10 @@
|
||||
@@ -35,9 +_,10 @@
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
int i = p_225542_1_.func_177229_b(field_176486_a);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/NoteBlock.java
|
||||
+++ b/net/minecraft/block/NoteBlock.java
|
||||
@@ -50,7 +50,7 @@
|
||||
@@ -50,7 +_,7 @@
|
||||
}
|
||||
|
||||
private void func_196482_a(World p_196482_1_, BlockPos p_196482_2_) {
|
||||
@@ -9,7 +9,7 @@
|
||||
p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
@@ -60,7 +_,9 @@
|
||||
if (p_225533_2_.field_72995_K) {
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
@@ -20,7 +20,7 @@
|
||||
p_225533_2_.func_180501_a(p_225533_3_, p_225533_1_, 3);
|
||||
this.func_196482_a(p_225533_2_, p_225533_3_);
|
||||
p_225533_4_.func_195066_a(Stats.field_188087_U);
|
||||
@@ -76,6 +78,9 @@
|
||||
@@ -76,6 +_,9 @@
|
||||
}
|
||||
|
||||
public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/OreBlock.java
|
||||
+++ b/net/minecraft/block/OreBlock.java
|
||||
@@ -31,12 +31,10 @@
|
||||
@@ -31,12 +_,10 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, ServerWorld p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/PistonBlock.java
|
||||
+++ b/net/minecraft/block/PistonBlock.java
|
||||
@@ -158,6 +158,7 @@
|
||||
@@ -158,6 +_,7 @@
|
||||
}
|
||||
|
||||
if (p_189539_4_ == 0) {
|
||||
@@ -8,7 +8,7 @@
|
||||
if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -165,6 +166,7 @@
|
||||
@@ -165,6 +_,7 @@
|
||||
p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67);
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F);
|
||||
} else if (p_189539_4_ == 1 || p_189539_4_ == 2) {
|
||||
@@ -16,7 +16,7 @@
|
||||
TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction));
|
||||
if (tileentity1 instanceof PistonTileEntity) {
|
||||
((PistonTileEntity)tileentity1).func_145866_f();
|
||||
@@ -204,6 +206,7 @@
|
||||
@@ -204,6 +_,7 @@
|
||||
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187712_dQ, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.15F + 0.6F);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -234,7 +237,7 @@
|
||||
@@ -234,7 +_,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@@ -273,7 +276,7 @@
|
||||
@@ -273,7 +_,7 @@
|
||||
for(int k = list2.size() - 1; k >= 0; --k) {
|
||||
BlockPos blockpos2 = list2.get(k);
|
||||
BlockState blockstate1 = p_176319_1_.func_180495_p(blockpos2);
|
||||
@@ -42,14 +42,14 @@
|
||||
func_220059_a(blockstate1, p_176319_1_, blockpos2, tileentity);
|
||||
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
|
||||
ablockstate[j++] = blockstate1;
|
||||
@@ -337,6 +340,10 @@
|
||||
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
|
||||
}
|
||||
@@ -335,6 +_,10 @@
|
||||
|
||||
+ public BlockState rotate(BlockState state, net.minecraft.world.IWorld world, BlockPos pos, Rotation direction) {
|
||||
+ return state.func_177229_b(field_176320_b) ? state : super.rotate(state, world, pos, direction);
|
||||
public BlockState func_185499_a(BlockState p_185499_1_, Rotation p_185499_2_) {
|
||||
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
|
||||
+ }
|
||||
+
|
||||
public BlockState func_185471_a(BlockState p_185471_1_, Mirror p_185471_2_) {
|
||||
return p_185471_1_.func_185907_a(p_185471_2_.func_185800_a(p_185471_1_.func_177229_b(field_176387_N)));
|
||||
+ public BlockState rotate(BlockState state, net.minecraft.world.IWorld world, BlockPos pos, Rotation direction) {
|
||||
+ return state.func_177229_b(field_176320_b) ? state : super.rotate(state, world, pos, direction);
|
||||
}
|
||||
|
||||
public BlockState func_185471_a(BlockState p_185471_1_, Mirror p_185471_2_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/PistonBlockStructureHelper.java
|
||||
+++ b/net/minecraft/block/PistonBlockStructureHelper.java
|
||||
@@ -48,7 +48,7 @@
|
||||
@@ -48,7 +_,7 @@
|
||||
} else {
|
||||
for(int i = 0; i < this.field_177258_e.size(); ++i) {
|
||||
BlockPos blockpos = this.field_177258_e.get(i);
|
||||
@@ -9,7 +9,7 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -57,24 +57,9 @@
|
||||
@@ -57,24 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return true;
|
||||
} else if (!PistonBlock.func_185646_a(blockstate, this.field_177261_a, p_177251_1_, this.field_177257_d, false, p_177251_2_)) {
|
||||
return true;
|
||||
@@ -87,12 +72,12 @@
|
||||
@@ -87,12 +_,12 @@
|
||||
if (i + this.field_177258_e.size() > 12) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -52,7 +52,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -119,7 +104,7 @@
|
||||
@@ -119,7 +_,7 @@
|
||||
|
||||
for(int k = 0; k <= j + l; ++k) {
|
||||
BlockPos blockpos2 = this.field_177258_e.get(k);
|
||||
@@ -61,7 +61,7 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +113,7 @@
|
||||
@@ -128,7 +_,7 @@
|
||||
}
|
||||
|
||||
blockstate = this.field_177261_a.func_180495_p(blockpos1);
|
||||
@@ -70,7 +70,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -173,7 +158,7 @@
|
||||
@@ -173,7 +_,7 @@
|
||||
if (direction.func_176740_k() != this.field_177257_d.func_176740_k()) {
|
||||
BlockPos blockpos = p_177250_1_.func_177972_a(direction);
|
||||
BlockState blockstate1 = this.field_177261_a.func_180495_p(blockpos);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/PortalSize.java
|
||||
+++ b/net/minecraft/block/PortalSize.java
|
||||
@@ -16,7 +16,7 @@
|
||||
@@ -16,7 +_,7 @@
|
||||
|
||||
public class PortalSize {
|
||||
private static final AbstractBlock.IPositionPredicate field_242962_a = (p_242966_0_, p_242966_1_, p_242966_2_) -> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/PoweredRailBlock.java
|
||||
+++ b/net/minecraft/block/PoweredRailBlock.java
|
||||
@@ -14,10 +14,16 @@
|
||||
@@ -14,10 +_,16 @@
|
||||
public class PoweredRailBlock extends AbstractRailBlock {
|
||||
public static final EnumProperty<RailShape> field_176568_b = BlockStateProperties.field_208166_S;
|
||||
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, BlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) {
|
||||
@@ -99,13 +105,13 @@
|
||||
@@ -99,13 +_,13 @@
|
||||
|
||||
protected boolean func_208071_a(World p_208071_1_, BlockPos p_208071_2_, boolean p_208071_3_, int p_208071_4_, RailShape p_208071_5_) {
|
||||
BlockState blockstate = p_208071_1_.func_180495_p(p_208071_2_);
|
||||
@@ -35,7 +35,7 @@
|
||||
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
|
||||
} else {
|
||||
return false;
|
||||
@@ -156,6 +162,9 @@
|
||||
@@ -156,6 +_,9 @@
|
||||
return p_185499_1_.func_206870_a(field_176568_b, RailShape.SOUTH_EAST);
|
||||
case NORTH_EAST:
|
||||
return p_185499_1_.func_206870_a(field_176568_b, RailShape.SOUTH_WEST);
|
||||
@@ -45,12 +45,13 @@
|
||||
}
|
||||
case COUNTERCLOCKWISE_90:
|
||||
switch((RailShape)p_185499_1_.func_177229_b(field_176568_b)) {
|
||||
@@ -255,4 +264,8 @@
|
||||
@@ -254,5 +_,9 @@
|
||||
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176568_b, field_176569_M);
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ public boolean isActivatorRail() {
|
||||
+ return isActivator;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/RailBlock.java
|
||||
+++ b/net/minecraft/block/RailBlock.java
|
||||
@@ -49,6 +49,9 @@
|
||||
@@ -49,6 +_,9 @@
|
||||
return p_185499_1_.func_206870_a(field_176565_b, RailShape.SOUTH_EAST);
|
||||
case NORTH_EAST:
|
||||
return p_185499_1_.func_206870_a(field_176565_b, RailShape.SOUTH_WEST);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/RailState.java
|
||||
+++ b/net/minecraft/block/RailState.java
|
||||
@@ -15,14 +15,16 @@
|
||||
@@ -15,14 +_,16 @@
|
||||
private BlockState field_196923_d;
|
||||
private final boolean field_208513_e;
|
||||
private final List<BlockPos> field_196924_e = Lists.newArrayList();
|
||||
@@ -19,7 +19,7 @@
|
||||
this.func_208509_a(railshape);
|
||||
}
|
||||
|
||||
@@ -178,7 +180,7 @@
|
||||
@@ -178,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_NORTH;
|
||||
}
|
||||
@@ -188,7 +190,7 @@
|
||||
@@ -188,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos3.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_EAST;
|
||||
}
|
||||
@@ -304,7 +306,7 @@
|
||||
@@ -304,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) {
|
||||
railshape = RailShape.ASCENDING_NORTH;
|
||||
}
|
||||
@@ -314,7 +316,7 @@
|
||||
@@ -314,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/RedstoneDiodeBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneDiodeBlock.java
|
||||
@@ -65,7 +65,7 @@
|
||||
@@ -65,7 +_,7 @@
|
||||
if (p_220069_1_.func_196955_c(p_220069_2_, p_220069_3_)) {
|
||||
this.func_176398_g(p_220069_2_, p_220069_3_, p_220069_1_);
|
||||
} else {
|
||||
@@ -9,7 +9,7 @@
|
||||
func_220059_a(p_220069_1_, p_220069_2_, p_220069_3_, tileentity);
|
||||
p_220069_2_.func_217377_a(p_220069_3_, false);
|
||||
|
||||
@@ -163,6 +163,8 @@
|
||||
@@ -163,6 +_,8 @@
|
||||
protected void func_176400_h(World p_176400_1_, BlockPos p_176400_2_, BlockState p_176400_3_) {
|
||||
Direction direction = p_176400_3_.func_177229_b(field_185512_D);
|
||||
BlockPos blockpos = p_176400_2_.func_177972_a(direction.func_176734_d());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/RedstoneOreBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneOreBlock.java
|
||||
@@ -71,11 +71,11 @@
|
||||
@@ -71,11 +_,11 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, ServerWorld p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/RedstoneWireBlock.java
|
||||
+++ b/net/minecraft/block/RedstoneWireBlock.java
|
||||
@@ -184,7 +184,7 @@
|
||||
@@ -184,7 +_,7 @@
|
||||
BlockState blockstate = p_235545_1_.func_180495_p(blockpos);
|
||||
if (p_235545_4_) {
|
||||
boolean flag = this.func_235552_b_(p_235545_1_, blockpos, blockstate);
|
||||
@@ -9,7 +9,7 @@
|
||||
if (blockstate.func_224755_d(p_235545_1_, blockpos, p_235545_3_.func_176734_d())) {
|
||||
return RedstoneSide.UP;
|
||||
}
|
||||
@@ -193,7 +193,7 @@
|
||||
@@ -193,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
@@ -335,11 +335,7 @@
|
||||
@@ -335,11 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if (p_176343_0_.func_203425_a(Blocks.field_150488_af)) {
|
||||
return true;
|
||||
} else if (p_176343_0_.func_203425_a(Blocks.field_196633_cV)) {
|
||||
@@ -348,7 +344,7 @@
|
||||
@@ -348,7 +_,7 @@
|
||||
} else if (p_176343_0_.func_203425_a(Blocks.field_190976_dk)) {
|
||||
return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SaplingBlock.java
|
||||
+++ b/net/minecraft/block/SaplingBlock.java
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -29,6 +_,7 @@
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
if (p_225542_2_.func_201696_r(p_225542_3_.func_177984_a()) >= 9 && p_225542_4_.nextInt(7) == 0) {
|
||||
@@ -8,7 +8,7 @@
|
||||
this.func_226942_a_(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_);
|
||||
}
|
||||
|
||||
@@ -38,6 +39,7 @@
|
||||
@@ -38,6 +_,7 @@
|
||||
if (p_226942_3_.func_177229_b(field_176479_b) == 0) {
|
||||
p_226942_1_.func_180501_a(p_226942_2_, p_226942_3_.func_235896_a_(field_176479_b), 4);
|
||||
} else {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/block/ScaffoldingBlock.java
|
||||
+++ b/net/minecraft/block/ScaffoldingBlock.java
|
||||
@@ -138,6 +138,8 @@
|
||||
return i;
|
||||
}
|
||||
|
||||
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
|
||||
+
|
||||
static {
|
||||
VoxelShape voxelshape = Block.func_208617_a(0.0D, 14.0D, 0.0D, 16.0D, 16.0D, 16.0D);
|
||||
VoxelShape voxelshape1 = Block.func_208617_a(0.0D, 0.0D, 0.0D, 2.0D, 16.0D, 2.0D);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SeaGrassBlock.java
|
||||
+++ b/net/minecraft/block/SeaGrassBlock.java
|
||||
@@ -17,7 +17,7 @@
|
||||
@@ -17,7 +_,7 @@
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/block/SoundType.java
|
||||
+++ b/net/minecraft/block/SoundType.java
|
||||
@@ -59,6 +_,7 @@
|
||||
private final SoundEvent field_185865_r;
|
||||
private final SoundEvent field_185866_s;
|
||||
|
||||
+ @Deprecated // Forge: Use {@link net.minecraftforge.common.util.ForgeSoundType} instead for suppliers
|
||||
public SoundType(float p_i46679_1_, float p_i46679_2_, SoundEvent p_i46679_3_, SoundEvent p_i46679_4_, SoundEvent p_i46679_5_, SoundEvent p_i46679_6_, SoundEvent p_i46679_7_) {
|
||||
this.field_185860_m = p_i46679_1_;
|
||||
this.field_185861_n = p_i46679_2_;
|
||||
@@ -1,18 +1,16 @@
|
||||
--- a/net/minecraft/block/SpawnerBlock.java
|
||||
+++ b/net/minecraft/block/SpawnerBlock.java
|
||||
@@ -18,10 +18,13 @@
|
||||
@@ -18,8 +_,11 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, ServerWorld p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
|
||||
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);
|
||||
- int i = 15 + p_220062_2_.field_73012_v.nextInt(15) + p_220062_2_.field_73012_v.nextInt(15);
|
||||
- this.func_180637_b(p_220062_2_, p_220062_3_, i);
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getExpDrop(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, int fortune, int silktouch) {
|
||||
+ return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15);
|
||||
+ }
|
||||
+
|
||||
public BlockRenderType func_149645_b(BlockState p_149645_1_) {
|
||||
return BlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
public BlockRenderType func_149645_b(BlockState p_149645_1_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SpongeBlock.java
|
||||
+++ b/net/minecraft/block/SpongeBlock.java
|
||||
@@ -64,7 +64,7 @@
|
||||
@@ -64,7 +_,7 @@
|
||||
queue.add(new Tuple<>(blockpos1, j + 1));
|
||||
}
|
||||
} else if (material == Material.field_203243_f || material == Material.field_204868_h) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SpreadableSnowyDirtBlock.java
|
||||
+++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -33,6 +_,7 @@
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
if (!func_220257_b(p_225542_1_, p_225542_2_, p_225542_3_)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/StairsBlock.java
|
||||
+++ b/net/minecraft/block/StairsBlock.java
|
||||
@@ -83,13 +83,23 @@
|
||||
@@ -83,11 +_,21 @@
|
||||
return voxelshape;
|
||||
}
|
||||
|
||||
@@ -11,20 +11,18 @@
|
||||
this.field_150149_b = p_i48321_1_.func_177230_c();
|
||||
this.field_150151_M = p_i48321_1_;
|
||||
+ this.stateSupplier = () -> p_i48321_1_;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public StairsBlock(java.util.function.Supplier<BlockState> state, AbstractBlock.Properties properties) {
|
||||
+ super(properties);
|
||||
+ this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false)));
|
||||
+ this.field_150149_b = Blocks.field_150350_a; // These are unused, fields are redirected
|
||||
+ this.field_150151_M = Blocks.field_150350_a.func_176223_P();
|
||||
+ this.stateSupplier = state;
|
||||
+ }
|
||||
+
|
||||
public boolean func_220074_n(BlockState p_220074_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -265,4 +275,14 @@
|
||||
|
||||
public boolean func_220074_n(BlockState p_220074_1_) {
|
||||
@@ -265,4 +_,14 @@
|
||||
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/StemBlock.java
|
||||
+++ b/net/minecraft/block/StemBlock.java
|
||||
@@ -37,22 +37,24 @@
|
||||
@@ -37,22 +_,24 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
@@ -29,14 +29,15 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -97,4 +99,10 @@
|
||||
@@ -96,5 +_,11 @@
|
||||
|
||||
public StemGrownBlock func_208486_d() {
|
||||
return this.field_149877_a;
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ //FORGE START
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
+ return net.minecraftforge.common.PlantType.CROP;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SugarCaneBlock.java
|
||||
+++ b/net/minecraft/block/SugarCaneBlock.java
|
||||
@@ -15,7 +15,7 @@
|
||||
@@ -15,7 +_,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X;
|
||||
protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D);
|
||||
|
||||
@@ -43,12 +43,14 @@
|
||||
@@ -43,12 +_,14 @@
|
||||
|
||||
if (i < 3) {
|
||||
int j = p_225542_1_.func_177229_b(field_176355_a);
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +65,8 @@
|
||||
@@ -63,6 +_,8 @@
|
||||
}
|
||||
|
||||
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
|
||||
@@ -33,10 +33,11 @@
|
||||
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
|
||||
if (blockstate.func_177230_c() == this) {
|
||||
return true;
|
||||
@@ -86,4 +90,14 @@
|
||||
@@ -85,5 +_,15 @@
|
||||
|
||||
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
|
||||
p_206840_1_.func_206894_a(field_176355_a);
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {
|
||||
@@ -46,5 +47,5 @@
|
||||
+ @Override
|
||||
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
|
||||
+ return func_176223_P();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SweetBerryBushBlock.java
|
||||
+++ b/net/minecraft/block/SweetBerryBushBlock.java
|
||||
@@ -52,8 +52,9 @@
|
||||
@@ -52,8 +_,9 @@
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
int i = p_225542_1_.func_177229_b(field_220125_a);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/TNTBlock.java
|
||||
+++ b/net/minecraft/block/TNTBlock.java
|
||||
@@ -29,10 +29,14 @@
|
||||
@@ -29,10 +_,14 @@
|
||||
this.func_180632_j(this.func_176223_P().func_206870_a(field_212569_a, Boolean.valueOf(false)));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
p_220082_2_.func_217377_a(p_220082_3_, false);
|
||||
}
|
||||
|
||||
@@ -41,7 +45,7 @@
|
||||
@@ -41,7 +_,7 @@
|
||||
|
||||
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
|
||||
if (p_220069_2_.func_175640_z(p_220069_3_)) {
|
||||
@@ -25,7 +25,7 @@
|
||||
p_220069_2_.func_217377_a(p_220069_3_, false);
|
||||
}
|
||||
|
||||
@@ -49,7 +53,7 @@
|
||||
@@ -49,7 +_,7 @@
|
||||
|
||||
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) {
|
||||
if (!p_176208_1_.func_201670_d() && !p_176208_4_.func_184812_l_() && p_176208_3_.func_177229_b(field_212569_a)) {
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_);
|
||||
@@ -63,10 +67,12 @@
|
||||
@@ -63,10 +_,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
private static void func_196535_a(World p_196535_0_, BlockPos p_196535_1_, @Nullable LivingEntity p_196535_2_) {
|
||||
if (!p_196535_0_.field_72995_K) {
|
||||
TNTEntity tntentity = new TNTEntity(p_196535_0_, (double)p_196535_1_.func_177958_n() + 0.5D, (double)p_196535_1_.func_177956_o(), (double)p_196535_1_.func_177952_p() + 0.5D, p_196535_2_);
|
||||
@@ -81,7 +87,7 @@
|
||||
@@ -81,7 +_,7 @@
|
||||
if (item != Items.field_151033_d && item != Items.field_151059_bz) {
|
||||
return super.func_225533_a_(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_4_, p_225533_5_, p_225533_6_);
|
||||
} else {
|
||||
@@ -56,7 +56,7 @@
|
||||
p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150350_a.func_176223_P(), 11);
|
||||
if (!p_225533_4_.func_184812_l_()) {
|
||||
if (item == Items.field_151033_d) {
|
||||
@@ -102,7 +108,7 @@
|
||||
@@ -102,7 +_,7 @@
|
||||
Entity entity = p_220066_4_.func_234616_v_();
|
||||
if (p_220066_4_.func_70027_ad()) {
|
||||
BlockPos blockpos = p_220066_3_.func_216350_a();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/TallGrassBlock.java
|
||||
+++ b/net/minecraft/block/TallGrassBlock.java
|
||||
@@ -8,7 +8,7 @@
|
||||
@@ -8,7 +_,7 @@
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/TrapDoorBlock.java
|
||||
+++ b/net/minecraft/block/TrapDoorBlock.java
|
||||
@@ -147,4 +147,17 @@
|
||||
@@ -147,4 +_,17 @@
|
||||
|
||||
return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
|
||||
}
|
||||
@@ -9,9 +9,9 @@
|
||||
+ @Override
|
||||
+ public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) {
|
||||
+ if (state.func_177229_b(field_176283_b)) {
|
||||
+ BlockState down = world.func_180495_p(pos.func_177977_b());
|
||||
+ if (down.func_177230_c() == net.minecraft.block.Blocks.field_150468_ap)
|
||||
+ return down.func_177229_b(LadderBlock.field_176382_a) == state.func_177229_b(field_185512_D);
|
||||
+ BlockPos downPos = pos.func_177977_b();
|
||||
+ BlockState down = world.func_180495_p(downPos);
|
||||
+ return down.func_177230_c().makesOpenTrapdoorAboveClimbable(down, world, downPos, state);
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/block/TripWireHookBlock.java
|
||||
@@ -150,8 +_,8 @@
|
||||
BlockPos blockpos2 = p_176260_2_.func_177967_a(direction, k);
|
||||
BlockState blockstate2 = ablockstate[k];
|
||||
if (blockstate2 != null) {
|
||||
+ if (!p_176260_1_.func_180495_p(blockpos2).func_196958_f()) { // FORGE: fix MC-129055
|
||||
p_176260_1_.func_180501_a(blockpos2, blockstate2.func_206870_a(field_176265_M, Boolean.valueOf(flag2)), 3);
|
||||
- if (!p_176260_1_.func_180495_p(blockpos2).func_196958_f()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/block/TurtleEggBlock.java
|
||||
+++ b/net/minecraft/block/TurtleEggBlock.java
|
||||
@@ -149,7 +149,7 @@
|
||||
@@ -149,7 +_,7 @@
|
||||
if (!(p_212570_2_ instanceof LivingEntity)) {
|
||||
return false;
|
||||
} else {
|
||||
- return p_212570_2_ instanceof PlayerEntity || p_212570_1_.func_82736_K().func_223586_b(GameRules.field_223599_b);
|
||||
+ return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_) : true;
|
||||
+ return p_212570_2_ instanceof PlayerEntity || net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/VineBlock.java
|
||||
+++ b/net/minecraft/block/VineBlock.java
|
||||
@@ -22,7 +22,7 @@
|
||||
@@ -22,7 +_,7 @@
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z;
|
||||
public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a;
|
||||
public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b;
|
||||
@@ -152,14 +152,14 @@
|
||||
@@ -152,14 +_,14 @@
|
||||
}
|
||||
|
||||
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
|
||||
@@ -26,20 +26,15 @@
|
||||
Direction direction3 = direction.func_176746_e();
|
||||
Direction direction4 = direction.func_176735_f();
|
||||
boolean flag = p_225542_1_.func_177229_b(func_176267_a(direction3));
|
||||
@@ -216,7 +216,7 @@
|
||||
@@ -216,8 +_,9 @@
|
||||
if (p_225542_3_.func_177956_o() > 0) {
|
||||
BlockPos blockpos1 = p_225542_3_.func_177977_b();
|
||||
BlockState blockstate = p_225542_2_.func_180495_p(blockpos1);
|
||||
- if (blockstate.func_196958_f() || blockstate.func_203425_a(this)) {
|
||||
+ if (blockstate.isAir(p_225542_2_, blockpos) || blockstate.func_203425_a(this)) {
|
||||
BlockState blockstate1 = blockstate.func_196958_f() ? this.func_176223_P() : blockstate;
|
||||
- BlockState blockstate1 = blockstate.func_196958_f() ? this.func_176223_P() : blockstate;
|
||||
+ boolean isAir = blockstate.isAir(p_225542_2_, blockpos1);
|
||||
+ if (isAir || blockstate.func_203425_a(this)) {
|
||||
+ BlockState blockstate1 = isAir ? this.func_176223_P() : blockstate;
|
||||
BlockState blockstate2 = this.func_196544_a(p_225542_1_, blockstate1, p_225542_4_);
|
||||
if (blockstate1 != blockstate2 && this.func_196540_x(blockstate2)) {
|
||||
@@ -322,4 +322,7 @@
|
||||
public static BooleanProperty func_176267_a(Direction p_176267_0_) {
|
||||
return field_196546_A.get(p_176267_0_);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
|
||||
}
|
||||
p_225542_2_.func_180501_a(blockpos1, blockstate2, 2);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/WebBlock.java
|
||||
+++ b/net/minecraft/block/WebBlock.java
|
||||
@@ -5,7 +5,7 @@
|
||||
@@ -5,7 +_,7 @@
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/net/minecraft/block/WoodType.java
|
||||
+++ b/net/minecraft/block/WoodType.java
|
||||
@@ -32,4 +_,11 @@
|
||||
public String func_227048_b_() {
|
||||
return this.field_227045_h_;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Use this to create a new {@link WoodType}. Make sure to register its rendering by enqueuing Atlases.addWoodType(...) during client setup..
|
||||
+ */
|
||||
+ public static WoodType create(String name) {
|
||||
+ return new WoodType(name);
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/ClientBrandRetriever.java
|
||||
+++ b/net/minecraft/client/ClientBrandRetriever.java
|
||||
@@ -6,6 +6,6 @@
|
||||
@@ -6,6 +_,6 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ClientBrandRetriever {
|
||||
public static String getClientModName() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -167,6 +167,7 @@
|
||||
@@ -170,6 +_,7 @@
|
||||
public boolean field_241568_aS_;
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
this.field_74317_L = p_i46326_1_;
|
||||
this.field_74354_ai = new File(p_i46326_2_, "options.txt");
|
||||
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
|
||||
@@ -518,7 +519,11 @@
|
||||
@@ -529,7 +_,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s.equals("key_" + keybinding.func_151464_g())) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,6 +570,7 @@
|
||||
@@ -576,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
@@ -29,7 +29,7 @@
|
||||
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
|
||||
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
|
||||
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
|
||||
@@ -648,7 +654,7 @@
|
||||
@@ -661,7 +_,7 @@
|
||||
printwriter.println("syncChunkWrites:" + this.field_241568_aS_);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
@@ -38,10 +38,12 @@
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -747,6 +753,23 @@
|
||||
p_198017_1_.func_198985_a(set);
|
||||
}
|
||||
@@ -758,6 +_,23 @@
|
||||
}
|
||||
|
||||
p_198017_1_.func_198985_a(set);
|
||||
+ }
|
||||
+
|
||||
+ private void setForgeKeybindProperties() {
|
||||
+ net.minecraftforge.client.settings.KeyConflictContext inGame = net.minecraftforge.client.settings.KeyConflictContext.IN_GAME;
|
||||
+ field_74351_w.setKeyConflictContext(inGame);
|
||||
@@ -57,8 +59,6 @@
|
||||
+ field_74323_J.setKeyConflictContext(inGame);
|
||||
+ field_151457_aa.setKeyConflictContext(inGame);
|
||||
+ field_151458_ab.setKeyConflictContext(inGame);
|
||||
+ }
|
||||
+
|
||||
public PointOfView func_243230_g() {
|
||||
return this.field_243228_bb;
|
||||
}
|
||||
|
||||
public PointOfView func_243230_g() {
|
||||
Loaded 100 of 1485 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user