mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cc76a3f60 | ||
|
|
ffdeeb95b7 | ||
|
|
58335d7bc0 | ||
|
|
b0c9d7cce9 | ||
|
|
281ef5a152 | ||
|
|
9183c2fa0d | ||
|
|
389751beae | ||
|
|
2b4e3bcf54 | ||
|
|
3dce85c49f | ||
|
|
185ce79a68 | ||
|
|
f777aba227 | ||
|
|
5efa373d7f | ||
|
|
b6cd19b4ae | ||
|
|
fc5573333d | ||
|
|
55fe7c470f | ||
|
|
3ef1d6919c | ||
|
|
e1863383ff | ||
|
|
4dc34b7d5b | ||
|
|
2c8c022034 | ||
|
|
b5b43a5a36 | ||
|
|
c09fe57031 | ||
|
|
68524ddde9 | ||
|
|
55bdd4d937 | ||
|
|
3f089e3add | ||
|
|
ddb90a69d3 | ||
|
|
bdce8d0494 | ||
|
|
734a3d76aa | ||
|
|
a4aa85259e | ||
|
|
ea1c7a7339 | ||
|
|
185f7344fa | ||
|
|
26e4bf92a0 | ||
|
|
68cb017be1 | ||
|
|
68ff1afac1 | ||
|
|
0d448a5e4f | ||
|
|
d9f6659f2c | ||
|
|
bae2ee0420 | ||
|
|
799e864d93 | ||
|
|
aa38f62bae | ||
|
|
06c3e255b3 | ||
|
|
d5e20b13b9 | ||
|
|
c83d4d29e4 | ||
|
|
ee1c06085b | ||
|
|
336d53b692 | ||
|
|
95c58ba75c | ||
|
|
56857cf5e7 | ||
|
|
838998b885 | ||
|
|
a9b3b48273 | ||
|
|
a788e8a475 | ||
|
|
b7e1cc5f6b | ||
|
|
e784a7f606 | ||
|
|
3e9bc3c434 | ||
|
|
dd340b8ef2 | ||
|
|
7deb479676 | ||
|
|
1ab40e0b3f | ||
|
|
283c3d1664 | ||
|
|
5291ea7270 | ||
|
|
0c1c1b65e1 | ||
|
|
b0787e9f40 | ||
|
|
dc0eacb80f | ||
|
|
8c04651301 | ||
|
|
94621fecd1 | ||
|
|
5e392e3300 | ||
|
|
88595dd26b | ||
|
|
4323c6d845 | ||
|
|
81ec8b99ac | ||
|
|
1af7b7603d | ||
|
|
0fd8fa2211 | ||
|
|
5048739b7f | ||
|
|
44f3f9e2d0 | ||
|
|
ed1c55508f | ||
|
|
50e411b82a | ||
|
|
a8a0306f98 | ||
|
|
19b7d26bc2 | ||
|
|
c7940e70ed | ||
|
|
58ede2c80a | ||
|
|
e83e00520f | ||
|
|
9a50c208f0 | ||
|
|
7acb380ba8 | ||
|
|
48fa2f458c | ||
|
|
318fc6ffe8 | ||
|
|
b009cedc0c | ||
|
|
c6dd475610 | ||
|
|
61285a098a | ||
|
|
995a8b8d35 | ||
|
|
5d33697cb1 | ||
|
|
ae09fc6b6d | ||
|
|
cd826f7bcf | ||
|
|
283ece29e8 | ||
|
|
1918148b8e | ||
|
|
e17714583f | ||
|
|
4c05c63a04 | ||
|
|
0bdc2d04b4 | ||
|
|
57d4d60a33 | ||
|
|
731e1920d2 | ||
|
|
7411b444d3 | ||
|
|
ae3d002ac6 | ||
|
|
1bd70ac5ab | ||
|
|
c90b1732e9 | ||
|
|
fcd9582133 | ||
|
|
9d82d822db | ||
|
|
186d91c03f | ||
|
|
eec5809097 | ||
|
|
4582a29ec1 | ||
|
|
2f83234ccb | ||
|
|
bef52c945b | ||
|
|
1de4ad735b | ||
|
|
00fc29d40d | ||
|
|
b99453d568 |
No files matched your search
+137
-18
@@ -8,6 +8,7 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
|
||||
classpath 'org.ow2.asm:asm:7.1'
|
||||
classpath 'org.ow2.asm:asm-tree:7.1'
|
||||
}
|
||||
}
|
||||
import groovy.json.JsonSlurper
|
||||
@@ -15,11 +16,20 @@ import groovy.json.JsonBuilder
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.LinkedHashMap
|
||||
import java.util.TreeSet
|
||||
import java.util.stream.Collectors
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
import java.util.zip.ZipOutputStream
|
||||
import java.security.MessageDigest
|
||||
import java.net.URL
|
||||
import net.minecraftforge.gradle.common.task.ArchiveChecksum
|
||||
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.common.util.HashStore
|
||||
import net.minecraftforge.gradle.mcp.function.MCPFunction
|
||||
import net.minecraftforge.gradle.mcp.util.MCPEnvironment
|
||||
import net.minecraftforge.gradle.patcher.task.ApplyBinPatches
|
||||
import net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
|
||||
import net.minecraftforge.gradle.userdev.tasks.RenameJar
|
||||
@@ -28,13 +38,11 @@ import de.undercouch.gradle.tasks.download.Download
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
import org.objectweb.asm.ClassReader
|
||||
|
||||
import java.util.stream.Collectors
|
||||
|
||||
plugins {
|
||||
id 'net.minecrell.licenser' version '0.4'
|
||||
id 'org.ajoberstar.grgit' version '2.3.0'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id 'de.undercouch.download' version '3.3.0'
|
||||
id 'com.github.ben-manes.versions' version '0.20.0'
|
||||
id 'com.github.ben-manes.versions' version '0.22.0'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
@@ -50,7 +58,7 @@ ext {
|
||||
MAPPING_CHANNEL = 'snapshot'
|
||||
MAPPING_VERSION = '20190719-1.14.3'
|
||||
MC_VERSION = '1.14.4'
|
||||
MCP_VERSION = '20190719.173545'
|
||||
MCP_VERSION = '20190829.143755'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -72,7 +80,7 @@ project(':clean') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'net.minecraftforge:forgespi:0.13.+'
|
||||
implementation 'net.minecraftforge:forgespi:1.1.+'
|
||||
}
|
||||
patcher {
|
||||
parent = project(':mcp')
|
||||
@@ -172,18 +180,19 @@ project(':forge') {
|
||||
}
|
||||
|
||||
ext {
|
||||
SPEC_VERSION = '28.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
SPEC_VERSION = '28.1' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
// 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'
|
||||
VERSION_JSON = project(':mcp').file('build/mcp/downloadJson/version.json')
|
||||
}
|
||||
|
||||
def getVersion = {
|
||||
//TAG-offset-hash
|
||||
def raw = grgit.describe(longDescr: true)
|
||||
def desc = (raw == null ? '0.0-0-unknown' : grgit.describe(longDescr: true)).split('-') as List
|
||||
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('-')
|
||||
@@ -205,6 +214,7 @@ project(':forge') {
|
||||
patchedSrc = file('src/main/java')
|
||||
srgPatches = true
|
||||
accessTransformer = file("$rootDir/src/main/resources/META-INF/accesstransformer.cfg")
|
||||
sideAnnotationStripper = file("$rootDir/src/main/resources/forge.sas")
|
||||
|
||||
runs {
|
||||
forge_client {
|
||||
@@ -233,6 +243,12 @@ project(':forge') {
|
||||
source sourceSets.userdev
|
||||
}
|
||||
|
||||
cpw_forge_client {
|
||||
parent runs.forge_client
|
||||
taskName 'cpw_forge_client'
|
||||
property 'forge.logging.noansi', 'false'
|
||||
}
|
||||
|
||||
forge_test_client {
|
||||
parent runs.forge_client
|
||||
taskName 'forge_test_client'
|
||||
@@ -298,6 +314,19 @@ project(':forge') {
|
||||
|
||||
args '--mod', 'forge', '--all', '--output', rootProject.file('src/generated/resources/')
|
||||
}
|
||||
|
||||
forge_test_data {
|
||||
parent runs.forge_data
|
||||
taskName 'forge_test_data'
|
||||
|
||||
environment 'MOD_CLASSES', 'dummy' // Needed to work around FG limitation, FG will replace this!
|
||||
|
||||
mods {
|
||||
tests { sources sourceSets.test }
|
||||
}
|
||||
|
||||
args '--mod', 'data_gen_test', '--all', '--output', rootProject.file('src/generated_test/resources/')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,6 +361,14 @@ project(':forge') {
|
||||
'Implementation-Version': SPEC_VERSION,
|
||||
'Implementation-Vendor': 'Forge'
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/fml/mclanguageprovider/': [
|
||||
'Specification-Title': 'Mod Language Provider',
|
||||
'Specification-Vendor': 'Forge Development LLC',
|
||||
'Specification-Version': '1',
|
||||
'Implementation-Title': 'Minecraft Language Mod Provider',
|
||||
'Implementation-Version': '1',
|
||||
'Implementation-Vendor': 'Forge'
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/fml/loading/': [
|
||||
'Specification-Title': 'Launcher',
|
||||
'Specification-Vendor': 'Forge Development LLC',
|
||||
@@ -367,26 +404,27 @@ project(':forge') {
|
||||
installer 'org.ow2.asm:asm:6.2'
|
||||
installer 'org.ow2.asm:asm-commons:6.2'
|
||||
installer 'org.ow2.asm:asm-tree:6.2'
|
||||
installer 'cpw.mods:modlauncher:3.0.+'
|
||||
installer 'cpw.mods:modlauncher:3.2.+'
|
||||
installer 'cpw.mods:grossjava9hacks:1.1.+'
|
||||
installer 'net.minecraftforge:accesstransformers:0.16.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:0.10.+:service'
|
||||
installer 'net.minecraftforge:forgespi:0.13.+'
|
||||
installer 'net.minecraftforge:coremods:0.6.+'
|
||||
installer 'net.minecraftforge:accesstransformers:1.0.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:1.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:1.3.+'
|
||||
installer 'net.minecraftforge:coremods:1.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'com.electronwill.night-config:core:3.6.0'
|
||||
installer 'com.electronwill.night-config:toml:3.6.0'
|
||||
installer 'org.jline:jline:3.9.0'
|
||||
installer 'org.jline:jline:3.12.+'
|
||||
installer 'org.apache.maven:maven-artifact:3.6.0'
|
||||
installer 'net.jodah:typetools:0.6.0'
|
||||
installer 'java3d:vecmath:1.5.2'
|
||||
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.1.+'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
fmllauncherImplementation 'com.google.guava:guava:21.0'
|
||||
fmllauncherImplementation 'com.google.code.gson:gson:2.8.0'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0'
|
||||
testImplementation 'org.junit.vintage:junit-vintage-engine:5.+'
|
||||
testImplementation 'org.opentest4j:opentest4j:1.0.0' // needed for junit 5
|
||||
testImplementation 'org.hamcrest:hamcrest-all:1.3' // needs advanced matching for list order
|
||||
}
|
||||
@@ -518,6 +556,40 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task downloadLibraries(dependsOn: ':mcp:setupMCP') {
|
||||
inputs.file VERSION_JSON
|
||||
doLast {
|
||||
def json = new JsonSlurper().parseText(VERSION_JSON.text)
|
||||
json.libraries.each {lib ->
|
||||
def artifacts = [lib.downloads.artifact] + lib.downloads.get('classifiers', [:]).values()
|
||||
artifacts.each{ art ->
|
||||
def target = file('build/libraries/' + art.path)
|
||||
if (!target.exists()) {
|
||||
download {
|
||||
src art.url
|
||||
dest target
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task extractInheritance(type: ExtractInheritance, dependsOn: [genJoinedBinPatches, downloadLibraries]) {
|
||||
input { genJoinedBinPatches.cleanJar }
|
||||
doFirst {
|
||||
def json = new JsonSlurper().parseText(VERSION_JSON.text)
|
||||
json.libraries.each {lib ->
|
||||
def artifacts = [lib.downloads.artifact] + lib.downloads.get('classifiers', [:]).values()
|
||||
artifacts.each{ art ->
|
||||
def target = file('build/libraries/' + art.path)
|
||||
if (target.exists())
|
||||
addLibrary(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
task checkATs(dependsOn: genJoinedBinPatches) {
|
||||
inputs.file { genJoinedBinPatches.cleanJar }
|
||||
inputs.files patcher.accessTransformers
|
||||
@@ -566,7 +638,44 @@ project(':forge') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task checkSAS(dependsOn: extractInheritance) {
|
||||
inputs.file { extractInheritance.output }
|
||||
inputs.files patcher.sideAnnotationStrippers
|
||||
doLast {
|
||||
def json = new JsonSlurper().parseText(extractInheritance.output.text)
|
||||
|
||||
patcher.sideAnnotationStrippers.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
if (line[0] == '\t') return //Skip any tabed lines, those are ones we add
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
lines.add(line)
|
||||
return
|
||||
}
|
||||
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
|
||||
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
cls = cls.replaceAll('\\.', '/')
|
||||
desc = desc.replace('(', ' (')
|
||||
if (desc.isEmpty() || json[cls] == null || json[cls]['methods'] == null || json[cls]['methods'][desc] == null) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def mtd = json[cls]['methods'][desc]
|
||||
lines.add(cls + ' ' + desc.replace(' ', '') + (comment == null ? '' : ' ' + comment))
|
||||
def children = json.values().findAll{ it.methods != null && it.methods[desc] != null && it.methods[desc].override == cls}
|
||||
.collect { it.name + ' ' + desc.replace(' ', '') } as TreeSet
|
||||
children.each { lines.add('\t' + it) }
|
||||
}
|
||||
f.text = lines.join('\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
|
||||
inputs.file universalJar.archivePath
|
||||
inputs.file { launcherJar.archivePath }
|
||||
@@ -622,7 +731,7 @@ project(':forge') {
|
||||
output.text = new JsonBuilder(json).toPrettyString()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches/*, createClientSRG, createServerSRG*/]) {
|
||||
ext {
|
||||
output = file('build/install_profile.json')
|
||||
@@ -1035,6 +1144,16 @@ project(':forge') {
|
||||
|
||||
tasks.eclipse.dependsOn('genEclipseRuns')
|
||||
|
||||
if (project.hasProperty('UPDATE_MAPPINGS')) {
|
||||
extractRangeMap {
|
||||
sources sourceSets.test.java.srcDirs
|
||||
}
|
||||
applyRangeMap {
|
||||
sources sourceSets.test.java.srcDirs
|
||||
}
|
||||
sourceSets.test.java.srcDirs.each { extractMappedNew.addTarget it }
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# 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="[26,)" #mandatory (26 is current forge version)
|
||||
loaderVersion="[28,)" #mandatory (28 is current forge version)
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
issueTrackerURL="http://my.issue.tracker/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
@@ -42,7 +42,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="[27,)" #mandatory
|
||||
versionRange="[28,)" #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
|
||||
@@ -51,6 +51,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
|
||||
[[dependencies.examplemod]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.14.3]"
|
||||
versionRange="[1.14.4]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
side="BOTH"
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/advancements/AdvancementManager.java
|
||||
+++ b/net/minecraft/advancements/AdvancementManager.java
|
||||
@@ -36,7 +36,11 @@
|
||||
Map<ResourceLocation, Advancement.Builder> map = Maps.newHashMap();
|
||||
p_212853_1_.forEach((p_223387_1_, p_223387_2_) -> {
|
||||
try {
|
||||
- Advancement.Builder advancement$builder = field_192783_b.fromJson(p_223387_2_, Advancement.Builder.class);
|
||||
+ Advancement.Builder advancement$builder = net.minecraftforge.common.crafting.ConditionalAdvancement.read(field_192783_b, p_223387_1_, p_223387_2_);
|
||||
+ if (advancement$builder == null) {
|
||||
+ field_192782_a.info("Skipping loading advancement {} as it's conditions were not met", p_223387_1_);
|
||||
+ return;
|
||||
+ }
|
||||
map.put(p_223387_1_, advancement$builder);
|
||||
} catch (IllegalArgumentException | JsonParseException jsonparseexception) {
|
||||
field_192782_a.error("Parsing error loading custom advancement {}: {}", p_223387_1_, jsonparseexception.getMessage());
|
||||
@@ -13,16 +13,18 @@
|
||||
private static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
|
||||
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_) {
|
||||
@@ -246,6 +247,8 @@
|
||||
@@ -246,6 +247,10 @@
|
||||
this.field_149765_K = p_i48440_1_.field_200961_i;
|
||||
this.field_208621_p = p_i48440_1_.field_208772_j;
|
||||
this.field_220085_g = p_i48440_1_.field_222381_j;
|
||||
+ this.harvestLevel = p_i48440_1_.harvestLevel;
|
||||
+ this.harvestTool = p_i48440_1_.harvestTool;
|
||||
+ final ResourceLocation lootTableCache = p_i48440_1_.field_222381_j;
|
||||
+ this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i48440_1_.lootTableSupplier != null ? p_i48440_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a());
|
||||
this.field_176227_L = builder.func_206893_a(BlockState::new);
|
||||
this.func_180632_j(this.field_176227_L.func_177621_b());
|
||||
}
|
||||
@@ -291,7 +294,7 @@
|
||||
@@ -291,7 +296,7 @@
|
||||
|
||||
@Deprecated
|
||||
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
|
||||
@@ -31,7 +33,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -303,8 +306,9 @@
|
||||
@@ -303,8 +308,9 @@
|
||||
return this.field_149789_z;
|
||||
}
|
||||
|
||||
@@ -42,7 +44,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -315,7 +319,7 @@
|
||||
@@ -315,7 +321,7 @@
|
||||
@Deprecated
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int func_220058_a(BlockState p_220058_1_, IEnviromentBlockReader p_220058_2_, BlockPos p_220058_3_) {
|
||||
@@ -51,7 +53,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -460,10 +464,9 @@
|
||||
@@ -460,10 +466,9 @@
|
||||
|
||||
@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_) {
|
||||
@@ -63,7 +65,7 @@
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -472,8 +475,8 @@
|
||||
@@ -472,8 +477,8 @@
|
||||
if (f == -1.0F) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
@@ -74,7 +76,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -553,7 +556,7 @@
|
||||
@@ -483,8 +488,7 @@
|
||||
|
||||
public ResourceLocation func_220068_i() {
|
||||
if (this.field_220085_g == null) {
|
||||
- ResourceLocation resourcelocation = Registry.field_212618_g.func_177774_c(this);
|
||||
- this.field_220085_g = new ResourceLocation(resourcelocation.func_110624_b(), "blocks/" + resourcelocation.func_110623_a());
|
||||
+ this.field_220085_g = this.lootTableSupplier.get();
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -553,7 +557,7 @@
|
||||
}
|
||||
|
||||
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
|
||||
@@ -83,7 +95,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;
|
||||
@@ -565,7 +568,7 @@
|
||||
@@ -565,7 +569,7 @@
|
||||
}
|
||||
|
||||
public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
|
||||
@@ -92,7 +104,7 @@
|
||||
while(p_180637_3_ > 0) {
|
||||
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
|
||||
p_180637_3_ -= i;
|
||||
@@ -575,6 +578,7 @@
|
||||
@@ -575,6 +579,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -100,15 +112,15 @@
|
||||
public float func_149638_a() {
|
||||
return this.field_149781_w;
|
||||
}
|
||||
@@ -677,6 +681,7 @@
|
||||
@@ -677,6 +682,7 @@
|
||||
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
|
||||
return new ItemStack(this);
|
||||
@@ -691,6 +696,7 @@
|
||||
}
|
||||
@@ -690,6 +696,7 @@
|
||||
return Fluids.field_204541_a.func_207188_f();
|
||||
}
|
||||
|
||||
@@ -116,7 +128,7 @@
|
||||
public float func_208618_m() {
|
||||
return this.field_149765_K;
|
||||
}
|
||||
@@ -711,6 +717,7 @@
|
||||
@@ -710,6 +717,7 @@
|
||||
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
|
||||
}
|
||||
|
||||
@@ -124,7 +136,7 @@
|
||||
public boolean func_149659_a(Explosion p_149659_1_) {
|
||||
return true;
|
||||
}
|
||||
@@ -755,6 +762,7 @@
|
||||
@@ -754,6 +762,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +144,25 @@
|
||||
public SoundType func_220072_p(BlockState p_220072_1_) {
|
||||
return this.field_149762_H;
|
||||
}
|
||||
@@ -780,13 +788,80 @@
|
||||
@@ -763,7 +772,7 @@
|
||||
this.field_220086_i = Item.func_150898_a(this);
|
||||
}
|
||||
|
||||
- return this.field_220086_i;
|
||||
+ return this.field_220086_i.delegate.get(); //Forge: Vanilla caches the items, update with registry replacements.
|
||||
}
|
||||
|
||||
public boolean func_208619_r() {
|
||||
@@ -771,7 +780,7 @@
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
- return "Block{" + Registry.field_212618_g.func_177774_c(this) + "}";
|
||||
+ return "Block{" + getRegistryName() + "}";
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -779,13 +788,81 @@
|
||||
}
|
||||
|
||||
public static boolean func_196252_e(Block p_196252_0_) {
|
||||
@@ -150,6 +180,7 @@
|
||||
+ 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::getGeneration, BlockTags::func_199896_a);
|
||||
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
+
|
||||
+ @Override
|
||||
+ public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) {
|
||||
@@ -215,16 +246,17 @@
|
||||
public static enum OffsetType {
|
||||
NONE,
|
||||
XZ,
|
||||
@@ -805,6 +880,8 @@
|
||||
@@ -804,6 +881,9 @@
|
||||
private float field_200961_i = 0.6F;
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_208772_j;
|
||||
+ private int harvestLevel = -1;
|
||||
+ private net.minecraftforge.common.ToolType harvestTool;
|
||||
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
|
||||
private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
|
||||
this.field_200953_a = p_i48616_1_;
|
||||
@@ -835,6 +912,8 @@
|
||||
@@ -834,6 +914,8 @@
|
||||
block$properties.field_200956_d = p_200950_0_.field_149762_H;
|
||||
block$properties.field_200961_i = p_200950_0_.func_208618_m();
|
||||
block$properties.field_208772_j = p_200950_0_.field_208621_p;
|
||||
@@ -233,7 +265,7 @@
|
||||
return block$properties;
|
||||
}
|
||||
|
||||
@@ -883,6 +962,16 @@
|
||||
@@ -882,13 +964,23 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -250,3 +282,11 @@
|
||||
public Block.Properties func_222380_e() {
|
||||
this.field_222381_j = LootTables.field_186419_a;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Block.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;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/CropsBlock.java
|
||||
+++ b/net/minecraft/block/CropsBlock.java
|
||||
@@ -59,12 +59,14 @@
|
||||
@@ -57,12 +57,14 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,9 +95,9 @@
|
||||
@@ -91,9 +93,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;
|
||||
}
|
||||
}
|
||||
@@ -131,7 +133,7 @@
|
||||
@@ -129,7 +131,7 @@
|
||||
}
|
||||
|
||||
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/block/FlowerPotBlock.java
|
||||
+++ b/net/minecraft/block/FlowerPotBlock.java
|
||||
@@ -21,7 +21,7 @@
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@@ -19,7 +19,7 @@
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FlowerPotBlock extends Block {
|
||||
- private static final Map<Block, Block> field_196451_b = Maps.newHashMap();
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
--- a/net/minecraft/block/FlowingFluidBlock.java
|
||||
+++ b/net/minecraft/block/FlowingFluidBlock.java
|
||||
@@ -30,9 +30,11 @@
|
||||
|
||||
public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
|
||||
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
|
||||
- protected final FlowingFluid field_204517_c;
|
||||
+ private final FlowingFluid field_204517_c;
|
||||
private final List<IFluidState> field_212565_c;
|
||||
|
||||
+ // Forge: Use the constructor that takes a supplier
|
||||
+ @Deprecated
|
||||
protected FlowingFluidBlock(FlowingFluid p_i49014_1_, Block.Properties p_i49014_2_) {
|
||||
super(p_i49014_2_);
|
||||
this.field_204517_c = p_i49014_1_;
|
||||
@@ -45,8 +47,21 @@
|
||||
|
||||
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>}
|
||||
+ */
|
||||
+ public FlowingFluidBlock(java.util.function.Supplier<? extends FlowingFluid> supplier, Block.Properties p_i48368_1_) {
|
||||
+ super(p_i48368_1_);
|
||||
+ this.field_204517_c = null;
|
||||
+ 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 void func_196265_a(BlockState p_196265_1_, World p_196265_2_, BlockPos p_196265_3_, Random p_196265_4_) {
|
||||
p_196265_2_.func_204610_c(p_196265_3_).func_206891_b(p_196265_2_, p_196265_3_, p_196265_4_);
|
||||
}
|
||||
@@ -61,6 +76,7 @@
|
||||
|
||||
public IFluidState func_204507_t(BlockState p_204507_1_) {
|
||||
int i = p_204507_1_.func_177229_b(field_176367_b);
|
||||
+ if (!fluidStateCacheInitialized) initFluidStateCache();
|
||||
return this.field_212565_c.get(Math.min(i, 8));
|
||||
}
|
||||
|
||||
@@ -121,13 +137,13 @@
|
||||
if (flag) {
|
||||
IFluidState ifluidstate = p_204515_1_.func_204610_c(p_204515_2_);
|
||||
if (ifluidstate.func_206889_d()) {
|
||||
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150343_Z.func_176223_P());
|
||||
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150343_Z.func_176223_P()));
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ifluidstate.func_215679_a(p_204515_1_, p_204515_2_) >= 0.44444445F) {
|
||||
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150347_e.func_176223_P());
|
||||
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150347_e.func_176223_P()));
|
||||
this.func_180688_d(p_204515_1_, p_204515_2_);
|
||||
return false;
|
||||
}
|
||||
@@ -160,4 +176,22 @@
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+ // Forge start
|
||||
+ private final java.util.function.Supplier<? extends Fluid> supplier;
|
||||
+ public FlowingFluid getFluid() {
|
||||
+ return (FlowingFluid)supplier.get();
|
||||
+ }
|
||||
+
|
||||
+ private boolean fluidStateCacheInitialized;
|
||||
+ protected void initFluidStateCache() {
|
||||
+ this.field_212565_c.add(getFluid().func_207204_a(false));
|
||||
+
|
||||
+ for(int i = 1; i < 8; ++i) {
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8 - i, false));
|
||||
+ }
|
||||
+
|
||||
+ this.field_212565_c.add(getFluid().func_207207_a(8, true));
|
||||
+ fluidStateCacheInitialized = true;
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/NetherWartBlock.java
|
||||
+++ b/net/minecraft/block/NetherWartBlock.java
|
||||
@@ -33,9 +33,10 @@
|
||||
@@ -31,9 +31,10 @@
|
||||
|
||||
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
|
||||
int i = p_196267_1_.func_177229_b(field_176486_a);
|
||||
|
||||
@@ -1,6 +1,22 @@
|
||||
--- a/net/minecraft/block/PistonBlock.java
|
||||
+++ b/net/minecraft/block/PistonBlock.java
|
||||
@@ -197,7 +197,7 @@
|
||||
@@ -166,6 +166,7 @@
|
||||
}
|
||||
|
||||
if (p_189539_4_ == 0) {
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, true)) return false;
|
||||
if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -173,6 +174,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) {
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, false)) return false;
|
||||
TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction));
|
||||
if (tileentity1 instanceof PistonTileEntity) {
|
||||
((PistonTileEntity)tileentity1).func_145866_f();
|
||||
@@ -197,7 +199,7 @@
|
||||
}
|
||||
|
||||
if (!flag1) {
|
||||
@@ -9,7 +25,15 @@
|
||||
p_189539_2_.func_217377_a(p_189539_3_.func_177972_a(direction), false);
|
||||
} else {
|
||||
this.func_176319_a(p_189539_2_, p_189539_3_, direction, false);
|
||||
@@ -238,7 +238,7 @@
|
||||
@@ -210,6 +212,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);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPistonMovePost(p_189539_2_, p_189539_3_, direction, (p_189539_4_ == 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -238,7 +241,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -18,7 +42,7 @@
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -274,7 +274,7 @@
|
||||
@@ -274,7 +277,7 @@
|
||||
for(int j = list2.size() - 1; j >= 0; --j) {
|
||||
BlockPos blockpos2 = list2.get(j);
|
||||
BlockState blockstate = p_176319_1_.func_180495_p(blockpos2);
|
||||
@@ -27,7 +51,7 @@
|
||||
func_220059_a(blockstate, p_176319_1_, blockpos2, tileentity);
|
||||
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
|
||||
--k;
|
||||
@@ -328,6 +328,10 @@
|
||||
@@ -328,6 +331,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)));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--- a/net/minecraft/block/SoundType.java
|
||||
+++ b/net/minecraft/block/SoundType.java
|
||||
@@ -54,7 +54,6 @@
|
||||
return this.field_185861_n;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public SoundEvent func_185845_c() {
|
||||
return this.field_185862_o;
|
||||
}
|
||||
@@ -67,7 +66,6 @@
|
||||
return this.field_185864_q;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public SoundEvent func_185846_f() {
|
||||
return this.field_185865_r;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/block/SpawnerBlock.java
|
||||
+++ b/net/minecraft/block/SpawnerBlock.java
|
||||
@@ -21,10 +21,13 @@
|
||||
@@ -19,10 +19,13 @@
|
||||
|
||||
public void func_220062_a(BlockState p_220062_1_, World 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_);
|
||||
|
||||
@@ -30,3 +30,14 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -100,4 +102,10 @@
|
||||
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;
|
||||
+ }
|
||||
}
|
||||
@@ -41,7 +41,13 @@
|
||||
this.field_110448_aq.func_198983_a();
|
||||
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
|
||||
|
||||
@@ -521,7 +521,8 @@
|
||||
@@ -516,12 +516,14 @@
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
GlStateManager.viewport(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ParticleFactoryRegisterEvent());
|
||||
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);
|
||||
this.field_213273_aM = new PotionSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213273_aM);
|
||||
@@ -51,7 +57,7 @@
|
||||
this.field_184132_p = new DebugRenderer(this);
|
||||
GLX.setGlfwErrorCallback(this::func_195545_a);
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
@@ -543,7 +544,7 @@
|
||||
@@ -543,7 +545,7 @@
|
||||
if (SharedConstants.field_206244_b) {
|
||||
this.func_213256_aB();
|
||||
}
|
||||
@@ -60,7 +66,7 @@
|
||||
}, false));
|
||||
}
|
||||
|
||||
@@ -558,7 +559,7 @@
|
||||
@@ -558,7 +560,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_) -> {
|
||||
@@ -69,7 +75,7 @@
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -647,7 +648,7 @@
|
||||
@@ -647,7 +649,7 @@
|
||||
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
|
||||
if (p_71377_1_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
||||
@@ -78,7 +84,7 @@
|
||||
} else if (p_71377_1_.func_147149_a(file2)) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||
System.exit(-1);
|
||||
@@ -662,6 +663,7 @@
|
||||
@@ -662,6 +664,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -86,7 +92,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -741,16 +743,20 @@
|
||||
@@ -741,16 +744,20 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -111,7 +117,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);
|
||||
@@ -875,11 +881,13 @@
|
||||
@@ -875,11 +882,13 @@
|
||||
GlStateManager.enableTexture();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
@@ -125,7 +131,7 @@
|
||||
}
|
||||
|
||||
this.field_71424_I.func_219897_b();
|
||||
@@ -1147,10 +1155,10 @@
|
||||
@@ -1147,10 +1156,10 @@
|
||||
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();
|
||||
@@ -138,7 +144,7 @@
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1177,7 +1185,7 @@
|
||||
@@ -1177,7 +1186,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -147,7 +153,7 @@
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1187,6 +1195,7 @@
|
||||
@@ -1187,6 +1196,7 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
@@ -155,7 +161,7 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
@@ -1236,6 +1245,9 @@
|
||||
@@ -1236,6 +1246,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +171,7 @@
|
||||
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand) == ActionResultType.SUCCESS) {
|
||||
this.field_71460_t.field_78516_c.func_187460_a(hand);
|
||||
return;
|
||||
@@ -1255,6 +1267,8 @@
|
||||
@@ -1255,6 +1268,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -174,7 +180,7 @@
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1373,6 +1387,8 @@
|
||||
@@ -1373,6 +1388,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -183,7 +189,7 @@
|
||||
}
|
||||
|
||||
private void func_184117_aA() {
|
||||
@@ -1527,6 +1543,12 @@
|
||||
@@ -1527,6 +1544,12 @@
|
||||
this.func_147108_a(worldloadprogressscreen);
|
||||
|
||||
while(!this.field_71437_Z.func_71200_ad()) {
|
||||
@@ -196,7 +202,7 @@
|
||||
worldloadprogressscreen.tick();
|
||||
this.func_195542_b(false);
|
||||
|
||||
@@ -1547,11 +1569,17 @@
|
||||
@@ -1547,11 +1570,17 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
@@ -215,7 +221,12 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1587,6 +1615,7 @@
|
||||
@@ -1583,10 +1612,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerLogout(this.field_71442_b, this.field_71439_g);
|
||||
this.field_71442_b = null;
|
||||
NarratorChatListener.field_193643_a.func_193642_b();
|
||||
this.func_213241_c(p_213231_1_);
|
||||
if (this.field_71441_e != null) {
|
||||
@@ -223,7 +234,7 @@
|
||||
if (integratedserver != null) {
|
||||
while(!integratedserver.func_213201_w()) {
|
||||
this.func_195542_b(false);
|
||||
@@ -1624,6 +1653,7 @@
|
||||
@@ -1624,6 +1655,7 @@
|
||||
}
|
||||
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
@@ -231,7 +242,7 @@
|
||||
}
|
||||
|
||||
public final boolean func_71355_q() {
|
||||
@@ -1649,112 +1679,8 @@
|
||||
@@ -1649,112 +1681,8 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -346,7 +357,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1826,6 +1752,7 @@
|
||||
@@ -1826,6 +1754,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
@@ -354,7 +365,7 @@
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> {
|
||||
return p_213240_0_;
|
||||
@@ -1972,6 +1899,8 @@
|
||||
@@ -1972,6 +1901,8 @@
|
||||
}
|
||||
|
||||
public MusicTicker.MusicType func_147109_W() {
|
||||
@@ -363,7 +374,7 @@
|
||||
if (this.field_71462_r instanceof WinGameScreen) {
|
||||
return MusicTicker.MusicType.CREDITS;
|
||||
} else if (this.field_71439_g == null) {
|
||||
@@ -2128,4 +2057,12 @@
|
||||
@@ -2128,4 +2059,12 @@
|
||||
public LoadingGui func_213250_au() {
|
||||
return this.field_213279_p;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,15 @@
|
||||
} 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;
|
||||
@@ -168,7 +174,9 @@
|
||||
@@ -129,6 +135,7 @@
|
||||
}
|
||||
|
||||
this.field_200542_o -= (double)f1;
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.onMouseScroll(this, d0)) return;
|
||||
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));
|
||||
@@ -168,7 +175,9 @@
|
||||
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m();
|
||||
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n();
|
||||
Screen.wrapScreenError(() -> {
|
||||
@@ -49,7 +57,7 @@
|
||||
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -233,6 +241,10 @@
|
||||
@@ -233,6 +242,10 @@
|
||||
return this.field_198039_d;
|
||||
}
|
||||
|
||||
@@ -60,7 +68,7 @@
|
||||
public double func_198024_e() {
|
||||
return this.field_198040_e;
|
||||
}
|
||||
@@ -241,6 +253,14 @@
|
||||
@@ -241,6 +254,14 @@
|
||||
return this.field_198041_f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
--- a/net/minecraft/client/gui/DisplayEffectsScreen.java
|
||||
+++ b/net/minecraft/client/gui/DisplayEffectsScreen.java
|
||||
@@ -84,6 +84,7 @@
|
||||
@@ -34,6 +34,7 @@
|
||||
this.field_147003_i = (this.width - this.field_146999_f) / 2;
|
||||
this.field_147045_u = false;
|
||||
} else {
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.PotionShiftEvent(this))) this.field_147003_i = (this.width - this.field_146999_f) / 2; else
|
||||
this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2;
|
||||
this.field_147045_u = true;
|
||||
}
|
||||
@@ -84,6 +85,7 @@
|
||||
int i = this.field_147009_r;
|
||||
|
||||
for(EffectInstance effectinstance : p_214077_3_) {
|
||||
@@ -8,7 +16,7 @@
|
||||
Effect effect = effectinstance.func_188419_a();
|
||||
blit(p_214077_1_ + 6, i + 7, this.blitOffset, 18, 18, potionspriteuploader.func_215288_a(effect));
|
||||
i += p_214077_2_;
|
||||
@@ -95,6 +96,9 @@
|
||||
@@ -95,6 +97,9 @@
|
||||
int i = this.field_147009_r;
|
||||
|
||||
for(EffectInstance effectinstance : p_214078_3_) {
|
||||
|
||||
@@ -24,7 +24,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +593,13 @@
|
||||
@@ -572,6 +577,7 @@
|
||||
}
|
||||
|
||||
String s = itextcomponent.func_150254_d();
|
||||
+ s = this.field_92016_l.func_77973_b().getHighlightTip(this.field_92016_l, s);
|
||||
int i = (this.field_194811_H - this.func_175179_f().func_78256_a(s)) / 2;
|
||||
int j = this.field_194812_I - 59;
|
||||
if (!this.field_73839_d.field_71442_b.func_78755_b()) {
|
||||
@@ -588,7 +594,13 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
fill(i - 2, j - 2, i + this.func_175179_f().func_78256_a(s) + 2, j + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/gui/screen/DeathScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/DeathScreen.java
|
||||
@@ -44,6 +44,7 @@
|
||||
}));
|
||||
Button button = this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 96, 200, 20, s1, (p_213020_1_) -> {
|
||||
if (this.field_213023_c) {
|
||||
+ func_213022_a(true);
|
||||
this.minecraft.func_147108_a(new MainMenuScreen());
|
||||
} else {
|
||||
ConfirmScreen confirmscreen = new ConfirmScreen(this::func_213022_a, new TranslationTextComponent("deathScreen.quit.confirm"), new StringTextComponent(""), I18n.func_135052_a("deathScreen.titleScreen"), I18n.func_135052_a("deathScreen.respawn"));
|
||||
@@ -11,7 +11,33 @@
|
||||
return false;
|
||||
} else {
|
||||
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
|
||||
@@ -187,13 +189,13 @@
|
||||
@@ -129,21 +131,25 @@
|
||||
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_);
|
||||
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate, 1.0F);
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_).isCanceled())
|
||||
func_178891_a(this.field_78776_a, this, p_180511_1_, p_180511_2_);
|
||||
this.field_78781_i = 5;
|
||||
} else if (!this.field_78778_j || !this.func_178893_a(p_180511_1_)) {
|
||||
if (this.field_78778_j) {
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.ABORT_DESTROY_BLOCK, this.field_178895_c, p_180511_2_);
|
||||
}
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_);
|
||||
|
||||
BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_);
|
||||
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate1, 0.0F);
|
||||
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
|
||||
boolean flag = !blockstate1.func_196958_f();
|
||||
if (flag && this.field_78770_f == 0.0F) {
|
||||
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY)
|
||||
blockstate1.func_196942_a(this.field_78776_a.field_71441_e, p_180511_1_, this.field_78776_a.field_71439_g);
|
||||
}
|
||||
|
||||
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return true;
|
||||
if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) {
|
||||
this.func_187103_a(p_180511_1_);
|
||||
} else {
|
||||
@@ -187,13 +193,13 @@
|
||||
return true;
|
||||
} else if (this.func_178893_a(p_180512_1_)) {
|
||||
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
|
||||
@@ -27,7 +53,7 @@
|
||||
this.field_78776_a.func_147118_V().func_147682_a(new SimpleSound(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_));
|
||||
}
|
||||
|
||||
@@ -217,7 +219,8 @@
|
||||
@@ -217,7 +223,8 @@
|
||||
}
|
||||
|
||||
public float func_78757_d() {
|
||||
@@ -37,7 +63,7 @@
|
||||
}
|
||||
|
||||
public void func_78765_e() {
|
||||
@@ -234,7 +237,7 @@
|
||||
@@ -234,7 +241,7 @@
|
||||
ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca();
|
||||
boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b();
|
||||
if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) {
|
||||
@@ -46,7 +72,20 @@
|
||||
}
|
||||
|
||||
return p_178893_1_.equals(this.field_178895_c) && flag;
|
||||
@@ -298,11 +301,14 @@
|
||||
@@ -257,6 +264,12 @@
|
||||
return ActionResultType.FAIL;
|
||||
} else {
|
||||
ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_);
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks
|
||||
+ .onRightClickBlock(p_217292_1_, p_217292_3_, blockpos, p_217292_4_.func_216354_b());
|
||||
+ if (event.isCanceled()) {
|
||||
+ this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
+ return event.getCancellationResult();
|
||||
+ }
|
||||
if (this.field_78779_k == GameType.SPECTATOR) {
|
||||
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -298,11 +311,14 @@
|
||||
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
|
||||
return ActionResultType.PASS;
|
||||
} else {
|
||||
@@ -61,7 +100,7 @@
|
||||
}
|
||||
|
||||
return actionresult.func_188397_a();
|
||||
@@ -327,6 +333,9 @@
|
||||
@@ -327,6 +343,9 @@
|
||||
public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) {
|
||||
this.func_78750_j();
|
||||
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_));
|
||||
@@ -71,7 +110,7 @@
|
||||
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
|
||||
}
|
||||
|
||||
@@ -334,6 +343,9 @@
|
||||
@@ -334,6 +353,9 @@
|
||||
this.func_78750_j();
|
||||
Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.field_70165_t, p_187102_2_.field_70163_u, p_187102_2_.field_70161_v);
|
||||
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d));
|
||||
|
||||
+37
-8
@@ -1,6 +1,22 @@
|
||||
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
|
||||
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
|
||||
@@ -714,7 +714,7 @@
|
||||
@@ -356,6 +356,7 @@
|
||||
|
||||
this.field_147299_f.field_184132_p.func_217737_a();
|
||||
this.field_147299_f.field_71439_g.func_70065_x();
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerLogin(this.field_147299_f.field_71442_b, this.field_147299_f.field_71439_g, this.field_147299_f.func_147114_u().func_147298_b());
|
||||
int i = p_147282_1_.func_149197_c();
|
||||
this.field_147300_g.func_217408_a(i, this.field_147299_f.field_71439_g);
|
||||
this.field_147299_f.field_71439_g.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
|
||||
@@ -366,6 +367,7 @@
|
||||
this.field_147299_f.field_71439_g.func_145769_d(i);
|
||||
this.field_147299_f.field_71439_g.func_175150_k(p_147282_1_.func_179744_h());
|
||||
this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e());
|
||||
+ net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(field_147302_e, "PLAY_TO_SERVER");
|
||||
this.field_147299_f.field_71474_y.func_82879_c();
|
||||
this.field_147302_e.func_179290_a(new CCustomPayloadPacket(CCustomPayloadPacket.field_210344_a, (new PacketBuffer(Unpooled.buffer())).func_180714_a(ClientBrandRetriever.getClientModName())));
|
||||
this.field_147299_f.func_213229_ar().func_216814_a();
|
||||
@@ -714,7 +716,7 @@
|
||||
BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z"));
|
||||
TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos);
|
||||
if (tileentity != null) {
|
||||
@@ -9,7 +25,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,7 +790,9 @@
|
||||
@@ -790,7 +792,9 @@
|
||||
|
||||
public void func_147251_a(SChatPacket p_147251_1_) {
|
||||
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
|
||||
@@ -20,15 +36,18 @@
|
||||
}
|
||||
|
||||
public void func_147279_a(SAnimateHandPacket p_147279_1_) {
|
||||
@@ -962,6 +964,7 @@
|
||||
@@ -962,8 +966,10 @@
|
||||
this.field_147299_f.field_71439_g = clientplayerentity1;
|
||||
this.field_147299_f.field_175622_Z = clientplayerentity1;
|
||||
clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c());
|
||||
+ clientplayerentity1.updateSyncFields(clientplayerentity); // Forge: fix MC-10657
|
||||
clientplayerentity1.func_70065_x();
|
||||
clientplayerentity1.func_175158_f(s);
|
||||
+ net.minecraftforge.fml.client.ClientHooks.firePlayerRespawn(this.field_147299_f.field_71442_b, clientplayerentity, clientplayerentity1, clientplayerentity1.field_71174_a.func_147298_b());
|
||||
this.field_147300_g.func_217408_a(i, clientplayerentity1);
|
||||
@@ -1084,6 +1087,12 @@
|
||||
clientplayerentity1.field_70177_z = -180.0F;
|
||||
clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
|
||||
@@ -1084,6 +1090,12 @@
|
||||
boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity;
|
||||
if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity) {
|
||||
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
||||
@@ -41,7 +60,7 @@
|
||||
}
|
||||
|
||||
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
|
||||
@@ -1253,6 +1262,7 @@
|
||||
@@ -1253,6 +1265,7 @@
|
||||
clientrecipebook.func_199644_c();
|
||||
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
|
||||
imutablesearchtree.func_194040_a();
|
||||
@@ -49,7 +68,7 @@
|
||||
}
|
||||
|
||||
public void func_200232_a(SPlayerLookPacket p_200232_1_) {
|
||||
@@ -1333,7 +1343,7 @@
|
||||
@@ -1333,7 +1346,7 @@
|
||||
PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f);
|
||||
Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d());
|
||||
if (entity instanceof LivingEntity) {
|
||||
@@ -58,12 +77,13 @@
|
||||
if (effect != null) {
|
||||
EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h());
|
||||
effectinstance.func_100012_b(p_147260_1_.func_149429_c());
|
||||
@@ -1766,10 +1776,12 @@
|
||||
@@ -1766,10 +1779,12 @@
|
||||
|
||||
this.field_147299_f.field_184132_p.field_217741_m.func_217692_a(pointofinterestdebugrenderer$braininfo);
|
||||
} else {
|
||||
- field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
|
||||
+ if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_147240_1_, this.field_147302_e))
|
||||
field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
|
||||
+ field_147301_d.warn("Unknown custom packet identifier: {}", (Object)resourcelocation);
|
||||
}
|
||||
} finally {
|
||||
if (packetbuffer != null) {
|
||||
@@ -71,3 +91,12 @@
|
||||
packetbuffer.release();
|
||||
}
|
||||
|
||||
@@ -1909,7 +1924,7 @@
|
||||
for(SEntityPropertiesPacket.Snapshot sentitypropertiespacket$snapshot : p_147290_1_.func_149441_d()) {
|
||||
IAttributeInstance iattributeinstance = abstractattributemap.func_111152_a(sentitypropertiespacket$snapshot.func_151409_a());
|
||||
if (iattributeinstance == null) {
|
||||
- iattributeinstance = abstractattributemap.func_111150_b(new RangedAttribute((IAttribute)null, sentitypropertiespacket$snapshot.func_151409_a(), 0.0D, Double.MIN_NORMAL, Double.MAX_VALUE));
|
||||
+ iattributeinstance = abstractattributemap.func_111150_b(new RangedAttribute((IAttribute)null, sentitypropertiespacket$snapshot.func_151409_a(), 0.0D, -Double.MAX_VALUE, Double.MAX_VALUE)); // FORGE: fix invalid value range (MC-150405)
|
||||
}
|
||||
|
||||
iattributeinstance.func_111128_a(sentitypropertiespacket$snapshot.func_151410_b());
|
||||
@@ -1,11 +1,25 @@
|
||||
--- a/net/minecraft/client/particle/DiggingParticle.java
|
||||
+++ b/net/minecraft/client/particle/DiggingParticle.java
|
||||
@@ -21,7 +21,7 @@
|
||||
public DiggingParticle(World p_i46280_1_, double p_i46280_2_, double p_i46280_4_, double p_i46280_6_, double p_i46280_8_, double p_i46280_10_, double p_i46280_12_, BlockState p_i46280_14_) {
|
||||
super(p_i46280_1_, p_i46280_2_, p_i46280_4_, p_i46280_6_, p_i46280_8_, p_i46280_10_, p_i46280_12_);
|
||||
this.field_174847_a = p_i46280_14_;
|
||||
- this.func_217567_a(Minecraft.func_71410_x().func_175602_ab().func_175023_a().func_178122_a(p_i46280_14_));
|
||||
+ this.func_217567_a(Minecraft.func_71410_x().func_175602_ab().func_175023_a().getTexture(p_i46280_14_, p_i46280_1_, new BlockPos(field_187126_f, field_187127_g, field_187128_h)));
|
||||
this.field_70545_g = 1.0F;
|
||||
this.field_70552_h = 0.6F;
|
||||
this.field_70553_i = 0.6F;
|
||||
@@ -36,6 +36,7 @@
|
||||
}
|
||||
|
||||
public DiggingParticle func_174846_a(BlockPos p_174846_1_) {
|
||||
+ updateSprite(p_174846_1_);
|
||||
this.field_181019_az = p_174846_1_;
|
||||
if (this.field_174847_a.func_177230_c() == Blocks.field_196658_i) {
|
||||
return this;
|
||||
@@ -93,7 +94,13 @@
|
||||
public static class Factory implements IParticleFactory<BlockParticleData> {
|
||||
public Particle func_199234_a(BlockParticleData p_199234_1_, World p_199234_2_, double p_199234_3_, double p_199234_5_, double p_199234_7_, double p_199234_9_, double p_199234_11_, double p_199234_13_) {
|
||||
BlockState blockstate = p_199234_1_.func_197584_c();
|
||||
- return !blockstate.func_196958_f() && blockstate.func_177230_c() != Blocks.field_196603_bb ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l() : null;
|
||||
+ return !blockstate.func_196958_f() && blockstate.func_177230_c() != Blocks.field_196603_bb ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l().updateSprite(p_199234_1_.getPos()) : null;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ private Particle updateSprite(BlockPos pos) { //FORGE: we cannot assume that the x y z of the particles match the block pos of the block.
|
||||
+ if (pos != null) // There are cases where we are not able to obtain the correct source pos, and need to fallback to the non-model data version
|
||||
+ this.func_217567_a(Minecraft.func_71410_x().func_175602_ab().func_175023_a().getTexture(field_174847_a, field_187122_b, pos));
|
||||
+ return this;
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,37 @@
|
||||
--- a/net/minecraft/client/particle/ParticleManager.java
|
||||
+++ b/net/minecraft/client/particle/ParticleManager.java
|
||||
@@ -235,6 +235,7 @@
|
||||
@@ -63,7 +63,7 @@
|
||||
private final Queue<EmitterParticle> field_178933_d = Queues.newArrayDeque();
|
||||
private final TextureManager field_78877_c;
|
||||
private final Random field_78875_d = new Random();
|
||||
- private final Int2ObjectMap<IParticleFactory<?>> field_178932_g = new Int2ObjectOpenHashMap<>();
|
||||
+ private final Map<ResourceLocation, IParticleFactory<?>> field_178932_g = new java.util.HashMap<>();
|
||||
private final Queue<Particle> field_187241_h = Queues.newArrayDeque();
|
||||
private final Map<ResourceLocation, ParticleManager.AnimatedSpriteImpl> field_215242_i = Maps.newHashMap();
|
||||
private final AtlasTexture field_215243_j = new AtlasTexture("textures/particle");
|
||||
@@ -137,13 +137,13 @@
|
||||
}
|
||||
|
||||
public <T extends IParticleData> void func_199283_a(ParticleType<T> p_199283_1_, IParticleFactory<T> p_199283_2_) {
|
||||
- this.field_178932_g.put(Registry.field_212632_u.func_148757_b(p_199283_1_), p_199283_2_);
|
||||
+ this.field_178932_g.put(Registry.field_212632_u.func_177774_c(p_199283_1_), p_199283_2_);
|
||||
}
|
||||
|
||||
public <T extends IParticleData> void func_215234_a(ParticleType<T> p_215234_1_, ParticleManager.IParticleMetaFactory<T> p_215234_2_) {
|
||||
ParticleManager.AnimatedSpriteImpl particlemanager$animatedspriteimpl = new ParticleManager.AnimatedSpriteImpl();
|
||||
this.field_215242_i.put(Registry.field_212632_u.func_177774_c(p_215234_1_), particlemanager$animatedspriteimpl);
|
||||
- this.field_178932_g.put(Registry.field_212632_u.func_148757_b(p_215234_1_), p_215234_2_.create(particlemanager$animatedspriteimpl));
|
||||
+ this.field_178932_g.put(Registry.field_212632_u.func_177774_c(p_215234_1_), p_215234_2_.create(particlemanager$animatedspriteimpl));
|
||||
}
|
||||
|
||||
public CompletableFuture<Void> func_215226_a(IFutureReloadListener.IStage p_215226_1_, IResourceManager p_215226_2_, IProfiler p_215226_3_, IProfiler p_215226_4_, Executor p_215226_5_, Executor p_215226_6_) {
|
||||
@@ -230,11 +230,12 @@
|
||||
|
||||
@Nullable
|
||||
private <T extends IParticleData> Particle func_199927_b(T p_199927_1_, double p_199927_2_, double p_199927_4_, double p_199927_6_, double p_199927_8_, double p_199927_10_, double p_199927_12_) {
|
||||
- IParticleFactory<T> iparticlefactory = (IParticleFactory<T>) this.field_178932_g.get(Registry.field_212632_u.func_148757_b(p_199927_1_.func_197554_b()));
|
||||
+ IParticleFactory<T> iparticlefactory = (IParticleFactory<T>) this.field_178932_g.get(Registry.field_212632_u.func_177774_c(p_199927_1_.func_197554_b()));
|
||||
return iparticlefactory == null ? null : iparticlefactory.func_199234_a(p_199927_1_, this.field_78878_a, p_199927_2_, p_199927_4_, p_199927_6_, p_199927_8_, p_199927_10_, p_199927_12_);
|
||||
}
|
||||
|
||||
public void func_78873_a(Particle p_78873_1_) {
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
--- a/net/minecraft/client/renderer/FluidBlockRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/FluidBlockRenderer.java
|
||||
@@ -58,8 +58,9 @@
|
||||
|
||||
public boolean func_217638_a(IEnviromentBlockReader p_217638_1_, BlockPos p_217638_2_, BufferBuilder p_217638_3_, IFluidState p_217638_4_) {
|
||||
boolean flag = p_217638_4_.func_206884_a(FluidTags.field_206960_b);
|
||||
- TextureAtlasSprite[] atextureatlassprite = flag ? this.field_178272_a : this.field_178271_b;
|
||||
- int i = flag ? 16777215 : BiomeColors.func_217612_c(p_217638_1_, p_217638_2_);
|
||||
+ TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_217638_1_, p_217638_2_, p_217638_4_);
|
||||
+ int i = p_217638_4_.func_206886_c().getAttributes().getColor(p_217638_1_, p_217638_2_);
|
||||
+ float alpha = (float)(i >> 24 & 255) / 255.0F;
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
@@ -145,15 +146,15 @@
|
||||
float f24 = 1.0F * f;
|
||||
float f25 = 1.0F * f1;
|
||||
float f26 = 1.0F * f2;
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
if (p_217638_4_.func_205586_a(p_217638_1_, p_217638_2_.func_177984_a())) {
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,10 +169,10 @@
|
||||
float f37 = 0.5F * f;
|
||||
float f38 = 0.5F * f1;
|
||||
float f40 = 0.5F * f2;
|
||||
- p_217638_3_.func_181662_b(d0, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f31, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0, d1, d2).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f31, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f32, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f32, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f31, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0, d1, d2).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f31, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f32, (double)f34).func_187314_a(j2, k2).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f32, (double)f36).func_187314_a(j2, k2).func_181675_d();
|
||||
flag7 = true;
|
||||
}
|
||||
|
||||
@@ -245,15 +246,15 @@
|
||||
float f28 = 1.0F * f27 * f;
|
||||
float f29 = 1.0F * f27 * f1;
|
||||
float f30 = 1.0F * f27 * f2;
|
||||
- p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
if (textureatlassprite2 != this.field_187501_d) {
|
||||
- p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
- p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d();
|
||||
+ p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/ItemRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/ItemRenderer.java
|
||||
@@ -51,13 +51,14 @@
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
public ItemRenderer(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_) {
|
||||
this.field_175057_n = p_i46552_1_;
|
||||
@@ -9,14 +9,7 @@
|
||||
|
||||
for(Item item : Registry.field_212630_s) {
|
||||
if (!field_195411_c.contains(item)) {
|
||||
this.field_175059_m.func_199311_a(item, new ModelResourceLocation(Registry.field_212630_s.func_177774_c(item), "inventory"));
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.client.model.ModelLoader.onRegisterItems(this.field_175059_m);
|
||||
|
||||
this.field_184395_f = p_i46552_3_;
|
||||
}
|
||||
@@ -75,6 +76,10 @@
|
||||
@@ -75,6 +75,10 @@
|
||||
}
|
||||
|
||||
private void func_191967_a(IBakedModel p_191967_1_, int p_191967_2_, ItemStack p_191967_3_) {
|
||||
@@ -27,7 +20,7 @@
|
||||
Tessellator tessellator = Tessellator.func_178181_a();
|
||||
BufferBuilder bufferbuilder = tessellator.func_178180_c();
|
||||
bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_176599_b);
|
||||
@@ -98,7 +103,7 @@
|
||||
@@ -98,7 +102,7 @@
|
||||
if (p_180454_2_.func_188618_c()) {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
@@ -36,7 +29,7 @@
|
||||
} else {
|
||||
this.func_191961_a(p_180454_2_, p_180454_1_);
|
||||
if (p_180454_1_.func_77962_s()) {
|
||||
@@ -164,7 +169,7 @@
|
||||
@@ -164,7 +168,7 @@
|
||||
k = k | -16777216;
|
||||
}
|
||||
|
||||
@@ -45,7 +38,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -225,11 +230,8 @@
|
||||
@@ -225,11 +229,8 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -59,7 +52,7 @@
|
||||
|
||||
this.func_180454_a(p_184394_1_, p_184394_2_);
|
||||
GlStateManager.cullFace(GlStateManager.CullFace.BACK);
|
||||
@@ -260,7 +262,7 @@
|
||||
@@ -260,7 +261,7 @@
|
||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.func_180452_a(p_191962_2_, p_191962_3_, p_191962_4_.func_177556_c());
|
||||
@@ -68,7 +61,7 @@
|
||||
this.func_180454_a(p_191962_1_, p_191962_4_);
|
||||
GlStateManager.disableAlphaTest();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
@@ -299,6 +301,7 @@
|
||||
@@ -299,6 +300,7 @@
|
||||
crashreportcategory.func_189529_a("Item Type", () -> {
|
||||
return String.valueOf((Object)p_184391_2_.func_77973_b());
|
||||
});
|
||||
@@ -76,7 +69,7 @@
|
||||
crashreportcategory.func_189529_a("Item Damage", () -> {
|
||||
return String.valueOf(p_184391_2_.func_77952_i());
|
||||
});
|
||||
@@ -330,9 +333,12 @@
|
||||
@@ -330,9 +332,12 @@
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepthTest();
|
||||
@@ -90,7 +83,7 @@
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepthTest();
|
||||
GlStateManager.disableTexture();
|
||||
@@ -340,11 +346,9 @@
|
||||
@@ -340,11 +345,9 @@
|
||||
GlStateManager.disableBlend();
|
||||
Tessellator tessellator = Tessellator.func_178181_a();
|
||||
BufferBuilder bufferbuilder = tessellator.func_178180_c();
|
||||
@@ -105,7 +98,7 @@
|
||||
this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255);
|
||||
this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255);
|
||||
GlStateManager.enableBlend();
|
||||
@@ -383,4 +387,9 @@
|
||||
@@ -383,4 +386,9 @@
|
||||
public void func_195410_a(IResourceManager p_195410_1_) {
|
||||
this.field_175059_m.func_178085_b();
|
||||
}
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
boolean flag = this.func_188363_b(p_188361_9_);
|
||||
- this.func_215333_a(this.func_177181_a(armoritem, flag));
|
||||
- if (armoritem instanceof DyeableArmorItem) {
|
||||
- int i = ((DyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
+ this.func_215333_a(this.getArmorResource(p_188361_1_, itemstack, p_188361_9_, null));
|
||||
+ if (armoritem instanceof net.minecraft.item.IDyeableArmorItem) { // Allow this for anything, not only cloth
|
||||
int i = ((DyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
+ int i = ((net.minecraft.item.IDyeableArmorItem)armoritem).func_200886_f(itemstack);
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
public boolean func_178309_b() {
|
||||
return this.field_178315_d != null ? this.field_178315_d.func_178309_b() : this.field_178322_i;
|
||||
}
|
||||
@@ -90,6 +93,10 @@
|
||||
private ItemOverrideList func_217646_a(ModelBakery p_217646_1_, BlockModel p_217646_2_) {
|
||||
@@ -91,6 +94,10 @@
|
||||
return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, this.field_187968_k);
|
||||
}
|
||||
+
|
||||
|
||||
+ public ItemOverrideList getOverrides(ModelBakery p_217646_1_, BlockModel p_217646_2_, Function<ResourceLocation, TextureAtlasSprite> textureGetter, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
+ return this.field_187968_k.isEmpty() ? ItemOverrideList.field_188022_a : new ItemOverrideList(p_217646_1_, p_217646_2_, p_217646_1_::func_209597_a, textureGetter, this.field_187968_k, format);
|
||||
+ }
|
||||
|
||||
+
|
||||
public Collection<ResourceLocation> func_187965_e() {
|
||||
Set<ResourceLocation> set = Sets.newHashSet();
|
||||
|
||||
@@ -160,25 +167,33 @@
|
||||
return set1;
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
public IBakedModel func_217644_a(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_) {
|
||||
+ return bake(p_217644_1_, p_217644_2_, p_217644_3_, p_217644_4_, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public IBakedModel bake(ModelBakery p_217644_1_, BlockModel p_217644_2_, Function<ResourceLocation, TextureAtlasSprite> p_217644_3_, ISprite p_217644_4_, net.minecraft.client.renderer.vertex.VertexFormat format) {
|
||||
TextureAtlasSprite textureatlassprite = p_217644_3_.apply(new ResourceLocation(this.func_178308_c("particle")));
|
||||
if (this.func_178310_f() == ModelBakery.field_177616_r) {
|
||||
@@ -57,7 +57,7 @@
|
||||
+ simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
} else {
|
||||
- simplebakedmodel$builder.func_177650_a(p_217644_4_.func_188048_b().func_177523_a(blockpartface.field_178244_b), func_217645_a(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
+ simplebakedmodel$builder.func_177650_a(p_217644_4_.getState().apply(java.util.Optional.empty()).map(trsr -> trsr.rotate(blockpartface.field_178244_b)).orElse(blockpartface.field_178244_b), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
+ simplebakedmodel$builder.func_177650_a(p_217644_4_.getState().apply(java.util.Optional.empty()).map(trsr -> trsr.rotateTransform(blockpartface.field_178244_b)).orElse(blockpartface.field_178244_b), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, p_217644_4_));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
+ }
|
||||
+
|
||||
+ private void fillVertexData(int[] p_188015_1_, int p_188015_2_, Direction p_188015_3_, BlockFaceUV p_188015_4_, float[] p_188015_5_, TextureAtlasSprite p_188015_6_, net.minecraftforge.common.model.ITransformation p_188015_7_, @Nullable BlockPartRotation p_188015_8_, boolean p_188015_9_) {
|
||||
+ Direction direction = p_188015_7_.rotate(p_188015_3_);
|
||||
+ Direction direction = p_188015_7_.rotateTransform(p_188015_3_);
|
||||
int i = p_188015_9_ ? this.func_178413_a(direction) : -1;
|
||||
FaceDirection.VertexInformation facedirection$vertexinformation = FaceDirection.func_179027_a(p_188015_3_).func_179025_a(p_188015_2_);
|
||||
Vector3f vector3f = new Vector3f(p_188015_5_[facedirection$vertexinformation.field_179184_a], p_188015_5_[facedirection$vertexinformation.field_179182_b], p_188015_5_[facedirection$vertexinformation.field_179183_c]);
|
||||
|
||||
@@ -9,16 +9,36 @@
|
||||
private final Map<ResourceLocation, IUnbakedModel> field_217851_H = Maps.newHashMap();
|
||||
private final Map<ResourceLocation, IBakedModel> field_217852_I = Maps.newHashMap();
|
||||
private final AtlasTexture.SheetData field_217853_J;
|
||||
@@ -288,7 +288,7 @@
|
||||
@@ -142,12 +142,19 @@
|
||||
|
||||
p_i51735_4_.func_219895_b("special");
|
||||
this.func_217843_a(new ModelResourceLocation("minecraft:trident_in_hand#inventory"));
|
||||
+ for (ResourceLocation rl : getSpecialModels()) {
|
||||
+ // Same as func_217843_a but without restricting to MRL's
|
||||
+ IUnbakedModel iunbakedmodel = this.func_209597_a(rl);
|
||||
+ this.field_217849_F.put(rl, iunbakedmodel);
|
||||
+ this.field_217851_H.put(rl, iunbakedmodel);
|
||||
+ }
|
||||
p_i51735_4_.func_219895_b("textures");
|
||||
Set<String> set = Sets.newLinkedHashSet();
|
||||
Set<ResourceLocation> set1 = this.field_217851_H.values().stream().flatMap((p_217838_2_) -> {
|
||||
return p_217838_2_.func_209559_a(this::func_209597_a, set).stream();
|
||||
}).collect(Collectors.toSet());
|
||||
set1.addAll(field_177602_b);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.gatherFluidTextures(set1);
|
||||
set.forEach((p_217833_0_) -> {
|
||||
field_177603_c.warn("Unable to resolve texture reference: {}", (Object)p_217833_0_);
|
||||
});
|
||||
@@ -288,7 +295,7 @@
|
||||
{
|
||||
lvt_13_5_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_217839_1_) -> {
|
||||
try (InputStream inputstream = p_217839_1_.func_199027_b()) {
|
||||
- Pair pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
|
||||
+ Pair<String,BlockModelDefinition> pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
|
||||
- Pair<String, BlockModelDefinition> pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
|
||||
+ Pair<String, BlockModelDefinition> pair2 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
|
||||
return pair2;
|
||||
} catch (Exception exception1) {
|
||||
throw new ModelBakery.BlockStateDefinitionException(String.format("Exception loading blockstate definition: '%s' in resourcepack: '%s': %s", p_217839_1_.func_199029_a(), p_217839_1_.func_199026_d(), exception1.getMessage()));
|
||||
@@ -404,7 +404,12 @@
|
||||
@@ -404,7 +411,12 @@
|
||||
|
||||
@Nullable
|
||||
public IBakedModel func_217845_a(ResourceLocation p_217845_1_, ISprite p_217845_2_) {
|
||||
@@ -32,7 +52,7 @@
|
||||
if (this.field_217850_G.containsKey(triple)) {
|
||||
return this.field_217850_G.get(triple);
|
||||
} else {
|
||||
@@ -412,11 +417,11 @@
|
||||
@@ -412,11 +424,11 @@
|
||||
if (iunbakedmodel instanceof BlockModel) {
|
||||
BlockModel blockmodel = (BlockModel)iunbakedmodel;
|
||||
if (blockmodel.func_178310_f() == field_177606_o) {
|
||||
@@ -46,3 +66,14 @@
|
||||
this.field_217850_G.put(triple, ibakedmodel);
|
||||
return ibakedmodel;
|
||||
}
|
||||
@@ -471,6 +483,10 @@
|
||||
return this.field_225367_M;
|
||||
}
|
||||
|
||||
+ public Set<ResourceLocation> getSpecialModels() {
|
||||
+ return java.util.Collections.emptySet();
|
||||
+ }
|
||||
+
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static class BlockStateDefinitionException extends RuntimeException {
|
||||
public BlockStateDefinitionException(String p_i49526_1_) {
|
||||
@@ -16,6 +16,6 @@
|
||||
+
|
||||
+ public java.util.Optional<net.minecraftforge.common.model.TRSRTransformation> apply(java.util.Optional<? extends net.minecraftforge.common.model.IModelPart> part) { return net.minecraftforge.client.ForgeHooksClient.applyTransform(this, part); }
|
||||
+ public javax.vecmath.Matrix4f getMatrixVec() { return net.minecraftforge.common.model.TRSRTransformation.from(this).getMatrixVec(); }
|
||||
+ public Direction rotate(Direction facing) { return func_177523_a(facing); }
|
||||
+ public Direction rotateTransform(Direction facing) { return func_177523_a(facing); }
|
||||
+ public int rotate(Direction facing, int vertexIndex) { return func_177520_a(facing, vertexIndex); }
|
||||
}
|
||||
@@ -9,19 +9,19 @@
|
||||
private static final Comparator<Stitcher.Holder> field_217797_a = Comparator.<Stitcher.Holder, Integer>comparing((p_217793_0_) -> {
|
||||
return -p_217793_0_.field_94201_d;
|
||||
}).thenComparing((p_217795_0_) -> {
|
||||
@@ -53,6 +55,12 @@
|
||||
list.sort(field_217797_a);
|
||||
@@ -54,6 +56,12 @@
|
||||
|
||||
for(Stitcher.Holder stitcher$holder : list) {
|
||||
if (!this.func_94310_b(stitcher$holder)) {
|
||||
+ LOGGER.info(new net.minecraftforge.fml.loading.AdvancedLogMessageAdapter(sb->{
|
||||
+ sb.append("Unable to fit: ").append(stitcher$holder.field_98151_a.func_195668_m());
|
||||
+ sb.append(" - size: ").append(stitcher$holder.field_98151_a.func_94211_a()).append("x").append(stitcher$holder.field_98151_a.func_94216_b());
|
||||
+ sb.append(" - Maybe try a lower resolution resourcepack?\n");
|
||||
+ list.forEach(h-> sb.append("\t").append(h).append("\n"));
|
||||
+ }));
|
||||
if (!this.func_94310_b(stitcher$holder)) {
|
||||
throw new StitcherException(stitcher$holder.field_98151_a, list.stream().map((p_225334_0_) -> {
|
||||
return p_225334_0_.field_98151_a;
|
||||
}).collect(ImmutableList.toImmutableList()));
|
||||
@@ -107,7 +115,7 @@
|
||||
boolean flag4 = flag2 && j != l;
|
||||
boolean flag;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
--- a/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
+++ b/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
public boolean func_110580_a(ResourceLocation p_110580_1_, ITickableTextureObject p_110580_2_) {
|
||||
- if (this.func_110579_a(p_110580_1_, p_110580_2_)) {
|
||||
+ if (this.func_110579_a(p_110580_1_, (ITextureObject)p_110580_2_)) { //TODO: Move to MCPConfig
|
||||
this.field_110583_b.add(p_110580_2_);
|
||||
return true;
|
||||
} else {
|
||||
@@ -125,6 +125,7 @@
|
||||
public void func_147645_c(ResourceLocation p_147645_1_) {
|
||||
ITextureObject itextureobject = this.func_110581_b(p_147645_1_);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/net/minecraft/command/impl/LocateCommand.java
|
||||
+++ b/net/minecraft/command/impl/LocateCommand.java
|
||||
@@ -50,7 +50,13 @@
|
||||
return func_198534_a(p_204758_0_.getSource(), "Shipwreck");
|
||||
})).then(Commands.func_197057_a("Village").executes((p_218858_0_) -> {
|
||||
return func_198534_a(p_218858_0_.getSource(), "Village");
|
||||
- })));
|
||||
+ // FORGE: Support modded structures via registry name
|
||||
+ })).then(Commands.func_197056_a("structure_type", net.minecraft.command.arguments.ResourceLocationArgument.func_197197_a())
|
||||
+ .suggests((ctx, sb) -> net.minecraft.command.ISuggestionProvider.func_197013_a(
|
||||
+ net.minecraftforge.registries.GameData.getStructureFeatures().func_148742_b().stream()
|
||||
+ .map(net.minecraft.util.ResourceLocation::toString), sb))
|
||||
+ .executes(ctx -> func_198534_a(ctx.getSource(), ctx.getArgument("structure_type", net.minecraft.util.ResourceLocation.class).toString().replace("minecraft:", ""))
|
||||
+ )));
|
||||
}
|
||||
|
||||
private static int func_198534_a(CommandSource p_198534_0_, String p_198534_1_) throws CommandSyntaxException {
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/data/RecipeProvider.java
|
||||
+++ b/net/minecraft/data/RecipeProvider.java
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
}
|
||||
});
|
||||
+ if (this.getClass() == RecipeProvider.class) //Forge: Subclasses don't need this.
|
||||
this.func_208310_b(p_200398_1_, Advancement.Builder.func_200278_a().func_200275_a("impossible", new ImpossibleTrigger.Instance()).func_200273_b(), path.resolve("data/minecraft/advancements/recipes/root.json"));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
- for(SheepEntity sheepentity : world.func_217357_a(SheepEntity.class, new AxisAlignedBB(blockpos))) {
|
||||
- if (sheepentity.func_70089_S() && !sheepentity.func_70892_o() && !sheepentity.func_70631_g_()) {
|
||||
- sheepentity.func_213612_dV();
|
||||
+ for(net.minecraft.entity.Entity entity : world.func_175674_a(null, new AxisAlignedBB(blockpos), e -> !e.func_175149_v() && e instanceof net.minecraftforge.common.IShearable)) {
|
||||
+ for(net.minecraft.entity.Entity entity : world.func_175674_a((net.minecraft.entity.Entity)null, new AxisAlignedBB(blockpos), e -> !e.func_175149_v() && e instanceof net.minecraftforge.common.IShearable)) {
|
||||
+ net.minecraftforge.common.IShearable target = (net.minecraftforge.common.IShearable)entity;
|
||||
+ if (target.isShearable(p_82487_2_, world, blockpos)) {
|
||||
+ java.util.List<ItemStack> drops = target.onSheared(p_82487_2_, entity.field_70170_p, blockpos,
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
float f = this.field_213325_aI.field_220315_a / 2.0F;
|
||||
float f1 = this.field_213325_aI.field_220316_b;
|
||||
this.func_174826_a(new AxisAlignedBB(p_70107_1_ - (double)f, p_70107_3_, p_70107_5_ - (double)f, p_70107_1_ + (double)f, p_70107_3_ + (double)f1, p_70107_5_ + (double)f));
|
||||
@@ -496,7 +508,7 @@
|
||||
@@ -496,11 +508,11 @@
|
||||
int k = MathHelper.func_76128_c(this.field_70161_v);
|
||||
BlockPos blockpos = new BlockPos(i, j, k);
|
||||
BlockState blockstate = this.field_70170_p.func_180495_p(blockpos);
|
||||
@@ -73,6 +73,11 @@
|
||||
BlockPos blockpos1 = blockpos.func_177977_b();
|
||||
BlockState blockstate1 = this.field_70170_p.func_180495_p(blockpos1);
|
||||
Block block = blockstate1.func_177230_c();
|
||||
- if (block.func_203417_a(BlockTags.field_219748_G) || block.func_203417_a(BlockTags.field_219757_z) || block instanceof FenceGateBlock) {
|
||||
+ if (blockstate.collisionExtendsVertically(this.field_70170_p, blockpos, this)) {
|
||||
blockstate = blockstate1;
|
||||
blockpos = blockpos1;
|
||||
}
|
||||
@@ -535,7 +547,7 @@
|
||||
|
||||
this.field_70140_Q = (float)((double)this.field_70140_Q + (double)MathHelper.func_76133_a(func_213296_b(vec3d)) * 0.6D);
|
||||
@@ -108,14 +113,18 @@
|
||||
this.func_184185_a(soundtype.func_185844_d(), soundtype.func_185843_a() * 0.15F, soundtype.func_185847_b());
|
||||
}
|
||||
}
|
||||
@@ -1040,6 +1053,7 @@
|
||||
@@ -1040,9 +1053,10 @@
|
||||
int k = MathHelper.func_76128_c(this.field_70161_v);
|
||||
BlockPos blockpos = new BlockPos(i, j, k);
|
||||
BlockState blockstate = this.field_70170_p.func_180495_p(blockpos);
|
||||
+ if (!blockstate.addRunningEffects(field_70170_p, blockpos, this))
|
||||
if (blockstate.func_185901_i() != BlockRenderType.INVISIBLE) {
|
||||
Vec3d vec3d = this.func_213322_ci();
|
||||
this.field_70170_p.func_195594_a(new BlockParticleData(ParticleTypes.field_197611_d, blockstate), this.field_70165_t + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.field_213325_aI.field_220315_a, this.field_70163_u + 0.1D, this.field_70161_v + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.field_213325_aI.field_220315_a, vec3d.field_72450_a * -4.0D, 1.5D, vec3d.field_72449_c * -4.0D);
|
||||
- this.field_70170_p.func_195594_a(new BlockParticleData(ParticleTypes.field_197611_d, blockstate), this.field_70165_t + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.field_213325_aI.field_220315_a, this.field_70163_u + 0.1D, this.field_70161_v + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.field_213325_aI.field_220315_a, vec3d.field_72450_a * -4.0D, 1.5D, vec3d.field_72449_c * -4.0D);
|
||||
+ this.field_70170_p.func_195594_a(new BlockParticleData(ParticleTypes.field_197611_d, blockstate).setPos(blockpos), this.field_70165_t + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.field_213325_aI.field_220315_a, this.field_70163_u + 0.1D, this.field_70161_v + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.field_213325_aI.field_220315_a, vec3d.field_72450_a * -4.0D, 1.5D, vec3d.field_72449_c * -4.0D);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1061,7 +1075,7 @@
|
||||
return false;
|
||||
} else {
|
||||
@@ -129,7 +138,7 @@
|
||||
this.field_70126_B -= 360.0F;
|
||||
}
|
||||
|
||||
+ if (!this.field_70170_p.field_72995_K) this.field_70170_p.func_212866_a_((int) Math.floor(this.field_70165_t) >> 4, (int) Math.floor(this.field_70161_v) >> 4); // Forge - ensure target chunk is loaded.
|
||||
+ if (!this.field_70170_p.field_72995_K && this.func_70089_S()) this.field_70170_p.func_212866_a_((int) Math.floor(this.field_70165_t) >> 4, (int) Math.floor(this.field_70161_v) >> 4); // Forge - ensure target chunk is loaded.
|
||||
this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v);
|
||||
this.func_70101_b(p_70080_7_, p_70080_8_);
|
||||
}
|
||||
@@ -147,7 +156,7 @@
|
||||
|
||||
+ CompoundNBT caps = serializeCaps();
|
||||
+ if (caps != null) p_189511_1_.func_218657_a("ForgeCaps", caps);
|
||||
+ if (entityData != null) p_189511_1_.func_218657_a("ForgeData", entityData);
|
||||
+ if (persistentData != null) p_189511_1_.func_218657_a("ForgeData", persistentData);
|
||||
+
|
||||
this.func_213281_b(p_189511_1_);
|
||||
if (this.func_184207_aI()) {
|
||||
@@ -156,7 +165,7 @@
|
||||
this.func_174810_b(p_70020_1_.func_74767_n("Silent"));
|
||||
this.func_189654_d(p_70020_1_.func_74767_n("NoGravity"));
|
||||
this.func_184195_f(p_70020_1_.func_74767_n("Glowing"));
|
||||
+ if (p_70020_1_.func_150297_b("ForgeData", 10)) entityData = p_70020_1_.func_74775_l("ForgeData");
|
||||
+ if (p_70020_1_.func_150297_b("ForgeData", 10)) persistentData = p_70020_1_.func_74775_l("ForgeData");
|
||||
+ if (p_70020_1_.func_150297_b("CanUpdate", 99)) this.canUpdate(p_70020_1_.func_74767_n("CanUpdate"));
|
||||
+ if (p_70020_1_.func_150297_b("ForgeCaps", 10)) deserializeCaps(p_70020_1_.func_74775_l("ForgeCaps"));
|
||||
if (p_70020_1_.func_150297_b("Tags", 9)) {
|
||||
@@ -306,12 +315,12 @@
|
||||
+ this.captureDrops = value;
|
||||
+ return ret;
|
||||
+ }
|
||||
+ private CompoundNBT entityData;
|
||||
+ private CompoundNBT persistentData;
|
||||
+ @Override
|
||||
+ public CompoundNBT getEntityData() {
|
||||
+ if (entityData == null)
|
||||
+ entityData = new CompoundNBT();
|
||||
+ return entityData;
|
||||
+ public CompoundNBT getPersistentData() {
|
||||
+ if (persistentData == null)
|
||||
+ persistentData = new CompoundNBT();
|
||||
+ return persistentData;
|
||||
+ }
|
||||
+ @Override
|
||||
+ public boolean canTrample(BlockState state, BlockPos pos, float fallDistance) {
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
@Nullable
|
||||
public T func_220342_a(World p_220342_1_, @Nullable CompoundNBT p_220342_2_, @Nullable ITextComponent p_220342_3_, @Nullable PlayerEntity p_220342_4_, BlockPos p_220342_5_, SpawnReason p_220342_6_, boolean p_220342_7_, boolean p_220342_8_) {
|
||||
T t = this.func_220349_b(p_220342_1_, p_220342_2_, p_220342_3_, p_220342_4_, p_220342_5_, p_220342_6_, p_220342_7_, p_220342_8_);
|
||||
+ if (t instanceof net.minecraft.entity.MobEntity && net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn((net.minecraft.entity.MobEntity) t, p_220342_1_, p_220342_5_.func_177958_n(), p_220342_5_.func_177956_o(), p_220342_5_.func_177952_p(), null)) return null;
|
||||
+ if (t instanceof net.minecraft.entity.MobEntity && net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn((net.minecraft.entity.MobEntity) t, p_220342_1_, p_220342_5_.func_177958_n(), p_220342_5_.func_177956_o(), p_220342_5_.func_177952_p(), null, p_220342_6_)) return null;
|
||||
p_220342_1_.func_217376_c(t);
|
||||
return t;
|
||||
}
|
||||
@@ -111,7 +111,7 @@
|
||||
private boolean field_225436_f;
|
||||
private EntitySize field_220326_f = EntitySize.func_220314_b(0.6F, 1.8F);
|
||||
|
||||
@@ -553,6 +591,26 @@
|
||||
@@ -553,11 +591,31 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,12 @@
|
||||
public EntityType<T> func_206830_a(String p_206830_1_) {
|
||||
if (this.field_200710_b) {
|
||||
try {
|
||||
DataFixesManager.func_210901_a().getSchema(DataFixUtils.makeKey(SharedConstants.func_215069_a().getWorldVersion())).getChoiceType(TypeReferences.field_211298_n, p_206830_1_);
|
||||
- } catch (IllegalStateException illegalstateexception) {
|
||||
+ } catch (IllegalArgumentException illegalstateexception) { // Forge: fix catching wrong exception
|
||||
if (SharedConstants.field_206244_b) {
|
||||
throw illegalstateexception;
|
||||
}
|
||||
@@ -566,7 +624,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
--- a/net/minecraft/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/entity/LivingEntity.java
|
||||
@@ -105,6 +105,8 @@
|
||||
@@ -104,7 +104,12 @@
|
||||
|
||||
public abstract class LivingEntity extends Entity {
|
||||
private static final UUID field_110156_b = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
|
||||
+ private static final UUID SLOW_FALLING_ID = UUID.fromString("A5B6CF2A-2F7C-31EF-9022-7C3E7D5E6ABA");
|
||||
private static final AttributeModifier field_110157_c = (new AttributeModifier(field_110156_b, "Sprinting speed boost", (double)0.3F, AttributeModifier.Operation.MULTIPLY_TOTAL)).func_111168_a(false);
|
||||
+ private static final AttributeModifier SLOW_FALLING = new AttributeModifier(SLOW_FALLING_ID, "Slow falling acceleration reduction", -0.07, AttributeModifier.Operation.ADDITION).func_111168_a(false); // Add -0.07 to 0.08 so we get the vanilla default of 0.01
|
||||
+ public static final net.minecraft.entity.ai.attributes.IAttribute SWIM_SPEED = new net.minecraft.entity.ai.attributes.RangedAttribute(null, "forge.swimSpeed", 1.0D, 0.0D, 1024.0D).func_111112_a(true);
|
||||
+ public static final net.minecraft.entity.ai.attributes.IAttribute NAMETAG_DISTANCE = new net.minecraft.entity.ai.attributes.RangedAttribute(null, "forge.nameTagDistance", 64.0D, 0.0D, Float.MAX_VALUE).func_111112_a(true);
|
||||
+ public static final net.minecraft.entity.ai.attributes.IAttribute ENTITY_GRAVITY = new net.minecraft.entity.ai.attributes.RangedAttribute(null, "forge.entity_gravity", 0.08D, -8.0D, 8.0D).func_111112_a(true);
|
||||
protected static final DataParameter<Byte> field_184621_as = EntityDataManager.func_187226_a(LivingEntity.class, DataSerializers.field_187191_a);
|
||||
private static final DataParameter<Float> field_184632_c = EntityDataManager.func_187226_a(LivingEntity.class, DataSerializers.field_187193_c);
|
||||
private static final DataParameter<Integer> field_184633_f = EntityDataManager.func_187226_a(LivingEntity.class, DataSerializers.field_187192_b);
|
||||
@@ -228,6 +230,8 @@
|
||||
@@ -228,6 +233,9 @@
|
||||
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_111263_d);
|
||||
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188791_g);
|
||||
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_189429_h);
|
||||
+ this.func_110140_aT().func_111150_b(SWIM_SPEED);
|
||||
+ this.func_110140_aT().func_111150_b(NAMETAG_DISTANCE);
|
||||
+ this.func_110140_aT().func_111150_b(ENTITY_GRAVITY);
|
||||
}
|
||||
|
||||
protected void func_184231_a(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_) {
|
||||
@@ -237,9 +241,10 @@
|
||||
@@ -237,9 +245,10 @@
|
||||
|
||||
if (!this.field_70170_p.field_72995_K && this.field_70143_R > 3.0F && p_184231_3_) {
|
||||
float f = (float)MathHelper.func_76123_f(this.field_70143_R - 3.0F);
|
||||
@@ -30,7 +35,7 @@
|
||||
((ServerWorld)this.field_70170_p).func_195598_a(new BlockParticleData(ParticleTypes.field_197611_d, p_184231_4_), this.field_70165_t, this.field_70163_u, this.field_70161_v, i, 0.0D, 0.0D, 0.0D, (double)0.15F);
|
||||
}
|
||||
}
|
||||
@@ -303,7 +308,7 @@
|
||||
@@ -303,7 +312,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +44,7 @@
|
||||
this.func_184210_p();
|
||||
}
|
||||
} else if (this.func_70086_ai() < this.func_205010_bg()) {
|
||||
@@ -388,6 +393,7 @@
|
||||
@@ -388,6 +397,7 @@
|
||||
if (!this.field_70170_p.field_72995_K && (this.func_70684_aJ() || this.field_70718_bc > 0 && this.func_146066_aG() && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223602_e))) {
|
||||
int i = this.func_70693_a(this.field_70717_bb);
|
||||
|
||||
@@ -47,7 +52,16 @@
|
||||
while(i > 0) {
|
||||
int j = ExperienceOrbEntity.func_70527_a(i);
|
||||
i -= j;
|
||||
@@ -590,7 +596,7 @@
|
||||
@@ -395,7 +405,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- this.func_70106_y();
|
||||
+ this.remove(this instanceof net.minecraft.entity.player.ServerPlayerEntity); //Forge keep data until we revive player
|
||||
|
||||
for(int k = 0; k < 20; ++k) {
|
||||
double d2 = this.field_70146_Z.nextGaussian() * 0.02D;
|
||||
@@ -590,7 +600,7 @@
|
||||
Effect effect = iterator.next();
|
||||
EffectInstance effectinstance = this.field_70713_bf.get(effect);
|
||||
if (!effectinstance.func_76455_a(this)) {
|
||||
@@ -56,7 +70,7 @@
|
||||
iterator.remove();
|
||||
this.func_70688_c(effectinstance);
|
||||
}
|
||||
@@ -640,8 +646,10 @@
|
||||
@@ -640,8 +650,10 @@
|
||||
this.func_82142_c(false);
|
||||
} else {
|
||||
Collection<EffectInstance> collection = this.field_70713_bf.values();
|
||||
@@ -69,7 +83,7 @@
|
||||
this.func_82142_c(this.func_70644_a(Effects.field_76441_p));
|
||||
}
|
||||
|
||||
@@ -705,7 +713,10 @@
|
||||
@@ -705,7 +717,10 @@
|
||||
|
||||
boolean flag;
|
||||
for(flag = false; iterator.hasNext(); flag = true) {
|
||||
@@ -81,7 +95,7 @@
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -735,6 +746,7 @@
|
||||
@@ -735,6 +750,7 @@
|
||||
return false;
|
||||
} else {
|
||||
EffectInstance effectinstance = this.field_70713_bf.get(p_195064_1_.func_188419_a());
|
||||
@@ -89,7 +103,7 @@
|
||||
if (effectinstance == null) {
|
||||
this.field_70713_bf.put(p_195064_1_.func_188419_a(), p_195064_1_);
|
||||
this.func_70670_a(p_195064_1_);
|
||||
@@ -749,6 +761,9 @@
|
||||
@@ -749,6 +765,9 @@
|
||||
}
|
||||
|
||||
public boolean func_70687_e(EffectInstance p_70687_1_) {
|
||||
@@ -99,7 +113,7 @@
|
||||
if (this.func_70668_bt() == CreatureAttribute.field_223223_b_) {
|
||||
Effect effect = p_70687_1_.func_188419_a();
|
||||
if (effect == Effects.field_76428_l || effect == Effects.field_76436_u) {
|
||||
@@ -769,6 +784,7 @@
|
||||
@@ -769,6 +788,7 @@
|
||||
}
|
||||
|
||||
public boolean func_195063_d(Effect p_195063_1_) {
|
||||
@@ -107,7 +121,7 @@
|
||||
EffectInstance effectinstance = this.func_184596_c(p_195063_1_);
|
||||
if (effectinstance != null) {
|
||||
this.func_70688_c(effectinstance);
|
||||
@@ -805,6 +821,8 @@
|
||||
@@ -805,6 +825,8 @@
|
||||
}
|
||||
|
||||
public void func_70691_i(float p_70691_1_) {
|
||||
@@ -116,7 +130,7 @@
|
||||
float f = this.func_110143_aJ();
|
||||
if (f > 0.0F) {
|
||||
this.func_70606_j(f + p_70691_1_);
|
||||
@@ -821,6 +839,7 @@
|
||||
@@ -821,6 +843,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
@@ -124,7 +138,7 @@
|
||||
if (this.func_180431_b(p_70097_1_)) {
|
||||
return false;
|
||||
} else if (this.field_70170_p.field_72995_K) {
|
||||
@@ -887,8 +906,8 @@
|
||||
@@ -887,8 +910,8 @@
|
||||
if (entity1 instanceof PlayerEntity) {
|
||||
this.field_70718_bc = 100;
|
||||
this.field_70717_bb = (PlayerEntity)entity1;
|
||||
@@ -135,7 +149,7 @@
|
||||
if (wolfentity.func_70909_n()) {
|
||||
this.field_70718_bc = 100;
|
||||
LivingEntity livingentity = wolfentity.func_70902_q();
|
||||
@@ -1070,6 +1089,7 @@
|
||||
@@ -1070,6 +1093,7 @@
|
||||
}
|
||||
|
||||
public void func_70645_a(DamageSource p_70645_1_) {
|
||||
@@ -143,7 +157,7 @@
|
||||
if (!this.field_70729_aU) {
|
||||
Entity entity = p_70645_1_.func_76346_g();
|
||||
LivingEntity livingentity = this.func_94060_bK();
|
||||
@@ -1091,7 +1111,7 @@
|
||||
@@ -1091,7 +1115,7 @@
|
||||
this.func_213345_d(p_70645_1_);
|
||||
boolean flag = false;
|
||||
if (livingentity instanceof WitherEntity) {
|
||||
@@ -152,7 +166,7 @@
|
||||
BlockPos blockpos = new BlockPos(this.field_70165_t, this.field_70163_u, this.field_70161_v);
|
||||
BlockState blockstate = Blocks.field_222388_bz.func_176223_P();
|
||||
if (this.field_70170_p.func_180495_p(blockpos).func_196958_f() && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
|
||||
@@ -1114,13 +1134,10 @@
|
||||
@@ -1114,13 +1138,10 @@
|
||||
|
||||
protected void func_213345_d(DamageSource p_213345_1_) {
|
||||
Entity entity = p_213345_1_.func_76346_g();
|
||||
@@ -169,7 +183,7 @@
|
||||
boolean flag = this.field_70718_bc > 0;
|
||||
if (this.func_146066_aG() && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223602_e)) {
|
||||
this.func_213354_a(p_213345_1_, flag);
|
||||
@@ -1128,6 +1145,10 @@
|
||||
@@ -1128,6 +1149,10 @@
|
||||
}
|
||||
|
||||
this.func_213337_cE();
|
||||
@@ -180,7 +194,7 @@
|
||||
}
|
||||
|
||||
protected void func_213337_cE() {
|
||||
@@ -1157,6 +1178,9 @@
|
||||
@@ -1157,6 +1182,9 @@
|
||||
}
|
||||
|
||||
public void func_70653_a(Entity p_70653_1_, float p_70653_2_, double p_70653_3_, double p_70653_5_) {
|
||||
@@ -190,7 +204,7 @@
|
||||
if (!(this.field_70146_Z.nextDouble() < this.func_110148_a(SharedMonsterAttributes.field_111266_c).func_111126_e())) {
|
||||
this.field_70160_al = true;
|
||||
Vec3d vec3d = this.func_213322_ci();
|
||||
@@ -1192,12 +1216,7 @@
|
||||
@@ -1192,12 +1220,7 @@
|
||||
return false;
|
||||
} else {
|
||||
BlockState blockstate = this.func_213339_cH();
|
||||
@@ -204,7 +218,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1221,6 +1240,9 @@
|
||||
@@ -1221,6 +1244,9 @@
|
||||
}
|
||||
|
||||
public void func_180430_e(float p_180430_1_, float p_180430_2_) {
|
||||
@@ -214,7 +228,7 @@
|
||||
super.func_180430_e(p_180430_1_, p_180430_2_);
|
||||
EffectInstance effectinstance = this.func_70660_b(Effects.field_76430_j);
|
||||
float f = effectinstance == null ? 0.0F : (float)(effectinstance.func_76458_c() + 1);
|
||||
@@ -1233,7 +1255,7 @@
|
||||
@@ -1233,7 +1259,7 @@
|
||||
int l = MathHelper.func_76128_c(this.field_70161_v);
|
||||
BlockState blockstate = this.field_70170_p.func_180495_p(new BlockPos(j, k, l));
|
||||
if (!blockstate.func_196958_f()) {
|
||||
@@ -223,7 +237,7 @@
|
||||
this.func_184185_a(soundtype.func_185842_g(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F);
|
||||
}
|
||||
}
|
||||
@@ -1302,6 +1324,8 @@
|
||||
@@ -1302,6 +1328,8 @@
|
||||
|
||||
protected void func_70665_d(DamageSource p_70665_1_, float p_70665_2_) {
|
||||
if (!this.func_180431_b(p_70665_1_)) {
|
||||
@@ -232,7 +246,7 @@
|
||||
p_70665_2_ = this.func_70655_b(p_70665_1_, p_70665_2_);
|
||||
p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_);
|
||||
float f = p_70665_2_;
|
||||
@@ -1312,10 +1336,11 @@
|
||||
@@ -1312,10 +1340,11 @@
|
||||
((ServerPlayerEntity)p_70665_1_.func_76346_g()).func_195067_a(Stats.field_212735_F, Math.round(f1 * 10.0F));
|
||||
}
|
||||
|
||||
@@ -245,7 +259,7 @@
|
||||
this.func_110149_m(this.func_110139_bj() - p_70665_2_);
|
||||
}
|
||||
}
|
||||
@@ -1357,6 +1382,8 @@
|
||||
@@ -1357,6 +1386,8 @@
|
||||
}
|
||||
|
||||
public void func_184609_a(Hand p_184609_1_) {
|
||||
@@ -254,7 +268,7 @@
|
||||
if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0) {
|
||||
this.field_110158_av = -1;
|
||||
this.field_82175_bq = true;
|
||||
@@ -1715,15 +1742,16 @@
|
||||
@@ -1715,15 +1746,16 @@
|
||||
}
|
||||
|
||||
this.field_70160_al = true;
|
||||
@@ -273,7 +287,24 @@
|
||||
}
|
||||
|
||||
protected float func_189749_co() {
|
||||
@@ -1786,7 +1814,7 @@
|
||||
@@ -1733,11 +1765,15 @@
|
||||
public void func_213352_e(Vec3d p_213352_1_) {
|
||||
if (this.func_70613_aW() || this.func_184186_bw()) {
|
||||
double d0 = 0.08D;
|
||||
+ IAttributeInstance gravity = this.func_110148_a(ENTITY_GRAVITY);
|
||||
boolean flag = this.func_213322_ci().field_72448_b <= 0.0D;
|
||||
if (flag && this.func_70644_a(Effects.field_204839_B)) {
|
||||
- d0 = 0.01D;
|
||||
+ if (!gravity.func_180374_a(SLOW_FALLING)) gravity.func_111121_a(SLOW_FALLING);
|
||||
this.field_70143_R = 0.0F;
|
||||
+ } else if (gravity.func_180374_a(SLOW_FALLING)) {
|
||||
+ gravity.func_111124_b(SLOW_FALLING);
|
||||
}
|
||||
+ d0 = gravity.func_111126_e();
|
||||
|
||||
if (!this.func_70090_H() || this instanceof PlayerEntity && ((PlayerEntity)this).field_71075_bZ.field_75100_b) {
|
||||
if (!this.func_180799_ab() || this instanceof PlayerEntity && ((PlayerEntity)this).field_71075_bZ.field_75100_b) {
|
||||
@@ -1786,7 +1822,7 @@
|
||||
}
|
||||
} else {
|
||||
BlockPos blockpos = new BlockPos(this.field_70165_t, this.func_174813_aQ().field_72338_b - 1.0D, this.field_70161_v);
|
||||
@@ -282,7 +313,7 @@
|
||||
float f7 = this.field_70122_E ? f5 * 0.91F : 0.91F;
|
||||
this.func_213309_a(this.func_213335_r(f5), p_213352_1_);
|
||||
this.func_213317_d(this.func_213362_f(this.func_213322_ci()));
|
||||
@@ -1848,6 +1876,7 @@
|
||||
@@ -1848,6 +1884,7 @@
|
||||
f = 0.96F;
|
||||
}
|
||||
|
||||
@@ -290,7 +321,7 @@
|
||||
this.func_213309_a(f1, p_213352_1_);
|
||||
this.func_213315_a(MoverType.SELF, this.func_213322_ci());
|
||||
Vec3d vec3d1 = this.func_213322_ci();
|
||||
@@ -1923,6 +1952,7 @@
|
||||
@@ -1923,6 +1960,7 @@
|
||||
}
|
||||
|
||||
public void func_70071_h_() {
|
||||
@@ -298,7 +329,7 @@
|
||||
super.func_70071_h_();
|
||||
this.func_184608_ct();
|
||||
this.func_205014_p();
|
||||
@@ -1954,7 +1984,9 @@
|
||||
@@ -1954,7 +1992,9 @@
|
||||
|
||||
ItemStack itemstack1 = this.func_184582_a(equipmentslottype);
|
||||
if (!ItemStack.func_77989_b(itemstack1, itemstack)) {
|
||||
@@ -308,7 +339,7 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
this.func_110140_aT().func_111148_a(itemstack.func_111283_C(equipmentslottype));
|
||||
}
|
||||
@@ -2403,13 +2435,22 @@
|
||||
@@ -2403,13 +2443,22 @@
|
||||
|
||||
private void func_184608_ct() {
|
||||
if (this.func_184587_cr()) {
|
||||
@@ -333,7 +364,7 @@
|
||||
this.func_71036_o();
|
||||
}
|
||||
} else {
|
||||
@@ -2443,8 +2484,10 @@
|
||||
@@ -2443,8 +2492,10 @@
|
||||
public void func_184598_c(Hand p_184598_1_) {
|
||||
ItemStack itemstack = this.func_184586_b(p_184598_1_);
|
||||
if (!itemstack.func_190926_b() && !this.func_184587_cr()) {
|
||||
@@ -345,7 +376,7 @@
|
||||
if (!this.field_70170_p.field_72995_K) {
|
||||
this.func_204802_c(1, true);
|
||||
this.func_204802_c(2, p_184598_1_ == Hand.OFF_HAND);
|
||||
@@ -2504,6 +2547,9 @@
|
||||
@@ -2504,6 +2555,9 @@
|
||||
vec3d1 = vec3d1.func_178789_a(-this.field_70125_A * ((float)Math.PI / 180F));
|
||||
vec3d1 = vec3d1.func_178785_b(-this.field_70177_z * ((float)Math.PI / 180F));
|
||||
vec3d1 = vec3d1.func_72441_c(this.field_70165_t, this.field_70163_u + (double)this.func_70047_e(), this.field_70161_v);
|
||||
@@ -355,7 +386,7 @@
|
||||
this.field_70170_p.func_195594_a(new ItemParticleData(ParticleTypes.field_197591_B, p_195062_1_), vec3d1.field_72450_a, vec3d1.field_72448_b, vec3d1.field_72449_c, vec3d.field_72450_a, vec3d.field_72448_b + 0.05D, vec3d.field_72449_c);
|
||||
}
|
||||
|
||||
@@ -2512,7 +2558,9 @@
|
||||
@@ -2512,7 +2566,9 @@
|
||||
protected void func_71036_o() {
|
||||
if (!this.field_184627_bm.func_190926_b() && this.func_184587_cr()) {
|
||||
this.func_184584_a(this.field_184627_bm, 16);
|
||||
@@ -366,15 +397,19 @@
|
||||
this.func_184602_cy();
|
||||
}
|
||||
|
||||
@@ -2532,6 +2580,7 @@
|
||||
@@ -2532,7 +2588,11 @@
|
||||
|
||||
public void func_184597_cx() {
|
||||
if (!this.field_184627_bm.func_190926_b()) {
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.onUseItemStop(this, field_184627_bm, this.func_184605_cv()))
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.onUseItemStop(this, field_184627_bm, this.func_184605_cv())) {
|
||||
+ ItemStack copy = this instanceof PlayerEntity ? field_184627_bm.func_77946_l() : null;
|
||||
this.field_184627_bm.func_77974_b(this.field_70170_p, this, this.func_184605_cv());
|
||||
+ if (copy != null && field_184627_bm.func_190926_b()) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem((PlayerEntity)this, copy, func_184600_cs());
|
||||
+ }
|
||||
if (this.field_184627_bm.func_222122_m()) {
|
||||
this.func_184608_ct();
|
||||
@@ -2687,16 +2736,16 @@
|
||||
}
|
||||
@@ -2687,16 +2747,16 @@
|
||||
|
||||
private boolean func_213359_p() {
|
||||
return this.func_213374_dv().map((p_213347_1_) -> {
|
||||
@@ -395,7 +430,7 @@
|
||||
BlockPos blockpos = p_213368_1_.func_177984_a();
|
||||
return new Vec3d((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.1D, (double)blockpos.func_177952_p() + 0.5D);
|
||||
});
|
||||
@@ -2711,8 +2760,13 @@
|
||||
@@ -2711,8 +2771,13 @@
|
||||
@Nullable
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public Direction func_213376_dz() {
|
||||
@@ -410,7 +445,7 @@
|
||||
}
|
||||
|
||||
public boolean func_70094_T() {
|
||||
@@ -2779,4 +2833,58 @@
|
||||
@@ -2779,4 +2844,58 @@
|
||||
public void func_213334_d(Hand p_213334_1_) {
|
||||
this.func_213361_c(p_213334_1_ == Hand.MAIN_HAND ? EquipmentSlotType.MAINHAND : EquipmentSlotType.OFFHAND);
|
||||
}
|
||||
|
||||
@@ -8,15 +8,7 @@
|
||||
}
|
||||
|
||||
public boolean func_213358_a(EntityType<?> p_213358_1_) {
|
||||
@@ -259,7 +260,6 @@
|
||||
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public void func_70103_a(byte p_70103_1_) {
|
||||
if (p_70103_1_ == 20) {
|
||||
this.func_70656_aK();
|
||||
@@ -458,7 +458,7 @@
|
||||
@@ -458,7 +459,7 @@
|
||||
public void func_70636_d() {
|
||||
super.func_70636_d();
|
||||
this.field_70170_p.func_217381_Z().func_76320_a("looting");
|
||||
@@ -25,7 +17,7 @@
|
||||
for(ItemEntity itementity : this.field_70170_p.func_217357_a(ItemEntity.class, this.func_174813_aQ().func_72314_b(1.0D, 0.0D, 1.0D))) {
|
||||
if (!itementity.field_70128_L && !itementity.func_92059_d().func_190926_b() && !itementity.func_174874_s()) {
|
||||
this.func_175445_a(itementity);
|
||||
@@ -548,6 +548,14 @@
|
||||
@@ -548,6 +549,14 @@
|
||||
protected void func_70623_bb() {
|
||||
if (!this.func_104002_bU() && !this.func_213392_I()) {
|
||||
Entity entity = this.field_70170_p.func_217362_a(this, -1.0D);
|
||||
@@ -40,7 +32,7 @@
|
||||
if (entity != null) {
|
||||
double d0 = entity.func_70068_e(this);
|
||||
if (d0 > 16384.0D && this.func_213397_c(d0)) {
|
||||
@@ -786,6 +794,8 @@
|
||||
@@ -786,6 +795,8 @@
|
||||
}
|
||||
|
||||
public static EquipmentSlotType func_184640_d(ItemStack p_184640_0_) {
|
||||
@@ -49,7 +41,7 @@
|
||||
Item item = p_184640_0_.func_77973_b();
|
||||
if (item != Blocks.field_196625_cS.func_199767_j() && (!(item instanceof BlockItem) || !(((BlockItem)item).func_179223_d() instanceof AbstractSkullBlock))) {
|
||||
if (item instanceof ArmorItem) {
|
||||
@@ -793,7 +803,7 @@
|
||||
@@ -793,7 +804,7 @@
|
||||
} else if (item == Items.field_185160_cR) {
|
||||
return EquipmentSlotType.CHEST;
|
||||
} else {
|
||||
@@ -58,7 +50,7 @@
|
||||
}
|
||||
} else {
|
||||
return EquipmentSlotType.HEAD;
|
||||
@@ -1173,10 +1183,10 @@
|
||||
@@ -1173,10 +1184,10 @@
|
||||
PlayerEntity playerentity = (PlayerEntity)p_70652_1_;
|
||||
ItemStack itemstack = this.func_184614_ca();
|
||||
ItemStack itemstack1 = playerentity.func_184587_cr() ? playerentity.func_184607_cu() : ItemStack.field_190927_a;
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@
|
||||
+ @Override public double getDragAir() { return dragAir; }
|
||||
+ @Override public void setDragAir(double value) { dragAir = value; }
|
||||
+ @Override
|
||||
+ public double getMaxSpeed() { //Non-default because getMaximumSpeed is protected
|
||||
+ public double getMaxSpeedWithRail() { //Non-default because getMaximumSpeed is protected
|
||||
+ if (!canUseRail()) return func_174898_m();
|
||||
+ BlockPos pos = this.getCurrentRailPosition();
|
||||
+ BlockState state = getMinecart().field_70170_p.func_180495_p(pos);
|
||||
|
||||
+6
-8
@@ -1,12 +1,10 @@
|
||||
--- a/net/minecraft/entity/item/minecart/ContainerMinecartEntity.java
|
||||
+++ b/net/minecraft/entity/item/minecart/ContainerMinecartEntity.java
|
||||
@@ -116,11 +116,17 @@
|
||||
@@ -115,12 +115,14 @@
|
||||
return super.func_212321_a(p_212321_1_);
|
||||
}
|
||||
|
||||
public void func_70106_y() {
|
||||
+ super.func_70106_y();
|
||||
+ }
|
||||
+
|
||||
- public void func_70106_y() {
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
if (!this.field_70170_p.field_72995_K && this.field_94112_b) {
|
||||
@@ -19,7 +17,7 @@
|
||||
}
|
||||
|
||||
protected void func_213281_b(CompoundNBT p_213281_1_) {
|
||||
@@ -149,6 +155,7 @@
|
||||
@@ -149,6 +151,7 @@
|
||||
}
|
||||
|
||||
public boolean func_184230_a(PlayerEntity p_184230_1_, Hand p_184230_2_) {
|
||||
@@ -27,7 +25,7 @@
|
||||
p_184230_1_.func_213829_a(this);
|
||||
return true;
|
||||
}
|
||||
@@ -168,6 +175,8 @@
|
||||
@@ -168,6 +171,8 @@
|
||||
LootTable loottable = this.field_70170_p.func_73046_m().func_200249_aQ().func_186521_a(this.field_184290_c);
|
||||
this.field_184290_c = null;
|
||||
LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld)this.field_70170_p)).func_216015_a(LootParameters.field_216286_f, new BlockPos(this)).func_216016_a(this.field_184291_d);
|
||||
@@ -36,7 +34,7 @@
|
||||
if (p_184288_1_ != null) {
|
||||
lootcontext$builder.func_186469_a(p_184288_1_.func_184817_da()).func_216015_a(LootParameters.field_216281_a, p_184288_1_);
|
||||
}
|
||||
@@ -198,4 +207,17 @@
|
||||
@@ -198,4 +203,17 @@
|
||||
}
|
||||
|
||||
protected abstract Container func_213968_a(int p_213968_1_, PlayerInventory p_213968_2_);
|
||||
|
||||
@@ -9,3 +9,12 @@
|
||||
if (this.func_70631_g_()) {
|
||||
this.func_213756_es();
|
||||
return super.func_184645_a(p_184645_1_, p_184645_2_);
|
||||
@@ -611,7 +611,7 @@
|
||||
});
|
||||
} else {
|
||||
VillagerProfession villagerprofession = this.func_213700_eh().func_221130_b();
|
||||
- ITextComponent itextcomponent1 = (new TranslationTextComponent(this.func_200600_R().func_210760_d() + '.' + Registry.field_218370_L.func_177774_c(villagerprofession).func_110623_a())).func_211710_a((p_213773_1_) -> {
|
||||
+ ITextComponent itextcomponent1 = (new TranslationTextComponent(this.func_200600_R().func_210760_d() + '.' + (!"minecraft".equals(villagerprofession.getRegistryName().func_110624_b()) ? villagerprofession.getRegistryName().func_110624_b() + '.' : "") + villagerprofession.getRegistryName().func_110623_a())).func_211710_a((p_213773_1_) -> {
|
||||
p_213773_1_.func_150209_a(this.func_174823_aP()).func_179989_a(this.func_189512_bd());
|
||||
});
|
||||
if (team != null) {
|
||||
@@ -17,7 +17,29 @@
|
||||
for(int j = 0; j < i * 8; ++j) {
|
||||
float f = this.field_70146_Z.nextFloat() * ((float)Math.PI * 2F);
|
||||
float f1 = this.field_70146_Z.nextFloat() * 0.5F + 0.5F;
|
||||
@@ -251,7 +252,7 @@
|
||||
@@ -170,9 +171,10 @@
|
||||
return (EntityType<? extends SlimeEntity>) super.func_200600_R();
|
||||
}
|
||||
|
||||
- public void func_70106_y() {
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
int i = this.func_70809_q();
|
||||
- if (!this.field_70170_p.field_72995_K && i > 1 && this.func_110143_aJ() <= 0.0F) {
|
||||
+ if (!this.field_70170_p.field_72995_K && i > 1 && this.func_110143_aJ() <= 0.0F && !this.field_70128_L) {
|
||||
int j = 2 + this.field_70146_Z.nextInt(3);
|
||||
|
||||
for(int k = 0; k < j; ++k) {
|
||||
@@ -193,7 +195,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- super.func_70106_y();
|
||||
+ super.remove(keepData);
|
||||
}
|
||||
|
||||
public void func_70108_f(Entity p_70108_1_) {
|
||||
@@ -251,7 +253,7 @@
|
||||
}
|
||||
|
||||
public static boolean func_223366_c(EntityType<SlimeEntity> p_223366_0_, IWorld p_223366_1_, SpawnReason p_223366_2_, BlockPos p_223366_3_, Random p_223366_4_) {
|
||||
@@ -26,7 +48,7 @@
|
||||
return false;
|
||||
} else {
|
||||
if (p_223366_1_.func_175659_aa() != Difficulty.PEACEFUL) {
|
||||
@@ -309,6 +310,12 @@
|
||||
@@ -309,6 +311,12 @@
|
||||
return super.func_213305_a(p_213305_1_).func_220313_a(0.255F * (float)this.func_70809_q());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/entity/passive/IronGolemEntity.java
|
||||
+++ b/net/minecraft/entity/passive/IronGolemEntity.java
|
||||
@@ -106,7 +106,7 @@
|
||||
int k = MathHelper.func_76128_c(this.field_70161_v);
|
||||
BlockState blockstate = this.field_70170_p.func_180495_p(new BlockPos(i, j, k));
|
||||
if (!blockstate.func_196958_f()) {
|
||||
- this.field_70170_p.func_195594_a(new BlockParticleData(ParticleTypes.field_197611_d, blockstate), this.field_70165_t + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.func_213311_cf(), this.func_174813_aQ().field_72338_b + 0.1D, this.field_70161_v + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.func_213311_cf(), 4.0D * ((double)this.field_70146_Z.nextFloat() - 0.5D), 0.5D, ((double)this.field_70146_Z.nextFloat() - 0.5D) * 4.0D);
|
||||
+ this.field_70170_p.func_195594_a(new BlockParticleData(ParticleTypes.field_197611_d, blockstate).setPos(new BlockPos(i, j, k)), this.field_70165_t + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.func_213311_cf(), this.func_174813_aQ().field_72338_b + 0.1D, this.field_70161_v + ((double)this.field_70146_Z.nextFloat() - 0.5D) * (double)this.func_213311_cf(), 4.0D * ((double)this.field_70146_Z.nextFloat() - 0.5D), 0.5D, ((double)this.field_70146_Z.nextFloat() - 0.5D) * 4.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,24 +173,21 @@
|
||||
this.func_190777_m(true);
|
||||
}
|
||||
|
||||
@@ -820,13 +867,15 @@
|
||||
@@ -820,11 +867,12 @@
|
||||
}
|
||||
|
||||
protected void func_184590_k(float p_184590_1_) {
|
||||
- if (p_184590_1_ >= 3.0F && this.field_184627_bm.func_77973_b() == Items.field_185159_cQ) {
|
||||
+ if (p_184590_1_ >= 3.0F && this.field_184627_bm.isShield(this)) {
|
||||
+ ItemStack copy = this.field_184627_bm.func_77946_l();
|
||||
int i = 1 + MathHelper.func_76141_d(p_184590_1_);
|
||||
Hand hand = this.func_184600_cs();
|
||||
this.field_184627_bm.func_222118_a(i, this, (p_213833_1_) -> {
|
||||
p_213833_1_.func_213334_d(hand);
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, this.field_184627_bm, hand);
|
||||
});
|
||||
if (this.field_184627_bm.func_190926_b()) {
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this, copy, hand);
|
||||
if (hand == Hand.MAIN_HAND) {
|
||||
this.func_184201_a(EquipmentSlotType.MAINHAND, ItemStack.field_190927_a);
|
||||
} else {
|
||||
@@ -842,11 +891,14 @@
|
||||
@@ -842,11 +890,14 @@
|
||||
|
||||
protected void func_70665_d(DamageSource p_70665_1_, float p_70665_2_) {
|
||||
if (!this.func_180431_b(p_70665_1_)) {
|
||||
@@ -205,7 +202,7 @@
|
||||
float f1 = f - p_70665_2_;
|
||||
if (f1 > 0.0F && f1 < 3.4028235E37F) {
|
||||
this.func_195067_a(Stats.field_212738_J, Math.round(f1 * 10.0F));
|
||||
@@ -901,6 +953,8 @@
|
||||
@@ -901,6 +952,8 @@
|
||||
|
||||
return ActionResultType.PASS;
|
||||
} else {
|
||||
@@ -214,7 +211,7 @@
|
||||
ItemStack itemstack = this.func_184586_b(p_190775_2_);
|
||||
ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l();
|
||||
if (p_190775_1_.func_184230_a(this, p_190775_2_)) {
|
||||
@@ -908,6 +962,9 @@
|
||||
@@ -908,6 +961,9 @@
|
||||
itemstack.func_190920_e(itemstack1.func_190916_E());
|
||||
}
|
||||
|
||||
@@ -224,7 +221,7 @@
|
||||
return ActionResultType.SUCCESS;
|
||||
} else {
|
||||
if (!itemstack.func_190926_b() && p_190775_1_ instanceof LivingEntity) {
|
||||
@@ -917,6 +974,7 @@
|
||||
@@ -917,6 +973,7 @@
|
||||
|
||||
if (itemstack.func_111282_a(this, (LivingEntity)p_190775_1_, p_190775_2_)) {
|
||||
if (itemstack.func_190926_b() && !this.field_71075_bZ.field_75098_d) {
|
||||
@@ -232,7 +229,7 @@
|
||||
this.func_184611_a(p_190775_2_, ItemStack.field_190927_a);
|
||||
}
|
||||
|
||||
@@ -943,6 +1001,7 @@
|
||||
@@ -943,6 +1000,7 @@
|
||||
}
|
||||
|
||||
public void func_71059_n(Entity p_71059_1_) {
|
||||
@@ -240,7 +237,7 @@
|
||||
if (p_71059_1_.func_70075_an()) {
|
||||
if (!p_71059_1_.func_85031_j(this)) {
|
||||
float f = (float)this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111126_e();
|
||||
@@ -970,8 +1029,10 @@
|
||||
@@ -970,8 +1028,10 @@
|
||||
|
||||
boolean flag2 = flag && this.field_70143_R > 0.0F && !this.field_70122_E && !this.func_70617_f_() && !this.func_70090_H() && !this.func_70644_a(Effects.field_76440_q) && !this.func_184218_aH() && p_71059_1_ instanceof LivingEntity;
|
||||
flag2 = flag2 && !this.func_70051_ag();
|
||||
@@ -252,7 +249,7 @@
|
||||
}
|
||||
|
||||
f = f + f1;
|
||||
@@ -1059,8 +1120,10 @@
|
||||
@@ -1059,8 +1119,10 @@
|
||||
}
|
||||
|
||||
if (!this.field_70170_p.field_72995_K && !itemstack1.func_190926_b() && entity instanceof LivingEntity) {
|
||||
@@ -263,7 +260,7 @@
|
||||
this.func_184611_a(Hand.MAIN_HAND, ItemStack.field_190927_a);
|
||||
}
|
||||
}
|
||||
@@ -1102,7 +1165,7 @@
|
||||
@@ -1102,7 +1164,7 @@
|
||||
}
|
||||
|
||||
if (this.field_70146_Z.nextFloat() < f) {
|
||||
@@ -272,6 +269,18 @@
|
||||
this.func_184602_cy();
|
||||
this.field_70170_p.func_72960_a(this, (byte)30);
|
||||
}
|
||||
@@ -1128,8 +1190,9 @@
|
||||
public void func_71004_bE() {
|
||||
}
|
||||
|
||||
- public void func_70106_y() {
|
||||
- super.func_70106_y();
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
+ super.remove(keepData);
|
||||
this.field_71069_bz.func_75134_a(this);
|
||||
if (this.field_71070_bA != null) {
|
||||
this.field_71070_bA.func_75134_a(this);
|
||||
@@ -1146,6 +1209,9 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -776,7 +778,7 @@
|
||||
@@ -776,11 +778,11 @@
|
||||
BlockPos blockpos = new BlockPos(i, j, k);
|
||||
if (this.field_70170_p.func_175667_e(blockpos)) {
|
||||
BlockState blockstate = this.field_70170_p.func_180495_p(blockpos);
|
||||
@@ -73,6 +73,11 @@
|
||||
BlockPos blockpos1 = blockpos.func_177977_b();
|
||||
BlockState blockstate1 = this.field_70170_p.func_180495_p(blockpos1);
|
||||
Block block = blockstate1.func_177230_c();
|
||||
- if (block.func_203417_a(BlockTags.field_219748_G) || block.func_203417_a(BlockTags.field_219757_z) || block instanceof FenceGateBlock) {
|
||||
+ if (blockstate.collisionExtendsVertically(this.field_70170_p, blockpos, this)) {
|
||||
blockpos = blockpos1;
|
||||
blockstate = blockstate1;
|
||||
}
|
||||
@@ -819,6 +821,7 @@
|
||||
this.field_71135_a.func_147359_a(new SOpenWindowPacket(container.field_75152_c, container.func_216957_a(), p_213829_1_.func_145748_c_()));
|
||||
container.func_75132_a(this);
|
||||
@@ -111,9 +116,9 @@
|
||||
+
|
||||
+ //Copy over a section of the Entity Data from the old player.
|
||||
+ //Allows mods to specify data that persists after players respawn.
|
||||
+ CompoundNBT old = p_193104_1_.getEntityData();
|
||||
+ CompoundNBT old = p_193104_1_.getPersistentData();
|
||||
+ if (old.func_74764_b(PERSISTED_NBT_TAG))
|
||||
+ getEntityData().func_218657_a(PERSISTED_NBT_TAG, old.func_74781_a(PERSISTED_NBT_TAG));
|
||||
+ getPersistentData().func_218657_a(PERSISTED_NBT_TAG, old.func_74781_a(PERSISTED_NBT_TAG));
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerClone(this, p_193104_1_, !p_193104_2_);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/entity/projectile/ArrowEntity.java
|
||||
+++ b/net/minecraft/entity/projectile/ArrowEntity.java
|
||||
@@ -59,7 +59,7 @@
|
||||
} else if (p_184555_1_.func_77973_b() == Items.field_151032_g) {
|
||||
this.field_184560_g = Potions.field_185229_a;
|
||||
this.field_184561_h.clear();
|
||||
- this.field_70180_af.func_187227_b(field_184559_f, -1);
|
||||
+ this.func_191507_d(-1); // Forge: fix MC-107941
|
||||
}
|
||||
|
||||
}
|
||||
@@ -62,3 +62,15 @@
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -416,8 +424,9 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- public void func_70106_y() {
|
||||
- super.func_70106_y();
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
+ super.remove(keepData);
|
||||
if (this.field_146042_b != null) {
|
||||
this.field_146042_b.field_71104_cf = null;
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final ObjectIntIdentityMap<IFluidState> field_207201_d = new ObjectIntIdentityMap<>();
|
||||
protected final StateContainer<Fluid, IFluidState> field_207202_e;
|
||||
private IFluidState field_207200_b;
|
||||
@@ -102,4 +102,10 @@
|
||||
@@ -102,4 +102,26 @@
|
||||
}
|
||||
|
||||
public abstract VoxelShape func_215664_b(IFluidState p_215664_1_, IBlockReader p_215664_2_, BlockPos p_215664_3_);
|
||||
@@ -18,5 +18,21 @@
|
||||
+ @Override
|
||||
+ public java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
|
||||
+ return reverseTags.getTagNames();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates the fluid attributes object, which will contain all the extended values for the fluid that aren't part of the vanilla system.
|
||||
+ * Do not call this from outside. To retrieve the values use {@link Fluid#getAttributes()}
|
||||
+ */
|
||||
+ protected net.minecraftforge.fluids.FluidAttributes createAttributes()
|
||||
+ {
|
||||
+ return net.minecraftforge.common.ForgeHooks.createVanillaFluidAttributes(this);
|
||||
+ }
|
||||
+
|
||||
+ private net.minecraftforge.fluids.FluidAttributes forgeFluidAttributes;
|
||||
+ public final net.minecraftforge.fluids.FluidAttributes getAttributes() {
|
||||
+ if (forgeFluidAttributes == null)
|
||||
+ forgeFluidAttributes = createAttributes();
|
||||
+ return forgeFluidAttributes;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/fluid/LavaFluid.java
|
||||
+++ b/net/minecraft/fluid/LavaFluid.java
|
||||
@@ -76,7 +76,7 @@
|
||||
BlockState blockstate = p_207186_1_.func_180495_p(blockpos);
|
||||
if (blockstate.func_196958_f()) {
|
||||
if (this.func_176369_e(p_207186_1_, blockpos)) {
|
||||
- p_207186_1_.func_175656_a(blockpos, Blocks.field_150480_ab.func_176223_P());
|
||||
+ p_207186_1_.func_175656_a(blockpos, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_207186_1_, blockpos, p_207186_2_, Blocks.field_150480_ab.func_176223_P()));
|
||||
return;
|
||||
}
|
||||
} else if (blockstate.func_185904_a().func_76230_c()) {
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
if (p_207186_1_.func_175623_d(blockpos1.func_177984_a()) && this.func_176368_m(p_207186_1_, blockpos1)) {
|
||||
- p_207186_1_.func_175656_a(blockpos1.func_177984_a(), Blocks.field_150480_ab.func_176223_P());
|
||||
+ p_207186_1_.func_175656_a(blockpos1.func_177984_a(), net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_207186_1_, blockpos1.func_177984_a(), p_207186_2_, Blocks.field_150480_ab.func_176223_P()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@
|
||||
IFluidState ifluidstate = p_205574_1_.func_204610_c(p_205574_2_);
|
||||
if (this.func_207185_a(FluidTags.field_206960_b) && ifluidstate.func_206884_a(FluidTags.field_206959_a)) {
|
||||
if (p_205574_3_.func_177230_c() instanceof FlowingFluidBlock) {
|
||||
- p_205574_1_.func_180501_a(p_205574_2_, Blocks.field_150348_b.func_176223_P(), 3);
|
||||
+ p_205574_1_.func_180501_a(p_205574_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_205574_1_, p_205574_2_, p_205574_2_, Blocks.field_150348_b.func_176223_P()), 3);
|
||||
}
|
||||
|
||||
this.func_205581_a(p_205574_1_, p_205574_2_);
|
||||
@@ -9,7 +9,7 @@
|
||||
world.func_184133_a(playerentity, blockpos, this.func_219983_a(blockstate1), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
itemstack.func_190918_g(1);
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -189,6 +189,10 @@
|
||||
@@ -189,10 +189,18 @@
|
||||
}
|
||||
|
||||
public Block func_179223_d() {
|
||||
@@ -20,3 +20,11 @@
|
||||
return this.field_150939_a;
|
||||
}
|
||||
|
||||
public void func_195946_a(Map<Block, Item> p_195946_1_, Item p_195946_2_) {
|
||||
p_195946_1_.put(this.func_179223_d(), p_195946_2_);
|
||||
}
|
||||
+
|
||||
+ public void removeFromBlockToItemMap(Map<Block, Item> blockToItemMap, Item itemIn) {
|
||||
+ blockToItemMap.remove(this.func_179223_d());
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,26 @@
|
||||
--- a/net/minecraft/item/BucketItem.java
|
||||
+++ b/net/minecraft/item/BucketItem.java
|
||||
@@ -38,6 +38,8 @@
|
||||
@@ -30,14 +30,28 @@
|
||||
public class BucketItem extends Item {
|
||||
private final Fluid field_77876_a;
|
||||
|
||||
+ // Forge: Use the other constructor that takes a Supplier
|
||||
+ @Deprecated
|
||||
public BucketItem(Fluid p_i49025_1_, Item.Properties p_i49025_2_) {
|
||||
super(p_i49025_2_);
|
||||
this.field_77876_a = p_i49025_1_;
|
||||
+ this.fluidSupplier = p_i49025_1_.delegate;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @param supplier A fluid supplier such as {@link net.minecraftforge.fml.RegistryObject<Fluid>}
|
||||
+ */
|
||||
+ public BucketItem(java.util.function.Supplier<? extends Fluid> supplier, Item.Properties builder) {
|
||||
+ super(builder);
|
||||
+ this.field_77876_a = null;
|
||||
+ this.fluidSupplier = supplier;
|
||||
+ }
|
||||
+
|
||||
public ActionResult<ItemStack> func_77659_a(World p_77659_1_, PlayerEntity p_77659_2_, Hand p_77659_3_) {
|
||||
ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_);
|
||||
RayTraceResult raytraceresult = func_219968_a(p_77659_1_, p_77659_2_, this.field_77876_a == Fluids.field_204541_a ? RayTraceContext.FluidMode.SOURCE_ONLY : RayTraceContext.FluidMode.NONE);
|
||||
@@ -9,8 +29,25 @@
|
||||
if (raytraceresult.func_216346_c() == RayTraceResult.Type.MISS) {
|
||||
return new ActionResult<>(ActionResultType.PASS, itemstack);
|
||||
} else if (raytraceresult.func_216346_c() != RayTraceResult.Type.BLOCK) {
|
||||
@@ -150,4 +152,12 @@
|
||||
SoundEvent soundevent = this.field_77876_a.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187627_L : SoundEvents.field_187624_K;
|
||||
@@ -52,7 +66,10 @@
|
||||
Fluid fluid = ((IBucketPickupHandler)blockstate1.func_177230_c()).func_204508_a(p_77659_1_, blockpos, blockstate1);
|
||||
if (fluid != Fluids.field_204541_a) {
|
||||
p_77659_2_.func_71029_a(Stats.field_75929_E.func_199076_b(this));
|
||||
- p_77659_2_.func_184185_a(fluid.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187633_N : SoundEvents.field_187630_M, 1.0F, 1.0F);
|
||||
+
|
||||
+ SoundEvent soundevent = this.field_77876_a.getAttributes().getEmptySound();
|
||||
+ if(soundevent == null) soundevent = fluid.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187633_N : SoundEvents.field_187630_M;
|
||||
+ p_77659_2_.func_184185_a(soundevent, 1.0F, 1.0F);
|
||||
ItemStack itemstack1 = this.func_150910_a(itemstack, p_77659_2_, fluid.func_204524_b());
|
||||
if (!p_77659_1_.field_72995_K) {
|
||||
CriteriaTriggers.field_204813_j.func_204817_a((ServerPlayerEntity)p_77659_2_, new ItemStack(fluid.func_204524_b()));
|
||||
@@ -147,7 +164,19 @@
|
||||
}
|
||||
|
||||
protected void func_203791_b(@Nullable PlayerEntity p_203791_1_, IWorld p_203791_2_, BlockPos p_203791_3_) {
|
||||
- SoundEvent soundevent = this.field_77876_a.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187627_L : SoundEvents.field_187624_K;
|
||||
+ SoundEvent soundevent = this.field_77876_a.getAttributes().getEmptySound();
|
||||
+ if(soundevent == null) soundevent = this.field_77876_a.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187627_L : SoundEvents.field_187624_K;
|
||||
p_203791_2_.func_184133_a(p_203791_1_, p_203791_3_, soundevent, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
+
|
||||
@@ -21,4 +58,7 @@
|
||||
+ else
|
||||
+ return super.initCapabilities(stack, nbt);
|
||||
+ }
|
||||
+
|
||||
+ private final java.util.function.Supplier<? extends Fluid> fluidSupplier;
|
||||
+ public Fluid getFluid() { return fluidSupplier.get(); }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/item/WallOrFloorItem.java
|
||||
+++ b/net/minecraft/item/WallOrFloorItem.java
|
||||
@@ -41,4 +41,9 @@
|
||||
super.func_195946_a(p_195946_1_, p_195946_2_);
|
||||
p_195946_1_.put(this.field_195947_b, p_195946_2_);
|
||||
}
|
||||
+
|
||||
+ public void removeFromBlockToItemMap(Map<Block, Item> blockToItemMap, Item itemIn) {
|
||||
+ super.removeFromBlockToItemMap(blockToItemMap, itemIn);
|
||||
+ blockToItemMap.remove(this.field_195947_b);
|
||||
+ }
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/AbstractCookingRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/AbstractCookingRecipe.java
|
||||
@@ -35,7 +35,6 @@
|
||||
return this.field_222143_e.func_77946_l();
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return true;
|
||||
}
|
||||
@@ -54,7 +53,6 @@
|
||||
return this.field_222143_e;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public String func_193358_e() {
|
||||
return this.field_222141_c;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/ArmorDyeRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/ArmorDyeRecipe.java
|
||||
@@ -74,7 +74,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/BannerDuplicateRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/BannerDuplicateRecipe.java
|
||||
@@ -79,8 +79,8 @@
|
||||
@@ -77,8 +77,8 @@
|
||||
for(int i = 0; i < nonnulllist.size(); ++i) {
|
||||
ItemStack itemstack = p_179532_1_.func_70301_a(i);
|
||||
if (!itemstack.func_190926_b()) {
|
||||
@@ -11,11 +11,3 @@
|
||||
} else if (itemstack.func_77942_o() && BannerTileEntity.func_175113_c(itemstack) > 0) {
|
||||
ItemStack itemstack1 = itemstack.func_77946_l();
|
||||
itemstack1.func_190920_e(1);
|
||||
@@ -96,7 +96,6 @@
|
||||
return IRecipeSerializer.field_222167_k;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/BlastingRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/BlastingRecipe.java
|
||||
@@ -11,7 +11,6 @@
|
||||
super(IRecipeType.field_222151_c, p_i50031_1_, p_i50031_2_, p_i50031_3_, p_i50031_4_, p_i50031_5_, p_i50031_6_);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_222128_h() {
|
||||
return new ItemStack(Blocks.field_222424_lM);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/BookCloningRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/BookCloningRecipe.java
|
||||
@@ -81,8 +81,8 @@
|
||||
@@ -79,8 +79,8 @@
|
||||
|
||||
for(int i = 0; i < nonnulllist.size(); ++i) {
|
||||
ItemStack itemstack = p_179532_1_.func_70301_a(i);
|
||||
@@ -11,11 +11,3 @@
|
||||
} else if (itemstack.func_77973_b() instanceof WrittenBookItem) {
|
||||
ItemStack itemstack1 = itemstack.func_77946_l();
|
||||
itemstack1.func_190920_e(1);
|
||||
@@ -98,7 +98,6 @@
|
||||
return IRecipeSerializer.field_222160_d;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ >= 3 && p_194133_2_ >= 3;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/CampfireCookingRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/CampfireCookingRecipe.java
|
||||
@@ -11,7 +11,6 @@
|
||||
super(IRecipeType.field_222153_e, p_i50030_1_, p_i50030_2_, p_i50030_3_, p_i50030_4_, p_i50030_5_, p_i50030_6_);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_222128_h() {
|
||||
return new ItemStack(Blocks.field_222433_lV);
|
||||
}
|
||||
@@ -9,3 +9,22 @@
|
||||
private final int field_222178_t;
|
||||
private final CookingRecipeSerializer.IFactory<T> field_222179_u;
|
||||
|
||||
@@ -21,11 +21,17 @@
|
||||
String s = JSONUtils.func_151219_a(p_199425_2_, "group", "");
|
||||
JsonElement jsonelement = (JsonElement)(JSONUtils.func_151202_d(p_199425_2_, "ingredient") ? JSONUtils.func_151214_t(p_199425_2_, "ingredient") : JSONUtils.func_152754_s(p_199425_2_, "ingredient"));
|
||||
Ingredient ingredient = Ingredient.func_199802_a(jsonelement);
|
||||
+ //Forge: Check if primitive string to keep vanilla or a object which can contain a count field.
|
||||
+ if (!p_199425_2_.has("result")) throw new com.google.gson.JsonSyntaxException("Missing result, expected to find a string or object");
|
||||
+ ItemStack itemstack;
|
||||
+ if (p_199425_2_.get("result").isJsonObject()) itemstack = ShapedRecipe.func_199798_a(JSONUtils.func_152754_s(p_199425_2_, "result"));
|
||||
+ else {
|
||||
String s1 = JSONUtils.func_151200_h(p_199425_2_, "result");
|
||||
ResourceLocation resourcelocation = new ResourceLocation(s1);
|
||||
- ItemStack itemstack = new ItemStack(Registry.field_212630_s.func_218349_b(resourcelocation).orElseThrow(() -> {
|
||||
+ itemstack = new ItemStack(Registry.field_212630_s.func_218349_b(resourcelocation).orElseThrow(() -> {
|
||||
return new IllegalStateException("Item: " + s1 + " does not exist");
|
||||
}));
|
||||
+ }
|
||||
float f = JSONUtils.func_151221_a(p_199425_2_, "experience", 0.0F);
|
||||
int i = JSONUtils.func_151208_a(p_199425_2_, "cookingtime", this.field_222178_t);
|
||||
return this.field_222179_u.create(p_199425_1_, s, ingredient, itemstack, f, i);
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/FireworkRocketRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/FireworkRocketRecipe.java
|
||||
@@ -74,7 +74,6 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/FireworkStarFadeRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/FireworkStarFadeRecipe.java
|
||||
@@ -68,7 +68,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/FireworkStarRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/FireworkStarRecipe.java
|
||||
@@ -111,7 +111,6 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/FurnaceRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/FurnaceRecipe.java
|
||||
@@ -11,7 +11,6 @@
|
||||
super(IRecipeType.field_222150_b, p_i48715_1_, p_i48715_2_, p_i48715_3_, p_i48715_4_, p_i48715_5_, p_i48715_6_);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_222128_h() {
|
||||
return new ItemStack(Blocks.field_150460_al);
|
||||
}
|
||||
@@ -1,16 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/IRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/IRecipe.java
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
ItemStack func_77572_b(C p_77572_1_);
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
- boolean func_194133_a(int p_194133_1_, int p_194133_2_);
|
||||
+ default boolean func_194133_a(int p_194133_1_, int p_194133_2_) { return true; }
|
||||
|
||||
ItemStack func_77571_b();
|
||||
|
||||
@@ -24,9 +23,9 @@
|
||||
@@ -21,9 +21,9 @@
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a);
|
||||
|
||||
for(int i = 0; i < nonnulllist.size(); ++i) {
|
||||
@@ -23,16 +13,3 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,12 +40,10 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
default String func_193358_e() {
|
||||
return "";
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
default ItemStack func_222128_h() {
|
||||
return new ItemStack(Blocks.field_150462_ai);
|
||||
}
|
||||
@@ -9,3 +9,11 @@
|
||||
IRecipeSerializer<ShapedRecipe> field_222157_a = func_222156_a("crafting_shaped", new ShapedRecipe.Serializer());
|
||||
IRecipeSerializer<ShapelessRecipe> field_222158_b = func_222156_a("crafting_shapeless", new ShapelessRecipe.Serializer());
|
||||
SpecialRecipeSerializer<ArmorDyeRecipe> field_222159_c = func_222156_a("crafting_special_armordye", new SpecialRecipeSerializer<>(ArmorDyeRecipe::new));
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
T func_199425_a_(ResourceLocation p_199425_1_, JsonObject p_199425_2_);
|
||||
|
||||
+ @javax.annotation.Nullable
|
||||
T func_199426_a_(ResourceLocation p_199426_1_, PacketBuffer p_199426_2_);
|
||||
|
||||
void func_199427_a_(PacketBuffer p_199427_1_, T p_199427_2_);
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/item/crafting/Ingredient.java
|
||||
+++ b/net/minecraft/item/crafting/Ingredient.java
|
||||
@@ -30,6 +30,12 @@
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@@ -28,6 +28,12 @@
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class Ingredient implements Predicate<ItemStack> {
|
||||
+ //Because Mojang caches things... we need to invalidate them.. so... here we go..
|
||||
@@ -13,7 +13,7 @@
|
||||
private static final Predicate<? super Ingredient.IItemList> field_209362_b = (p_209361_0_) -> {
|
||||
return !p_209361_0_.func_199799_a().stream().allMatch(ItemStack::func_190926_b);
|
||||
};
|
||||
@@ -37,14 +43,16 @@
|
||||
@@ -35,11 +41,14 @@
|
||||
private final Ingredient.IItemList[] field_199807_b;
|
||||
private ItemStack[] field_193371_b;
|
||||
private IntList field_194140_c;
|
||||
@@ -27,11 +27,8 @@
|
||||
+ Ingredient.INSTANCES.add(this);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public ItemStack[] func_193365_a() {
|
||||
this.func_199806_d();
|
||||
return this.field_193371_b;
|
||||
@@ -96,6 +104,10 @@
|
||||
@@ -93,6 +102,10 @@
|
||||
|
||||
public final void func_199564_a(PacketBuffer p_199564_1_) {
|
||||
this.func_199806_d();
|
||||
@@ -42,7 +39,7 @@
|
||||
p_199564_1_.func_150787_b(this.field_193371_b.length);
|
||||
|
||||
for(int i = 0; i < this.field_193371_b.length; ++i) {
|
||||
@@ -122,6 +134,25 @@
|
||||
@@ -119,6 +132,25 @@
|
||||
return this.field_199807_b.length == 0 && (this.field_193371_b == null || this.field_193371_b.length == 0) && (this.field_194140_c == null || this.field_194140_c.isEmpty());
|
||||
}
|
||||
|
||||
@@ -62,21 +59,13 @@
|
||||
+
|
||||
+ public net.minecraftforge.common.crafting.IIngredientSerializer<? extends Ingredient> getSerializer() {
|
||||
+ if (!isVanilla()) throw new IllegalStateException("Modderrs must implement Ingredient.getSerializer in their custom Ingredients: " + this);
|
||||
+ return net.minecraftforge.common.crafting.CraftingHelper.INGREDIENT_VANILLA;
|
||||
+ return net.minecraftforge.common.crafting.VanillaIngredientSerializer.INSTANCE;
|
||||
+ }
|
||||
+
|
||||
public static Ingredient func_209357_a(Stream<? extends Ingredient.IItemList> p_209357_0_) {
|
||||
Ingredient ingredient = new Ingredient(p_209357_0_);
|
||||
return ingredient.field_199807_b.length == 0 ? field_193370_a : ingredient;
|
||||
@@ -133,7 +164,6 @@
|
||||
}));
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static Ingredient func_193369_a(ItemStack... p_193369_0_) {
|
||||
return func_209357_a(Arrays.stream(p_193369_0_).map((p_209356_0_) -> {
|
||||
return new Ingredient.SingleItemList(p_209356_0_);
|
||||
@@ -146,6 +176,9 @@
|
||||
@@ -142,6 +174,9 @@
|
||||
|
||||
public static Ingredient func_199566_b(PacketBuffer p_199566_0_) {
|
||||
int i = p_199566_0_.func_150792_a();
|
||||
@@ -86,7 +75,7 @@
|
||||
return func_209357_a(Stream.generate(() -> {
|
||||
return new Ingredient.SingleItemList(p_199566_0_.func_150791_c());
|
||||
}).limit((long)i));
|
||||
@@ -153,6 +186,8 @@
|
||||
@@ -149,6 +184,8 @@
|
||||
|
||||
public static Ingredient func_199802_a(@Nullable JsonElement p_199802_0_) {
|
||||
if (p_199802_0_ != null && !p_199802_0_.isJsonNull()) {
|
||||
@@ -95,19 +84,7 @@
|
||||
if (p_199802_0_.isJsonObject()) {
|
||||
return func_209357_a(Stream.of(func_199803_a(p_199802_0_.getAsJsonObject())));
|
||||
} else if (p_199802_0_.isJsonArray()) {
|
||||
@@ -173,6 +208,11 @@
|
||||
}
|
||||
|
||||
public static Ingredient.IItemList func_199803_a(JsonObject p_199803_0_) {
|
||||
+ if (p_199803_0_.has("constant")) {
|
||||
+ Ingredient.IItemList ret = net.minecraftforge.common.crafting.CraftingHelper.getConstant(new ResourceLocation(JSONUtils.func_151200_h(p_199803_0_, "constant")));
|
||||
+ if (ret == null) throw new JsonSyntaxException("Ingredient referenced invalid constant: " + JSONUtils.func_151200_h(p_199803_0_, "constant"));
|
||||
+ return ret;
|
||||
+ }
|
||||
if (p_199803_0_.has("item") && p_199803_0_.has("tag")) {
|
||||
throw new JsonParseException("An ingredient entry is either a tag or an item, not both");
|
||||
} else if (p_199803_0_.has("item")) {
|
||||
@@ -194,6 +234,12 @@
|
||||
@@ -190,6 +227,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,3 +97,13 @@
|
||||
public interface IItemList {
|
||||
Collection<ItemStack> func_199799_a();
|
||||
|
||||
@@ -228,6 +271,9 @@
|
||||
list.add(new ItemStack(item));
|
||||
}
|
||||
|
||||
+ if (list.size() == 0 && !net.minecraftforge.common.ForgeConfig.SERVER.treatEmptyTagsAsAir.get()) {
|
||||
+ list.add(new ItemStack(net.minecraft.block.Blocks.field_180401_cv).func_200302_a(new net.minecraft.util.text.StringTextComponent("Empty Tag: " + field_199800_a.func_199886_b().toString())));
|
||||
+ }
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/MapCloningRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/MapCloningRecipe.java
|
||||
@@ -71,7 +71,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ >= 3 && p_194133_2_ >= 3;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/RecipeManager.java
|
||||
+++ b/net/minecraft/item/crafting/RecipeManager.java
|
||||
@@ -50,8 +50,13 @@
|
||||
@@ -50,9 +50,18 @@
|
||||
|
||||
for(Entry<ResourceLocation, JsonObject> entry : p_212853_1_.entrySet()) {
|
||||
ResourceLocation resourcelocation = entry.getKey();
|
||||
@@ -12,5 +12,10 @@
|
||||
+ continue;
|
||||
+ }
|
||||
IRecipe<?> irecipe = func_215377_a(resourcelocation, entry.getValue());
|
||||
+ if (irecipe == null) {
|
||||
+ field_199521_c.info("Skipping loading recipe {} as it's serializer returned null", resourcelocation);
|
||||
+ continue;
|
||||
+ }
|
||||
map.computeIfAbsent(irecipe.func_222127_g(), (p_223391_0_) -> {
|
||||
return ImmutableMap.builder();
|
||||
}).put(resourcelocation, irecipe);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/RepairItemRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/RepairItemRecipe.java
|
||||
@@ -24,7 +24,7 @@
|
||||
@@ -22,7 +22,7 @@
|
||||
list.add(itemstack);
|
||||
if (list.size() > 1) {
|
||||
ItemStack itemstack1 = list.get(0);
|
||||
@@ -9,7 +9,7 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@
|
||||
@@ -41,7 +41,7 @@
|
||||
list.add(itemstack);
|
||||
if (list.size() > 1) {
|
||||
ItemStack itemstack1 = list.get(0);
|
||||
@@ -18,7 +18,7 @@
|
||||
return ItemStack.field_190927_a;
|
||||
}
|
||||
}
|
||||
@@ -53,12 +53,12 @@
|
||||
@@ -51,12 +51,12 @@
|
||||
if (list.size() == 2) {
|
||||
ItemStack itemstack3 = list.get(0);
|
||||
ItemStack itemstack4 = list.get(1);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/item/crafting/ShapedRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/ShapedRecipe.java
|
||||
@@ -23,7 +23,20 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@@ -21,7 +21,20 @@
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
-public class ShapedRecipe implements ICraftingRecipe {
|
||||
+public class ShapedRecipe implements ICraftingRecipe, net.minecraftforge.common.crafting.IShapedRecipe<CraftingInventory> {
|
||||
@@ -22,23 +22,7 @@
|
||||
private final int field_77576_b;
|
||||
private final int field_77577_c;
|
||||
private final NonNullList<Ingredient> field_77574_d;
|
||||
@@ -48,7 +61,6 @@
|
||||
return IRecipeSerializer.field_222157_a;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public String func_193358_e() {
|
||||
return this.field_194137_e;
|
||||
}
|
||||
@@ -61,7 +73,6 @@
|
||||
return this.field_77574_d;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ >= this.field_77576_b && p_194133_2_ >= this.field_77577_c;
|
||||
}
|
||||
@@ -113,10 +124,20 @@
|
||||
@@ -109,10 +122,20 @@
|
||||
return this.field_77576_b;
|
||||
}
|
||||
|
||||
@@ -59,7 +43,7 @@
|
||||
private static NonNullList<Ingredient> func_192402_a(String[] p_192402_0_, Map<String, Ingredient> p_192402_1_, int p_192402_2_, int p_192402_3_) {
|
||||
NonNullList<Ingredient> nonnulllist = NonNullList.func_191197_a(p_192402_2_ * p_192402_3_, Ingredient.field_193370_a);
|
||||
Set<String> set = Sets.newHashSet(p_192402_1_.keySet());
|
||||
@@ -198,15 +219,15 @@
|
||||
@@ -194,15 +217,15 @@
|
||||
|
||||
private static String[] func_192407_a(JsonArray p_192407_0_) {
|
||||
String[] astring = new String[p_192407_0_.size()];
|
||||
@@ -79,7 +63,7 @@
|
||||
}
|
||||
|
||||
if (i > 0 && astring[0].length() != s.length()) {
|
||||
@@ -248,11 +269,12 @@
|
||||
@@ -244,11 +267,12 @@
|
||||
throw new JsonParseException("Disallowed data tag found");
|
||||
} else {
|
||||
int i = JSONUtils.func_151208_a(p_199798_0_, "count", 1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/ShapelessRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/ShapelessRecipe.java
|
||||
@@ -19,12 +19,14 @@
|
||||
@@ -17,12 +17,14 @@
|
||||
private final String field_194138_c;
|
||||
private final ItemStack field_77580_a;
|
||||
private final NonNullList<Ingredient> field_77579_b;
|
||||
@@ -15,15 +15,7 @@
|
||||
}
|
||||
|
||||
public ResourceLocation func_199560_c() {
|
||||
@@ -35,7 +37,6 @@
|
||||
return IRecipeSerializer.field_222158_b;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public String func_193358_e() {
|
||||
return this.field_194138_c;
|
||||
}
|
||||
@@ -50,36 +51,39 @@
|
||||
@@ -47,17 +49,20 @@
|
||||
|
||||
public boolean func_77569_a(CraftingInventory p_77569_1_, World p_77569_2_) {
|
||||
RecipeItemHelper recipeitemhelper = new RecipeItemHelper();
|
||||
@@ -45,16 +37,12 @@
|
||||
}
|
||||
|
||||
public ItemStack func_77572_b(CraftingInventory p_77572_1_) {
|
||||
return this.field_77580_a.func_77946_l();
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
@@ -68,14 +73,15 @@
|
||||
return p_194133_1_ * p_194133_2_ >= this.field_77579_b.size();
|
||||
}
|
||||
|
||||
- public static class Serializer implements IRecipeSerializer<ShapelessRecipe> {
|
||||
+ public static class Serializer extends net.minecraftforge.registries.ForgeRegistryEntry<IRecipeSerializer<?>> implements IRecipeSerializer<ShapelessRecipe> {
|
||||
+ public static class Serializer extends net.minecraftforge.registries.ForgeRegistryEntry<IRecipeSerializer<?>> implements IRecipeSerializer<ShapelessRecipe> {
|
||||
+ private static final ResourceLocation NAME = new ResourceLocation("minecraft", "crafting_shapeless");
|
||||
public ShapelessRecipe func_199425_a_(ResourceLocation p_199425_1_, JsonObject p_199425_2_) {
|
||||
String s = JSONUtils.func_151219_a(p_199425_2_, "group", "");
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/ShieldRecipes.java
|
||||
+++ b/net/minecraft/item/crafting/ShieldRecipes.java
|
||||
@@ -79,7 +79,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/ShulkerBoxColoringRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/ShulkerBoxColoringRecipe.java
|
||||
@@ -27,7 +27,7 @@
|
||||
@@ -25,7 +25,7 @@
|
||||
if (Block.func_149634_a(itemstack.func_77973_b()) instanceof ShulkerBoxBlock) {
|
||||
++i;
|
||||
} else {
|
||||
@@ -9,7 +9,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
public ItemStack func_77572_b(CraftingInventory p_77572_1_) {
|
||||
ItemStack itemstack = ItemStack.field_190927_a;
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
for(int i = 0; i < p_77572_1_.func_70302_i_(); ++i) {
|
||||
ItemStack itemstack1 = p_77572_1_.func_70301_a(i);
|
||||
@@ -53,13 +53,14 @@
|
||||
@@ -51,13 +51,14 @@
|
||||
Item item = itemstack1.func_77973_b();
|
||||
if (Block.func_149634_a(item) instanceof ShulkerBoxBlock) {
|
||||
itemstack = itemstack1;
|
||||
@@ -36,11 +36,3 @@
|
||||
if (itemstack.func_77942_o()) {
|
||||
itemstack2.func_77982_d(itemstack.func_77978_p().func_74737_b());
|
||||
}
|
||||
@@ -67,7 +68,6 @@
|
||||
return itemstack2;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ * p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/item/crafting/SingleItemRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/SingleItemRecipe.java
|
||||
@@ -64,7 +64,7 @@
|
||||
@@ -60,7 +60,7 @@
|
||||
return this.field_222132_b.func_77946_l();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/SmokingRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/SmokingRecipe.java
|
||||
@@ -11,7 +11,6 @@
|
||||
super(IRecipeType.field_222152_d, p_i50022_1_, p_i50022_2_, p_i50022_3_, p_i50022_4_, p_i50022_5_, p_i50022_6_);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_222128_h() {
|
||||
return new ItemStack(Blocks.field_222423_lL);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/StonecuttingRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/StonecuttingRecipe.java
|
||||
@@ -17,7 +17,6 @@
|
||||
return this.field_222131_a.test(p_77569_1_.func_70301_a(0));
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public ItemStack func_222128_h() {
|
||||
return new ItemStack(Blocks.field_222430_lS);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/SuspiciousStewRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/SuspiciousStewRecipe.java
|
||||
@@ -68,7 +68,6 @@
|
||||
return itemstack2;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ >= 2 && p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/item/crafting/TippedArrowRecipe.java
|
||||
+++ b/net/minecraft/item/crafting/TippedArrowRecipe.java
|
||||
@@ -53,7 +53,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
|
||||
return p_194133_1_ >= 2 && p_194133_2_ >= 2;
|
||||
}
|
||||
@@ -1,30 +1,6 @@
|
||||
--- a/net/minecraft/nbt/CompressedStreamTools.java
|
||||
+++ b/net/minecraft/nbt/CompressedStreamTools.java
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static void func_74793_a(CompoundNBT p_74793_0_, File p_74793_1_) throws IOException {
|
||||
File file1 = new File(p_74793_1_.getAbsolutePath() + "_tmp");
|
||||
if (file1.exists()) {
|
||||
@@ -57,7 +56,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static void func_74795_b(CompoundNBT p_74795_0_, File p_74795_1_) throws IOException {
|
||||
DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(p_74795_1_));
|
||||
|
||||
@@ -70,7 +68,6 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static CompoundNBT func_74797_a(File p_74797_0_) throws IOException {
|
||||
if (!p_74797_0_.exists()) {
|
||||
return null;
|
||||
@@ -115,10 +112,12 @@
|
||||
@@ -110,10 +110,12 @@
|
||||
|
||||
private static INBT func_152455_a(DataInput p_152455_0_, int p_152455_1_, NBTSizeTracker p_152455_2_) throws IOException {
|
||||
byte b0 = p_152455_0_.readByte();
|
||||
|
||||
@@ -16,6 +16,15 @@
|
||||
|
||||
try {
|
||||
this.func_150723_a(ProtocolType.HANDSHAKING);
|
||||
@@ -173,7 +175,7 @@
|
||||
++this.field_211395_r;
|
||||
if (protocoltype1 != protocoltype) {
|
||||
field_150735_g.debug("Disabled auto read");
|
||||
- this.field_150746_k.config().setAutoRead(false);
|
||||
+ this.field_150746_k.eventLoop().execute(()->this.field_150746_k.config().setAutoRead(false));
|
||||
}
|
||||
|
||||
if (this.field_150746_k.eventLoop().inEventLoop()) {
|
||||
@@ -257,7 +259,9 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/network/play/server/SCommandListPacket.java
|
||||
+++ b/net/minecraft/network/play/server/SCommandListPacket.java
|
||||
@@ -110,6 +110,9 @@
|
||||
String s = p_197695_1_.func_150789_c(32767);
|
||||
ArgumentType<?> argumenttype = ArgumentTypes.func_197486_a(p_197695_1_);
|
||||
if (argumenttype == null) {
|
||||
+ if ((p_197695_2_ & 16) != 0) { // FORGE: Flush unused suggestion data
|
||||
+ p_197695_1_.func_192575_l();
|
||||
+ }
|
||||
return null;
|
||||
} else {
|
||||
RequiredArgumentBuilder<ISuggestionProvider, ?> requiredargumentbuilder = RequiredArgumentBuilder.argument(s, argumenttype);
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/particles/BlockParticleData.java
|
||||
+++ b/net/minecraft/particles/BlockParticleData.java
|
||||
@@ -45,4 +45,15 @@
|
||||
public BlockState func_197584_c() {
|
||||
return this.field_197587_c;
|
||||
}
|
||||
+
|
||||
+ //FORGE: Add a source pos property, so we can provide models with additional model data
|
||||
+ private net.minecraft.util.math.BlockPos pos;
|
||||
+ public BlockParticleData setPos(net.minecraft.util.math.BlockPos pos) {
|
||||
+ this.pos = pos;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraft.util.math.BlockPos getPos() {
|
||||
+ return pos;
|
||||
+ }
|
||||
}
|
||||
@@ -1,35 +1,11 @@
|
||||
--- a/net/minecraft/potion/Effect.java
|
||||
+++ b/net/minecraft/potion/Effect.java
|
||||
@@ -20,7 +20,7 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@@ -18,7 +18,7 @@
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
|
||||
-public class Effect {
|
||||
+public class Effect extends net.minecraftforge.registries.ForgeRegistryEntry<Effect> implements net.minecraftforge.common.extensions.IForgeEffect {
|
||||
private final Map<IAttribute, AttributeModifier> field_111188_I = Maps.newHashMap();
|
||||
private final EffectType field_220305_b;
|
||||
private final int field_76414_N;
|
||||
@@ -134,7 +134,6 @@
|
||||
return new TranslationTextComponent(this.func_76393_a());
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public EffectType func_220303_e() {
|
||||
return this.field_220305_b;
|
||||
}
|
||||
@@ -149,7 +148,6 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public Map<IAttribute, AttributeModifier> func_111186_k() {
|
||||
return this.field_111188_I;
|
||||
}
|
||||
@@ -180,7 +178,6 @@
|
||||
return p_111183_2_.func_111164_d() * (double)(p_111183_1_ + 1);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_188408_i() {
|
||||
return this.field_220305_b == EffectType.BENEFICIAL;
|
||||
}
|
||||
@@ -17,18 +17,16 @@
|
||||
}
|
||||
|
||||
public boolean func_199308_a(EffectInstance p_199308_1_) {
|
||||
@@ -88,6 +89,10 @@
|
||||
@@ -88,7 +89,7 @@
|
||||
}
|
||||
|
||||
public Effect func_188419_a() {
|
||||
+ return this.getPotionRaw() == null ? null : this.getPotionRaw().delegate.get();
|
||||
+ }
|
||||
+
|
||||
+ private Effect getPotionRaw() {
|
||||
return this.field_188420_b;
|
||||
- return this.field_188420_b;
|
||||
+ return this.field_188420_b == null ? null : this.field_188420_b.delegate.get();
|
||||
}
|
||||
|
||||
@@ -188,11 +193,12 @@
|
||||
public int func_76459_b() {
|
||||
@@ -188,11 +189,12 @@
|
||||
p_82719_1_.func_74757_a("Ambient", this.func_82720_e());
|
||||
p_82719_1_.func_74757_a("ShowParticles", this.func_188418_e());
|
||||
p_82719_1_.func_74757_a("ShowIcon", this.func_205348_f());
|
||||
@@ -42,7 +40,7 @@
|
||||
Effect effect = Effect.func_188412_a(i);
|
||||
if (effect == null) {
|
||||
return null;
|
||||
@@ -210,7 +216,7 @@
|
||||
@@ -210,7 +212,7 @@
|
||||
flag2 = p_82722_0_.func_74767_n("ShowIcon");
|
||||
}
|
||||
|
||||
@@ -51,7 +49,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,6 +232,32 @@
|
||||
@@ -226,6 +228,32 @@
|
||||
|
||||
public int compareTo(EffectInstance p_compareTo_1_) {
|
||||
int i = 32147;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/potion/EffectType.java
|
||||
+++ b/net/minecraft/potion/EffectType.java
|
||||
@@ -15,7 +15,6 @@
|
||||
this.field_220307_d = p_i50390_3_;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public TextFormatting func_220306_a() {
|
||||
return this.field_220307_d;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
--- a/net/minecraft/resources/FallbackResourceManager.java
|
||||
+++ b/net/minecraft/resources/FallbackResourceManager.java
|
||||
@@ -30,7 +30,6 @@
|
||||
this.field_199023_a.add(p_199021_1_);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public Set<String> func_199001_a() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
@@ -59,7 +58,6 @@
|
||||
throw new FileNotFoundException(p_199002_1_.toString());
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_219533_b(ResourceLocation p_219533_1_) {
|
||||
if (!this.func_219541_f(p_219533_1_)) {
|
||||
return false;
|
||||
@@ -1,21 +0,0 @@
|
||||
--- a/net/minecraft/resources/IResourceManager.java
|
||||
+++ b/net/minecraft/resources/IResourceManager.java
|
||||
@@ -10,18 +10,15 @@
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public interface IResourceManager {
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
Set<String> func_199001_a();
|
||||
|
||||
IResource func_199002_a(ResourceLocation p_199002_1_) throws IOException;
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
boolean func_219533_b(ResourceLocation p_219533_1_);
|
||||
|
||||
List<IResource> func_199004_b(ResourceLocation p_199004_1_) throws IOException;
|
||||
|
||||
Collection<ResourceLocation> func_199003_a(String p_199003_1_, Predicate<String> p_199003_2_);
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
void func_199021_a(IResourcePack p_199021_1_);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
--- a/net/minecraft/resources/SimpleReloadableResourceManager.java
|
||||
+++ b/net/minecraft/resources/SimpleReloadableResourceManager.java
|
||||
@@ -50,7 +50,6 @@
|
||||
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public Set<String> func_199001_a() {
|
||||
return this.field_199016_e;
|
||||
}
|
||||
@@ -64,7 +63,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public boolean func_219533_b(ResourceLocation p_219533_1_) {
|
||||
IResourceManager iresourcemanager = this.field_199014_c.get(p_219533_1_.func_110624_b());
|
||||
return iresourcemanager != null ? iresourcemanager.func_219533_b(p_219533_1_) : false;
|
||||
@@ -118,7 +116,6 @@
|
||||
return iasyncreloader;
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public IAsyncReloader func_219535_a(Executor p_219535_1_, Executor p_219535_2_, CompletableFuture<Unit> p_219535_3_) {
|
||||
return this.func_219538_b(p_219535_1_, p_219535_2_, this.field_219539_d, p_219535_3_);
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
WorldInfo worldinfo = savehandler.func_75757_d();
|
||||
WorldSettings worldsettings;
|
||||
if (worldinfo == null) {
|
||||
@@ -347,7 +349,6 @@
|
||||
@@ -347,13 +349,13 @@
|
||||
}
|
||||
|
||||
this.func_195560_a(savehandler.func_75765_b(), worldinfo);
|
||||
@@ -26,7 +26,14 @@
|
||||
this.func_213194_a(savehandler, worldinfo, worldsettings, ichunkstatuslistener);
|
||||
this.func_147139_a(this.func_147135_j(), true);
|
||||
this.func_213186_a(ichunkstatuslistener);
|
||||
@@ -395,6 +396,7 @@
|
||||
}
|
||||
|
||||
protected void func_213194_a(SaveHandler p_213194_1_, WorldInfo p_213194_2_, WorldSettings p_213194_3_, IChunkStatusListener p_213194_4_) {
|
||||
+ net.minecraftforge.common.DimensionManager.fireRegister();
|
||||
if (this.func_71242_L()) {
|
||||
p_213194_2_.func_176127_a(field_213219_c);
|
||||
}
|
||||
@@ -395,6 +397,7 @@
|
||||
if (dimensiontype != DimensionType.field_223227_a_) {
|
||||
this.field_71305_c.put(dimensiontype, new ServerMultiWorld(serverworld1, this, this.field_213217_au, p_213194_1_, dimensiontype, this.field_71304_b, p_213194_4_));
|
||||
}
|
||||
@@ -34,7 +41,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -552,6 +554,7 @@
|
||||
@@ -552,6 +555,7 @@
|
||||
for(ServerWorld serverworld1 : this.func_212370_w()) {
|
||||
if (serverworld1 != null) {
|
||||
try {
|
||||
@@ -42,7 +49,7 @@
|
||||
serverworld1.close();
|
||||
} catch (IOException ioexception) {
|
||||
field_147145_h.error("Exception closing the level", (Throwable)ioexception);
|
||||
@@ -592,6 +595,7 @@
|
||||
@@ -592,6 +596,7 @@
|
||||
public void run() {
|
||||
try {
|
||||
if (this.func_71197_b()) {
|
||||
@@ -50,7 +57,7 @@
|
||||
this.field_211151_aa = Util.func_211177_b();
|
||||
this.field_147147_p.func_151315_a(new StringTextComponent(this.field_71286_C));
|
||||
this.field_147147_p.func_151321_a(new ServerStatusResponse.Version(SharedConstants.func_215069_a().getName(), SharedConstants.func_215069_a().getProtocolVersion()));
|
||||
@@ -623,9 +627,15 @@
|
||||
@@ -623,9 +628,15 @@
|
||||
this.field_71304_b.func_219897_b();
|
||||
this.field_71296_Q = true;
|
||||
}
|
||||
@@ -66,7 +73,7 @@
|
||||
} catch (Throwable throwable1) {
|
||||
field_147145_h.error("Encountered an unexpected exception", throwable1);
|
||||
CrashReport crashreport;
|
||||
@@ -642,6 +652,7 @@
|
||||
@@ -642,6 +653,7 @@
|
||||
field_147145_h.error("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
@@ -74,7 +81,7 @@
|
||||
this.func_71228_a(crashreport);
|
||||
} finally {
|
||||
try {
|
||||
@@ -650,6 +661,7 @@
|
||||
@@ -650,6 +662,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
field_147145_h.error("Exception stopping the server", throwable);
|
||||
} finally {
|
||||
@@ -82,7 +89,7 @@
|
||||
this.func_71240_o();
|
||||
}
|
||||
|
||||
@@ -746,6 +758,7 @@
|
||||
@@ -746,6 +759,7 @@
|
||||
|
||||
protected void func_71217_p(BooleanSupplier p_71217_1_) {
|
||||
long i = Util.func_211178_c();
|
||||
@@ -90,7 +97,7 @@
|
||||
++this.field_71315_w;
|
||||
this.func_71190_q(p_71217_1_);
|
||||
if (i - this.field_147142_T >= 5000000000L) {
|
||||
@@ -760,6 +773,7 @@
|
||||
@@ -760,6 +774,7 @@
|
||||
|
||||
Collections.shuffle(Arrays.asList(agameprofile));
|
||||
this.field_147147_p.func_151318_b().func_151330_a(agameprofile);
|
||||
@@ -98,7 +105,7 @@
|
||||
}
|
||||
|
||||
if (this.field_71315_w % 6000 == 0) {
|
||||
@@ -787,6 +801,7 @@
|
||||
@@ -787,6 +802,7 @@
|
||||
long i1 = Util.func_211178_c();
|
||||
this.field_213215_ap.func_181747_a(i1 - i);
|
||||
this.field_71304_b.func_76319_b();
|
||||
@@ -106,7 +113,7 @@
|
||||
}
|
||||
|
||||
protected void func_71190_q(BooleanSupplier p_71190_1_) {
|
||||
@@ -794,7 +809,8 @@
|
||||
@@ -794,7 +810,8 @@
|
||||
this.func_193030_aL().func_73660_a();
|
||||
this.field_71304_b.func_219895_b("levels");
|
||||
|
||||
@@ -116,7 +123,7 @@
|
||||
if (serverworld.field_73011_w.func_186058_p() == DimensionType.field_223227_a_ || this.func_71255_r()) {
|
||||
this.field_71304_b.func_194340_a(() -> {
|
||||
return serverworld.func_72912_H().func_76065_j() + " " + Registry.field_212622_k.func_177774_c(serverworld.field_73011_w.func_186058_p());
|
||||
@@ -806,6 +822,7 @@
|
||||
@@ -806,6 +823,7 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_76320_a("tick");
|
||||
@@ -124,7 +131,7 @@
|
||||
|
||||
try {
|
||||
serverworld.func_72835_b(p_71190_1_);
|
||||
@@ -814,12 +831,16 @@
|
||||
@@ -814,12 +832,16 @@
|
||||
serverworld.func_72914_a(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
@@ -133,7 +140,7 @@
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76319_b();
|
||||
}
|
||||
+ tickTimes.computeIfAbsent(serverworld.func_201675_m().func_186058_p(), k -> new long[100])[this.field_71315_w % 100] = Util.func_211178_c() - tickStart;
|
||||
+ perWorldTickTimes.computeIfAbsent(serverworld.func_201675_m().func_186058_p(), k -> new long[100])[this.field_71315_w % 100] = Util.func_211178_c() - tickStart;
|
||||
}
|
||||
|
||||
+ this.field_71304_b.func_219895_b("dim_unloading");
|
||||
@@ -141,7 +148,7 @@
|
||||
this.field_71304_b.func_219895_b("connection");
|
||||
this.func_147137_ag().func_151269_c();
|
||||
this.field_71304_b.func_219895_b("players");
|
||||
@@ -856,6 +877,7 @@
|
||||
@@ -856,6 +878,7 @@
|
||||
OptionSpec<Integer> optionspec10 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1);
|
||||
OptionSpec<String> optionspec11 = optionparser.accepts("serverId").withRequiredArg();
|
||||
OptionSpec<String> optionspec12 = optionparser.nonOptions();
|
||||
@@ -149,7 +156,18 @@
|
||||
|
||||
try {
|
||||
OptionSet optionset = optionparser.parse(p_main_0_);
|
||||
@@ -948,7 +970,7 @@
|
||||
@@ -887,6 +910,10 @@
|
||||
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
|
||||
PlayerProfileCache playerprofilecache = new PlayerProfileCache(gameprofilerepository, new File(s, field_152367_a.getName()));
|
||||
String s1 = Optional.ofNullable(optionset.valueOf(optionspec9)).orElse(serverpropertiesprovider.func_219034_a().field_219021_o);
|
||||
+ if (s1 == null || s1.isEmpty() || new File(s, s1).getAbsolutePath().equals(new File(s).getAbsolutePath())) {
|
||||
+ field_147145_h.error("Invalid world directory specified, must not be null, empty or the same directory as your universe! " + s1);
|
||||
+ return;
|
||||
+ }
|
||||
final DedicatedServer dedicatedserver = new DedicatedServer(new File(s), serverpropertiesprovider, DataFixesManager.func_210901_a(), yggdrasilauthenticationservice, minecraftsessionservice, gameprofilerepository, playerprofilecache, LoggingChunkStatusListener::new, s1);
|
||||
dedicatedserver.func_71224_l(optionset.valueOf(optionspec7));
|
||||
dedicatedserver.func_71208_b(optionset.valueOf(optionspec10));
|
||||
@@ -948,7 +975,7 @@
|
||||
}
|
||||
|
||||
public ServerWorld func_71218_a(DimensionType p_71218_1_) {
|
||||
@@ -158,7 +176,7 @@
|
||||
}
|
||||
|
||||
public Iterable<ServerWorld> func_212370_w() {
|
||||
@@ -987,7 +1009,7 @@
|
||||
@@ -987,7 +1014,7 @@
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
@@ -167,14 +185,14 @@
|
||||
}
|
||||
|
||||
public CrashReport func_71230_b(CrashReport p_71230_1_) {
|
||||
@@ -1529,6 +1551,31 @@
|
||||
@@ -1529,6 +1556,31 @@
|
||||
|
||||
public abstract boolean func_213199_b(GameProfile p_213199_1_);
|
||||
|
||||
+ private Map<DimensionType, long[]> tickTimes = Maps.newIdentityHashMap();
|
||||
+ private Map<DimensionType, long[]> perWorldTickTimes = Maps.newIdentityHashMap();
|
||||
+ @Nullable
|
||||
+ public long[] getTickTime(DimensionType dim) {
|
||||
+ return tickTimes.get(dim);
|
||||
+ return perWorldTickTimes.get(dim);
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated //Forge Internal use Only, You can screw up a lot of things if you mess with this map.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/dedicated/PropertyManager.java
|
||||
+++ b/net/minecraft/server/dedicated/PropertyManager.java
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
public void func_218970_c(Path p_218970_1_) {
|
||||
try (OutputStream outputstream = Files.newOutputStream(p_218970_1_)) {
|
||||
- this.field_73672_b.store(outputstream, "Minecraft server properties");
|
||||
+ net.minecraftforge.common.util.SortedProperties.store(field_73672_b, outputstream, "Minecraft server properties");
|
||||
} catch (IOException var15) {
|
||||
field_164440_a.error("Failed to store properties to file: " + p_218970_1_);
|
||||
}
|
||||
+100
-2
@@ -18,23 +18,30 @@
|
||||
this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, -1);
|
||||
this.field_73094_o = -1;
|
||||
this.field_73088_d = false;
|
||||
@@ -115,7 +115,9 @@
|
||||
@@ -115,7 +115,15 @@
|
||||
double d1 = this.field_73090_b.field_70163_u - ((double)p_225416_1_.func_177956_o() + 0.5D) + 1.5D;
|
||||
double d2 = this.field_73090_b.field_70161_v - ((double)p_225416_1_.func_177952_p() + 0.5D);
|
||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||
- if (d3 > 36.0D) {
|
||||
+ double dist = field_73090_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 1;
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(field_73090_b, p_225416_1_, p_225416_3_);
|
||||
+ if (event.isCanceled() || (!this.func_73083_d() && event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY)) { // Restore block and te data
|
||||
+ field_73090_b.field_71135_a.func_147359_a(new SPlayerDiggingPacket(p_225416_1_, field_73092_a.func_180495_p(p_225416_1_), p_225416_2_, false));
|
||||
+ field_73092_a.func_184138_a(p_225416_1_, field_73092_a.func_180495_p(p_225416_1_), field_73092_a.func_180495_p(p_225416_1_), 3);
|
||||
+ return;
|
||||
+ }
|
||||
+ dist *= dist;
|
||||
+ if (d3 > dist) {
|
||||
this.field_73090_b.field_71135_a.func_147359_a(new SPlayerDiggingPacket(p_225416_1_, this.field_73092_a.func_180495_p(p_225416_1_), p_225416_2_, false));
|
||||
} else if (p_225416_1_.func_177956_o() >= p_225416_4_) {
|
||||
this.field_73090_b.field_71135_a.func_147359_a(new SPlayerDiggingPacket(p_225416_1_, this.field_73092_a.func_180495_p(p_225416_1_), p_225416_2_, false));
|
||||
@@ -145,12 +147,12 @@
|
||||
@@ -145,12 +153,13 @@
|
||||
this.field_73089_e = this.field_73100_i;
|
||||
float f = 1.0F;
|
||||
BlockState blockstate = this.field_73092_a.func_180495_p(p_225416_1_);
|
||||
- if (!blockstate.func_196958_f()) {
|
||||
+ if (!blockstate.isAir(field_73092_a, p_225416_1_)) {
|
||||
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY)
|
||||
blockstate.func_196942_a(this.field_73092_a, p_225416_1_, this.field_73090_b);
|
||||
f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_225416_1_);
|
||||
}
|
||||
@@ -44,3 +51,94 @@
|
||||
this.func_225415_a(p_225416_1_, p_225416_2_);
|
||||
} else {
|
||||
this.field_73088_d = true;
|
||||
@@ -203,7 +212,8 @@
|
||||
|
||||
public boolean func_180237_b(BlockPos p_180237_1_) {
|
||||
BlockState blockstate = this.field_73092_a.func_180495_p(p_180237_1_);
|
||||
- if (!this.field_73090_b.func_184614_ca().func_77973_b().func_195938_a(blockstate, this.field_73092_a, p_180237_1_, this.field_73090_b)) {
|
||||
+ int exp = net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(field_73092_a, field_73091_c, field_73090_b, p_180237_1_);
|
||||
+ if (exp == -1) {
|
||||
return false;
|
||||
} else {
|
||||
TileEntity tileentity = this.field_73092_a.func_175625_s(p_180237_1_);
|
||||
@@ -211,25 +221,30 @@
|
||||
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_73090_b.func_195070_dx()) {
|
||||
this.field_73092_a.func_184138_a(p_180237_1_, blockstate, blockstate, 3);
|
||||
return false;
|
||||
+ } else if (field_73090_b.func_184614_ca().onBlockStartBreak(p_180237_1_, field_73090_b)) {
|
||||
+ return false;
|
||||
} else if (this.field_73090_b.func_223729_a(this.field_73092_a, p_180237_1_, this.field_73091_c)) {
|
||||
return false;
|
||||
} else {
|
||||
- block.func_176208_a(this.field_73092_a, p_180237_1_, blockstate, this.field_73090_b);
|
||||
- boolean flag = this.field_73092_a.func_217377_a(p_180237_1_, false);
|
||||
- if (flag) {
|
||||
- block.func_176206_d(this.field_73092_a, p_180237_1_, blockstate);
|
||||
- }
|
||||
-
|
||||
if (this.func_73083_d()) {
|
||||
+ removeBlock(p_180237_1_, false);
|
||||
return true;
|
||||
} else {
|
||||
ItemStack itemstack = this.field_73090_b.func_184614_ca();
|
||||
- boolean flag1 = this.field_73090_b.func_184823_b(blockstate);
|
||||
+ ItemStack copy = itemstack.func_77946_l();
|
||||
+ boolean flag1 = blockstate.canHarvestBlock(this.field_73092_a, p_180237_1_, this.field_73090_b);
|
||||
itemstack.func_179548_a(this.field_73092_a, blockstate, p_180237_1_, this.field_73090_b);
|
||||
+ if (itemstack.func_190926_b() && !copy.func_190926_b()) {
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_73090_b, copy, Hand.MAIN_HAND);
|
||||
+ }
|
||||
+ boolean flag = removeBlock(p_180237_1_, flag1);
|
||||
if (flag && flag1) {
|
||||
ItemStack itemstack1 = itemstack.func_190926_b() ? ItemStack.field_190927_a : itemstack.func_77946_l();
|
||||
block.func_180657_a(this.field_73092_a, this.field_73090_b, p_180237_1_, blockstate, tileentity, itemstack1);
|
||||
}
|
||||
+ if (flag && exp > 0) {
|
||||
+ blockstate.func_177230_c().func_180637_b(field_73092_a, p_180237_1_, exp);
|
||||
+ }
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -237,12 +252,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ private boolean removeBlock(BlockPos p_180235_1_, boolean canHarvest) {
|
||||
+ BlockState state = this.field_73092_a.func_180495_p(p_180235_1_);
|
||||
+ boolean removed = state.removedByPlayer(this.field_73092_a, p_180235_1_, this.field_73090_b, canHarvest, this.field_73092_a.func_204610_c(p_180235_1_));
|
||||
+ if (removed)
|
||||
+ state.func_177230_c().func_176206_d(this.field_73092_a, p_180235_1_, state);
|
||||
+ return removed;
|
||||
+ }
|
||||
+
|
||||
public ActionResultType func_187250_a(PlayerEntity p_187250_1_, World p_187250_2_, ItemStack p_187250_3_, Hand p_187250_4_) {
|
||||
if (this.field_73091_c == GameType.SPECTATOR) {
|
||||
return ActionResultType.PASS;
|
||||
} else if (p_187250_1_.func_184811_cZ().func_185141_a(p_187250_3_.func_77973_b())) {
|
||||
return ActionResultType.PASS;
|
||||
} else {
|
||||
+ ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187250_1_, p_187250_4_);
|
||||
+ if (cancelResult != null) return cancelResult;
|
||||
int i = p_187250_3_.func_190916_E();
|
||||
int j = p_187250_3_.func_77952_i();
|
||||
ActionResult<ItemStack> actionresult = p_187250_3_.func_77957_a(p_187250_2_, p_187250_1_, p_187250_4_);
|
||||
@@ -285,12 +310,18 @@
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
} else {
|
||||
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks.onRightClickBlock(p_219441_1_, p_219441_4_, blockpos, p_219441_5_.func_216354_b());
|
||||
+ if (event.isCanceled()) return event.getCancellationResult();
|
||||
+ ItemUseContext itemusecontext = new ItemUseContext(p_219441_1_, p_219441_4_, p_219441_5_);
|
||||
+ if (event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
|
||||
+ ActionResultType result = p_219441_3_.onItemUseFirst(itemusecontext);
|
||||
+ if (result != ActionResultType.PASS) return result;
|
||||
+ }
|
||||
boolean flag = !p_219441_1_.func_184614_ca().func_190926_b() || !p_219441_1_.func_184592_cb().func_190926_b();
|
||||
boolean flag1 = p_219441_1_.func_70093_af() && flag;
|
||||
if (!flag1 && blockstate.func_215687_a(p_219441_2_, p_219441_1_, p_219441_4_, p_219441_5_)) {
|
||||
return ActionResultType.SUCCESS;
|
||||
} else if (!p_219441_3_.func_190926_b() && !p_219441_1_.func_184811_cZ().func_185141_a(p_219441_3_.func_77973_b())) {
|
||||
- ItemUseContext itemusecontext = new ItemUseContext(p_219441_1_, p_219441_4_, p_219441_5_);
|
||||
if (this.func_73083_d()) {
|
||||
int i = p_219441_3_.func_190916_E();
|
||||
ActionResultType actionresulttype = p_219441_3_.func_196084_a(itemusecontext);
|
||||
@@ -1,6 +1,14 @@
|
||||
--- a/net/minecraft/server/management/PlayerList.java
|
||||
+++ b/net/minecraft/server/management/PlayerList.java
|
||||
@@ -110,6 +110,14 @@
|
||||
@@ -94,6 +94,7 @@
|
||||
private GameType field_72410_m;
|
||||
private boolean field_72407_n;
|
||||
private int field_72408_o;
|
||||
+ private final List<ServerPlayerEntity> playersView = java.util.Collections.unmodifiableList(field_72404_b);
|
||||
|
||||
public PlayerList(MinecraftServer p_i50688_1_, int p_i50688_2_) {
|
||||
this.field_72400_f = p_i50688_1_;
|
||||
@@ -110,6 +111,14 @@
|
||||
playerprofilecache.func_152649_a(gameprofile);
|
||||
CompoundNBT compoundnbt = this.func_72380_a(p_72355_2_);
|
||||
ServerWorld serverworld = this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK);
|
||||
@@ -15,7 +23,24 @@
|
||||
p_72355_2_.func_70029_a(serverworld);
|
||||
p_72355_2_.field_71134_c.func_73080_a((ServerWorld)p_72355_2_.field_70170_p);
|
||||
String s1 = "local";
|
||||
@@ -163,8 +171,9 @@
|
||||
@@ -121,6 +130,7 @@
|
||||
WorldInfo worldinfo = serverworld.func_72912_H();
|
||||
this.func_72381_a(p_72355_2_, (ServerPlayerEntity)null, serverworld);
|
||||
ServerPlayNetHandler serverplaynethandler = new ServerPlayNetHandler(this.field_72400_f, p_72355_1_, p_72355_2_);
|
||||
+ net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(p_72355_1_, "PLAY_TO_CLIENT");
|
||||
serverplaynethandler.func_147359_a(new SJoinGamePacket(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), serverworld.field_73011_w.func_186058_p(), this.func_72352_l(), worldinfo.func_76067_t(), this.field_72402_d, serverworld.func_82736_K().func_223586_b(GameRules.field_223612_o)));
|
||||
serverplaynethandler.func_147359_a(new SCustomPayloadPlayPacket(SCustomPayloadPlayPacket.field_209911_b, (new PacketBuffer(Unpooled.buffer())).func_180714_a(this.func_72365_p().getServerModName())));
|
||||
serverplaynethandler.func_147359_a(new SServerDifficultyPacket(worldinfo.func_176130_y(), worldinfo.func_176123_z()));
|
||||
@@ -142,7 +152,7 @@
|
||||
|
||||
this.func_148539_a(itextcomponent.func_211708_a(TextFormatting.YELLOW));
|
||||
serverplaynethandler.func_147364_a(p_72355_2_.field_70165_t, p_72355_2_.field_70163_u, p_72355_2_.field_70161_v, p_72355_2_.field_70177_z, p_72355_2_.field_70125_A);
|
||||
- this.field_72404_b.add(p_72355_2_);
|
||||
+ this.addPlayer(p_72355_2_);
|
||||
this.field_177454_f.put(p_72355_2_.func_110124_au(), p_72355_2_);
|
||||
this.func_148540_a(new SPlayerListItemPacket(SPlayerListItemPacket.Action.ADD_PLAYER, p_72355_2_));
|
||||
|
||||
@@ -163,8 +173,9 @@
|
||||
|
||||
if (compoundnbt != null && compoundnbt.func_150297_b("RootVehicle", 10)) {
|
||||
CompoundNBT compoundnbt1 = compoundnbt.func_74775_l("RootVehicle");
|
||||
@@ -26,7 +51,7 @@
|
||||
});
|
||||
if (entity1 != null) {
|
||||
UUID uuid = compoundnbt1.func_186857_a("Attach");
|
||||
@@ -191,6 +200,7 @@
|
||||
@@ -191,6 +202,7 @@
|
||||
}
|
||||
|
||||
p_72355_2_.func_71116_b();
|
||||
@@ -34,7 +59,7 @@
|
||||
}
|
||||
|
||||
protected void func_96456_a(ServerScoreboard p_96456_1_, ServerPlayerEntity p_96456_2_) {
|
||||
@@ -252,6 +262,7 @@
|
||||
@@ -252,6 +264,7 @@
|
||||
compoundnbt1 = compoundnbt;
|
||||
p_72380_1_.func_70020_e(compoundnbt);
|
||||
field_148546_d.debug("loading single player");
|
||||
@@ -42,7 +67,7 @@
|
||||
} else {
|
||||
compoundnbt1 = this.field_72412_k.func_75752_b(p_72380_1_);
|
||||
}
|
||||
@@ -260,6 +271,7 @@
|
||||
@@ -260,6 +273,7 @@
|
||||
}
|
||||
|
||||
protected void func_72391_b(ServerPlayerEntity p_72391_1_) {
|
||||
@@ -50,7 +75,7 @@
|
||||
this.field_72412_k.func_75753_a(p_72391_1_);
|
||||
ServerStatisticsManager serverstatisticsmanager = this.field_148547_k.get(p_72391_1_.func_110124_au());
|
||||
if (serverstatisticsmanager != null) {
|
||||
@@ -274,6 +286,7 @@
|
||||
@@ -274,6 +288,7 @@
|
||||
}
|
||||
|
||||
public void func_72367_e(ServerPlayerEntity p_72367_1_) {
|
||||
@@ -58,10 +83,23 @@
|
||||
ServerWorld serverworld = p_72367_1_.func_71121_q();
|
||||
p_72367_1_.func_195066_a(Stats.field_75947_j);
|
||||
this.func_72391_b(p_72367_1_);
|
||||
@@ -364,10 +377,18 @@
|
||||
@@ -295,7 +310,7 @@
|
||||
p_72367_1_.func_213319_R();
|
||||
serverworld.func_217434_e(p_72367_1_);
|
||||
p_72367_1_.func_192039_O().func_192745_a();
|
||||
- this.field_72404_b.remove(p_72367_1_);
|
||||
+ this.removePlayer(p_72367_1_);
|
||||
this.field_72400_f.func_201300_aS().func_201382_b(p_72367_1_);
|
||||
UUID uuid = p_72367_1_.func_110124_au();
|
||||
ServerPlayerEntity serverplayerentity = this.field_177454_f.get(uuid);
|
||||
@@ -364,10 +379,18 @@
|
||||
}
|
||||
|
||||
public ServerPlayerEntity func_72368_a(ServerPlayerEntity p_72368_1_, DimensionType p_72368_2_, boolean p_72368_3_) {
|
||||
- this.field_72404_b.remove(p_72368_1_);
|
||||
- p_72368_1_.func_71121_q().func_217434_e(p_72368_1_);
|
||||
- BlockPos blockpos = p_72368_1_.func_180470_cg();
|
||||
- boolean flag = p_72368_1_.func_82245_bX();
|
||||
+ ServerWorld world = field_72400_f.func_71218_a(p_72368_2_);
|
||||
+ if (world == null)
|
||||
+ p_72368_2_ = p_72368_1_.getSpawnDimension();
|
||||
@@ -70,17 +108,14 @@
|
||||
+ if (field_72400_f.func_71218_a(p_72368_2_) == null)
|
||||
+ p_72368_2_ = DimensionType.field_223227_a_;
|
||||
+
|
||||
this.field_72404_b.remove(p_72368_1_);
|
||||
- p_72368_1_.func_71121_q().func_217434_e(p_72368_1_);
|
||||
- BlockPos blockpos = p_72368_1_.func_180470_cg();
|
||||
- boolean flag = p_72368_1_.func_82245_bX();
|
||||
+ this.removePlayer(p_72368_1_);
|
||||
+ p_72368_1_.func_71121_q().removePlayer(p_72368_1_, true); // Forge: keep data until copyFrom called
|
||||
+ BlockPos blockpos = p_72368_1_.getBedLocation(p_72368_2_);
|
||||
+ boolean flag = p_72368_1_.isSpawnForced(p_72368_2_);
|
||||
p_72368_1_.field_71093_bK = p_72368_2_;
|
||||
PlayerInteractionManager playerinteractionmanager;
|
||||
if (this.field_72400_f.func_71242_L()) {
|
||||
@@ -379,6 +400,8 @@
|
||||
@@ -379,6 +402,8 @@
|
||||
ServerPlayerEntity serverplayerentity = new ServerPlayerEntity(this.field_72400_f, this.field_72400_f.func_71218_a(p_72368_1_.field_71093_bK), p_72368_1_.func_146103_bH(), playerinteractionmanager);
|
||||
serverplayerentity.field_71135_a = p_72368_1_.field_71135_a;
|
||||
serverplayerentity.func_193104_a(p_72368_1_, p_72368_3_);
|
||||
@@ -89,7 +124,7 @@
|
||||
serverplayerentity.func_145769_d(p_72368_1_.func_145782_y());
|
||||
serverplayerentity.func_184819_a(p_72368_1_.func_184591_cq());
|
||||
|
||||
@@ -393,7 +416,7 @@
|
||||
@@ -393,7 +418,7 @@
|
||||
if (optional.isPresent()) {
|
||||
Vec3d vec3d = optional.get();
|
||||
serverplayerentity.func_70012_b(vec3d.field_72450_a, vec3d.field_72448_b, vec3d.field_72449_c, 0.0F, 0.0F);
|
||||
@@ -98,7 +133,12 @@
|
||||
} else {
|
||||
serverplayerentity.field_71135_a.func_147359_a(new SChangeGameStatePacket(0, 0.0F));
|
||||
}
|
||||
@@ -417,6 +440,7 @@
|
||||
@@ -413,10 +438,11 @@
|
||||
this.func_72354_b(serverplayerentity, serverworld);
|
||||
this.func_187243_f(serverplayerentity);
|
||||
serverworld.func_217433_d(serverplayerentity);
|
||||
- this.field_72404_b.add(serverplayerentity);
|
||||
+ this.addPlayer(serverplayerentity);
|
||||
this.field_177454_f.put(serverplayerentity.func_110124_au(), serverplayerentity);
|
||||
serverplayerentity.func_71116_b();
|
||||
serverplayerentity.func_70606_j(serverplayerentity.func_110143_aJ());
|
||||
@@ -106,3 +146,25 @@
|
||||
return serverplayerentity;
|
||||
}
|
||||
|
||||
@@ -736,7 +762,7 @@
|
||||
}
|
||||
|
||||
public List<ServerPlayerEntity> func_181057_v() {
|
||||
- return this.field_72404_b;
|
||||
+ return this.playersView; //Unmodifiable view, we don't want people removing things without us knowing.
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -766,4 +792,12 @@
|
||||
public boolean func_206257_x() {
|
||||
return this.field_72407_n;
|
||||
}
|
||||
+
|
||||
+ public boolean addPlayer(ServerPlayerEntity player) {
|
||||
+ return net.minecraftforge.common.DimensionManager.rebuildPlayerMap(this, this.field_72404_b.add(player));
|
||||
+ }
|
||||
+
|
||||
+ public boolean removePlayer(ServerPlayerEntity player) {
|
||||
+ return net.minecraftforge.common.DimensionManager.rebuildPlayerMap(this, this.field_72404_b.remove(player));
|
||||
+ }
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
--- a/net/minecraft/tags/TagCollection.java
|
||||
+++ b/net/minecraft/tags/TagCollection.java
|
||||
@@ -27,8 +27,6 @@
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Util;
|
||||
-import net.minecraftforge.api.distmarker.Dist;
|
||||
-import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -64,7 +62,6 @@
|
||||
return this.field_199921_d.keySet();
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public Collection<ResourceLocation> func_199913_a(T p_199913_1_) {
|
||||
List<ResourceLocation> list = Lists.newArrayList();
|
||||
|
||||
@@ -40,23 +40,16 @@
|
||||
return p_189516_1_;
|
||||
}
|
||||
}
|
||||
@@ -93,14 +100,13 @@
|
||||
@@ -93,7 +100,7 @@
|
||||
if (this.field_145850_b != null) {
|
||||
this.field_195045_e = this.field_145850_b.func_180495_p(this.field_174879_c);
|
||||
this.field_145850_b.func_175646_b(this.field_174879_c, this);
|
||||
- if (!this.field_195045_e.func_196958_f()) {
|
||||
+ if (!this.field_195045_e.isAir(field_145850_b, this.field_174879_c)) {
|
||||
+ if (!this.field_195045_e.isAir(this.field_145850_b, this.field_174879_c)) {
|
||||
this.field_145850_b.func_175666_e(this.field_174879_c, this.field_195045_e.func_177230_c());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_) {
|
||||
double d0 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_;
|
||||
double d1 = (double)this.field_174879_c.func_177956_o() + 0.5D - p_145835_3_;
|
||||
@@ -140,6 +146,7 @@
|
||||
@@ -139,6 +146,7 @@
|
||||
|
||||
public void func_145843_s() {
|
||||
this.field_145846_f = true;
|
||||
@@ -64,7 +57,7 @@
|
||||
}
|
||||
|
||||
public void func_145829_t() {
|
||||
@@ -182,6 +189,13 @@
|
||||
@@ -181,6 +189,13 @@
|
||||
return this.field_200663_e;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
--- a/net/minecraft/util/Direction.java
|
||||
+++ b/net/minecraft/util/Direction.java
|
||||
@@ -119,7 +119,6 @@
|
||||
return func_82600_a(this.field_176759_h);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public Direction func_176732_a(Direction.Axis p_176732_1_) {
|
||||
switch(p_176732_1_) {
|
||||
case X:
|
||||
@@ -160,7 +159,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
private Direction func_176744_n() {
|
||||
switch(this) {
|
||||
case NORTH:
|
||||
@@ -178,7 +176,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
private Direction func_176738_p() {
|
||||
switch(this) {
|
||||
case EAST:
|
||||
@@ -231,7 +228,6 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static Direction func_176739_a(@Nullable String p_176739_0_) {
|
||||
return p_176739_0_ == null ? null : field_176761_p.get(p_176739_0_.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
@@ -353,7 +349,6 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static Direction.Axis func_176717_a(String p_176717_0_) {
|
||||
return field_176725_d.get(p_176717_0_.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
--- a/net/minecraft/util/math/Vec3d.java
|
||||
+++ b/net/minecraft/util/math/Vec3d.java
|
||||
@@ -80,7 +80,6 @@
|
||||
return this.func_216372_d(p_186678_1_, p_186678_1_, p_186678_1_);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public Vec3d func_216371_e() {
|
||||
return this.func_186678_a(-1.0D);
|
||||
}
|
||||
@@ -150,12 +149,10 @@
|
||||
return new Vec3d(d0, d1, d2);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static Vec3d func_189984_a(Vec2f p_189984_0_) {
|
||||
return func_189986_a(p_189984_0_.field_189982_i, p_189984_0_.field_189983_j);
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public static Vec3d func_189986_a(float p_189986_0_, float p_189986_1_) {
|
||||
float f = MathHelper.func_76134_b(-p_189986_1_ * ((float)Math.PI / 180F) - (float)Math.PI);
|
||||
float f1 = MathHelper.func_76126_a(-p_189986_1_ * ((float)Math.PI / 180F) - (float)Math.PI);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/util/registry/Registry.java
|
||||
+++ b/net/minecraft/util/registry/Registry.java
|
||||
@@ -66,71 +66,75 @@
|
||||
@@ -66,76 +66,78 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -95,8 +95,14 @@
|
||||
+ @Deprecated public static final DefaultedRegistry<ChunkStatus> field_218360_A = forgeDefaulted("chunk_status", ChunkStatus.class, () -> {
|
||||
return ChunkStatus.field_223226_a_;
|
||||
});
|
||||
public static final Registry<Structure<?>> field_218361_B = func_222935_a("structure_feature", () -> {
|
||||
@@ -148,37 +152,37 @@
|
||||
- public static final Registry<Structure<?>> field_218361_B = func_222935_a("structure_feature", () -> {
|
||||
- return Structures.field_215143_a;
|
||||
- });
|
||||
+ @Deprecated public static final Registry<Structure<?>> field_218361_B = net.minecraftforge.registries.GameData.getStructureFeatures();
|
||||
public static final Registry<IStructurePieceType> field_218362_C = func_222935_a("structure_piece", () -> {
|
||||
return IStructurePieceType.field_214782_c;
|
||||
});
|
||||
@@ -148,37 +150,37 @@
|
||||
public static final Registry<IJigsawDeserializer> field_218365_F = func_222935_a("structure_pool_element", () -> {
|
||||
return IJigsawDeserializer.field_214931_e;
|
||||
});
|
||||
@@ -143,7 +149,7 @@
|
||||
return Activity.field_221366_b;
|
||||
});
|
||||
|
||||
@@ -230,6 +234,14 @@
|
||||
@@ -230,6 +232,14 @@
|
||||
return ((MutableRegistry<T>)p_218343_0_).func_218382_a(p_218343_1_, new ResourceLocation(p_218343_2_), p_218343_3_);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
|
||||
Chunk chunk = abstractchunkprovider.func_217205_a(p_180494_1_.func_177958_n() >> 4, p_180494_1_.func_177952_p() >> 4, false);
|
||||
if (chunk != null) {
|
||||
@@ -169,17 +177,45 @@
|
||||
@@ -169,23 +177,51 @@
|
||||
} else {
|
||||
Chunk chunk = this.func_175726_f(p_180501_1_);
|
||||
Block block = p_180501_2_.func_177230_c();
|
||||
@@ -63,7 +63,7 @@
|
||||
} else {
|
||||
BlockState blockstate1 = this.func_180495_p(p_180501_1_);
|
||||
- if (blockstate1 != blockstate && (blockstate1.func_200016_a(this, p_180501_1_) != blockstate.func_200016_a(this, p_180501_1_) || blockstate1.func_185906_d() != blockstate.func_185906_d() || blockstate1.func_215691_g() || blockstate.func_215691_g())) {
|
||||
+ if (blockstate1 != blockstate && (blockstate1.func_200016_a(this, p_180501_1_) != oldOpacity || blockstate1.func_185906_d() != oldLight || blockstate1.func_215691_g() || blockstate.func_215691_g())) {
|
||||
+ if (blockstate1 != blockstate && (blockstate1.func_200016_a(this, p_180501_1_) != oldOpacity || blockstate1.getLightValue(this, p_180501_1_) != oldLight || blockstate1.func_215691_g() || blockstate.func_215691_g())) {
|
||||
this.field_72984_F.func_76320_a("queueCheckLight");
|
||||
this.func_72863_F().func_212863_j_().func_215568_a(p_180501_1_);
|
||||
this.field_72984_F.func_76319_b();
|
||||
@@ -87,6 +87,13 @@
|
||||
if (blockstate1 == p_180501_2_) {
|
||||
if (blockstate != blockstate1) {
|
||||
this.func_225319_b(p_180501_1_, blockstate, blockstate1);
|
||||
}
|
||||
|
||||
- if ((p_180501_3_ & 2) != 0 && (!this.field_72995_K || (p_180501_3_ & 4) == 0) && (this.field_72995_K || chunk.func_217321_u() != null && chunk.func_217321_u().func_219065_a(ChunkHolder.LocationType.TICKING))) {
|
||||
+ if ((p_180501_3_ & 2) != 0 && (!this.field_72995_K || (p_180501_3_ & 4) == 0) && (this.field_72995_K || chunk == null || chunk.func_217321_u() != null && chunk.func_217321_u().func_219065_a(ChunkHolder.LocationType.TICKING))) {
|
||||
this.func_184138_a(p_180501_1_, blockstate, p_180501_2_, p_180501_3_);
|
||||
}
|
||||
|
||||
@@ -205,8 +241,6 @@
|
||||
|
||||
this.func_217393_a(p_180501_1_, blockstate, blockstate1);
|
||||
@@ -154,11 +161,9 @@
|
||||
}
|
||||
|
||||
public void func_184133_a(@Nullable PlayerEntity p_184133_1_, BlockPos p_184133_2_, SoundEvent p_184133_3_, SoundCategory p_184133_4_, float p_184133_5_, float p_184133_6_) {
|
||||
@@ -390,8 +431,11 @@
|
||||
public void func_217404_b(IParticleData p_217404_1_, boolean p_217404_2_, double p_217404_3_, double p_217404_5_, double p_217404_7_, double p_217404_9_, double p_217404_11_, double p_217404_13_) {
|
||||
@@ -391,6 +432,10 @@
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public float func_72971_b(float p_72971_1_) {
|
||||
+ return this.field_73011_w.getSunBrightness(p_72971_1_);
|
||||
+ }
|
||||
@@ -167,7 +172,7 @@
|
||||
float f = this.func_72826_c(p_72971_1_);
|
||||
float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.2F);
|
||||
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
|
||||
@@ -403,12 +447,15 @@
|
||||
@@ -402,12 +447,15 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public Vec3d func_217382_a(BlockPos p_217382_1_, float p_217382_2_) {
|
||||
@@ -186,7 +191,7 @@
|
||||
float f3 = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f4 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f5 = (float)(i & 255) / 255.0F;
|
||||
@@ -455,6 +502,11 @@
|
||||
@@ -454,6 +502,11 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public Vec3d func_72824_f(float p_72824_1_) {
|
||||
@@ -198,7 +203,7 @@
|
||||
float f = this.func_72826_c(p_72824_1_);
|
||||
float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F;
|
||||
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
|
||||
@@ -493,17 +545,24 @@
|
||||
@@ -492,17 +545,24 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public float func_72880_h(float p_72880_1_) {
|
||||
@@ -224,7 +229,7 @@
|
||||
}
|
||||
|
||||
boolean flag = this.field_147482_g.add(p_175700_1_);
|
||||
@@ -511,6 +570,8 @@
|
||||
@@ -510,6 +570,8 @@
|
||||
this.field_175730_i.add(p_175700_1_);
|
||||
}
|
||||
|
||||
@@ -233,7 +238,7 @@
|
||||
if (this.field_72995_K) {
|
||||
BlockPos blockpos = p_175700_1_.func_174877_v();
|
||||
BlockState blockstate = this.func_180495_p(blockpos);
|
||||
@@ -522,6 +583,7 @@
|
||||
@@ -521,6 +583,7 @@
|
||||
|
||||
public void func_147448_a(Collection<TileEntity> p_147448_1_) {
|
||||
if (this.field_147481_N) {
|
||||
@@ -241,7 +246,7 @@
|
||||
this.field_147484_a.addAll(p_147448_1_);
|
||||
} else {
|
||||
for(TileEntity tileentity : p_147448_1_) {
|
||||
@@ -534,13 +596,15 @@
|
||||
@@ -533,13 +596,15 @@
|
||||
public void func_217391_K() {
|
||||
IProfiler iprofiler = this.func_217381_Z();
|
||||
iprofiler.func_76320_a("blockEntities");
|
||||
@@ -258,7 +263,7 @@
|
||||
Iterator<TileEntity> iterator = this.field_175730_i.iterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
@@ -549,8 +613,9 @@
|
||||
@@ -548,8 +613,9 @@
|
||||
BlockPos blockpos = tileentity.func_174877_v();
|
||||
if (this.field_73020_y.func_222866_a(blockpos) && this.func_175723_af().func_177746_a(blockpos)) {
|
||||
try {
|
||||
@@ -269,7 +274,7 @@
|
||||
});
|
||||
if (tileentity.func_200662_C().func_223045_a(this.func_180495_p(blockpos).func_177230_c())) {
|
||||
((ITickableTileEntity)tileentity).func_73660_a();
|
||||
@@ -563,8 +628,16 @@
|
||||
@@ -562,8 +628,16 @@
|
||||
CrashReport crashreport = CrashReport.func_85055_a(throwable, "Ticking block entity");
|
||||
CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block entity being ticked");
|
||||
tileentity.func_145828_a(crashreportcategory);
|
||||
@@ -286,7 +291,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -572,7 +645,10 @@
|
||||
@@ -571,7 +645,10 @@
|
||||
iterator.remove();
|
||||
this.field_147482_g.remove(tileentity);
|
||||
if (this.func_175667_e(tileentity.func_174877_v())) {
|
||||
@@ -298,7 +303,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -604,12 +680,15 @@
|
||||
@@ -603,12 +680,15 @@
|
||||
|
||||
public void func_217390_a(Consumer<Entity> p_217390_1_, Entity p_217390_2_) {
|
||||
try {
|
||||
@@ -314,7 +319,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,7 +705,7 @@
|
||||
@@ -625,7 +705,7 @@
|
||||
for(int l1 = k; l1 < l; ++l1) {
|
||||
for(int i2 = i1; i2 < j1; ++i2) {
|
||||
BlockState blockstate = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2));
|
||||
@@ -323,7 +328,7 @@
|
||||
boolean flag = true;
|
||||
return flag;
|
||||
}
|
||||
@@ -650,8 +729,8 @@
|
||||
@@ -649,8 +729,8 @@
|
||||
for(int k1 = i; k1 < j; ++k1) {
|
||||
for(int l1 = k; l1 < l; ++l1) {
|
||||
for(int i2 = i1; i2 < j1; ++i2) {
|
||||
@@ -334,7 +339,7 @@
|
||||
boolean flag = true;
|
||||
return flag;
|
||||
}
|
||||
@@ -722,6 +801,7 @@
|
||||
@@ -721,6 +801,7 @@
|
||||
if (p_217401_2_ != null) {
|
||||
explosion.func_199592_a(p_217401_2_);
|
||||
}
|
||||
@@ -342,7 +347,7 @@
|
||||
|
||||
explosion.func_77278_a();
|
||||
explosion.func_77279_a(true);
|
||||
@@ -782,9 +862,12 @@
|
||||
@@ -781,9 +862,12 @@
|
||||
|
||||
public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) {
|
||||
if (!func_189509_E(p_175690_1_)) {
|
||||
@@ -355,7 +360,7 @@
|
||||
Iterator<TileEntity> iterator = this.field_147484_a.iterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
@@ -797,7 +880,8 @@
|
||||
@@ -796,7 +880,8 @@
|
||||
|
||||
this.field_147484_a.add(p_175690_2_);
|
||||
} else {
|
||||
@@ -365,7 +370,7 @@
|
||||
this.func_175700_a(p_175690_2_);
|
||||
}
|
||||
}
|
||||
@@ -810,6 +894,8 @@
|
||||
@@ -809,6 +894,8 @@
|
||||
if (tileentity != null && this.field_147481_N) {
|
||||
tileentity.func_145843_s();
|
||||
this.field_147484_a.remove(tileentity);
|
||||
@@ -374,7 +379,7 @@
|
||||
} else {
|
||||
if (tileentity != null) {
|
||||
this.field_147484_a.remove(tileentity);
|
||||
@@ -819,7 +905,7 @@
|
||||
@@ -818,7 +905,7 @@
|
||||
|
||||
this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_);
|
||||
}
|
||||
@@ -383,7 +388,7 @@
|
||||
}
|
||||
|
||||
public boolean func_195588_v(BlockPos p_195588_1_) {
|
||||
@@ -844,9 +930,14 @@
|
||||
@@ -843,9 +930,14 @@
|
||||
|
||||
public void func_72891_a(boolean p_72891_1_, boolean p_72891_2_) {
|
||||
this.func_72863_F().func_217203_a(p_72891_1_, p_72891_2_);
|
||||
@@ -398,7 +403,7 @@
|
||||
if (this.field_72986_A.func_76059_o()) {
|
||||
this.field_73004_o = 1.0F;
|
||||
if (this.field_72986_A.func_76061_m()) {
|
||||
@@ -866,10 +957,10 @@
|
||||
@@ -865,10 +957,10 @@
|
||||
|
||||
public List<Entity> func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate<? super Entity> p_175674_3_) {
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
@@ -413,7 +418,7 @@
|
||||
|
||||
for(int i1 = i; i1 <= j; ++i1) {
|
||||
for(int j1 = k; j1 <= l; ++j1) {
|
||||
@@ -884,10 +975,10 @@
|
||||
@@ -883,10 +975,10 @@
|
||||
}
|
||||
|
||||
public List<Entity> func_217394_a(@Nullable EntityType<?> p_217394_1_, AxisAlignedBB p_217394_2_, Predicate<? super Entity> p_217394_3_) {
|
||||
@@ -428,7 +433,7 @@
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
|
||||
for(int i1 = i; i1 < j; ++i1) {
|
||||
@@ -903,10 +994,10 @@
|
||||
@@ -902,10 +994,10 @@
|
||||
}
|
||||
|
||||
public <T extends Entity> List<T> func_175647_a(Class<? extends T> p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable Predicate<? super T> p_175647_3_) {
|
||||
@@ -443,7 +448,7 @@
|
||||
List<T> list = Lists.newArrayList();
|
||||
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
|
||||
|
||||
@@ -1001,7 +1092,7 @@
|
||||
@@ -1000,7 +1092,7 @@
|
||||
|
||||
public int func_175651_c(BlockPos p_175651_1_, Direction p_175651_2_) {
|
||||
BlockState blockstate = this.func_180495_p(p_175651_1_);
|
||||
@@ -452,7 +457,7 @@
|
||||
}
|
||||
|
||||
public boolean func_175640_z(BlockPos p_175640_1_) {
|
||||
@@ -1046,7 +1137,7 @@
|
||||
@@ -1045,7 +1137,7 @@
|
||||
}
|
||||
|
||||
public long func_72905_C() {
|
||||
@@ -461,7 +466,7 @@
|
||||
}
|
||||
|
||||
public long func_82737_E() {
|
||||
@@ -1054,11 +1145,11 @@
|
||||
@@ -1053,11 +1145,11 @@
|
||||
}
|
||||
|
||||
public long func_72820_D() {
|
||||
@@ -475,7 +480,7 @@
|
||||
}
|
||||
|
||||
protected void func_217389_a() {
|
||||
@@ -1070,7 +1161,7 @@
|
||||
@@ -1069,7 +1161,7 @@
|
||||
}
|
||||
|
||||
public BlockPos func_175694_M() {
|
||||
@@ -484,7 +489,7 @@
|
||||
if (!this.func_175723_af().func_177746_a(blockpos)) {
|
||||
blockpos = this.func_205770_a(Heightmap.Type.MOTION_BLOCKING, new BlockPos(this.func_175723_af().func_177731_f(), 0.0D, this.func_175723_af().func_177721_g()));
|
||||
}
|
||||
@@ -1079,10 +1170,14 @@
|
||||
@@ -1078,10 +1170,14 @@
|
||||
}
|
||||
|
||||
public void func_175652_B(BlockPos p_175652_1_) {
|
||||
@@ -500,7 +505,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1150,8 +1245,7 @@
|
||||
@@ -1149,8 +1245,7 @@
|
||||
}
|
||||
|
||||
public boolean func_180502_D(BlockPos p_180502_1_) {
|
||||
@@ -510,7 +515,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1165,12 +1259,11 @@
|
||||
@@ -1164,11 +1259,11 @@
|
||||
}
|
||||
|
||||
public int func_72940_L() {
|
||||
@@ -518,14 +523,13 @@
|
||||
+ return this.field_73011_w.getActualHeight();
|
||||
}
|
||||
|
||||
- @OnlyIn(Dist.CLIENT)
|
||||
public double func_72919_O() {
|
||||
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
|
||||
+ return this.field_73011_w.getHorizon();
|
||||
}
|
||||
|
||||
public CrashReportCategory func_72914_a(CrashReport p_72914_1_) {
|
||||
@@ -1201,16 +1294,15 @@
|
||||
@@ -1199,16 +1294,15 @@
|
||||
public abstract Scoreboard func_96441_U();
|
||||
|
||||
public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) {
|
||||
@@ -546,7 +550,7 @@
|
||||
blockstate.func_215697_a(this, blockpos, p_175666_2_, p_175666_1_, false);
|
||||
}
|
||||
}
|
||||
@@ -1289,4 +1381,16 @@
|
||||
@@ -1287,4 +1381,16 @@
|
||||
public BlockPos func_205770_a(Heightmap.Type p_205770_1_, BlockPos p_205770_2_) {
|
||||
return new BlockPos(p_205770_2_.func_177958_n(), this.func_201676_a(p_205770_1_, p_205770_2_.func_177958_n(), p_205770_2_.func_177952_p()), p_205770_2_.func_177952_p());
|
||||
}
|
||||
|
||||
@@ -41,7 +41,20 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -526,6 +526,18 @@
|
||||
@@ -375,6 +375,12 @@
|
||||
return this.field_185364_H;
|
||||
}
|
||||
|
||||
+ public Biome getRiver() {
|
||||
+ if (this == Biomes.field_76774_n) return Biomes.field_76777_m;
|
||||
+ if (this == Biomes.field_76789_p || this == Biomes.field_76788_q) return Biomes.field_76788_q;
|
||||
+ return Biomes.field_76781_i;
|
||||
+ }
|
||||
+
|
||||
public static class Builder {
|
||||
@Nullable
|
||||
private ConfiguredSurfaceBuilder<?> field_205422_a;
|
||||
@@ -526,6 +532,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
--- a/net/minecraft/world/biome/Biomes.java
|
||||
+++ b/net/minecraft/world/biome/Biomes.java
|
||||
@@ -4,6 +4,7 @@
|
||||
@@ -4,8 +4,10 @@
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
[email protected]("minecraft")
|
||||
public abstract class Biomes {
|
||||
public static final Biome field_76771_b = func_222369_a(0, "ocean", new OceanBiome());
|
||||
+ @net.minecraftforge.registries.ObjectHolder("minecraft:ocean")
|
||||
public static final Biome field_180279_ad = field_76771_b;
|
||||
public static final Biome field_76772_c = func_222369_a(1, "plains", new PlainsBiome());
|
||||
public static final Biome field_76769_d = func_222369_a(2, "desert", new DesertBiome());
|
||||
@@ -177,6 +177,15 @@
|
||||
for(int i = 0; i < this.field_76652_q.length; ++i) {
|
||||
ChunkSection chunksection = this.field_76652_q[i];
|
||||
if ((p_217326_3_ & 1 << i) == 0) {
|
||||
@@ -599,7 +616,7 @@
|
||||
|
||||
public Stream<BlockPos> func_217304_m() {
|
||||
return StreamSupport.stream(BlockPos.func_191531_b(this.field_212816_F.func_180334_c(), 0, this.field_212816_F.func_180333_d(), this.field_212816_F.func_180332_e(), 255, this.field_212816_F.func_180330_f()).spliterator(), false).filter((p_217312_1_) -> {
|
||||
- return this.func_180495_p(p_217312_1_).func_185906_d() != 0;
|
||||
+ return this.func_180495_p(p_217312_1_).getLightValue(func_177412_p(), p_217312_1_) != 0;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -704,9 +721,9 @@
|
||||
private TileEntity func_212815_a(BlockPos p_212815_1_, CompoundNBT p_212815_2_) {
|
||||
TileEntity tileentity;
|
||||
|
||||
Loaded 100 of 550 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user