mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
No files matched your search
+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
|
||||
|
||||
+159
-131
@@ -2,17 +2,10 @@ buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.187'
|
||||
classpath 'org.ow2.asm:asm:7.2'
|
||||
classpath 'org.ow2.asm:asm-tree:7.2'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:4.1.+'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +19,15 @@ import static net.minecraftforge.forge.tasks.Util.*
|
||||
import net.minecraftforge.gradle.common.task.DownloadMavenArtifact
|
||||
import net.minecraftforge.gradle.common.task.ExtractInheritance
|
||||
import net.minecraftforge.gradle.common.task.SignJar
|
||||
import net.minecraftforge.gradle.patcher.task.ApplyBinPatches
|
||||
import net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
|
||||
import net.minecraftforge.gradle.userdev.tasks.RenameJar
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
|
||||
plugins {
|
||||
id 'net.minecrell.licenser' version '0.4'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id 'com.github.ben-manes.versions' version '0.22.0'
|
||||
id 'org.cadixdev.licenser' version '0.5.0'
|
||||
id 'com.github.ben-manes.versions' version '0.36.0'
|
||||
id 'eclipse'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
Util.init() //Init all our extension methods!
|
||||
|
||||
@@ -52,10 +42,11 @@ ext {
|
||||
keystore: project.properties.keystore
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'snapshot'
|
||||
MAPPING_VERSION = '20201028-1.16.3'
|
||||
MC_VERSION = '1.16.4'
|
||||
MCP_VERSION = '20201102.104115'
|
||||
MAPPING_CHANNEL = 'official'
|
||||
MAPPING_VERSION = '1.16.5'
|
||||
MC_VERSION = '1.16.5'
|
||||
MCP_VERSION = '20210115.111550'
|
||||
SPI_VERSION = '3.2.0'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -73,20 +64,18 @@ project(':clean') {
|
||||
evaluationDependsOn(':mcp')
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'net.minecraftforge.gradle.patcher'
|
||||
compileJava.sourceCompatibility = compileJava.targetCompatibility = sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'net.minecraftforge:forgespi:2.0.+'
|
||||
implementation 'net.minecraftforge:forgespi:' + SPI_VERSION
|
||||
}
|
||||
|
||||
patcher {
|
||||
parent = project(':mcp')
|
||||
mcVersion = MC_VERSION
|
||||
@@ -124,9 +113,9 @@ project(':forge') {
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'net.minecraftforge.gradle.patcher'
|
||||
apply plugin: 'net.minecrell.licenser'
|
||||
apply plugin: 'org.cadixdev.licenser'
|
||||
|
||||
compileJava.sourceCompatibility = compileJava.targetCompatibility = sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||
group = 'net.minecraftforge'
|
||||
|
||||
sourceSets {
|
||||
@@ -189,42 +178,24 @@ project(':forge') {
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
ext {
|
||||
SPEC_VERSION = '35.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
GIT_INFO = Util.gitInfo(rootProject.file('.'))
|
||||
SPEC_VERSION = GIT_INFO.tag
|
||||
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
|
||||
// ForgeMC is a unique identifier for every MC version we have supported.
|
||||
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
|
||||
MCP_ARTIFACT = project(':mcp').mcp.config
|
||||
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.8.5'
|
||||
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.9.0'
|
||||
SPECIAL_SOURCE_MCP = 'net.md-5:SpecialSource:1.8.3'
|
||||
VERSION_JSON = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
BINPATCH_TOOL = 'net.minecraftforge:binarypatcher:1.0.12:fatjar'
|
||||
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.1.11'
|
||||
}
|
||||
|
||||
def getVersion = {
|
||||
//TAG-offset-hash
|
||||
def raw = grgit.describe(longDescr: true, tags:true)
|
||||
def desc = (raw == null ? '0.0-0-unknown' : grgit.describe(longDescr: true, tags:true)).split('-') as List
|
||||
def hash = desc.remove(desc.size() - 1)
|
||||
def offset = desc.remove(desc.size() - 1)
|
||||
def tag = desc.join('-')
|
||||
def branch = grgit.branch.current().name
|
||||
if (branch in ['master', 'HEAD', MC_VERSION, MC_VERSION + '.0'])
|
||||
branch = null
|
||||
if (branch != null && branch.endsWith('.x') && MC_VERSION.startsWith(branch.substring(0, branch.length() - 2))) //1.13.x
|
||||
branch = null
|
||||
SPEC_VERSION = tag
|
||||
return "${MC_VERSION}-${tag}.${offset}${t -> if (branch != null) t << '-' + branch}".toString() //Bake the response instead of making it dynamic
|
||||
}
|
||||
|
||||
version = getVersion()
|
||||
version = Util.getVersion(GIT_INFO, MC_VERSION)
|
||||
println('Forge Version: ' + version)
|
||||
|
||||
patcher {
|
||||
@@ -252,15 +223,16 @@ project(':forge') {
|
||||
environment 'MCP_VERSION', MCP_VERSION
|
||||
environment 'FORGE_GROUP', project.group
|
||||
environment 'FORGE_SPEC', SPEC_VERSION
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1)
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
property 'org.lwjgl.system.SharedLibraryExtractDirectory', 'lwjgl_dll'
|
||||
property 'eventbus.checkTypesOnDispatch', 'true'
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
|
||||
source sourceSets.main
|
||||
source sourceSets.userdev
|
||||
mods {
|
||||
forge { source sourceSets.main }
|
||||
}
|
||||
}
|
||||
|
||||
forge_test_client {
|
||||
@@ -272,7 +244,8 @@ project(':forge') {
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev_test"
|
||||
|
||||
mods {
|
||||
TestMods { sources sourceSets.test }
|
||||
forge { source sourceSets.main }
|
||||
tests { sources sourceSets.test }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,14 +261,15 @@ project(':forge') {
|
||||
environment 'MCP_VERSION', MCP_VERSION
|
||||
environment 'FORGE_GROUP', project.group
|
||||
environment 'FORGE_SPEC', SPEC_VERSION
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1)
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
property 'eventbus.checkTypesOnDispatch', 'true'
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
|
||||
source sourceSets.main
|
||||
source sourceSets.userdev
|
||||
mods {
|
||||
forge { source sourceSets.main }
|
||||
}
|
||||
}
|
||||
|
||||
forge_test_server {
|
||||
@@ -307,7 +281,8 @@ project(':forge') {
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev_test"
|
||||
|
||||
mods {
|
||||
TestMods { sources sourceSets.test }
|
||||
forge { source sourceSets.main }
|
||||
tests { sources sourceSets.test }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,13 +298,14 @@ project(':forge') {
|
||||
environment 'MCP_VERSION', MCP_VERSION
|
||||
environment 'FORGE_GROUP', project.group
|
||||
environment 'FORGE_SPEC', SPEC_VERSION
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
|
||||
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1)
|
||||
environment 'LAUNCHER_VERSION', SPEC_VERSION
|
||||
|
||||
ideaModule "${rootProject.name}.${project.name}.userdev"
|
||||
|
||||
source sourceSets.main
|
||||
source sourceSets.userdev
|
||||
mods {
|
||||
forge { source sourceSets.main }
|
||||
}
|
||||
|
||||
args '--mod', 'forge', '--all', '--output', rootProject.file('src/generated/resources/'), '--validate',
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
@@ -365,8 +341,8 @@ project(':forge') {
|
||||
MANIFESTS = [
|
||||
'/': [
|
||||
'Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
'GitCommit': grgit.head().abbreviatedId,
|
||||
'Git-Branch': grgit.branch.current().getName()
|
||||
'GitCommit': GIT_INFO.abbreviatedId,
|
||||
'Git-Branch': GIT_INFO.branch
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/versions/forge/': [
|
||||
'Specification-Title': 'Forge',
|
||||
@@ -419,50 +395,49 @@ project(':forge') {
|
||||
]
|
||||
}
|
||||
|
||||
applyPatches {
|
||||
canonicalizeAccess true
|
||||
canonicalizeWhitespace true
|
||||
maxFuzz 3
|
||||
}
|
||||
configurations {
|
||||
installer {
|
||||
transitive = false //Don't pull all libraries, if we're missing something, add it to the installer list so the installer knows to download it.
|
||||
}
|
||||
api.extendsFrom(installer)
|
||||
fmllauncherImplementation.extendsFrom(installer)
|
||||
fmllauncherImplementation.extendsFrom(installer, implementation)
|
||||
}
|
||||
dependencies {
|
||||
installer 'org.ow2.asm:asm:7.2'
|
||||
installer 'org.ow2.asm:asm-commons:7.2'
|
||||
installer 'org.ow2.asm:asm-tree:7.2'
|
||||
installer 'org.ow2.asm:asm-util:7.2'
|
||||
installer 'org.ow2.asm:asm-analysis:7.2'
|
||||
installer 'cpw.mods:modlauncher:8.0.6'
|
||||
installer 'org.ow2.asm:asm:9.0'
|
||||
installer 'org.ow2.asm:asm-commons:9.0'
|
||||
installer 'org.ow2.asm:asm-tree:9.0'
|
||||
installer 'org.ow2.asm:asm-util:9.0'
|
||||
installer 'org.ow2.asm:asm-analysis:9.0'
|
||||
installer 'cpw.mods:modlauncher:8.0.9'
|
||||
installer 'cpw.mods:grossjava9hacks:1.3.+'
|
||||
installer 'net.minecraftforge:accesstransformers:2.2.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:3.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:3.2.+'
|
||||
installer 'net.minecraftforge:coremods:3.0.+'
|
||||
installer 'net.minecraftforge:accesstransformers:3.0.1'
|
||||
installer 'org.antlr:antlr4-runtime:4.9.1' //Dep of AccessTransformer
|
||||
installer 'net.minecraftforge:eventbus:4.0.+'
|
||||
installer 'net.minecraftforge:forgespi:' + SPI_VERSION
|
||||
installer 'net.minecraftforge:coremods:4.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'com.electronwill.night-config:core:3.6.2'
|
||||
installer 'com.electronwill.night-config:toml:3.6.2'
|
||||
installer 'com.electronwill.night-config:core:3.6.3'
|
||||
installer 'com.electronwill.night-config:toml:3.6.3'
|
||||
installer 'org.jline:jline:3.12.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.0'
|
||||
installer 'net.jodah:typetools:0.8.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.3'
|
||||
installer 'net.jodah:typetools:0.8.3'
|
||||
installer 'org.apache.logging.log4j:log4j-api:2.11.2'
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.0'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
installer 'org.spongepowered:mixin:0.8.2'
|
||||
// This is org.openjdk.nashorn:nashorn-core:15.1.1 repackaged so it doesn't crash on JREs < 15.
|
||||
// See: https://github.com/LexManos/NashornLegacyPackager
|
||||
installer 'net.minecraftforge:nashorn-core-compat:15.1.1.1'
|
||||
fmllauncherImplementation 'com.google.guava:guava:21.0'
|
||||
fmllauncherImplementation 'com.google.code.gson:gson:2.8.0'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl:3.2.2'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl-glfw:3.2.2'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl-opengl:3.2.2'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl-stb:3.2.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
|
||||
testImplementation 'org.junit.vintage:junit-vintage-engine:5.+'
|
||||
testImplementation 'org.opentest4j:opentest4j:1.0.0' // needed for junit 5
|
||||
testImplementation 'org.opentest4j:opentest4j:1.2.0' // needed for junit 5
|
||||
testImplementation 'org.hamcrest:hamcrest-all:1.3' // needs advanced matching for list order
|
||||
}
|
||||
|
||||
@@ -475,35 +450,35 @@ project(':forge') {
|
||||
if (changelog.exists())
|
||||
extraTxts += changelog
|
||||
|
||||
task crowdin(type: CrowdinTask) {
|
||||
key = project.hasProperty('crowdinKey') ? project.crowdinKey : null
|
||||
//TODO: Merge our english.json?
|
||||
}
|
||||
task crowdin(type: CrowdinTask) {
|
||||
key = project.hasProperty('crowdinKey') ? project.crowdinKey : null
|
||||
//TODO: Merge our english.json?
|
||||
}
|
||||
|
||||
// We apply the bin patches we just created to make a jar that is JUST our changes
|
||||
['Client', 'Server', 'Joined'].each { side ->
|
||||
def gen = tasks.getByName("gen${side}BinPatches")
|
||||
gen.tool = BINPATCH_TOOL
|
||||
task "apply${side}BinPatches"(type: ApplyBinPatches, dependsOn: gen) {
|
||||
clean = { gen.cleanJar }
|
||||
input = gen.output
|
||||
tool = BINPATCH_TOOL
|
||||
}
|
||||
if (side != 'Joined') {
|
||||
// Create SRG named Vanilla jars, using the SpecialSource we have in the installer
|
||||
task "create${side}SRG"(type: RenameJar, dependsOn: gen) {
|
||||
tool = SPECIAL_SOURCE + ':shaded'
|
||||
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
|
||||
mappings = { gen.srg }
|
||||
input = { gen.cleanJar }
|
||||
output = file("build/create${name}SRG/output.jar")
|
||||
}
|
||||
}
|
||||
}
|
||||
['Client', 'Server', 'Joined'].each { side ->
|
||||
def gen = tasks.getByName("gen${side}BinPatches")
|
||||
gen.tool = BINPATCH_TOOL
|
||||
task "apply${side}BinPatches"(type: net.minecraftforge.gradle.common.task.ApplyBinPatches, dependsOn: gen) {
|
||||
clean = { gen.cleanJar }
|
||||
patch = gen.output
|
||||
tool = BINPATCH_TOOL
|
||||
}
|
||||
|
||||
def srgTask = tasks.getByName(patcher.notchObf ? 'createMcp2Obf' : 'createMcp2Srg')
|
||||
// Create SRG named Vanilla jars, using the SpecialSource we have in the installer
|
||||
task "create${side}SRG"(type: net.minecraftforge.gradle.userdev.tasks.RenameJar, dependsOn: srgTask) {
|
||||
tool = SPECIAL_SOURCE_MCP + ':shaded'
|
||||
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
|
||||
mappings = { srgTask.output }
|
||||
input = { gen.cleanJar }
|
||||
output = file("build/create${name}SRG/output.jar")
|
||||
}
|
||||
}
|
||||
|
||||
task downloadLibraries(type: DownloadLibrariesTask, dependsOn: ':mcp:setupMCP') {
|
||||
input = VERSION_JSON
|
||||
output = rootProject.file('build/libraries/')
|
||||
input = VERSION_JSON
|
||||
output = rootProject.file('build/libraries/')
|
||||
}
|
||||
|
||||
task extractInheritance(type: ExtractInheritance, dependsOn: [genJoinedBinPatches, downloadLibraries]) {
|
||||
@@ -511,23 +486,59 @@ project(':forge') {
|
||||
input { genJoinedBinPatches.cleanJar }
|
||||
doFirst { downloadLibraries.libraries.each{ addLibrary(it) } }
|
||||
}
|
||||
|
||||
|
||||
task findFieldInstanceChecks(type: FieldCompareFinder, dependsOn: ['createJoinedSRG']) {
|
||||
jar = tasks.getByName('createJoinedSRG').output
|
||||
output = rootProject.file('src/main/resources/coremods/field_to_instanceof.json')
|
||||
fields {
|
||||
bows {
|
||||
cls = 'net/minecraft/item/Items'
|
||||
name = 'field_151031_f'
|
||||
replacement = 'net/minecraft/item/BowItem'
|
||||
}
|
||||
crossbows {
|
||||
cls = 'net/minecraft/item/Items'
|
||||
name = 'field_222114_py'
|
||||
replacement = 'net/minecraft/item/CrossbowItem'
|
||||
}
|
||||
filled_map {
|
||||
cls = 'net/minecraft/item/Items'
|
||||
name = 'field_151098_aY'
|
||||
replacement = 'net/minecraft/item/FilledMapItem'
|
||||
blacklist 'net/minecraft/client/gui/screen/inventory/CartographyTableScreen', 'func_230450_a_', '(Lcom/mojang/blaze3d/matrix/MatrixStack;FII)V'
|
||||
blacklist 'net/minecraft/client/renderer/entity/ItemFrameRenderer', 'func_225623_a_', '(Lnet/minecraft/entity/item/ItemFrameEntity;FFLcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;I)V'
|
||||
blacklist 'net/minecraft/item/crafting/MapCloningRecipe'
|
||||
blacklist 'net/minecraft/item/crafting/MapExtendingRecipe'
|
||||
}
|
||||
fishing_rod {
|
||||
cls = 'net/minecraft/item/Items'
|
||||
name = 'field_151112_aM'
|
||||
replacement = 'net/minecraft/item/FishingRodItem'
|
||||
}
|
||||
shears {
|
||||
cls = 'net/minecraft/item/Items'
|
||||
name = 'field_151097_aZ'
|
||||
replacement = 'net/minecraft/item/ShearsItem'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task checkATs(type: CheckATs, dependsOn: extractInheritance) {
|
||||
inheritance = extractInheritance.output
|
||||
ats = patcher.accessTransformers
|
||||
ats = patcher.accessTransformers
|
||||
}
|
||||
|
||||
|
||||
task checkSAS(type: CheckSAS, dependsOn: extractInheritance) {
|
||||
inheritance = extractInheritance.output
|
||||
sass = patcher.sideAnnotationStrippers
|
||||
sass = patcher.sideAnnotationStrippers
|
||||
}
|
||||
|
||||
|
||||
task checkExcs(type: CheckExcs, dependsOn: jar) {
|
||||
binary = jar.archivePath
|
||||
excs = patcher.excs
|
||||
excs = patcher.excs
|
||||
}
|
||||
|
||||
task checkAll(dependsOn: [checkATs, checkSAS, checkExcs]){}
|
||||
|
||||
task checkAll(dependsOn: [checkATs, checkSAS, checkExcs, findFieldInstanceChecks]){}
|
||||
|
||||
task checkPatchesAndFix(type: CheckPatches) {
|
||||
patchDir = file("$rootDir/patches")
|
||||
@@ -538,7 +549,10 @@ project(':forge') {
|
||||
patchDir = file("$rootDir/patches")
|
||||
autoFix = false
|
||||
}
|
||||
project(':forge').getTasks().getByName('genPatches').finalizedBy(checkPatches)
|
||||
genPatches {
|
||||
finalizedBy checkPatches
|
||||
autoHeader true
|
||||
}
|
||||
|
||||
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
|
||||
inputs.file universalJar.archivePath
|
||||
@@ -638,6 +652,7 @@ project(':forge') {
|
||||
logo: '/big_logo.png',
|
||||
minecraft: MC_VERSION,
|
||||
welcome: "Welcome to the simple ${project.name.capitalize()} installer.",
|
||||
mirrorList: "https://files.minecraftforge.net/mirrors-2.0.json",
|
||||
data: [
|
||||
MAPPINGS: [
|
||||
client: "[${MCP_ARTIFACT.group}:${MCP_ARTIFACT.name}:${MCP_ARTIFACT.version}:mappings@txt]",
|
||||
@@ -708,8 +723,8 @@ project(':forge') {
|
||||
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
|
||||
]
|
||||
], [
|
||||
jar: SPECIAL_SOURCE,
|
||||
classpath: getClasspath(project, libs, SPECIAL_SOURCE),
|
||||
jar: SPECIAL_SOURCE_MCP,
|
||||
classpath: getClasspath(project, libs, SPECIAL_SOURCE_MCP),
|
||||
args: [
|
||||
//'--stable', Java 9 Is borked, https://bugs.openjdk.java.net/browse/JDK-8184940 TODO: find a fix.
|
||||
'--in-jar', '{MC_SLIM}',
|
||||
@@ -758,7 +773,7 @@ project(':forge') {
|
||||
// add crowdin locales
|
||||
from { crowdin.output.exists() ? zipTree(crowdin.output) : null}
|
||||
dependsOn crowdin
|
||||
duplicatesStrategy = 'exclude'
|
||||
duplicatesStrategy = 'exclude'
|
||||
|
||||
doFirst {
|
||||
MANIFESTS.each{ pkg, values ->
|
||||
@@ -810,8 +825,8 @@ project(':forge') {
|
||||
|
||||
task installerJar(type: Zip, dependsOn: [downloadInstaller, installerJson, launcherJson, genClientBinPatches, genServerBinPatches, 'signUniversalJar', 'signLauncherJar']) {
|
||||
classifier = 'installer'
|
||||
extension = 'jar' //Needs to be Zip task to not override Manifest, so set extension
|
||||
destinationDir = file('build/libs')
|
||||
archiveExtension = 'jar' //Needs to be Zip task to not override Manifest, so set extension
|
||||
destinationDirectory = file('build/libs')
|
||||
from(extraTxts)
|
||||
from(rootProject.file('/installer_logo.png')) {
|
||||
rename{'big_logo.png'}
|
||||
@@ -857,10 +872,10 @@ project(':forge') {
|
||||
}
|
||||
|
||||
task makeMdk(type: Zip) {
|
||||
baseName = project.name
|
||||
archiveBaseName = project.name
|
||||
classifier = 'mdk'
|
||||
version = project.version
|
||||
destinationDir = file('build/libs')
|
||||
archiveVersion = project.version
|
||||
destinationDirectory = file('build/libs')
|
||||
|
||||
from rootProject.file('gradlew')
|
||||
from rootProject.file('gradlew.bat')
|
||||
@@ -879,7 +894,9 @@ project(':forge') {
|
||||
FORGE_NAME: project.name,
|
||||
MC_VERSION: MC_VERSION,
|
||||
MAPPING_CHANNEL: MAPPING_CHANNEL,
|
||||
MAPPING_VERSION: MAPPING_VERSION
|
||||
MAPPING_VERSION: MAPPING_VERSION,
|
||||
FORGE_SPEC_VERSION: SPEC_VERSION.split("\\.")[0],
|
||||
MC_NEXT_VERSION: "1."+((MC_VERSION.split("\\.")[1] as int)+1)
|
||||
])
|
||||
rename 'gitignore\\.txt', '.gitignore'
|
||||
rename 'gitattributes\\.txt', '.gitattributes'
|
||||
@@ -940,6 +957,10 @@ project(':forge') {
|
||||
license {
|
||||
header = file("$rootDir/LICENSE-header.txt")
|
||||
|
||||
ext {
|
||||
year = new Date().format("yyyy")
|
||||
}
|
||||
|
||||
include 'net/minecraftforge/'
|
||||
exclude 'net/minecraftforge/server/terminalconsole/'
|
||||
exclude 'net/minecraftforge/api/' // exclude API here because it's validated in the SPI build
|
||||
@@ -947,6 +968,7 @@ project(':forge') {
|
||||
exclude 'net/minecraftforge/fml/common/versioning/InvalidVersionSpecificationException.java'
|
||||
exclude 'net/minecraftforge/fml/common/versioning/Restriction.java'
|
||||
exclude 'net/minecraftforge/fml/common/versioning/VersionRange.java'
|
||||
exclude 'net/minecraftforge/common/LenientUnboundedMapCodec.java'
|
||||
|
||||
tasks {
|
||||
main {
|
||||
@@ -964,11 +986,16 @@ project(':forge') {
|
||||
classifier 'userdev-temp'
|
||||
}
|
||||
|
||||
reobfJar {
|
||||
tool = SPECIAL_SOURCE + ':shaded'
|
||||
}
|
||||
|
||||
task userdevExtrasReobf(type:TaskReobfuscateJar) {
|
||||
dependsOn userdevExtras, createMcp2Srg
|
||||
input = tasks.userdevExtras.archivePath
|
||||
classpath = project.configurations.compile
|
||||
srg = tasks.createMcp2Srg.output
|
||||
tool = SPECIAL_SOURCE + ':shaded'
|
||||
}
|
||||
|
||||
userdevJar {
|
||||
@@ -994,6 +1021,7 @@ project(':forge') {
|
||||
if (project.hasProperty('UPDATE_MAPPINGS')) {
|
||||
extractRangeMap {
|
||||
sources sourceSets.test.java.srcDirs
|
||||
addDependencies compileTestJava.classpath
|
||||
}
|
||||
applyRangeMap {
|
||||
sources sourceSets.test.java.srcDirs
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
repositories {
|
||||
//mavenCentral() //TODO: Update Gradle to use HTTPS by default
|
||||
maven {
|
||||
name 'maven_central'
|
||||
url 'https://repo.maven.apache.org/maven2/'
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
implementation 'org.ow2.asm:asm:7.2'
|
||||
implementation 'org.ow2.asm:asm:9.0'
|
||||
implementation 'org.ow2.asm:asm-tree:9.0'
|
||||
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.10.0.202012080955-r'
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
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.Type
|
||||
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
|
||||
|
||||
public abstract class BytecodeFinder extends DefaultTask {
|
||||
@InputFile File jar
|
||||
@OutputFile output = project.file("build/${name}/output.json")
|
||||
|
||||
@TaskAction
|
||||
protected void exec() {
|
||||
Util.init()
|
||||
|
||||
if (output.exists())
|
||||
output.delete()
|
||||
|
||||
pre()
|
||||
|
||||
jar.withInputStream { i ->
|
||||
new ZipInputStream(i).withCloseable { zin ->
|
||||
ZipEntry zein
|
||||
while ((zein = zin.nextEntry) != null) {
|
||||
if (zein.name.endsWith('.class')) {
|
||||
def node = new ClassNode(Opcodes.ASM7)
|
||||
new ClassReader(zin).accept(node, 0)
|
||||
process(node)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post()
|
||||
output.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,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 def apply(def obj, Closure cl) {
|
||||
cl.delegate = obj
|
||||
cl.resolveStrategy = Closure.DELEGATE_FIRST
|
||||
cl()
|
||||
return obj
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package net.minecraftforge.forge.tasks
|
||||
|
||||
import groovy.transform.EqualsAndHashCode
|
||||
|
||||
import java.util.ArrayList
|
||||
import java.util.HashMap
|
||||
import java.util.TreeMap
|
||||
import java.util.TreeSet
|
||||
import java.util.function.BiConsumer
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Nested
|
||||
import org.gradle.api.tasks.Optional
|
||||
|
||||
import org.objectweb.asm.Opcodes
|
||||
import org.objectweb.asm.Type
|
||||
import org.objectweb.asm.tree.ClassNode
|
||||
import org.objectweb.asm.tree.FieldNode
|
||||
import org.objectweb.asm.tree.MethodNode
|
||||
|
||||
import static org.objectweb.asm.Opcodes.*
|
||||
|
||||
public class FieldCompareFinder extends BytecodeFinder {
|
||||
@Nested
|
||||
Map<String, Search> fields = [:] as HashMap
|
||||
Map<Search, String> fieldsReverse = [:] as HashMap
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@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())
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@ import java.security.MessageDigest
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
|
||||
import org.eclipse.jgit.api.Git
|
||||
import org.eclipse.jgit.lib.AbbreviatedObjectId
|
||||
import org.eclipse.jgit.lib.ObjectId
|
||||
|
||||
public class Util {
|
||||
static void init() {
|
||||
File.metaClass.sha1 = { ->
|
||||
@@ -24,6 +28,18 @@ public class Util {
|
||||
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) {
|
||||
@@ -59,11 +75,12 @@ public class Util {
|
||||
url = "https://files.minecraftforge.net/maven/${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'
|
||||
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'
|
||||
path = "${art.group.replace('.', '/')}/${art.name}/${art.version}/${art.name}-${art.version}.jar"
|
||||
}
|
||||
ret[key] = [
|
||||
name: "${art.group}:${art.name}:${art.version}" + (art.classifier == null ? '' : ":${art.classifier}") + (art.extension == 'jar' ? '' : "@${art.extension}"),
|
||||
@@ -114,4 +131,42 @@ public class Util {
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
public static def gitInfo(dir) {
|
||||
init()
|
||||
def git = null
|
||||
try {
|
||||
git = Git.open(dir)
|
||||
} catch (org.eclipse.jgit.errors.RepositoryNotFoundException e) {
|
||||
return [
|
||||
tag: '0.0',
|
||||
offset: '0',
|
||||
hash: '00000000',
|
||||
branch: 'master',
|
||||
commit: '0000000000000000000000',
|
||||
abbreviatedId: '00000000'
|
||||
]
|
||||
}
|
||||
def desc = git.describe().setLong(true).setTags(true).call().rsplit('-', 2)
|
||||
def head = git.repository.resolve('HEAD')
|
||||
|
||||
def ret = [:]
|
||||
ret.tag = desc[0]
|
||||
ret.offset = desc[1]
|
||||
ret.hash = desc[2]
|
||||
ret.branch = git.repository.branch
|
||||
ret.commit = ObjectId.toString(head)
|
||||
ret.abbreviatedId = head.abbreviate(8).name()
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
public static String getVersion(info, mc_version) {
|
||||
def branch = info.branch
|
||||
if (branch != null && branch.startsWith('pulls/'))
|
||||
branch = 'pr' + branch.rsplit('/', 1)[1]
|
||||
if (branch in [null, 'master', 'HEAD', mc_version, mc_version + '.0', mc_version.rsplit('.', 1)[0] + '.x'])
|
||||
return "${mc_version}-${info.tag}.${info.offset}".toString()
|
||||
return "${mc_version}-${info.tag}.${info.offset}-${branch}".toString()
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
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!
|
||||
|
||||
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-6.8.1-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
|
||||
+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
|
||||
+32
-9
@@ -1,11 +1,10 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.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,9 +87,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'
|
||||
|
||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
||||
@@ -148,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="[34,)" #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="[34,)" #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.3]"
|
||||
# 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,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -572,10 +572,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,6 +1,6 @@
|
||||
--- 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_) {
|
||||
|
||||
@@ -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,7 +19,7 @@
|
||||
}
|
||||
|
||||
@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_) {
|
||||
@@ -28,7 +28,7 @@
|
||||
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,7 +65,7 @@
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -346,6 +349,14 @@
|
||||
@@ -346,6 +_,14 @@
|
||||
return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P());
|
||||
}
|
||||
|
||||
@@ -80,11 +80,17 @@
|
||||
public abstract static class AbstractBlockState extends StateHolder<Block, BlockState> {
|
||||
private final int field_215708_d;
|
||||
private final boolean field_215709_e;
|
||||
@@ -428,14 +439,18 @@
|
||||
@@ -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_;
|
||||
@@ -95,12 +101,12 @@
|
||||
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 +817,9 @@
|
||||
@@ -802,8 +_,11 @@
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_226895_m_ = true;
|
||||
private boolean field_235813_o_;
|
||||
@@ -108,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 +881,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_;
|
||||
@@ -119,7 +128,7 @@
|
||||
return abstractblock$properties;
|
||||
}
|
||||
|
||||
@@ -877,6 +897,24 @@
|
||||
@@ -877,6 +_,24 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -144,12 +153,20 @@
|
||||
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
|
||||
this.field_200961_i = p_200941_1_;
|
||||
return this;
|
||||
@@ -933,7 +971,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,7 +9,7 @@
|
||||
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;
|
||||
@@ -17,7 +17,7 @@
|
||||
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,6 +1,6 @@
|
||||
--- a/net/minecraft/block/BambooBlock.java
|
||||
+++ b/net/minecraft/block/BambooBlock.java
|
||||
@@ -100,10 +100,11 @@
|
||||
@@ -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) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/block/BeehiveBlock.java
|
||||
+++ b/net/minecraft/block/BeehiveBlock.java
|
||||
@@ -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,7 +9,7 @@
|
||||
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 +208,7 @@
|
||||
@@ -208,7 +_,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,8 +13,8 @@
|
||||
+ 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.
|
||||
@@ -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_);
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
+ 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)
|
||||
+ if (down.func_203425_a(net.minecraft.block.Blocks.field_150468_ap))
|
||||
+ return down.func_177229_b(LadderBlock.field_176382_a) == state.func_177229_b(field_185512_D);
|
||||
+ }
|
||||
+ return false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- 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 {
|
||||
|
||||
@@ -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,7 +26,7 @@
|
||||
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,8 +216,9 @@
|
||||
@@ -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);
|
||||
@@ -38,11 +38,3 @@
|
||||
BlockState blockstate2 = this.func_196544_a(p_225542_1_, blockstate1, p_225542_4_);
|
||||
if (blockstate1 != blockstate2 && this.func_196540_x(blockstate2)) {
|
||||
p_225542_2_.func_180501_a(blockpos1, blockstate2, 2);
|
||||
@@ -322,4 +323,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; }
|
||||
}
|
||||
@@ -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
|
||||
@@ -170,6 +170,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) {
|
||||
@@ -529,7 +530,11 @@
|
||||
@@ -529,7 +_,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s.equals("key_" + keybinding.func_151464_g())) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,6 +581,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));
|
||||
@@ -661,7 +667,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()) {
|
||||
@@ -760,6 +766,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() {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/KeyboardListener.java
|
||||
+++ b/net/minecraft/client/KeyboardListener.java
|
||||
@@ -255,7 +255,9 @@
|
||||
@@ -255,7 +_,9 @@
|
||||
}
|
||||
|
||||
INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r;
|
||||
@@ -11,7 +11,7 @@
|
||||
if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) {
|
||||
this.field_197972_a.func_228018_at_().func_198077_g();
|
||||
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.func_228018_at_().func_198113_j();
|
||||
@@ -274,6 +276,8 @@
|
||||
@@ -274,6 +_,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.func_241217_q_() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.func_241217_q_()).func_212955_f();
|
||||
@@ -289,10 +293,14 @@
|
||||
@@ -289,10 +_,14 @@
|
||||
Screen.func_231153_a_(() -> {
|
||||
if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) {
|
||||
if (p_197961_5_ == 0) {
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName());
|
||||
@@ -345,7 +353,7 @@
|
||||
@@ -345,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,12 +363,16 @@
|
||||
@@ -355,12 +_,16 @@
|
||||
if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) {
|
||||
if (Character.charCount(p_197963_3_) == 1) {
|
||||
Screen.func_231153_a_(() -> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/MainWindow.java
|
||||
+++ b/net/minecraft/client/MainWindow.java
|
||||
@@ -86,7 +86,7 @@
|
||||
@@ -86,7 +_,7 @@
|
||||
GLFW.glfwWindowHint(139266, 2);
|
||||
GLFW.glfwWindowHint(139267, 0);
|
||||
GLFW.glfwWindowHint(139272, 0);
|
||||
@@ -9,3 +9,11 @@
|
||||
if (monitor != null) {
|
||||
VideoMode videomode = monitor.func_197992_a(this.field_198125_l ? this.field_198124_k : Optional.empty());
|
||||
this.field_198120_g = this.field_198127_n = monitor.func_197989_c() + videomode.func_198064_a() / 2 - this.field_198129_p / 2;
|
||||
@@ -271,6 +_,7 @@
|
||||
GLFW.glfwGetFramebufferSize(this.field_198119_f, aint, aint1);
|
||||
this.field_198131_r = aint[0];
|
||||
this.field_198132_s = aint1[0];
|
||||
+ if (this.field_198132_s == 0 || this.field_198131_r==0) net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.updateFBSize(w->this.field_198131_r=w, h->this.field_198132_s=h);
|
||||
}
|
||||
|
||||
private void func_198089_c(long p_198089_1_, int p_198089_3_, int p_198089_4_) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -368,6 +368,7 @@
|
||||
@@ -368,6 +_,7 @@
|
||||
public Minecraft(GameConfiguration p_i45547_1_) {
|
||||
super("Client");
|
||||
field_71432_P = this;
|
||||
@@ -8,7 +8,7 @@
|
||||
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
|
||||
File file1 = p_i45547_1_.field_178744_c.field_178759_c;
|
||||
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
|
||||
@@ -382,7 +383,6 @@
|
||||
@@ -382,7 +_,6 @@
|
||||
this.field_244734_au = this.func_244735_a(yggdrasilauthenticationservice, p_i45547_1_);
|
||||
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
||||
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
|
||||
@@ -16,7 +16,7 @@
|
||||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_238175_ae_ = !p_i45547_1_.field_178741_d.field_239099_d_;
|
||||
this.field_238176_af_ = !p_i45547_1_.field_178741_d.field_239100_e_;
|
||||
@@ -428,13 +428,13 @@
|
||||
@@ -428,13 +_,13 @@
|
||||
|
||||
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
|
||||
this.field_71417_B = new MouseHelper(this);
|
||||
@@ -31,7 +31,7 @@
|
||||
this.field_110448_aq.func_198983_a();
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
|
||||
@@ -476,6 +476,7 @@
|
||||
@@ -476,6 +_,7 @@
|
||||
this.func_193986_ar();
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
@@ -39,7 +39,7 @@
|
||||
this.field_110451_am.func_219534_a(this.field_71452_i);
|
||||
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213272_aL);
|
||||
@@ -483,7 +484,8 @@
|
||||
@@ -483,7 +_,8 @@
|
||||
this.field_110451_am.func_219534_a(this.field_213273_aM);
|
||||
this.field_241557_ar_ = new GPUWarning();
|
||||
this.field_110451_am.func_219534_a(this.field_241557_ar_);
|
||||
@@ -49,7 +49,7 @@
|
||||
this.field_184132_p = new DebugRenderer(this);
|
||||
RenderSystem.setErrorCallback(this::func_195545_a);
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
@@ -495,11 +497,6 @@
|
||||
@@ -495,11 +_,6 @@
|
||||
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
|
||||
this.field_195558_d.func_227801_c_();
|
||||
this.func_213226_a();
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
ResourceLoadProgressGui.func_212970_a(this);
|
||||
List<IResourcePack> list = this.field_110448_aq.func_232623_f_();
|
||||
@@ -508,7 +505,14 @@
|
||||
@@ -508,7 +_,14 @@
|
||||
if (SharedConstants.field_206244_b) {
|
||||
this.func_213256_aB();
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
});
|
||||
}, false));
|
||||
}
|
||||
@@ -556,7 +560,7 @@
|
||||
@@ -556,7 +_,7 @@
|
||||
}
|
||||
|
||||
private void func_229988_a_(Throwable p_229988_1_) {
|
||||
@@ -86,7 +86,7 @@
|
||||
ITextComponent itextcomponent;
|
||||
if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) {
|
||||
itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_241203_a().func_195762_a());
|
||||
@@ -644,7 +648,7 @@
|
||||
@@ -644,7 +_,7 @@
|
||||
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
|
||||
});
|
||||
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
|
||||
@@ -95,7 +95,7 @@
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -714,13 +718,13 @@
|
||||
@@ -714,13 +_,13 @@
|
||||
Bootstrap.func_179870_a(p_71377_0_.func_71502_e());
|
||||
if (p_71377_0_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f());
|
||||
@@ -112,7 +112,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -729,6 +733,7 @@
|
||||
@@ -729,6 +_,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -817,10 +822,6 @@
|
||||
@@ -817,10 +_,6 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -131,7 +131,7 @@
|
||||
if (p_147108_1_ == null && this.field_71441_e == null) {
|
||||
p_147108_1_ = new MainMenuScreen();
|
||||
} else if (p_147108_1_ == null && this.field_71439_g.func_233643_dh_()) {
|
||||
@@ -831,6 +832,14 @@
|
||||
@@ -831,6 +_,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
this.field_71456_v.func_146158_b().func_146231_a(true);
|
||||
@@ -962,11 +971,13 @@
|
||||
@@ -962,11 +_,13 @@
|
||||
RenderSystem.enableCull();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
@@ -160,7 +160,7 @@
|
||||
}
|
||||
|
||||
if (this.field_238174_aV_ != null) {
|
||||
@@ -1065,6 +1076,7 @@
|
||||
@@ -1065,6 +_,7 @@
|
||||
|
||||
Framebuffer framebuffer = this.func_147110_a();
|
||||
framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a);
|
||||
@@ -168,7 +168,7 @@
|
||||
this.field_71460_t.func_147704_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71417_B.func_198021_g();
|
||||
}
|
||||
@@ -1253,11 +1265,21 @@
|
||||
@@ -1253,11 +_,21 @@
|
||||
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1276,6 +1298,8 @@
|
||||
@@ -1276,6 +_,8 @@
|
||||
}
|
||||
|
||||
} else if (!this.field_71439_g.func_184838_M()) {
|
||||
@@ -201,7 +201,7 @@
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
case ENTITY:
|
||||
this.field_71442_b.func_78764_a(this.field_71439_g, ((EntityRayTraceResult)this.field_71476_x).func_216348_a());
|
||||
@@ -1283,7 +1307,7 @@
|
||||
@@ -1283,7 +_,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -210,7 +210,7 @@
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1293,8 +1317,10 @@
|
||||
@@ -1293,8 +_,10 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
@@ -221,7 +221,7 @@
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1309,6 +1335,11 @@
|
||||
@@ -1309,6 +_,11 @@
|
||||
}
|
||||
|
||||
for(Hand hand : Hand.values()) {
|
||||
@@ -233,7 +233,7 @@
|
||||
ItemStack itemstack = this.field_71439_g.func_184586_b(hand);
|
||||
if (this.field_71476_x != null) {
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
@@ -1322,6 +1353,7 @@
|
||||
@@ -1322,6 +_,7 @@
|
||||
|
||||
if (actionresulttype.func_226246_a_()) {
|
||||
if (actionresulttype.func_226247_b_()) {
|
||||
@@ -241,7 +241,7 @@
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
}
|
||||
|
||||
@@ -1334,6 +1366,7 @@
|
||||
@@ -1334,6 +_,7 @@
|
||||
ActionResultType actionresulttype1 = this.field_71442_b.func_217292_a(this.field_71439_g, this.field_71441_e, hand, blockraytraceresult);
|
||||
if (actionresulttype1.func_226246_a_()) {
|
||||
if (actionresulttype1.func_226247_b_()) {
|
||||
@@ -249,7 +249,7 @@
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
if (!itemstack.func_190926_b() && (itemstack.func_190916_E() != i || this.field_71442_b.func_78758_h())) {
|
||||
this.field_71460_t.field_78516_c.func_187460_a(hand);
|
||||
@@ -1349,6 +1382,9 @@
|
||||
@@ -1349,6 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand);
|
||||
if (actionresulttype2.func_226246_a_()) {
|
||||
@@ -1375,6 +1411,8 @@
|
||||
@@ -1375,6 +_,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1500,6 +1538,8 @@
|
||||
@@ -1500,6 +_,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -277,7 +277,72 @@
|
||||
}
|
||||
|
||||
private boolean func_244600_aM() {
|
||||
@@ -1747,7 +1787,12 @@
|
||||
@@ -1638,11 +_,11 @@
|
||||
}
|
||||
|
||||
public void func_238191_a_(String p_238191_1_) {
|
||||
- this.func_238195_a_(p_238191_1_, DynamicRegistries.func_239770_b_(), Minecraft::func_238180_a_, Minecraft::func_238181_a_, false, Minecraft.WorldSelectionType.BACKUP);
|
||||
+ this.loadWorld(p_238191_1_, DynamicRegistries.func_239770_b_(), Minecraft::func_238180_a_, Minecraft::func_238181_a_, false, Minecraft.WorldSelectionType.BACKUP, false);
|
||||
}
|
||||
|
||||
public void func_238192_a_(String p_238192_1_, WorldSettings p_238192_2_, DynamicRegistries.Impl p_238192_3_, DimensionGeneratorSettings p_238192_4_) {
|
||||
- this.func_238195_a_(p_238192_1_, p_238192_3_, (p_238179_1_) -> {
|
||||
+ this.loadWorld(p_238192_1_, p_238192_3_, (p_238179_1_) -> {
|
||||
return p_238192_2_.func_234958_g_();
|
||||
}, (p_238187_3_, p_238187_4_, p_238187_5_, p_238187_6_) -> {
|
||||
WorldGenSettingsExport<JsonElement> worldgensettingsexport = WorldGenSettingsExport.func_240896_a_(JsonOps.INSTANCE, p_238192_3_);
|
||||
@@ -1652,10 +_,10 @@
|
||||
});
|
||||
DimensionGeneratorSettings dimensiongeneratorsettings = dataresult.resultOrPartial(Util.func_240982_a_("Error reading worldgen settings after loading data packs: ", field_147123_G::error)).orElse(p_238192_4_);
|
||||
return new ServerWorldInfo(p_238192_2_, dimensiongeneratorsettings, dataresult.lifecycle());
|
||||
- }, false, Minecraft.WorldSelectionType.CREATE);
|
||||
+ }, false, Minecraft.WorldSelectionType.CREATE, true);
|
||||
}
|
||||
|
||||
- private void func_238195_a_(String p_238195_1_, DynamicRegistries.Impl p_238195_2_, Function<SaveFormat.LevelSave, DatapackCodec> p_238195_3_, Function4<SaveFormat.LevelSave, DynamicRegistries.Impl, IResourceManager, DatapackCodec, IServerConfiguration> p_238195_4_, boolean p_238195_5_, Minecraft.WorldSelectionType p_238195_6_) {
|
||||
+ private void loadWorld(String p_238195_1_, DynamicRegistries.Impl p_238195_2_, Function<SaveFormat.LevelSave, DatapackCodec> p_238195_3_, Function4<SaveFormat.LevelSave, DynamicRegistries.Impl, IResourceManager, DatapackCodec, IServerConfiguration> p_238195_4_, boolean p_238195_5_, Minecraft.WorldSelectionType p_238195_6_, boolean creating) {
|
||||
SaveFormat.LevelSave saveformat$levelsave;
|
||||
try {
|
||||
saveformat$levelsave = this.field_71469_aa.func_237274_c_(p_238195_1_);
|
||||
@@ -1667,12 +_,17 @@
|
||||
}
|
||||
|
||||
Minecraft.PackManager minecraft$packmanager;
|
||||
+ final DynamicRegistries.Impl dyn_f;
|
||||
try {
|
||||
- minecraft$packmanager = this.func_238189_a_(p_238195_2_, p_238195_3_, p_238195_4_, p_238195_5_, saveformat$levelsave);
|
||||
+ Minecraft.PackManager mgr = this.func_238189_a_(p_238195_2_, p_238195_3_, p_238195_4_, p_238195_5_, saveformat$levelsave);
|
||||
+ // We need to rebuild this if we're loading world, so that it gets all the information from AFTER we inject our mappings from the save.
|
||||
+ dyn_f = creating ? p_238195_2_ : DynamicRegistries.func_239770_b_();
|
||||
+ minecraft$packmanager = creating ? mgr : this.func_238189_a_(dyn_f, p_238195_3_, p_238195_4_, p_238195_5_, saveformat$levelsave); //Note this runs the injection again... which isn't good.. but hey.. we need a better spot to hook in.
|
||||
+
|
||||
} catch (Exception exception) {
|
||||
field_147123_G.warn("Failed to load datapacks, can't proceed with server load", (Throwable)exception);
|
||||
this.func_147108_a(new DatapackFailureScreen(() -> {
|
||||
- this.func_238195_a_(p_238195_1_, p_238195_2_, p_238195_3_, p_238195_4_, true, p_238195_6_);
|
||||
+ this.loadWorld(p_238195_1_, p_238195_2_, p_238195_3_, p_238195_4_, true, p_238195_6_, creating);
|
||||
}));
|
||||
|
||||
try {
|
||||
@@ -1692,7 +_,7 @@
|
||||
this.field_213277_ad.set((TrackingChunkStatusListener)null);
|
||||
|
||||
try {
|
||||
- saveformat$levelsave.func_237287_a_(p_238195_2_, iserverconfiguration);
|
||||
+ saveformat$levelsave.func_237287_a_(dyn_f, iserverconfiguration);
|
||||
minecraft$packmanager.func_238225_b_().func_240971_i_();
|
||||
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(this.field_110453_aa);
|
||||
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|
||||
@@ -1702,7 +_,7 @@
|
||||
SkullTileEntity.func_184294_a(minecraftsessionservice);
|
||||
PlayerProfileCache.func_187320_a(false);
|
||||
this.field_71437_Z = MinecraftServer.func_240784_a_((p_238188_8_) -> {
|
||||
- return new IntegratedServer(p_238188_8_, this, p_238195_2_, saveformat$levelsave, minecraft$packmanager.func_238224_a_(), minecraft$packmanager.func_238225_b_(), iserverconfiguration, minecraftsessionservice, gameprofilerepository, playerprofilecache, (p_238211_1_) -> {
|
||||
+ return new IntegratedServer(p_238188_8_, this, dyn_f, saveformat$levelsave, minecraft$packmanager.func_238224_a_(), minecraft$packmanager.func_238225_b_(), iserverconfiguration, minecraftsessionservice, gameprofilerepository, playerprofilecache, (p_238211_1_) -> {
|
||||
TrackingChunkStatusListener trackingchunkstatuslistener = new TrackingChunkStatusListener(p_238211_1_ + 0);
|
||||
trackingchunkstatuslistener.func_219521_a();
|
||||
this.field_213277_ad.set(trackingchunkstatuslistener);
|
||||
@@ -1747,11 +_,16 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
@@ -291,7 +356,12 @@
|
||||
this.field_71453_ak = networkmanager;
|
||||
} else {
|
||||
this.func_241559_a_(p_238195_6_, p_238195_1_, flag, () -> {
|
||||
@@ -1821,6 +1866,7 @@
|
||||
- this.func_238195_a_(p_238195_1_, p_238195_2_, p_238195_3_, p_238195_4_, p_238195_5_, Minecraft.WorldSelectionType.NONE);
|
||||
+ this.loadWorld(p_238195_1_, dyn_f, p_238195_3_, p_238195_4_, p_238195_5_, Minecraft.WorldSelectionType.NONE, creating);
|
||||
});
|
||||
minecraft$packmanager.close();
|
||||
|
||||
@@ -1821,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void func_71403_a(ClientWorld p_71403_1_) {
|
||||
@@ -299,7 +369,7 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1852,10 +1898,12 @@
|
||||
@@ -1852,10 +_,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
@@ -312,7 +382,7 @@
|
||||
if (integratedserver != null) {
|
||||
this.field_71424_I.func_76320_a("waitForServer");
|
||||
|
||||
@@ -1870,6 +1918,7 @@
|
||||
@@ -1870,6 +_,7 @@
|
||||
this.field_71456_v.func_181029_i();
|
||||
this.field_71422_O = null;
|
||||
this.field_71455_al = false;
|
||||
@@ -320,7 +390,7 @@
|
||||
this.field_213274_aO.func_216815_b();
|
||||
}
|
||||
|
||||
@@ -1900,6 +1949,7 @@
|
||||
@@ -1900,6 +_,7 @@
|
||||
this.field_71452_i.func_78870_a(p_213257_1_);
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
this.func_230150_b_();
|
||||
@@ -328,7 +398,7 @@
|
||||
}
|
||||
|
||||
public boolean func_238216_r_() {
|
||||
@@ -1945,112 +1995,9 @@
|
||||
@@ -1945,112 +_,9 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -444,7 +514,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2140,6 +2087,7 @@
|
||||
@@ -2140,6 +_,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
@@ -452,7 +522,7 @@
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
|
||||
return p_229993_0_;
|
||||
@@ -2451,7 +2399,7 @@
|
||||
@@ -2451,7 +_,7 @@
|
||||
supplier = func_228022_c_(supplier);
|
||||
}
|
||||
|
||||
@@ -461,18 +531,18 @@
|
||||
}
|
||||
|
||||
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
|
||||
@@ -2470,6 +2418,14 @@
|
||||
this.field_175617_aL.func_229355_a_(p_228020_1_);
|
||||
}
|
||||
@@ -2468,6 +_,14 @@
|
||||
|
||||
public void func_228020_b_(int p_228020_1_) {
|
||||
this.field_175617_aL.func_229355_a_(p_228020_1_);
|
||||
+ }
|
||||
+
|
||||
+ public ItemColors getItemColors() {
|
||||
+ return this.field_184128_aI;
|
||||
+ }
|
||||
+
|
||||
+ public SearchTreeManager getSearchTreeManager() {
|
||||
+ return this.field_193995_ae;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static final class PackManager implements AutoCloseable {
|
||||
private final ResourcePackList field_238221_a_;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/MouseHelper.java
|
||||
+++ b/net/minecraft/client/MouseHelper.java
|
||||
@@ -71,6 +71,7 @@
|
||||
@@ -71,6 +_,7 @@
|
||||
this.field_198042_g = -1;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
boolean[] aboolean = new boolean[]{false};
|
||||
if (this.field_198036_a.field_213279_p == null) {
|
||||
if (this.field_198036_a.field_71462_r == null) {
|
||||
@@ -82,11 +83,15 @@
|
||||
@@ -82,11 +_,15 @@
|
||||
double d1 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
if (flag) {
|
||||
Screen.func_231153_a_(() -> {
|
||||
@@ -26,7 +26,7 @@
|
||||
}, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -110,7 +115,7 @@
|
||||
@@ -110,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +126,9 @@
|
||||
@@ -121,7 +_,9 @@
|
||||
if (this.field_198036_a.field_71462_r != null) {
|
||||
double d1 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
|
||||
double d2 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
@@ -46,7 +46,7 @@
|
||||
} else if (this.field_198036_a.field_71439_g != null) {
|
||||
if (this.field_200542_o != 0.0D && Math.signum(d0) != Math.signum(this.field_200542_o)) {
|
||||
this.field_200542_o = 0.0D;
|
||||
@@ -134,6 +141,7 @@
|
||||
@@ -134,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.field_200542_o -= (double)f1;
|
||||
@@ -54,7 +54,7 @@
|
||||
if (this.field_198036_a.field_71439_g.func_175149_v()) {
|
||||
if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) {
|
||||
this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1));
|
||||
@@ -202,7 +210,9 @@
|
||||
@@ -202,7 +_,9 @@
|
||||
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
|
||||
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
|
||||
Screen.func_231153_a_(() -> {
|
||||
@@ -65,7 +65,7 @@
|
||||
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -267,6 +277,10 @@
|
||||
@@ -267,12 +_,24 @@
|
||||
return this.field_198039_d;
|
||||
}
|
||||
|
||||
@@ -76,18 +76,17 @@
|
||||
public double func_198024_e() {
|
||||
return this.field_198040_e;
|
||||
}
|
||||
@@ -275,6 +289,14 @@
|
||||
return this.field_198041_f;
|
||||
}
|
||||
|
||||
public double func_198026_f() {
|
||||
return this.field_198041_f;
|
||||
+ }
|
||||
+
|
||||
+ public double getXVelocity() {
|
||||
+ return this.field_198048_m;
|
||||
+ }
|
||||
+
|
||||
+ public double getYVelocity() {
|
||||
+ return this.field_198049_n;
|
||||
+ }
|
||||
+
|
||||
public void func_198021_g() {
|
||||
this.field_198043_h = true;
|
||||
}
|
||||
|
||||
public void func_198021_g() {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/audio/SoundEngine.java
|
||||
+++ b/net/minecraft/client/audio/SoundEngine.java
|
||||
@@ -56,6 +56,7 @@
|
||||
@@ -56,6 +_,7 @@
|
||||
this.field_148622_c = p_i50892_1_;
|
||||
this.field_148619_d = p_i50892_2_;
|
||||
this.field_217939_i = new AudioStreamManager(p_i50892_3_);
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
public void func_148596_a() {
|
||||
@@ -71,6 +72,7 @@
|
||||
@@ -71,6 +_,7 @@
|
||||
|
||||
this.func_148613_b();
|
||||
this.func_148608_i();
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
|
||||
private synchronized void func_148608_i() {
|
||||
@@ -266,7 +268,8 @@
|
||||
@@ -266,7 +_,8 @@
|
||||
|
||||
public void func_148611_c(ISound p_148611_1_) {
|
||||
if (this.field_148617_f) {
|
||||
@@ -26,7 +26,7 @@
|
||||
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
|
||||
ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
|
||||
if (soundeventaccessor == null) {
|
||||
@@ -331,11 +334,13 @@
|
||||
@@ -331,11 +_,13 @@
|
||||
p_239543_8_.func_216420_a(vector3d);
|
||||
p_239543_8_.func_216432_b(flag);
|
||||
});
|
||||
@@ -40,7 +40,7 @@
|
||||
});
|
||||
});
|
||||
} else {
|
||||
@@ -343,6 +348,7 @@
|
||||
@@ -343,6 +_,7 @@
|
||||
channelmanager$entry.func_217888_a((p_217935_1_) -> {
|
||||
p_217935_1_.func_216433_a(p_217928_1_);
|
||||
p_217935_1_.func_216438_c();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/audio/SoundHandler.java
|
||||
+++ b/net/minecraft/client/audio/SoundHandler.java
|
||||
@@ -192,6 +192,11 @@
|
||||
@@ -192,6 +_,11 @@
|
||||
this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_);
|
||||
}
|
||||
|
||||
|
||||
+1
-10
@@ -1,15 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
|
||||
@@ -114,7 +114,7 @@
|
||||
f = 1.0F;
|
||||
}
|
||||
|
||||
- if (this.func_184587_cr() && this.func_184607_cu().func_77973_b() == Items.field_151031_f) {
|
||||
+ if (this.func_184587_cr() && this.func_184607_cu().func_77973_b() instanceof net.minecraft.item.BowItem) {
|
||||
int i = this.func_184612_cw();
|
||||
float f1 = (float)i / 20.0F;
|
||||
if (f1 > 1.0F) {
|
||||
@@ -126,6 +126,6 @@
|
||||
@@ -126,6 +_,6 @@
|
||||
f *= 1.0F - f1 * 0.15F;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java
|
||||
@@ -134,6 +134,7 @@
|
||||
@@ -134,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -457,6 +458,11 @@
|
||||
@@ -457,6 +_,11 @@
|
||||
}
|
||||
|
||||
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) {
|
||||
@@ -20,7 +20,7 @@
|
||||
this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
|
||||
}
|
||||
|
||||
@@ -595,6 +601,7 @@
|
||||
@@ -595,6 +_,7 @@
|
||||
boolean flag2 = this.func_223110_ee();
|
||||
this.field_239203_ch_ = !this.field_71075_bZ.field_75100_b && !this.func_203007_ba() && this.func_213298_c(Pose.CROUCHING) && (this.func_225608_bj_() || !this.func_70608_bn() && !this.func_213298_c(Pose.STANDING));
|
||||
this.field_71158_b.func_225607_a_(this.func_228354_I_());
|
||||
@@ -28,7 +28,7 @@
|
||||
this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b);
|
||||
if (this.func_184587_cr() && !this.func_184218_aH()) {
|
||||
this.field_71158_b.field_78902_a *= 0.2F;
|
||||
@@ -667,7 +674,7 @@
|
||||
@@ -667,7 +_,7 @@
|
||||
|
||||
if (this.field_71158_b.field_78901_c && !flag7 && !flag && !this.field_71075_bZ.field_75100_b && !this.func_184218_aH() && !this.func_70617_f_()) {
|
||||
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.CHEST);
|
||||
@@ -37,10 +37,11 @@
|
||||
this.field_71174_a.func_147297_a(new CEntityActionPacket(this, CEntityActionPacket.Action.START_FALL_FLYING));
|
||||
}
|
||||
}
|
||||
@@ -975,4 +982,16 @@
|
||||
@@ -974,5 +_,17 @@
|
||||
} else {
|
||||
return super.func_241843_o(p_241843_1_);
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ public void updateSyncFields(ClientPlayerEntity old) {
|
||||
+ this.field_175172_bI = old.field_175172_bI;
|
||||
@@ -52,5 +53,5 @@
|
||||
+ this.field_228351_cj_ = old.field_228351_cj_;
|
||||
+ this.field_175171_bO = old.field_175171_bO;
|
||||
+ this.field_175168_bP = old.field_175168_bP;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/entity/player/RemoteClientPlayerEntity.java
|
||||
+++ b/net/minecraft/client/entity/player/RemoteClientPlayerEntity.java
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -29,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/DisplayEffectsScreen.java
|
||||
+++ b/net/minecraft/client/gui/DisplayEffectsScreen.java
|
||||
@@ -35,6 +35,9 @@
|
||||
@@ -35,6 +_,9 @@
|
||||
this.field_147003_i = (this.field_230708_k_ - this.field_146999_f) / 2;
|
||||
this.field_147045_u = false;
|
||||
} else {
|
||||
@@ -10,7 +10,7 @@
|
||||
this.field_147003_i = 160 + (this.field_230708_k_ - this.field_146999_f - 200) / 2;
|
||||
this.field_147045_u = true;
|
||||
}
|
||||
@@ -59,7 +62,7 @@
|
||||
@@ -59,7 +_,7 @@
|
||||
j = 132 / (collection.size() - 1);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
this.func_238810_a_(p_238811_1_, i, j, iterable);
|
||||
this.func_238812_b_(p_238811_1_, i, j, iterable);
|
||||
this.func_238813_c_(p_238811_1_, i, j, iterable);
|
||||
@@ -96,6 +99,11 @@
|
||||
@@ -96,6 +_,11 @@
|
||||
int i = this.field_147009_r;
|
||||
|
||||
for(EffectInstance effectinstance : p_238813_4_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/IngameGui.java
|
||||
+++ b/net/minecraft/client/gui/IngameGui.java
|
||||
@@ -79,7 +79,7 @@
|
||||
@@ -79,7 +_,7 @@
|
||||
protected static final ResourceLocation field_110329_b = new ResourceLocation("textures/misc/vignette.png");
|
||||
protected static final ResourceLocation field_110330_c = new ResourceLocation("textures/gui/widgets.png");
|
||||
protected static final ResourceLocation field_110328_d = new ResourceLocation("textures/misc/pumpkinblur.png");
|
||||
@@ -9,7 +9,7 @@
|
||||
protected final Random field_73842_c = new Random();
|
||||
protected final Minecraft field_73839_d;
|
||||
protected final ItemRenderer field_73841_b;
|
||||
@@ -415,6 +415,9 @@
|
||||
@@ -415,6 +_,9 @@
|
||||
|
||||
for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
|
||||
Effect effect = effectinstance.func_188419_a();
|
||||
@@ -19,7 +19,7 @@
|
||||
if (effectinstance.func_205348_f()) {
|
||||
int k = this.field_194811_H;
|
||||
int l = 1;
|
||||
@@ -452,6 +455,7 @@
|
||||
@@ -452,6 +_,7 @@
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
||||
func_238470_a_(p_238444_1_, j1 + 3, k1 + 3, this.func_230927_p_(), 18, 18, textureatlassprite);
|
||||
});
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,7 +580,8 @@
|
||||
@@ -576,7 +_,8 @@
|
||||
iformattabletextcomponent.func_240699_a_(TextFormatting.ITALIC);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
int j = (this.field_194811_H - i) / 2;
|
||||
int k = this.field_194812_I - 59;
|
||||
if (!this.field_73839_d.field_71442_b.func_78755_b()) {
|
||||
@@ -593,7 +598,13 @@
|
||||
@@ -593,7 +_,13 @@
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
func_238467_a_(p_238453_1_, j - 2, k - 2, j + i + 2, k + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
|
||||
@@ -52,7 +52,7 @@
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
@@ -1056,7 +1067,7 @@
|
||||
@@ -1056,7 +_,7 @@
|
||||
ItemStack itemstack = this.field_73839_d.field_71439_g.field_71071_by.func_70448_g();
|
||||
if (itemstack.func_190926_b()) {
|
||||
this.field_92017_k = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/MapItemRenderer.java
|
||||
+++ b/net/minecraft/client/gui/MapItemRenderer.java
|
||||
@@ -115,6 +115,7 @@
|
||||
@@ -115,6 +_,7 @@
|
||||
|
||||
for(MapDecoration mapdecoration : this.field_148242_b.field_76203_h.values()) {
|
||||
if (!p_228089_3_ || mapdecoration.func_191180_f()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/ResourceLoadProgressGui.java
|
||||
+++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java
|
||||
@@ -97,6 +97,7 @@
|
||||
@@ -97,6 +_,7 @@
|
||||
int l1 = (int)((double)this.field_212974_b.func_228018_at_().func_198087_p() * 0.8325D);
|
||||
float f3 = this.field_212975_c.func_219555_b();
|
||||
this.field_212978_f = MathHelper.func_76131_a(this.field_212978_f * 0.95F + f3 * 0.050000012F, 0.0F, 1.0F);
|
||||
@@ -8,7 +8,7 @@
|
||||
if (f < 1.0F) {
|
||||
this.func_238629_a_(p_230430_1_, i / 2 - k1, l1 - 5, i / 2 + k1, l1 + 5, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
|
||||
}
|
||||
@@ -106,6 +107,7 @@
|
||||
@@ -106,6 +_,7 @@
|
||||
}
|
||||
|
||||
if (this.field_212979_g == -1L && this.field_212975_c.func_219554_d() && (!this.field_212977_e || f1 >= 2.0F)) {
|
||||
@@ -16,7 +16,7 @@
|
||||
try {
|
||||
this.field_212975_c.func_219556_e();
|
||||
this.field_212976_d.accept(Optional.empty());
|
||||
@@ -113,7 +115,6 @@
|
||||
@@ -113,7 +_,6 @@
|
||||
this.field_212976_d.accept(Optional.of(throwable));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/ScreenManager.java
|
||||
+++ b/net/minecraft/client/gui/ScreenManager.java
|
||||
@@ -40,6 +40,10 @@
|
||||
@@ -40,6 +_,10 @@
|
||||
private static final Map<ContainerType<?>, ScreenManager.IScreenFactory<?, ?>> field_216914_b = Maps.newHashMap();
|
||||
|
||||
public static <T extends Container> void func_216909_a(@Nullable ContainerType<T> p_216909_0_, Minecraft p_216909_1_, int p_216909_2_, ITextComponent p_216909_3_) {
|
||||
@@ -11,7 +11,7 @@
|
||||
if (p_216909_0_ == null) {
|
||||
field_216913_a.warn("Trying to open invalid screen with name: {}", (Object)p_216909_3_.getString());
|
||||
} else {
|
||||
@@ -47,9 +51,10 @@
|
||||
@@ -47,9 +_,10 @@
|
||||
if (iscreenfactory == null) {
|
||||
field_216913_a.warn("Failed to create screen for menu type: {}", (Object)Registry.field_218366_G.func_177774_c(p_216909_0_));
|
||||
} else {
|
||||
|
||||
Loaded 100 of 1392 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user