Compare commits

..
61 Commits
Author SHA1 Message Date
cpw 27afdc8a27 Provisional update to 1.14.4. Missing a lot of playerinteractionmanager patches because everything moved and I'm tired.
Fix up immediate problems.

bump to 28.
2019-07-20 00:35:40 -04:00
cpw eff42f6066 Update mappings to 20190719 in prep for 1.14.4..
Signed-off-by: cpw <[email protected]>
2019-07-19 11:55:30 -04:00
CJ Miller 9f5ce12754 Remove OnlyIn Client Distribution from Effect and EffectType methods. (#5925) 2019-07-18 14:15:31 -07:00
LexManos cb21e95e0b Change default BrewingRecipe to use an Ingredient for the input instead of ItemStack. Closes #5944
Add AT for GameRules.register Closes #5946
Fix Forge Blockstate loader model path is inconsistent with vanilla blockstates Closes #5892
Fix client crashing when opting not to load a world when there's missing blocks Closes #5886
2019-07-18 14:13:20 -07:00
LexManos e6f032db1b Fix CheckSpawn event logic for natural spawns. 2019-07-16 22:38:11 -07:00
LexManos 86e9425638 Fixed item breaking particles not capturing current state of the ItemStack. Closes #5934 2019-07-16 16:02:52 -07:00
ewewukek 53ac33a84c Fix RenderSpecificHandEvent firing with wrong hand stack (#5927) 2019-07-16 12:42:33 -07:00
its_meow 5cf2af569f [1.14.x] Fix text positioning issues caused by scaling loading screen (#5932) 2019-07-16 12:41:21 -07:00
LexManos a46b7cb67a Fixed PlayerSleepInBedEvent pos is always null Closes #5936
Fixed decompile error causing Endless Loop in ModelBackery if model errors exist.
Fixed NPEs related to teleporting players without portals.
2019-07-16 11:52:51 -07:00
LexManos 3d78f30d18 Add simple concurrency protection to Server world list. Closes #5938 and #5739 2019-07-16 09:59:33 -07:00
cpw ad64d383e1 Update modlauncher to the 3.x series.
Signed-off-by: cpw <[email protected]>
2019-07-14 22:48:30 -04:00
tterrag1098 0a7f5ff9fa Rework GuiModList mod info to use custom scrolling panel impl 2019-07-10 20:13:33 -07:00
LexManos ce28c5794d Cleanup Forge's Access Transformer, and add ATs for Block.Properties#noDrop, and AxeItem/PickaxeItem. Closes #5866 and Closes #5921 2019-07-10 17:39:19 -07:00
LexManos e55c7c889b Fix race condition in client mouse handler. Closes #5888 2019-07-10 17:35:53 -07:00
LexManos 0633e8218f Added LootPool.Builder#bonusRolls setter. Closes #5887 2019-07-09 18:21:05 -07:00
LexManos 0fdfe1fd59 Implemented Item.get/setDamage hooks. Closes #5899 2019-07-09 18:03:19 -07:00
LexManos 2cc264645b Implement Item.isRepairable in Crafting and Grindstone. Closes #5917 2019-07-09 18:02:47 -07:00
LexManos 983e0a93db Re-implement state.onBlockExploded() Closes #5914 2019-07-09 17:07:09 -07:00
Vincent Lee d88e4fbf36 Add general damage hook for items. Closes #5502 (#5670) 2019-07-08 20:43:02 -07:00
LexManos f79da3edf7 Fix syntax error in IRenderHandler. 2019-07-08 20:14:41 -07:00
LexManos 8742d74e93 Pass tick counter to custom render handlers (#5744) 2019-07-08 19:55:47 -07:00
Cadiboo ff80ab6a23 Fire Loading event (#5795) 2019-07-08 19:49:47 -07:00
Dirk "YouDirk" Lehmann 8c37d642fe Fix logoFile not working properly (#5775) 2019-07-08 19:49:31 -07:00
ichttt 06a30e9f23 Adds some explanatory javadocs and check world in ModelDataManager (#5762) 2019-07-08 19:47:18 -07:00
Antoine Lucas 650e7dc16e Add InputEvent documentation (#5698) 2019-07-08 19:47:06 -07:00
ichttt d41fad51c2 Add IModelData to getParticleTexture (#5756) 2019-07-08 19:46:32 -07:00
ichttt 0463949ac3 Fixed BakedModelWrapper not delegating new methods (#5761) 2019-07-08 19:45:27 -07:00
Sargun Vohra 5f0fd4b706 Throw exception when a mod returns null from a dispatched capability provider (#5646) 2019-07-08 19:45:10 -07:00
Benjamin K 201c368325 Add isServer and isClient methods to LogicalSide (#5606)
* Add helper methods to LogicalSide.

* Fix backwards docs.
2019-07-08 19:44:35 -07:00
Cadiboo 3fe08f149d Added documentation to ObfuscationReflectionHelper adn deprecated index based functions. (#5893) 2019-07-08 19:44:21 -07:00
LexManos 61bea2bfda Fixed EntityJoinWorldEvent not being fired when player is added to ServerWorld. #5827
Fixed wrong example path for the access transformer in the MDK build.gradle. #5891
Added getters for mouse x/y velocity and if the middle-mouse button is being held down. #5776
Modify issue template for better clarity. #5874
Fixed grindstone not using ItemStack-sensitive getMaxDamage. #5831
Added ParticleManager.registerFactory to Forge's AT. #5896
Fixed NPE in SidedInvWrapper when side was null. #5787
Moved EndermanEntity.setAttackTarget super call to allow LivingSetAttackTargetEvent the ability to override default behavior. #5778
Added field to make "Looking at" debug info maximum distance configurable #5714
2019-07-08 18:42:12 -07:00
DaemonUmbra f720140481 Disable Config Button when no mods are selected (#5905)
Closes #5889
2019-07-08 15:56:49 -07:00
Tedstar 66a2d38ab8 Fix MC-258 on mod list screen, enable sorting, minor tweaks. (#5846) 2019-07-08 15:50:05 -07:00
DaemonUmbra bed266f310 Fixed #5895: Shearing via Displenser drops Shears (#5906) 2019-07-08 15:47:34 -07:00
Cloudhunter 719f08ea5e Fix link applying to whole component in chat if component starts with link (#5909) 2019-07-08 15:46:49 -07:00
Suppergerrie2 3992ea5c59 Added harvestLevel and harvestTool setter to the Block.Properties. (#5916) 2019-07-08 15:45:53 -07:00
LexManos a01c1cdc3a Fix installer realms issue on server.
Uptake EventBus changes to fix some potential dead locks.
2019-07-05 13:26:23 -07:00
m00nl1ght-dev 7a8ae9f56b Fix old entity not being removed on dimension change (#5833) 2019-07-04 13:03:45 -07:00
primetoxinz 765efc3c72 Update TextureStitchEvent.Pre to give access to the list of ResourceLocations that will be loaded as textures. (#5870) 2019-07-03 12:26:51 -07:00
LexManos bc23c1ddb2 Add installer processor to deobfuscate Mincraft's Realms library.
This task will processes the current realms library from the json, so the installer must be re-ran every time they update it.
2019-07-03 01:08:20 -07:00
David Quintana 87e2fcb4e5 Redirect a method to the recipe book container, to allow modded screens to have a recipe book. (#5873) 2019-07-02 13:05:03 -07:00
Take Weiland 478b7e7ccc Fix WorldEvent.Unload not firing on the client (fixes #5880) (#5884) 2019-07-02 12:58:45 -07:00
Take Weiland 0574db134c Fix TickEvent.PlayerTickEvent firing twice for tick end (fixes #5878) (#5885) 2019-07-02 12:57:06 -07:00
LexManos 358211ca66 Fix type cast issues in ForgeConfig values. Closes #5894
Added config value set and save functions.
By default mod configs are auto-saved, so you do not need to call save unless you create your own Config object.
2019-07-02 11:54:59 -07:00
cpw c8e5007913 Remove legacy StartupProgress.
Implement properly scalable progress thanks to @gigaherz. Closes #5863.
Implement API for pushing messages to the startup screen from mods.
Add memory display.

Signed-off-by: cpw <[email protected]>
2019-06-30 23:48:54 -04:00
cpw 943fedb073 Update coremods to newer version, with support for new targets.
Signed-off-by: cpw <[email protected]>
2019-06-29 17:05:18 -04:00
LexManos 13ae8e41ee Fix duplicate WorldEvent.Unload call in client key handler.
Add recipe generator to replace vanilla recipes with Forge tags.
2019-06-27 17:23:23 -07:00
LexManos ac8b196b8c Fix dimension save data invalid cache being to aggressive. 2019-06-27 10:57:03 -07:00
ある 2c3183bdae Fix garbled "µs" (#5818) 2019-06-26 13:23:47 -07:00
LexManos 53349603e2 Fix fmluserdevdata not being a valid launch target. 2019-06-25 18:16:10 -07:00
LexManos c284de366b Split userdev data entry point into it's own provider to fix duplicate mod issue. 2019-06-25 18:03:51 -07:00
tterrag e81c330694 Fix configs correcting numeric values when the primitive type differs
Fix configs with range not clamping the corrected value, and instead
just replacing with the default

Closes #5855
2019-06-25 19:56:31 -04:00
Ben Staddon 790da699dd Fix item placement losing NBT data in creative mode (#5757) 2019-06-25 13:59:10 -07:00
MajorTuvok 7915397377 Add extension to write entry id's to PacketBuffer's (#5812) 2019-06-25 13:55:24 -07:00
Someone b2a5d34679 Add isItemValid check for ItemStackHandler (#5850) 2019-06-25 13:50:08 -07:00
Johannes 73bb18e78b Fix leather armor dye recipe (#5836) 2019-06-25 13:48:49 -07:00
Tedstar 9701148819 [1.14.x] Replace dye items in Forge tags. (#5843) 2019-06-25 13:44:54 -07:00
Unnoen f1dbc8b117 Update readme and issue template. (#5773) 2019-06-25 13:38:32 -07:00
bl4ckscor3 b8131e6e67 implement Ingredient.getSerializer for custom ingredients (#5813) 2019-06-25 10:25:33 -07:00
LexManos f4598a97f7 Fix vines and scaffolding not being climbable.
Fix powered rails not spreading power correctly. Closes: #5854
2019-06-24 20:05:50 -07:00
LexManos c90d42973d Fix misaligned ServerWorld initCapabilities patch. 2019-06-24 19:37:02 -07:00
316 changed files with 5268 additions and 2956 deletions

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
<!-- Thank you for reporting! -->
<!-- Please go to the forum first for support with crashes and issues. -->
<!-- http://www.minecraftforge.net/forum/forum/18-support-bug-reports/ -->
+13
View File
@@ -0,0 +1,13 @@
---
name: Feature request
about: Want to request a feature?
title: ''
labels: Feature
assignees: ''
---
<!-- Please note, feature requests that are submitted as GitHub issues here are rarely implemented. -->
<!-- If you'd like to see something in Forge, you should be ready to implement it as a PR. -->
<!-- If you're not sure, open a Draft PR or discuss it in the Discord server. -->
<!-- Discord: https://discord.gg/UvedJ9m -->
+26
View File
@@ -0,0 +1,26 @@
---
name: Issue report
about: Visit the forum first for issues with crashes.
title: ''
labels: Triage
assignees: ''
---
<!-- Thank you for reporting! -->
<!-- For support with crashes and issues, please create a post on the forum instead: -->
<!-- https://www.minecraftforge.net/forum/forum/18-support-bug-reports/ -->
**Minecraft Version:** {Minecraft version}
**Forge Version:** {Forge version. *Version number, not latest/rb*}
**Logs:** {Link(s) to GitHub Gist with full latest.log and/or crash report}
**Steps to Reproduce:**
1. Do this
2. Then do that
3. ...
**Description of issue:**
-37
View File
@@ -1,37 +0,0 @@
# How to install Forge: For Players
Go to [the Forge website](http://files.minecraftforge.net)
and select the minecraft version you wish to get forge for from the list.
You can download the installer for the *Recommended Build* or the
*Latest build* there. Latest builds may have newer features but may be
more unstable as a result. The installer will attempt to install forge
into your vanilla launcher environment, where you can then create a new
profile using that version and play the game!
For support and questions, visit [the Support Forum](http://www.minecraftforge.net/forum/forum/18-support-bug-reports/).
Here is a short video from Rorax showing how to install and setup Forge:
[![HOWTO Install Forge](https://img.youtube.com/vi/lB3ArN_-3Oc/0.jpg)](https://www.youtube.com/watch?v=lB3ArN_-3Oc)
# How to install Forge: For Modders
[See the "Getting Started" section in the Forge Documentation](http://mcforge.readthedocs.io/en/latest/gettingstarted/).
# How to install Forge: For those wishing to work on Forge itself
If you wish to actually inspect Forge, submit PRs or otherwise work
with Forge itself, you're in the right place!
[See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/).
## Pull requests
[See the "Making Changes and Pull Requests" section in the Forge documentation](http://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests).
### Contributor License Agreement
We require all contributors to acknowledge the [Forge Contributor
License Agreement](https://cla-assistant.io/MinecraftForge/MinecraftForge). Please ensure you have a valid email address
associated with your github account to do this. If you have previously
signed it, you should be OK.
+107 -19
View File
@@ -7,6 +7,7 @@ buildscript {
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
classpath 'org.ow2.asm:asm:7.1'
}
}
import groovy.json.JsonSlurper
@@ -20,10 +21,12 @@ import net.minecraftforge.gradle.common.task.ArchiveChecksum
import net.minecraftforge.gradle.common.task.DownloadMavenArtifact
import net.minecraftforge.gradle.common.task.SignJar
import net.minecraftforge.gradle.patcher.task.ApplyBinPatches
import net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
import net.minecraftforge.gradle.userdev.tasks.RenameJar
import org.apache.tools.ant.filters.ReplaceTokens
import de.undercouch.gradle.tasks.download.Download
import net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
import org.gradle.plugins.ide.eclipse.model.SourceFolder
import org.objectweb.asm.ClassReader
import java.util.stream.Collectors
@@ -45,9 +48,9 @@ ext {
]
}
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20190621-1.14.2'
MC_VERSION = '1.14.3'
MCP_VERSION = '20190624.152911'
MAPPING_VERSION = '20190719-1.14.3'
MC_VERSION = '1.14.4'
MCP_VERSION = '20190719.173545'
}
project(':mcp') {
@@ -169,11 +172,12 @@ project(':forge') {
}
ext {
SPEC_VERSION = '27.0' // This is overwritten by git tag, but here so dev time doesnt explode
SPEC_VERSION = '28.0' // 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'
}
def getVersion = {
@@ -335,6 +339,14 @@ project(':forge') {
'Implementation-Title': 'FML Launcher',
'Implementation-Version': SPEC_VERSION,
'Implementation-Vendor': 'Forge'
] as LinkedHashMap,
'net/minecraftforge/fml/userdev/': [
'Specification-Title': 'Forge User Development',
'Specification-Vendor': 'Forge Development LLC',
'Specification-Version': SPEC_VERSION,
'Implementation-Title': project.group,
'Implementation-Version': project.version.substring(MC_VERSION.length() + 1),
'Implementation-Vendor': 'Forge Development LLC'
] as LinkedHashMap
]
}
@@ -355,12 +367,12 @@ 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:2.1.+'
installer 'cpw.mods:modlauncher:3.0.+'
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.5.+'
installer 'net.minecraftforge:coremods:0.6.+'
installer 'net.minecraftforge:unsafe:0.2.+'
installer 'com.electronwill.night-config:core:3.6.0'
installer 'com.electronwill.night-config:toml:3.6.0'
@@ -449,6 +461,21 @@ project(':forge') {
clean = { genJoinedBinPatches.cleanJar }
input = genJoinedBinPatches.output
}
// Create SRG named Vanilla jars, using the SpecialSource we have in the installer
task createClientSRG(type: RenameJar, dependsOn: genClientBinPatches) {
tool = SPECIAL_SOURCE + ':shaded'
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
mappings = { genClientBinPatches.srg }
input = { genClientBinPatches.cleanJar }
output = file('build/createClientSRG/output.jar')
}
task createServerSRG(type: RenameJar, dependsOn: genServerBinPatches) {
tool = SPECIAL_SOURCE + ':shaded'
args = ['--stable', '--in-jar', '{input}', '--out-jar', '{output}', '--srg-in', '{mappings}']
mappings = { genServerBinPatches.srg }
input = { genServerBinPatches.cleanJar }
output = file('build/createServerSRG/output.jar')
}
// Checksum tasks so that we can know if the vanilla classes are what we expect them to do!
task clientBaseChecksum(type: ArchiveChecksum, dependsOn: genClientBinPatches) {
input = { genClientBinPatches.cleanJar} //Lazy because Patcher Plugin sets the value afterEvaluate
@@ -491,9 +518,58 @@ project(':forge') {
}
}
}
task checkATs(dependsOn: genJoinedBinPatches) {
inputs.file { genJoinedBinPatches.cleanJar }
inputs.files patcher.accessTransformers
doLast {
def vanilla = [:]
def zip = new java.util.zip.ZipFile(genJoinedBinPatches.cleanJar)
zip.entries().findAll { !it.directory && it.name.endsWith('.class') }.each { entry ->
new ClassReader(zip.getInputStream(entry)).accept(new org.objectweb.asm.ClassVisitor(org.objectweb.asm.Opcodes.ASM7) {
String name
void visit(int version, int access, String name, String sig, String superName, String[] interfaces) {
this.name = name
vanilla[name] = access
}
org.objectweb.asm.FieldVisitor visitField(int access, String name, String desc, String sig, Object value) {
vanilla[this.name + ' ' + name] = access
return null
}
org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String sig, String[] excs) {
vanilla[this.name + ' ' + name + desc] = access
return null
}
}, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES)
}
patcher.accessTransformers.each { f ->
TreeMap lines = [:]
f.eachLine { line ->
def idx = line.indexOf('#')
if (idx == 0 || line.isEmpty()) return
def comment = idx == -1 ? null : line.substring(idx)
if (idx != -1) line = line.substring(0, idx - 1)
def (modifier, cls, desc) = (line.trim() + ' ').split(' ', -1)
def key = cls + (desc.isEmpty() ? '' : ' ' + desc)
def access = vanilla[key.replace('.', '/')]
if (access == null) {
if ((desc.equals('*') || desc.equals('*()')) && vanilla[cls.replace('.', '/')] != null)
println('Warning: ' + line)
else {
println('Invalid: ' + line)
return
}
}
//TODO: Check access actually changes, and expand inheretence?
lines[key] = [modifier: modifier, comment: comment]
}
f.text = lines.collect{ it.value.modifier + ' ' + it.key + (it.value.comment == null ? '' : ' ' + it.value.comment) }.join('\n')
}
}
}
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
inputs.file universalJar.archivePath
inputs.file { launcherJar.archivePath }
ext {
output = file('build/version.json')
vanilla = project(':mcp').file('build/mcp/downloadJson/version.json')
@@ -547,10 +623,10 @@ project(':forge') {
}
}
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches]) {
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches/*, createClientSRG, createServerSRG*/]) {
ext {
output = file('build/install_profile.json')
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.0.3'
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.1.4'
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.1.0'
}
doFirst {
@@ -560,6 +636,10 @@ project(':forge') {
inputs.file applyServerBinPatches.output
inputs.file genClientBinPatches.toolJar
inputs.file launcherJson.output
/*
inputs.file createClientSRG.output
inputs.file createServerSRG.output
*/
outputs.file output
doLast {
def libs = [
@@ -614,6 +694,10 @@ project(':forge') {
client: "[net.minecraft:client:${MC_VERSION}-${MCP_VERSION}:srg]",
server: "[net.minecraft:server:${MC_VERSION}-${MCP_VERSION}:srg]"
],
/*MC_SRG_SHA: [
client: "'${sha1(createClientSRG.output)}'",
server: "'${sha1(createServerSRG.output)}'"
],*/
PATCHED: [
client: "[${project.group}:${project.name}:${project.version}:client]",
server: "[${project.group}:${project.name}:${project.version}:server]"
@@ -621,6 +705,10 @@ project(':forge') {
PATCHED_SHA: [
client: "'${sha1(applyClientBinPatches.output)}'",
server: "'${sha1(applyServerBinPatches.output)}'"
],
MCP_VERSION: [
client: "'${MCP_VERSION}'",
server: "'${MCP_VERSION}'"
]
],
processors: [
@@ -646,21 +734,19 @@ project(':forge') {
'{MC_SLIM}': '{MC_SLIM_SHA}',
'{MC_EXTRA}': '{MC_EXTRA_SHA}'
]
], [ // SpecialSource has a bug where it won't create the nessasary directories, remove when they fix that.
jar: INSTALLER_TOOLS,
classpath: getClasspath(project, libs, INSTALLER_TOOLS),
args: [
'--task', 'CREATE_PARENTS',
'--target', '{MC_SRG}'
]
], [
jar: 'net.md-5:SpecialSource:1.8.3',
classpath: getClasspath(project, libs, 'net.md-5:SpecialSource:1.8.3'),
jar: SPECIAL_SOURCE,
classpath: getClasspath(project, libs, SPECIAL_SOURCE),
args: [
//'--stable', Java 9 Is borked, https://bugs.openjdk.java.net/browse/JDK-8184940 TODO: find a fix.
'--in-jar', '{MC_SLIM}',
'--out-jar', '{MC_SRG}',
'--srg-in', '{MAPPINGS}'
]/*,
outputs: [
'{MC_SRG}': '{MC_SRG_SHA}'
]
*/
], [
jar: BIN_PATCHER,
classpath: getClasspath(project, libs, BIN_PATCHER),
@@ -703,6 +789,7 @@ project(':forge') {
dependsOn fixAnnotationsJson
*/
/* We do not actually check this anywhere, so it's 400KB of uselless data
// Add checksum files of clean and patched vanilla classes.
['client', 'server'].each { side ->
['Base', 'Patched'].each { type ->
@@ -712,6 +799,7 @@ project(':forge') {
}
}
dependsOn checksums
*/
// add crowdin locales
from { !crowdin.state.skipped ? zipTree(crowdin.archivePath) : null}
@@ -881,7 +969,7 @@ project(':forge') {
data {
main 'net.minecraftforge.userdev.LaunchTesting'
environment 'target', 'fmldevdata'
environment 'target', 'fmluserdevdata'
environment 'MC_VERSION', "${MC_VERSION}"
environment 'FORGE_GROUP', "${project.group}"
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
+65
View File
@@ -0,0 +1,65 @@
<img src="assets/Forge_logo.svg">
MinecraftForge [![Latest Release](https://img.shields.io/maven-metadata/v/https/files.minecraftforge.net/maven/net/minecraftforge/forge/maven-metadata.xml.svg?label=latest)](https://files.minecraftforge.net) [![Discord](https://img.shields.io/discord/313125603924639766.svg?color=%237289da&label=discord&logo=discord&logoColor=%237289da)](https://discord.gg/UvedJ9m) [![Support](https://img.shields.io/badge/patreon-support-orange.svg)](https://www.patreon.com/LexManos) [![Merch](https://img.shields.io/badge/flocker-merch-blueviolet.svg)](https://forgedev.flocker.tv/)
=============
Forge is a free, open-source modding API all of your favourite mods use!
| Version | Support |
| ------------- | ------------- |
| 1.14.x | Active (latest) |
| 1.12.x | Active (stable) |
* [Download]
* [Forum]
* [Discord]
* [Documentation]
#### Notes:
- Introduced in 1.13 was a new FML, information found [here](NewFML.md).
# Installing Forge
Go to [the Forge website](https://files.minecraftforge.net)
and select the Minecraft version you wish to get Forge for from the list.
You can download the installer for the *Recommended Build* or the
*Latest build* there. Latest builds may have newer features but may be
more unstable as a result. The installer will attempt to install Forge
into your vanilla launcher environment, where you can then create a new
profile using that version and play the game!
For support and questions, visit [the Support Forum](https://www.minecraftforge.net/forum/forum/18-support-bug-reports/).
[Here is a short video from Rorax showing how to install and setup Forge.](https://www.youtube.com/watch?v=lB3ArN_-3Oc)
# Creating Mods
[See the "Getting Started" section in the Forge Documentation](https://mcforge.readthedocs.io/en/latest/gettingstarted/).
# Contribute to Forge
If you wish to actually inspect Forge, submit PRs or otherwise work
with Forge itself, you're in the right place!
[See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/).
### Pull requests
[See the "Making Changes and Pull Requests" section in the Forge documentation](https://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests).
Please read the contributing guidelines found [here](CONTRIBUTING.md) before making a pull request.
### Contributor License Agreement
We require all contributors to acknowledge the [Forge Contributor
License Agreement](https://cla-assistant.io/MinecraftForge/MinecraftForge). Please ensure you have a valid email address
associated with your GitHub account to do this. If you have previously
signed it, you should be OK.
#### Donate
*Forge is a large project with many collaborators working on it around the clock. Forge is and will always remain free to use and modify. However, it costs money to run such a large project as this, so please consider [becoming a patron](https://www.patreon.com/LexManos) or buying some [cool merch](https://forgedev.flocker.tv/).*
[Download]: https://files.minecraftforge.net/
[Forum]: https://www.minecraftforge.net/forum/
[Discord]: https://discord.gg/UvedJ9m
[Documentation]: https://mcforge.readthedocs.io
View File
File renamed without changes.
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg enable-background="new 164.072 372.466 294.41 46.56" version="1.1" viewBox="164.072 372.466 294.41 46.56" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g fill="#DFA86A">
<polygon points="266.16 417.99 277.12 417.99 277.12 401.05 295.09 401.05 295.09 390.78 277.12 390.78 277.12 383.77 296.18 383.77 296.18 373.5 266.16 373.5"/>
<path d="m337.33 378.7c-2.103-2.057-4.629-3.64-7.51-4.704-2.743-1.015-5.786-1.528-9.041-1.528l-0.356 2e-3c-3.362 0-6.503 0.556-9.338 1.651-2.857 1.106-5.357 2.707-7.434 4.761-2.073 2.052-3.714 4.559-4.877 7.45-1.158 2.876-1.748 6.104-1.748 9.59 0 3.417 0.59 6.582 1.753 9.403 1.163 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.834 1.096 5.975 1.651 9.339 1.651h0.023c3.402-0.043 6.57-0.639 9.42-1.772 2.863-1.142 5.375-2.757 7.465-4.804 2.091-2.051 3.742-4.524 4.91-7.358 1.162-2.823 1.75-5.987 1.75-9.402 0-3.487-0.588-6.705-1.748-9.568-1.168-2.874-2.82-5.371-4.913-7.425zm-4.644 16.762c0 1.96-0.302 3.782-0.896 5.413-0.587 1.607-1.42 3.011-2.479 4.167-1.05 1.147-2.335 2.065-3.821 2.728-1.479 0.656-3.164 0.99-5.008 0.99-1.84 0-3.514-0.333-4.973-0.988-1.47-0.662-2.747-1.578-3.799-2.729-1.062-1.156-1.895-2.559-2.479-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.298-3.497 0.887-5.044 0.584-1.536 1.419-2.894 2.479-4.037 1.048-1.132 2.323-2.03 3.792-2.674 1.465-0.642 3.145-0.968 4.988-0.968 1.848 0 3.539 0.326 5.025 0.971 1.481 0.643 2.766 1.541 3.812 2.671 1.062 1.143 1.896 2.501 2.479 4.036 0.589 1.548 0.889 3.245 0.889 5.044z"/>
<path d="m376.27 395.65c1.902-2.327 2.867-5.221 2.867-8.603 0-2.614-0.508-4.84-1.506-6.613-0.997-1.762-2.354-3.188-4.035-4.234-1.603-0.995-3.445-1.705-5.482-2.114-1.938-0.388-3.969-0.583-6.037-0.583h-16.021v44.487h10.961v-17.282h2.35l9.447 17.282h13.127l-11.199-18.646c2.262-0.728 4.116-1.964 5.528-3.694zm-19.254-12.223h4.426c0.844 0 1.73 0.054 2.636 0.16 0.784 0.094 1.503 0.283 2.132 0.568 0.496 0.225 0.888 0.553 1.193 0.998 0.283 0.415 0.428 1.031 0.428 1.836 0 0.931-0.16 1.643-0.459 2.06-0.34 0.472-0.771 0.813-1.32 1.046-0.686 0.289-1.459 0.477-2.301 0.554-0.975 0.089-1.963 0.136-2.938 0.136h-3.795l-2e-3 -7.358z"/>
<path d="m394.82 386.38c1.05-1.132 2.325-2.03 3.793-2.674 1.464-0.642 3.144-0.968 4.988-0.968 1.843 0 3.611 0.311 5.26 0.921 1.609 0.599 2.992 1.449 4.107 2.531l1.314 1.278 8.019-8.105-1.454-1.298c-2.355-2.103-5.066-3.586-8.058-4.407-2.879-0.789-5.987-1.189-9.247-1.189-3.361 0-6.503 0.556-9.339 1.651-2.856 1.106-5.355 2.707-7.431 4.761-2.074 2.052-3.716 4.559-4.88 7.45-1.158 2.876-1.746 6.104-1.746 9.59 0 3.417 0.59 6.582 1.752 9.403 1.164 2.829 2.807 5.297 4.88 7.329 2.073 2.03 4.572 3.621 7.425 4.724 2.832 1.096 5.975 1.651 9.339 1.651 6.501 0 12.475-1.432 17.751-4.25l0.979-0.522v-23.814h-19.313v10.27h8.354v6.639c-0.871 0.397-1.834 0.709-2.881 0.933-1.5 0.314-3.127 0.478-4.83 0.478-1.841 0-3.514-0.333-4.973-0.988-1.472-0.662-2.748-1.578-3.801-2.729-1.06-1.156-1.893-2.559-2.478-4.167-0.595-1.63-0.896-3.451-0.896-5.413 0-1.801 0.299-3.497 0.887-5.044 0.586-1.54 1.421-2.897 2.479-4.041z"/>
<polygon points="437.69 407.72 437.69 400.36 456.41 400.36 456.41 390.09 437.69 390.09 437.69 383.77 457.44 383.77 457.44 373.5 426.72 373.5 426.72 417.99 458.48 417.99 458.48 407.72"/>
</g>
<path d="m243.63 379.09l-37.842-1.852 46.229-0.034v-3.727h-52.125l-1e-3 7.798v6.201c0 0.115-1.52-9.144-1.87-11.734h-4.098v13.029c0 0.123-1.753-10.888-1.939-12.264h-27.914c1.902 1.648 12.401 10.598 19.865 14.28 3.741 1.846 8.33 1.86 12.414 1.974 2.075 0.06 4.25 0.217 5.803 1.754 2.255 2.236 2.758 5.704 0.814 8.33-1.922 2.594-7.335 3.156-7.335 3.156l-4.509 5.531v6.424h10.251l0.319-6.348 8.863-6.285c-0.946 0.757-3.058 2.783-6.229 7.666-0.717 1.102-1.275 2.306-1.711 3.49 2.238-1.896 6.84-3.194 12.153-3.194 5.307 0 9.903 1.295 12.146 3.188-0.437-1.185-0.994-2.385-1.709-3.483-3.172-4.883-5.284-6.909-6.229-7.666l8.863 6.285 0.32 6.348h9.565v-6.424l-4.507-5.531s-6.675-0.425-8.423-3.156c-5.032-7.869 2.115-20.082 18.836-23.756z" fill="#1E2D41"/>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

+19 -1
View File
@@ -28,7 +28,7 @@ minecraft {
mappings channel: '@MAPPING_CHANNEL@', version: '@MAPPING_VERSION@'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
// accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg')
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
@@ -64,6 +64,24 @@ minecraft {
}
}
}
data {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
mods {
examplemod {
source sourceSets.main
}
}
}
}
}
+2 -2
View File
@@ -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="[26,)" #mandatory
versionRange="[27,)" #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.2]"
versionRange="[1.14.3]"
ordering="NONE"
side="BOTH"
@@ -1,14 +0,0 @@
--- a/com/mojang/blaze3d/platform/TextureUtil.java
+++ b/com/mojang/blaze3d/platform/TextureUtil.java
@@ -44,7 +44,10 @@
}
public static void prepareImage(NativeImage.PixelFormatGLCode p_prepareImage_0_, int p_prepareImage_1_, int p_prepareImage_2_, int p_prepareImage_3_, int p_prepareImage_4_) {
- bind(p_prepareImage_1_);
+ synchronized (net.minecraftforge.fml.client.SplashProgress.class)
+ {
+ bind(p_prepareImage_1_);
+ }
if (p_prepareImage_2_ >= 0) {
GlStateManager.texParameter(3553, 33085, p_prepareImage_2_);
GlStateManager.texParameter(3553, 33082, 0);
@@ -13,7 +13,16 @@
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_) {
@@ -291,7 +292,7 @@
@@ -246,6 +247,8 @@
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;
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 @@
@Deprecated
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
@@ -22,7 +31,7 @@
}
@Deprecated
@@ -303,8 +304,9 @@
@@ -303,8 +306,9 @@
return this.field_149789_z;
}
@@ -33,7 +42,7 @@
}
@Deprecated
@@ -315,7 +317,7 @@
@@ -315,7 +319,7 @@
@Deprecated
@OnlyIn(Dist.CLIENT)
public int func_220058_a(BlockState p_220058_1_, IEnviromentBlockReader p_220058_2_, BlockPos p_220058_3_) {
@@ -42,7 +51,7 @@
}
@OnlyIn(Dist.CLIENT)
@@ -460,10 +462,9 @@
@@ -460,10 +464,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_) {
@@ -54,7 +63,7 @@
}
@Deprecated
@@ -472,8 +473,8 @@
@@ -472,8 +475,8 @@
if (f == -1.0F) {
return 0.0F;
} else {
@@ -65,7 +74,7 @@
}
}
@@ -553,7 +554,7 @@
@@ -553,7 +556,7 @@
}
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
@@ -74,7 +83,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 +566,7 @@
@@ -565,7 +568,7 @@
}
public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
@@ -83,7 +92,7 @@
while(p_180637_3_ > 0) {
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
p_180637_3_ -= i;
@@ -575,6 +576,7 @@
@@ -575,6 +578,7 @@
}
@@ -91,7 +100,7 @@
public float func_149638_a() {
return this.field_149781_w;
}
@@ -677,6 +679,7 @@
@@ -677,6 +681,7 @@
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
}
@@ -99,7 +108,7 @@
@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 +694,7 @@
@@ -691,6 +696,7 @@
return Fluids.field_204541_a.func_207188_f();
}
@@ -107,7 +116,7 @@
public float func_208618_m() {
return this.field_149765_K;
}
@@ -711,6 +715,7 @@
@@ -711,6 +717,7 @@
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
}
@@ -115,7 +124,7 @@
public boolean func_149659_a(Explosion p_149659_1_) {
return true;
}
@@ -755,6 +760,7 @@
@@ -755,6 +762,7 @@
}
}
@@ -123,7 +132,7 @@
public SoundType func_220072_p(BlockState p_220072_1_) {
return this.field_149762_H;
}
@@ -780,13 +786,80 @@
@@ -780,13 +788,80 @@
}
public static boolean func_196252_e(Block p_196252_0_) {
@@ -206,3 +215,38 @@
public static enum OffsetType {
NONE,
XZ,
@@ -805,6 +880,8 @@
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 Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
this.field_200953_a = p_i48616_1_;
@@ -835,6 +912,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;
+ block$properties.harvestLevel = p_200950_0_.harvestLevel;
+ block$properties.harvestTool = p_200950_0_.harvestTool;
return block$properties;
}
@@ -883,6 +962,16 @@
return this;
}
+ public Block.Properties harvestLevel(int harvestLevel) {
+ this.harvestLevel = harvestLevel;
+ return this;
+ }
+
+ public Block.Properties harvestTool(net.minecraftforge.common.ToolType harvestTool) {
+ this.harvestTool = harvestTool;
+ return this;
+ }
+
public Block.Properties func_222380_e() {
this.field_222381_j = LootTables.field_186419_a;
return this;
@@ -1,6 +1,6 @@
--- a/net/minecraft/block/DetectorRailBlock.java
+++ b/net/minecraft/block/DetectorRailBlock.java
@@ -126,6 +126,8 @@
@@ -128,6 +128,8 @@
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) {
if (p_180641_1_.func_177229_b(field_176574_M)) {
@@ -4,7 +4,7 @@
public BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
BlockPos blockpos = p_196448_2_.func_177977_b();
BlockState blockstate = p_196448_1_.func_180495_p(blockpos);
- if (!this.func_196446_i(blockstate) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) {
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) {
+ if (!this.canCatchFire(p_196448_1_, p_196448_2_, Direction.UP) && !Block.func_220056_d(blockstate, p_196448_1_, blockpos, Direction.UP)) {
BlockState blockstate1 = this.func_176223_P();
@@ -112,7 +112,7 @@
BlockPos blockpos = p_180655_3_.func_177977_b();
BlockState blockstate = p_180655_2_.func_180495_p(blockpos);
- if (!this.func_196446_i(blockstate) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_180655_2_, blockpos, Direction.UP)) {
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177976_e()))) {
+ if (!this.canCatchFire(p_180655_2_, blockpos, Direction.UP) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
+ if (this.canCatchFire(p_180655_2_, blockpos.func_177976_e(), Direction.EAST)) {
@@ -18,12 +18,20 @@
}
protected boolean func_176566_a(World p_176566_1_, BlockPos p_176566_2_, BlockState p_176566_3_, boolean p_176566_4_, int p_176566_5_) {
@@ -105,7 +111,7 @@
RailShape railshape = blockstate.func_177229_b(field_176568_b);
@@ -99,13 +105,13 @@
protected boolean func_208071_a(World p_208071_1_, BlockPos p_208071_2_, boolean p_208071_3_, int p_208071_4_, RailShape p_208071_5_) {
BlockState blockstate = p_208071_1_.func_180495_p(p_208071_2_);
- if (blockstate.func_177230_c() != this) {
+ if (!(blockstate.func_177230_c() instanceof PoweredRailBlock)) {
return false;
} else {
- RailShape railshape = blockstate.func_177229_b(field_176568_b);
+ RailShape railshape = getRailDirection(blockstate, p_208071_1_, p_208071_2_, null);
if (p_208071_5_ != RailShape.EAST_WEST || railshape != RailShape.NORTH_SOUTH && railshape != RailShape.ASCENDING_NORTH && railshape != RailShape.ASCENDING_SOUTH) {
if (p_208071_5_ != RailShape.NORTH_SOUTH || railshape != RailShape.EAST_WEST && railshape != RailShape.ASCENDING_EAST && railshape != RailShape.ASCENDING_WEST) {
- if (blockstate.func_177229_b(field_176569_M)) {
+ if (!(blockstate.func_177230_c() instanceof PoweredRailBlock) || isActivator != ((PoweredRailBlock)blockstate.func_177230_c()).isActivator) {
+ if (isActivator == ((PoweredRailBlock)blockstate.func_177230_c()).isActivator) {
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
} else {
return false;
@@ -3,10 +3,10 @@
@@ -124,7 +124,7 @@
BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1);
if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) {
boolean flag = Block.func_220056_d(blockstate, p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
- if (flag && func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177984_a()))) {
+ if (flag && canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177984_a()), p_208074_1_, blockpos.func_177984_a(), null)) {
if (func_208062_a(blockstate.func_196952_d(p_208074_1_, blockpos))) {
if (blockstate.func_224756_o(p_208074_1_, blockpos)) {
return RedstoneSide.UP;
}
@@ -133,7 +133,7 @@
@@ -0,0 +1,11 @@
--- a/net/minecraft/block/ScaffoldingBlock.java
+++ b/net/minecraft/block/ScaffoldingBlock.java
@@ -142,6 +142,8 @@
return i;
}
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
+
static {
VoxelShape voxelshape = Block.func_208617_a(0.0D, 14.0D, 0.0D, 16.0D, 16.0D, 16.0D);
VoxelShape voxelshape1 = Block.func_208617_a(0.0D, 0.0D, 0.0D, 2.0D, 16.0D, 2.0D);
@@ -7,4 +7,4 @@
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
if (!func_220257_b(p_196267_1_, p_196267_2_, p_196267_3_)) {
p_196267_2_.func_175656_a(p_196267_3_, Blocks.field_150346_d.func_176223_P());
} else if (p_196267_2_.func_201696_r(p_196267_3_.func_177984_a()) >= 4) {
} else {
@@ -18,3 +18,10 @@
Direction direction = Direction.func_176741_a(p_196267_4_);
BlockPos blockpos = p_196267_3_.func_177984_a();
if (direction.func_176740_k().func_176722_c() && !p_196267_1_.func_177229_b(func_176267_a(direction))) {
@@ -329,4 +329,6 @@
public static BooleanProperty func_176267_a(Direction p_176267_0_) {
return field_196546_A.get(p_176267_0_);
}
+
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/GameSettings.java
+++ b/net/minecraft/client/GameSettings.java
@@ -142,7 +142,7 @@
@@ -143,7 +143,7 @@
public final KeyBinding[] field_151456_ac = new KeyBinding[]{new KeyBinding("key.hotbar.1", 49, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 50, "key.categories.inventory"), new KeyBinding("key.hotbar.3", 51, "key.categories.inventory"), new KeyBinding("key.hotbar.4", 52, "key.categories.inventory"), new KeyBinding("key.hotbar.5", 53, "key.categories.inventory"), new KeyBinding("key.hotbar.6", 54, "key.categories.inventory"), new KeyBinding("key.hotbar.7", 55, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 56, "key.categories.inventory"), new KeyBinding("key.hotbar.9", 57, "key.categories.inventory")};
public final KeyBinding field_193629_ap = new KeyBinding("key.saveToolbarActivator", 67, "key.categories.creative");
public final KeyBinding field_193630_aq = new KeyBinding("key.loadToolbarActivator", 88, "key.categories.creative");
@@ -9,7 +9,7 @@
protected Minecraft field_74317_L;
private final File field_74354_ai;
public Difficulty field_74318_M = Difficulty.NORMAL;
@@ -161,6 +161,7 @@
@@ -162,6 +162,7 @@
public String field_74363_ab = "en_us";
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
@@ -17,7 +17,7 @@
this.field_74317_L = p_i46326_1_;
this.field_74354_ai = new File(p_i46326_2_, "options.txt");
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
@@ -462,7 +463,11 @@
@@ -467,7 +468,11 @@
for(KeyBinding keybinding : this.field_74324_K) {
if (s1.equals("key_" + keybinding.func_151464_g())) {
@@ -30,7 +30,7 @@
}
}
@@ -510,6 +515,7 @@
@@ -515,6 +520,7 @@
}
public void func_74303_b() {
@@ -38,7 +38,7 @@
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
@@ -583,7 +589,7 @@
@@ -589,7 +595,7 @@
printwriter.println("glDebugVerbosity:" + this.field_209231_W);
for(KeyBinding keybinding : this.field_74324_K) {
@@ -47,7 +47,7 @@
}
for(SoundCategory soundcategory : SoundCategory.values()) {
@@ -680,6 +686,25 @@
@@ -686,6 +692,25 @@
}
}
@@ -25,7 +25,15 @@
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
this.field_147129_ai = func_147122_X();
this.field_71437_Z = null;
@@ -451,6 +451,7 @@
@@ -442,7 +442,6 @@
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
this.field_71417_B = new MouseHelper(this);
- this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i());
this.field_195559_v = new KeyboardListener(this);
this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i());
GLX.init();
@@ -451,6 +450,7 @@
this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F);
this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC);
this.field_71474_y.func_198017_a(this.field_110448_aq);
@@ -33,16 +41,17 @@
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 +522,7 @@
@@ -521,7 +521,8 @@
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);
- this.field_71456_v = new IngameGui(this);
+ this.field_71456_v = new net.minecraftforge.client.ForgeIngameGui(this);
+ this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
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()) {
@@ -542,7 +543,7 @@
@@ -543,7 +544,7 @@
if (SharedConstants.field_206244_b) {
this.func_213256_aB();
}
@@ -51,7 +60,7 @@
}, false));
}
@@ -557,7 +558,7 @@
@@ -558,7 +559,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_) -> {
@@ -60,7 +69,7 @@
});
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
@@ -646,7 +647,7 @@
@@ -647,7 +648,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());
@@ -69,7 +78,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);
@@ -661,6 +662,7 @@
@@ -662,6 +663,7 @@
return this.field_71474_y.field_211842_aO;
}
@@ -77,7 +86,7 @@
public CompletableFuture<Void> func_213237_g() {
if (this.field_213276_aV != null) {
return this.field_213276_aV;
@@ -740,16 +742,20 @@
@@ -741,16 +743,20 @@
}
public void func_147108_a(@Nullable Screen p_147108_1_) {
@@ -102,7 +111,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);
@@ -874,11 +880,13 @@
@@ -875,11 +881,13 @@
GlStateManager.enableTexture();
this.field_71424_I.func_76319_b();
if (!this.field_71454_w) {
@@ -116,7 +125,7 @@
}
this.field_71424_I.func_219897_b();
@@ -1146,10 +1154,10 @@
@@ -1147,10 +1155,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();
@@ -129,7 +138,7 @@
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
}
}
@@ -1176,7 +1184,7 @@
@@ -1177,7 +1185,7 @@
case BLOCK:
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a();
@@ -138,7 +147,7 @@
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
break;
}
@@ -1186,6 +1194,7 @@
@@ -1187,6 +1195,7 @@
}
this.field_71439_g.func_184821_cY();
@@ -146,7 +155,7 @@
}
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
@@ -1235,6 +1244,9 @@
@@ -1236,6 +1245,9 @@
}
}
@@ -156,7 +165,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;
@@ -1254,6 +1266,8 @@
@@ -1255,6 +1267,8 @@
--this.field_71467_ac;
}
@@ -165,7 +174,7 @@
this.field_71424_I.func_76320_a("gui");
if (!this.field_71445_n) {
this.field_71456_v.func_73831_a();
@@ -1372,6 +1386,8 @@
@@ -1373,6 +1387,8 @@
this.field_71424_I.func_219895_b("keyboard");
this.field_195559_v.func_204870_b();
this.field_71424_I.func_76319_b();
@@ -174,15 +183,7 @@
}
private void func_184117_aA() {
@@ -1430,6 +1446,7 @@
this.field_71439_g.func_71040_bB(Screen.hasControlDown());
}
}
+ if (field_71441_e != null) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
boolean flag2 = this.field_71474_y.field_74343_n != ChatVisibility.HIDDEN;
if (flag2) {
@@ -1526,6 +1543,12 @@
@@ -1527,6 +1543,12 @@
this.func_147108_a(worldloadprogressscreen);
while(!this.field_71437_Z.func_71200_ad()) {
@@ -195,7 +196,7 @@
worldloadprogressscreen.tick();
this.func_195542_b(false);
@@ -1546,11 +1569,17 @@
@@ -1547,11 +1569,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));
@@ -214,7 +215,15 @@
WorkingScreen workingscreen = new WorkingScreen();
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
this.func_213241_c(workingscreen);
@@ -1623,6 +1652,7 @@
@@ -1587,6 +1615,7 @@
NarratorChatListener.field_193643_a.func_193642_b();
this.func_213241_c(p_213231_1_);
if (this.field_71441_e != null) {
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
if (integratedserver != null) {
while(!integratedserver.func_213201_w()) {
this.func_195542_b(false);
@@ -1624,6 +1653,7 @@
}
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
@@ -222,7 +231,7 @@
}
public final boolean func_71355_q() {
@@ -1648,112 +1678,8 @@
@@ -1649,112 +1679,8 @@
private void func_147112_ai() {
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
@@ -337,7 +346,7 @@
}
}
@@ -1825,6 +1751,7 @@
@@ -1826,6 +1752,7 @@
return field_71432_P;
}
@@ -345,7 +354,7 @@
public CompletableFuture<Void> func_213245_w() {
return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> {
return p_213240_0_;
@@ -1968,6 +1895,8 @@
@@ -1972,6 +1899,8 @@
}
public MusicTicker.MusicType func_147109_W() {
@@ -354,7 +363,7 @@
if (this.field_71462_r instanceof WinGameScreen) {
return MusicTicker.MusicType.CREDITS;
} else if (this.field_71439_g == null) {
@@ -2124,4 +2053,12 @@
@@ -2128,4 +2057,12 @@
public LoadingGui func_213250_au() {
return this.field_213279_p;
}
@@ -49,3 +49,29 @@
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
}
}
@@ -233,6 +241,10 @@
return this.field_198039_d;
}
+ public boolean isMiddleDown() {
+ return this.field_198038_c;
+ }
+
public double func_198024_e() {
return this.field_198040_e;
}
@@ -241,6 +253,14 @@
return this.field_198041_f;
}
+ public double getXVelocity() {
+ return this.field_198048_m;
+ }
+
+ public double getYVelocity() {
+ return this.field_198049_n;
+ }
+
public void func_198021_g() {
this.field_198043_h = true;
}
@@ -1,42 +1,6 @@
--- a/net/minecraft/client/audio/SoundHandler.java
+++ b/net/minecraft/client/audio/SoundHandler.java
@@ -61,6 +61,7 @@
SoundHandler.Loader soundhandler$loader = new SoundHandler.Loader();
p_212854_2_.func_219894_a();
+ java.util.List<net.minecraft.util.Tuple<ResourceLocation, Runnable>> resources = new java.util.LinkedList<>();
for(String s : p_212854_1_.func_199001_a()) {
p_212854_2_.func_76320_a(s);
@@ -74,7 +75,9 @@
p_212854_2_.func_219895_b("register");
for(Entry<String, SoundList> entry : map.entrySet()) {
+ resources.add(new net.minecraft.util.Tuple<>(new ResourceLocation(s, entry.getKey()), () -> {
soundhandler$loader.func_217944_a(new ResourceLocation(s, entry.getKey()), entry.getValue(), p_212854_1_);
+ }));
}
p_212854_2_.func_76319_b();
@@ -91,6 +94,17 @@
p_212854_2_.func_76319_b();
}
+ net.minecraftforge.fml.common.progress.StartupProgressManager.start("Loading sounds", resources.size(), bar -> {
+ resources.forEach(entry -> {
+ bar.step(entry.func_76341_a().toString());
+ try {
+ entry.func_76340_b().run();
+ } catch (RuntimeException e) {
+ field_147698_b.warn("Invalid sounds.json", e);
+ }
+ });
+ });
+
p_212854_2_.func_219897_b();
return soundhandler$loader;
}
@@ -210,6 +224,11 @@
@@ -210,6 +210,11 @@
this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_);
}
@@ -1,10 +1,10 @@
--- a/net/minecraft/client/gui/ResourceLoadProgressGui.java
+++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java
@@ -83,6 +83,7 @@
@@ -79,6 +79,7 @@
this.blit(k1, i1, 0, 0, 256, 256);
float f3 = this.field_212975_c.func_219555_b();
this.field_212978_f = this.field_212978_f * 0.95F + f3 * 0.050000012F;
+ net.minecraftforge.fml.client.ClientModLoader.renderProgressText();
if (f < 1.0F) {
this.func_212972_a(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, this.field_212978_f, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
}
+ net.minecraftforge.fml.client.ClientModLoader.renderProgressText();
if (f >= 2.0F) {
this.field_212974_b.func_213268_a((LoadingGui)null);
}
@@ -1,5 +1,14 @@
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
@@ -89,7 +89,7 @@
this.func_205702_a();
this.field_193018_j.clear();
- for(RecipeBookCategories recipebookcategories : ClientRecipeBook.func_216769_b(this.field_201522_g)) {
+ for(RecipeBookCategories recipebookcategories : this.field_201522_g.getRecipeBookCategories()) {
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
}
@@ -421,7 +421,7 @@
languagemanager.func_135045_a(language);
@@ -1,24 +1,17 @@
--- a/net/minecraft/client/multiplayer/PlayerController.java
+++ b/net/minecraft/client/multiplayer/PlayerController.java
@@ -104,6 +104,8 @@
}
}
@@ -103,7 +103,9 @@
Block block = blockstate.func_177230_c();
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
return false;
- } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(world, p_187103_1_)) {
+ if (field_78776_a.field_71439_g.func_184614_ca().onBlockStartBreak(p_187103_1_, field_78776_a.field_71439_g)) return false;
+
World world = this.field_78776_a.field_71441_e;
BlockState blockstate = world.func_180495_p(p_187103_1_);
if (!this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b().func_195938_a(blockstate, world, p_187103_1_, this.field_78776_a.field_71439_g)) {
@@ -112,7 +114,7 @@
Block block = blockstate.func_177230_c();
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
return false;
- } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(world, p_187103_1_)) {
return false;
} else {
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
@@ -209,13 +211,13 @@
return false;
} else {
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
@@ -187,13 +189,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_);
@@ -34,7 +27,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_));
}
@@ -239,7 +241,8 @@
@@ -217,7 +219,8 @@
}
public float func_78757_d() {
@@ -44,7 +37,7 @@
}
public void func_78765_e() {
@@ -256,7 +259,7 @@
@@ -234,7 +237,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()) {
@@ -53,7 +46,7 @@
}
return p_178893_1_.equals(this.field_178895_c) && flag;
@@ -320,11 +323,14 @@
@@ -298,11 +301,14 @@
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
return ActionResultType.PASS;
} else {
@@ -68,7 +61,7 @@
}
return actionresult.func_188397_a();
@@ -349,6 +355,9 @@
@@ -327,6 +333,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_));
@@ -78,7 +71,7 @@
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
}
@@ -356,6 +365,9 @@
@@ -334,6 +343,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));
@@ -8,7 +8,7 @@
this.field_147393_d.func_150719_a(new ClientPlayNetHandler(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e));
}
@@ -122,6 +123,7 @@
@@ -126,6 +127,7 @@
}
public void func_209521_a(SCustomPayloadLoginPacket p_209521_1_) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
@@ -711,7 +711,7 @@
@@ -714,7 +714,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 +9,7 @@
}
}
@@ -783,7 +783,9 @@
@@ -790,7 +790,9 @@
public void func_147251_a(SChatPacket p_147251_1_) {
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
@@ -20,7 +20,7 @@
}
public void func_147279_a(SAnimateHandPacket p_147279_1_) {
@@ -955,6 +957,7 @@
@@ -962,6 +964,7 @@
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());
@@ -28,7 +28,7 @@
clientplayerentity1.func_70065_x();
clientplayerentity1.func_175158_f(s);
this.field_147300_g.func_217408_a(i, clientplayerentity1);
@@ -1077,6 +1080,12 @@
@@ -1084,6 +1087,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 +41,7 @@
}
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
@@ -1246,6 +1255,7 @@
@@ -1253,6 +1262,7 @@
clientrecipebook.func_199644_c();
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
imutablesearchtree.func_194040_a();
@@ -49,7 +49,7 @@
}
public void func_200232_a(SPlayerLookPacket p_200232_1_) {
@@ -1326,7 +1336,7 @@
@@ -1333,7 +1343,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,7 +58,7 @@
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());
@@ -1759,10 +1769,12 @@
@@ -1766,10 +1776,12 @@
this.field_147299_f.field_184132_p.field_217741_m.func_217692_a(pointofinterestdebugrenderer$braininfo);
} else {
@@ -0,0 +1,11 @@
--- 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;
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
@@ -174,4 +174,11 @@
@@ -172,4 +172,11 @@
this.field_216791_c = null;
this.field_216789_a = false;
}
@@ -0,0 +1,19 @@
--- a/net/minecraft/client/renderer/BlockModelShapes.java
+++ b/net/minecraft/client/renderer/BlockModelShapes.java
@@ -24,10 +24,16 @@
this.field_178128_c = p_i46245_1_;
}
+ @Deprecated
public TextureAtlasSprite func_178122_a(BlockState p_178122_1_) {
return this.func_178125_b(p_178122_1_).func_177554_e();
}
+ public TextureAtlasSprite getTexture(BlockState state, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) {
+ net.minecraftforge.client.model.data.IModelData data = net.minecraftforge.client.model.ModelDataManager.getModelData(world, pos);
+ return this.func_178125_b(state).getParticleTexture(data == null ? net.minecraftforge.client.model.data.EmptyModelData.INSTANCE : data);
+ }
+
public IBakedModel func_178125_b(BlockState p_178125_1_) {
IBakedModel ibakedmodel = this.field_178129_a.get(p_178125_1_);
if (ibakedmodel == null) {
@@ -42,7 +42,7 @@
if (flag1) {
float f4 = hand == Hand.OFF_HAND ? f : 0.0F;
float f6 = 1.0F - MathHelper.func_219799_g(p_78440_1_, this.field_187472_i, this.field_187471_h);
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187467_d))
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e))
this.func_187457_a(abstractclientplayerentity, p_78440_1_, f1, Hand.OFF_HAND, f4, this.field_187468_e, f6);
}
@@ -72,8 +72,9 @@
}
if (blockstate.func_185901_i() != BlockRenderType.INVISIBLE) {
- this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(blockstate));
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(field_78455_a.field_71439_g, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, blockstate, overlayPos))
this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(blockstate));
+ this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().getTexture(blockstate, field_78455_a.field_71441_e, overlayPos));
}
}
@@ -46,7 +46,7 @@
} catch (Throwable throwable) {
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
@@ -655,7 +662,7 @@
@@ -656,7 +663,7 @@
double d2 = activerenderinfo.func_216785_c().field_72449_c;
icamera.func_78547_a(d0, d1, d2);
if (this.field_78531_r.field_71474_y.field_151451_c >= 4) {
@@ -55,7 +55,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("sky");
GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity();
@@ -668,14 +675,14 @@
@@ -669,14 +676,14 @@
GlStateManager.matrixMode(5888);
}
@@ -72,7 +72,7 @@
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
RenderHelper.func_74518_a();
this.field_78531_r.func_213239_aq().func_219895_b("terrain_setup");
@@ -689,7 +696,9 @@
@@ -690,7 +697,9 @@
GlStateManager.disableAlphaTest();
worldrenderer.func_215323_a(BlockRenderLayer.SOLID, activerenderinfo);
GlStateManager.enableAlphaTest();
@@ -82,7 +82,7 @@
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174936_b(false, false);
worldrenderer.func_215323_a(BlockRenderLayer.CUTOUT, activerenderinfo);
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
@@ -708,6 +717,7 @@
@@ -709,6 +718,7 @@
if (flag && this.field_78531_r.field_71476_x != null) {
GlStateManager.disableAlphaTest();
this.field_78531_r.func_213239_aq().func_219895_b("outline");
@@ -90,7 +90,7 @@
worldrenderer.func_215325_a(activerenderinfo, this.field_78531_r.field_71476_x, 0);
GlStateManager.enableAlphaTest();
}
@@ -724,7 +734,7 @@
@@ -725,7 +735,7 @@
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
GlStateManager.disableBlend();
this.func_180436_i();
@@ -99,7 +99,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("particles");
particlemanager.func_215233_a(activerenderinfo, p_181560_1_);
this.func_175072_h();
@@ -738,7 +748,7 @@
@@ -739,7 +749,7 @@
GlStateManager.enableCull();
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.alphaFunc(516, 0.1F);
@@ -108,7 +108,7 @@
GlStateManager.enableBlend();
GlStateManager.depthMask(false);
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
@@ -755,6 +765,9 @@
@@ -756,6 +766,9 @@
this.func_215313_a(activerenderinfo, worldrenderer, p_181560_1_, d0, d1, d2);
}
@@ -118,7 +118,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("hand");
if (this.field_175074_C) {
GlStateManager.clear(256, Minecraft.field_142025_a);
@@ -771,7 +784,7 @@
@@ -772,7 +785,7 @@
GlStateManager.multMatrix(Matrix4f.func_195876_a(this.func_215311_a(p_215313_1_, p_215313_3_, true), (float)this.field_78531_r.field_195558_d.func_198109_k() / (float)this.field_78531_r.field_195558_d.func_198091_l(), 0.05F, this.field_78530_s * 4.0F));
GlStateManager.matrixMode(5888);
GlStateManager.pushMatrix();
@@ -127,19 +127,19 @@
p_215313_2_.func_195466_a(p_215313_3_, p_215313_4_, p_215313_6_, p_215313_8_);
GlStateManager.disableFog();
GlStateManager.popMatrix();
@@ -857,6 +870,11 @@
@@ -858,6 +871,11 @@
}
protected void func_78474_d(float p_78474_1_) {
+ net.minecraftforge.client.IRenderHandler renderer = this.field_78531_r.field_71441_e.func_201675_m().getWeatherRenderer();
+ if (renderer != null) {
+ renderer.render(p_78474_1_, this.field_78531_r.field_71441_e, field_78531_r);
+ renderer.render(this.field_78529_t, p_78474_1_, this.field_78531_r.field_71441_e, this.field_78531_r);
+ return;
+ }
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
if (!(f <= 0.0F)) {
this.func_180436_i();
@@ -1089,4 +1107,9 @@
@@ -1090,4 +1108,9 @@
public ActiveRenderInfo func_215316_n() {
return this.field_215317_L;
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/WorldRenderer.java
+++ b/net/minecraft/client/renderer/WorldRenderer.java
@@ -589,10 +589,12 @@
@@ -592,10 +592,12 @@
this.field_72769_h.func_217381_Z().func_219895_b("blockentities");
RenderHelper.func_74519_b();
@@ -13,7 +13,7 @@
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity, p_215326_3_, -1);
}
}
@@ -600,16 +602,18 @@
@@ -603,16 +605,18 @@
synchronized(this.field_181024_n) {
for(TileEntity tileentity1 : this.field_181024_n) {
@@ -33,7 +33,7 @@
TileEntity tileentity2 = this.field_72769_h.func_175625_s(blockpos);
if (tileentity2 instanceof ChestTileEntity && blockstate.func_177229_b(ChestBlock.field_196314_b) == ChestType.LEFT) {
blockpos = blockpos.func_177972_a(blockstate.func_177229_b(ChestBlock.field_176459_a).func_176746_e());
@@ -730,7 +734,7 @@
@@ -733,7 +737,7 @@
for(int j = -this.field_72739_F; j <= this.field_72739_F; ++j) {
for(int k = -this.field_72739_F; k <= this.field_72739_F; ++k) {
ChunkRender chunkrender1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8));
@@ -42,7 +42,7 @@
chunkrender1.func_178577_a(p_215320_3_);
queue.add(new WorldRenderer.LocalRenderInformationContainer(chunkrender1, (Direction)null, 0));
}
@@ -775,7 +779,7 @@
@@ -778,7 +782,7 @@
this.field_147595_R = true;
BlockPos blockpos2 = chunkrender4.func_178568_j().func_177982_a(8, 8, 8);
boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D;
@@ -51,19 +51,19 @@
this.field_175009_l.add(chunkrender4);
} else {
this.field_72777_q.func_213239_aq().func_76320_a("build near");
@@ -969,6 +973,11 @@
@@ -972,6 +976,11 @@
}
public void func_195465_a(float p_195465_1_) {
+ net.minecraftforge.client.IRenderHandler renderer = this.field_72769_h.func_201675_m().getSkyRenderer();
+ if (renderer != null) {
+ renderer.render(p_195465_1_, field_72769_h, field_72777_q);
+ renderer.render(this.field_72773_u, p_195465_1_, this.field_72769_h, this.field_72777_q);
+ return;
+ }
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.field_223229_c_) {
this.func_180448_r();
} else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
@@ -1113,6 +1122,7 @@
@@ -1116,6 +1125,7 @@
}
public void func_195466_a(float p_195466_1_, double p_195466_2_, double p_195466_4_, double p_195466_6_) {
@@ -71,7 +71,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
float f = 12.0F;
float f1 = 4.0F;
@@ -1488,7 +1498,11 @@
@@ -1491,7 +1501,11 @@
DestroyBlockProgress destroyblockprogress = iterator.next();
BlockPos blockpos = destroyblockprogress.func_180246_b();
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
@@ -84,7 +84,7 @@
double d3 = (double)blockpos.func_177958_n() - d0;
double d4 = (double)blockpos.func_177956_o() - d1;
double d5 = (double)blockpos.func_177952_p() - d2;
@@ -1496,7 +1510,7 @@
@@ -1499,7 +1513,7 @@
iterator.remove();
} else {
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
@@ -93,7 +93,7 @@
int i = destroyblockprogress.func_73106_e();
TextureAtlasSprite textureatlassprite = this.field_94141_F[i];
BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab();
@@ -1517,7 +1531,7 @@
@@ -1520,7 +1534,7 @@
if (p_215325_3_ == 0 && p_215325_2_.func_216346_c() == RayTraceResult.Type.BLOCK) {
BlockPos blockpos = ((BlockRayTraceResult)p_215325_2_).func_216350_a();
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
@@ -102,7 +102,7 @@
GlStateManager.enableBlend();
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.lineWidth(Math.max(2.5F, (float)this.field_72777_q.field_195558_d.func_198109_k() / 1920.0F * 2.5F));
@@ -1984,7 +1998,7 @@
@@ -1994,7 +2008,7 @@
break;
case 2001:
BlockState blockstate = Block.func_196257_b(p_180439_4_);
@@ -111,7 +111,7 @@
SoundType soundtype = blockstate.func_215695_r();
this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false);
}
@@ -2108,6 +2122,11 @@
@@ -2118,6 +2132,11 @@
}
}
@@ -1,16 +1,16 @@
--- a/net/minecraft/client/renderer/color/BlockColors.java
+++ b/net/minecraft/client/renderer/color/BlockColors.java
@@ -22,7 +22,8 @@
@@ -27,7 +27,8 @@
@OnlyIn(Dist.CLIENT)
public class BlockColors {
- private final ObjectIntIdentityMap<IBlockColor> field_186725_a = new ObjectIntIdentityMap<>(32);
+ // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant
+ private final java.util.Map<net.minecraftforge.registries.IRegistryDelegate<Block>, IBlockColor> field_186725_a = new java.util.HashMap<>();
private final Map<Block, Set<IProperty<?>>> field_225311_b = Maps.newHashMap();
public static BlockColors func_186723_a() {
BlockColors blockcolors = new BlockColors();
@@ -63,11 +64,12 @@
@@ -72,11 +73,12 @@
blockcolors.func_186722_a((p_210228_0_, p_210228_1_, p_210228_2_, p_210228_3_) -> {
return p_210228_1_ != null && p_210228_2_ != null ? 2129968 : 7455580;
}, Blocks.field_196651_dG);
@@ -24,7 +24,7 @@
if (iblockcolor != null) {
return iblockcolor.getColor(p_189991_1_, (IEnviromentBlockReader)null, (BlockPos)null, 0);
} else {
@@ -77,13 +79,13 @@
@@ -86,13 +88,13 @@
}
public int func_216860_a(BlockState p_216860_1_, @Nullable IEnviromentBlockReader p_216860_2_, @Nullable BlockPos p_216860_3_, int p_216860_4_) {
@@ -2,7 +2,7 @@
+++ b/net/minecraft/client/renderer/entity/PlayerRenderer.java
@@ -52,6 +52,7 @@
public void func_76986_a(AbstractClientPlayerEntity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
if (!p_76986_1_.func_175144_cb() || this.field_76990_c.field_217783_c != null && this.field_76990_c.field_217783_c.func_216773_g() == p_76986_1_) {
if (!p_76986_1_.func_175144_cb() || this.field_76990_c.field_217783_c.func_216773_g() == p_76986_1_) {
double d0 = p_76986_4_;
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_76986_1_, this, p_76986_9_, p_76986_2_, p_76986_4_, p_76986_6_))) return;
if (p_76986_1_.func_213287_bg()) {
@@ -6,13 +6,17 @@
@OnlyIn(Dist.CLIENT)
-public interface IBakedModel {
+public interface IBakedModel extends net.minecraftforge.client.extensions.IForgeBakedModel {
+
+ /**@deprecated Forge: Use {@link net.minecraftforge.client.extensions.IForgeBakedModel#getQuads(IBlockState, EnumFacing, Random, net.minecraftforge.client.model.data.IModelData)}*/
+ @Deprecated
List<BakedQuad> func_200117_a(@Nullable BlockState p_200117_1_, @Nullable Direction p_200117_2_, Random p_200117_3_);
boolean func_177555_b();
@@ -21,7 +23,8 @@
@@ -19,9 +21,12 @@
boolean func_188618_c();
+ /**@deprecated Forge: Use {@link net.minecraftforge.client.extensions.IForgeBakedModel#getParticleTexture(net.minecraftforge.client.model.data.IModelData)}*/
+ @Deprecated
TextureAtlasSprite func_177554_e();
- ItemCameraTransforms func_177552_f();
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/model/ModelBakery.java
+++ b/net/minecraft/client/renderer/model/ModelBakery.java
@@ -87,7 +87,7 @@
@@ -97,7 +97,7 @@
private final Set<ResourceLocation> field_217848_D = Sets.newHashSet();
private final BlockModelDefinition.ContainerHolder field_209610_F = new BlockModelDefinition.ContainerHolder();
private final Map<ResourceLocation, IUnbakedModel> field_217849_F = Maps.newHashMap();
@@ -9,30 +9,30 @@
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;
@@ -269,7 +269,7 @@
flag = true;
lvt_9_4_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_217839_1_) -> {
@@ -288,7 +288,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 pair1 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
+ Pair pair1 = Pair.of(p_217839_1_.func_199026_d(), BlockModelDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
return pair1;
- 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_));
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()));
@@ -381,7 +381,12 @@
@@ -404,7 +404,12 @@
@Nullable
public IBakedModel func_217845_a(ResourceLocation p_217845_1_, ISprite p_217845_2_) {
- Triple<ResourceLocation, ModelRotation, Boolean> triple = Triple.of(p_217845_1_, p_217845_2_.func_188048_b(), p_217845_2_.func_188049_c());
+ return getBakedModel(p_217845_1_, p_217845_2_, this.field_177609_j::func_195424_a, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176599_b);
+ }
+
+
+ @Nullable
+ public IBakedModel getBakedModel(ResourceLocation p_217845_1_, ISprite p_217845_2_, java.util.function.Function<ResourceLocation, net.minecraft.client.renderer.texture.TextureAtlasSprite> textureGetter, net.minecraft.client.renderer.vertex.VertexFormat format) {
+ Triple<ResourceLocation, net.minecraftforge.common.model.IModelState, Boolean> triple = Triple.of(p_217845_1_, p_217845_2_.getState(), p_217845_2_.func_188049_c());
if (this.field_217850_G.containsKey(triple)) {
return this.field_217850_G.get(triple);
} else {
@@ -389,11 +394,11 @@
@@ -412,11 +417,11 @@
if (iunbakedmodel instanceof BlockModel) {
BlockModel blockmodel = (BlockModel)iunbakedmodel;
if (blockmodel.func_178310_f() == field_177606_o) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/model/ModelManager.java
+++ b/net/minecraft/client/renderer/model/ModelManager.java
@@ -12,7 +12,7 @@
@@ -16,7 +16,7 @@
@OnlyIn(Dist.CLIENT)
public class ModelManager extends ReloadListener<ModelBakery> {
@@ -8,29 +8,32 @@
+ private Map<ResourceLocation, IBakedModel> field_174958_a = new java.util.HashMap<>();
private final AtlasTexture field_174956_b;
private final BlockModelShapes field_174957_c;
private IBakedModel field_174955_d;
@@ -34,9 +34,15 @@
return this.field_174957_c;
}
private final BlockColors field_224743_d;
@@ -43,7 +43,7 @@
+ // TODO
+ //@Override
+ public net.minecraftforge.resource.IResourceType getResourceType() {
+ return net.minecraftforge.resource.VanillaResourceType.MODELS;
+ }
+
protected ModelBakery func_212854_a_(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
p_212854_2_.func_219894_a();
- ModelBakery modelbakery = new ModelBakery(p_212854_1_, this.field_174956_b, p_212854_2_);
+ net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_212854_1_, this.field_174956_b, p_212854_2_);
- ModelBakery modelbakery = new ModelBakery(p_212854_1_, this.field_174956_b, this.field_224743_d, p_212854_2_);
+ net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_212854_1_, this.field_174956_b, this.field_224743_d, p_212854_2_);
p_212854_2_.func_219897_b();
return modelbakery;
}
@@ -47,6 +53,7 @@
p_212853_1_.func_217844_a(p_212853_3_);
@@ -55,6 +55,7 @@
this.field_174958_a = p_212853_1_.func_217846_a();
this.field_224744_f = p_212853_1_.func_225354_b();
this.field_174955_d = this.field_174958_a.get(ModelBakery.field_177604_a);
+ net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, (net.minecraftforge.client.model.ModelLoader) p_212853_1_);
p_212853_3_.func_219895_b("cache");
this.field_174957_c.func_178124_c();
p_212853_3_.func_76319_b();
@@ -78,4 +79,10 @@
return true;
}
}
+
+ // TODO
+ //@Override
+ public net.minecraftforge.resource.IResourceType getResourceType() {
+ return net.minecraftforge.resource.VanillaResourceType.MODELS;
+ }
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/texture/AtlasTexture.java
+++ b/net/minecraft/client/renderer/texture/AtlasTexture.java
@@ -79,10 +79,12 @@
@@ -80,6 +80,7 @@
}
}
@@ -8,12 +8,15 @@
}
public AtlasTexture.SheetData func_215254_a(IResourceManager p_215254_1_, Iterable<ResourceLocation> p_215254_2_, IProfiler p_215254_3_) {
Set<ResourceLocation> set = Sets.newHashSet();
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(this);
p_215254_3_.func_76320_a("preparing");
p_215254_2_.forEach((p_215253_1_) -> {
if (p_215253_1_ == null) {
@@ -110,6 +112,7 @@
@@ -92,6 +93,7 @@
set.add(p_215253_1_);
}
});
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(this, set);
int i = this.field_215265_o;
Stitcher stitcher = new Stitcher(i, i, this.field_147636_j);
int j = Integer.MAX_VALUE;
@@ -111,6 +113,7 @@
int i1 = Math.min(j, k);
int j1 = MathHelper.func_151239_c(i1);
@@ -21,7 +24,7 @@
if (j1 < this.field_147636_j) {
field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.field_94254_c, this.field_147636_j, j1, i1);
this.field_147636_j = j1;
@@ -191,6 +194,7 @@
@@ -198,6 +201,7 @@
label62: {
boolean flag;
@@ -29,15 +32,14 @@
try {
iresource = p_195422_1_.func_199002_a(resourcelocation);
p_195422_2_.func_195664_a(iresource, this.field_147636_j + 1);
@@ -267,7 +271,94 @@
this.field_94252_e.clear();
@@ -275,6 +279,93 @@
this.field_94258_i.clear();
}
+
+ //===================================================================================================
+ // Forge Start
+ //===================================================================================================
+
+ private final java.util.Deque<ResourceLocation> loadingSprites = new java.util.ArrayDeque<>();
+ private final java.util.Set<ResourceLocation> loadedSprites = new java.util.HashSet<>();
+
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/texture/Stitcher.java
+++ b/net/minecraft/client/renderer/texture/Stitcher.java
@@ -13,6 +13,8 @@
@@ -14,6 +14,8 @@
@OnlyIn(Dist.CLIENT)
public class Stitcher {
@@ -9,29 +9,20 @@
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_) -> {
@@ -50,15 +52,21 @@
public void func_94305_f() {
List<Stitcher.Holder> list = Lists.newArrayList(this.field_94319_a);
@@ -53,6 +55,12 @@
list.sort(field_217797_a);
+ try(net.minecraftforge.fml.common.progress.ProgressBar bar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Texture stitching", list.size())) {
for(Stitcher.Holder stitcher$holder : list) {
+ bar.step(stitcher$holder.field_98151_a.func_195668_m().toString());
+ 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)) {
+ LOGGER.info(String.format("Unable to fit: %s - size: %dx%d - Maybe try a lower resolution resourcepack?", stitcher$holder.field_98151_a.func_195668_m(), stitcher$holder.field_98151_a.func_94211_a(), stitcher$holder.field_98151_a.func_94216_b()));
+ for (Stitcher.Holder h : list)
+ LOGGER.info(" {}", h);
throw new StitcherException(stitcher$holder.field_98151_a);
}
}
this.field_94318_c = MathHelper.func_151236_b(this.field_94318_c);
this.field_94315_d = MathHelper.func_151236_b(this.field_94315_d);
+ }; // Forge: end progress bar
}
public List<TextureAtlasSprite> func_94309_g() {
@@ -104,7 +112,7 @@
throw new StitcherException(stitcher$holder.field_98151_a, list.stream().map((p_225334_0_) -> {
return p_225334_0_.field_98151_a;
@@ -107,7 +115,7 @@
boolean flag4 = flag2 && j != l;
boolean flag;
if (flag3 ^ flag4) {
@@ -40,7 +31,7 @@
} else {
flag = flag1 && i <= j;
}
@@ -141,7 +149,7 @@
@@ -144,7 +152,7 @@
}
public String toString() {
@@ -9,7 +9,7 @@
private final ResourceLocation field_110984_i;
protected final int field_130223_c;
protected final int field_130224_d;
@@ -104,7 +104,10 @@
@@ -103,7 +103,10 @@
anativeimage[k1] = this.field_195670_c[k1];
} else {
NativeImage nativeimage1 = anativeimage[k1 - 1];
@@ -21,7 +21,7 @@
int k = nativeimage.func_195702_a();
int l = nativeimage.func_195714_b();
@@ -113,8 +116,11 @@
@@ -112,8 +115,11 @@
nativeimage.func_195700_a(i1, j1, func_195661_b(nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 0), nativeimage1.func_195709_a(i1 * 2 + 0, j1 * 2 + 1), nativeimage1.func_195709_a(i1 * 2 + 1, j1 * 2 + 1), flag));
}
}
@@ -34,7 +34,7 @@
}
}
@@ -196,6 +202,7 @@
@@ -209,6 +215,7 @@
private void func_195667_a(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_) {
for(int i = 0; i < this.field_195670_c.length; ++i) {
@@ -42,7 +42,7 @@
p_195667_3_[i].func_195706_a(i, this.field_110975_c >> i, this.field_110974_d >> i, p_195667_1_ >> i, p_195667_2_ >> i, this.field_130223_c >> i, this.field_130224_d >> i, this.field_195670_c.length > 1);
}
@@ -451,4 +458,10 @@
@@ -464,4 +471,10 @@
public void func_195663_q() {
this.func_195659_d(0);
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/crash/CrashReport.java
+++ b/net/minecraft/crash/CrashReport.java
@@ -65,6 +65,7 @@
@@ -69,6 +69,7 @@
List<String> list = Util.func_211565_f().collect(Collectors.toList());
return String.format("%d total; %s", list.size(), list.stream().collect(Collectors.joining(" ")));
});
@@ -8,7 +8,7 @@
}
public String func_71501_a() {
@@ -117,23 +118,13 @@
@@ -121,23 +122,13 @@
throwable.setStackTrace(this.field_71511_b.getStackTrace());
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/crash/CrashReportCategory.java
+++ b/net/minecraft/crash/CrashReportCategory.java
@@ -98,8 +98,10 @@
@@ -100,8 +100,10 @@
if (astacktraceelement.length <= 0) {
return 0;
} else {
@@ -0,0 +1,10 @@
--- a/net/minecraft/data/TagsProvider.java
+++ b/net/minecraft/data/TagsProvider.java
@@ -48,6 +48,7 @@
tagcollection.func_200039_c().forEach((p_223474_2_, p_223474_3_) -> {
JsonObject jsonobject = p_223474_3_.func_200571_a(this.field_200435_c::func_177774_c);
Path path = this.func_200431_a(p_223474_2_);
+ if (path == null) return; //Forge: Allow running this data provider without writing it. Recipe provider needs valid tags.
try {
String s = field_200437_e.toJson((JsonElement)jsonobject);
@@ -21,7 +21,7 @@
+ net.minecraft.enchantment.EnchantmentHelper.func_77506_a(net.minecraft.enchantment.Enchantments.field_185308_t, p_82487_2_));
+ java.util.Random rand = new java.util.Random();
+ drops.forEach(d -> {
+ net.minecraft.entity.item.ItemEntity ent = entity.func_70099_a(p_82487_2_, 1.0F);
+ net.minecraft.entity.item.ItemEntity ent = entity.func_70099_a(d, 1.0F);
+ ent.func_213317_d(ent.func_213322_ci().func_72441_c((double)((rand.nextFloat() - rand.nextFloat()) * 0.1F), (double)(rand.nextFloat() * 0.05F), (double)((rand.nextFloat() - rand.nextFloat()) * 0.1F)));
+ });
if (p_82487_2_.func_96631_a(1, world.field_73012_v, (ServerPlayerEntity)null)) {
@@ -240,15 +240,29 @@
double d3 = Math.min(-2.9999872E7D, serverworld1.func_175723_af().func_177726_b() + 16.0D);
double d4 = Math.min(-2.9999872E7D, serverworld1.func_175723_af().func_177736_c() + 16.0D);
@@ -2118,7 +2141,6 @@
@@ -2118,7 +2141,7 @@
serverworld1.func_217460_e(entity);
}
- this.field_70128_L = true;
+ this.remove(false);
this.field_70170_p.func_217381_Z().func_76319_b();
serverworld.func_82742_i();
serverworld1.func_82742_i();
@@ -2274,7 +2296,7 @@
@@ -2146,10 +2169,12 @@
}
public Vec3d func_181014_aG() {
+ if (this.field_181017_ao == null) return Vec3d.field_186680_a;
return this.field_181017_ao;
}
public Direction func_181012_aH() {
+ if (this.field_181018_ap == null) return Direction.NORTH;
return this.field_181018_ap;
}
@@ -2274,7 +2299,7 @@
Pose pose = this.func_213283_Z();
EntitySize entitysize1 = this.func_213305_a(pose);
this.field_213325_aI = entitysize1;
@@ -257,7 +271,7 @@
if (entitysize1.field_220315_a < entitysize.field_220315_a) {
double d0 = (double)entitysize1.field_220315_a / 2.0D;
this.func_174826_a(new AxisAlignedBB(this.field_70165_t - d0, this.field_70163_u, this.field_70161_v - d0, this.field_70165_t + d0, this.field_70163_u + (double)entitysize1.field_220316_b, this.field_70161_v + d0));
@@ -2641,6 +2663,7 @@
@@ -2641,6 +2666,7 @@
return this.field_211517_W;
}
@@ -265,7 +279,7 @@
public final float func_213311_cf() {
return this.field_213325_aI.field_220315_a;
}
@@ -2670,4 +2693,69 @@
@@ -2670,4 +2696,69 @@
public void func_213293_j(double p_213293_1_, double p_213293_3_, double p_213293_5_) {
this.func_213317_d(new Vec3d(p_213293_1_, p_213293_3_, p_213293_5_));
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/EntityType.java
+++ b/net/minecraft/entity/EntityType.java
@@ -135,7 +135,7 @@
@@ -134,7 +134,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -9,8 +9,8 @@
private static final Logger field_200731_aJ = LogManager.getLogger();
public static final EntityType<AreaEffectCloudEntity> field_200788_b = func_200712_a("area_effect_cloud", EntityType.Builder.<AreaEffectCloudEntity>func_220322_a(AreaEffectCloudEntity::new, EntityClassification.MISC).func_220320_c().func_220321_a(6.0F, 0.5F));
public static final EntityType<ArmorStandEntity> field_200789_c = func_200712_a("armor_stand", EntityType.Builder.<ArmorStandEntity>func_220322_a(ArmorStandEntity::new, EntityClassification.MISC).func_220321_a(0.5F, 1.975F));
@@ -254,6 +254,12 @@
private final Type<?> field_206832_aX;
@@ -252,6 +252,12 @@
private ResourceLocation field_220358_bg;
private final EntitySize field_220359_bi;
+ private final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier;
@@ -22,19 +22,19 @@
private static <T extends Entity> EntityType<T> func_200712_a(String p_200712_0_, EntityType.Builder<T> p_200712_1_) {
return Registry.func_218325_a(Registry.field_212629_r, p_200712_0_, p_200712_1_.func_206830_a(p_200712_0_));
}
@@ -266,7 +272,7 @@
@@ -264,7 +270,7 @@
return Registry.field_212629_r.func_218349_b(ResourceLocation.func_208304_a(p_220327_0_));
}
- public EntityType(EntityType.IFactory<T> p_i50385_1_, EntityClassification p_i50385_2_, boolean p_i50385_3_, boolean p_i50385_4_, boolean p_i50385_5_, @Nullable Type<?> p_i50385_6_, EntitySize p_i50385_7_) {
+ public EntityType(IFactory<T> p_i50385_1_, EntityClassification p_i50385_2_, boolean p_i50385_3_, boolean p_i50385_4_, boolean p_i50385_5_, @Nullable Type<?> p_i50385_6_, EntitySize p_i50385_7_, final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier, final java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier, final java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier, final java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory) {
this.field_200732_aK = p_i50385_1_;
this.field_220355_ba = p_i50385_2_;
this.field_200733_aL = p_i50385_3_;
@@ -274,6 +280,10 @@
this.field_220357_bd = p_i50385_5_;
this.field_206832_aX = p_i50385_6_;
this.field_220359_bi = p_i50385_7_;
- public EntityType(EntityType.IFactory<T> p_i51559_1_, EntityClassification p_i51559_2_, boolean p_i51559_3_, boolean p_i51559_4_, boolean p_i51559_5_, boolean p_i51559_6_, EntitySize p_i51559_7_) {
+ public EntityType(EntityType.IFactory<T> p_i51559_1_, EntityClassification p_i51559_2_, boolean p_i51559_3_, boolean p_i51559_4_, boolean p_i51559_5_, boolean p_i51559_6_, EntitySize p_i51559_7_, final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier, final java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier, final java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier, final java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory) {
this.field_200732_aK = p_i51559_1_;
this.field_220355_ba = p_i51559_2_;
this.field_225438_be = p_i51559_6_;
@@ -272,6 +278,10 @@
this.field_200734_aM = p_i51559_4_;
this.field_220357_bd = p_i51559_5_;
this.field_220359_bi = p_i51559_7_;
+ this.velocityUpdateSupplier = velocityUpdateSupplier;
+ this.trackingRangeSupplier = trackingRangeSupplier;
+ this.updateIntervalSupplier = updateIntervalSupplier;
@@ -42,7 +42,7 @@
}
@Nullable
@@ -284,6 +294,7 @@
@@ -282,6 +292,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_);
@@ -50,7 +50,7 @@
p_220342_1_.func_217376_c(t);
return t;
}
@@ -462,6 +473,9 @@
@@ -464,6 +475,9 @@
}
public int func_220345_k() {
@@ -60,7 +60,7 @@
if (this == field_200729_aH) {
return 32;
} else if (this == field_200801_o) {
@@ -474,6 +488,9 @@
@@ -476,6 +490,9 @@
}
public int func_220332_l() {
@@ -70,7 +70,7 @@
if (this != field_200729_aH && this != field_200805_s) {
if (this == field_200808_v) {
return 4;
@@ -494,6 +511,9 @@
@@ -496,6 +513,9 @@
}
public boolean func_220340_m() {
@@ -80,7 +80,7 @@
return this != field_200729_aH && this != field_200770_J && this != field_200760_az && this != field_200791_e && this != field_200766_F && this != field_200768_H && this != field_200782_V && this != field_200801_o && this != field_200805_s;
}
@@ -501,12 +521,30 @@
@@ -503,12 +523,30 @@
return p_220341_1_.func_199685_a_(this);
}
@@ -108,10 +108,10 @@
+ private java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier = EntityType::defaultUpdateIntervalSupplier;
+ private java.util.function.BiFunction<net.minecraftforge.fml.network.FMLPlayMessages.SpawnEntity, World, T> customClientFactory;
+
private boolean field_225436_f;
private EntitySize field_220326_f = EntitySize.func_220314_b(0.6F, 1.8F);
private Builder(EntityType.IFactory<T> p_i50479_1_, EntityClassification p_i50479_2_) {
@@ -544,12 +582,32 @@
@@ -553,6 +591,26 @@
return this;
}
@@ -136,21 +136,14 @@
+ }
+
public EntityType<T> func_206830_a(String p_206830_1_) {
Type<?> type = null;
if (this.field_200710_b) {
try {
type = 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) {
if (SharedConstants.field_206244_b) {
throw illegalstateexception;
}
@@ -558,7 +616,7 @@
@@ -566,7 +624,7 @@
}
}
- return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, type, this.field_220326_f);
+ return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, type, this.field_220326_f, velocityUpdateSupplier, trackingRangeSupplier, updateIntervalSupplier, customClientFactory);
- return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, this.field_225436_f, this.field_220326_f);
+ return new EntityType<>(this.field_200709_a, this.field_220324_b, this.field_200710_b, this.field_200711_c, this.field_220325_e, this.field_225436_f, this.field_220326_f, velocityUpdateSupplier, trackingRangeSupplier, updateIntervalSupplier, customClientFactory);
}
}
@@ -310,9 +310,9 @@
}
@@ -2403,13 +2435,22 @@
protected void func_184608_ct() {
private void func_184608_ct() {
if (this.func_184587_cr()) {
- if (this.func_184586_b(this.func_184600_cs()) == this.field_184627_bm) {
- if (ItemStack.func_185132_d(this.func_184586_b(this.func_184600_cs()), this.field_184627_bm)) {
+ ItemStack itemstack = this.func_184586_b(this.func_184600_cs());
+ if (net.minecraftforge.common.ForgeHooks.canContinueUsing(this.field_184627_bm, itemstack)) this.field_184627_bm = itemstack;
+ if (itemstack == this.field_184627_bm) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/ai/brain/memory/MemoryModuleType.java
+++ b/net/minecraft/entity/ai/brain/memory/MemoryModuleType.java
@@ -17,7 +17,7 @@
@@ -18,7 +18,7 @@
import net.minecraft.util.math.IPosWrapper;
import net.minecraft.util.registry.Registry;
@@ -9,7 +9,7 @@
return false;
} else if (p_212832_2_.func_213700_eh().func_221130_b() != VillagerProfession.field_221156_f) {
return false;
@@ -130,6 +130,11 @@
@@ -136,6 +136,11 @@
} else if (itemstack.func_77973_b() == Items.field_185163_cU) {
p_212833_1_.func_180501_a(this.field_220422_a, Blocks.field_185773_cZ.func_176223_P(), 3);
flag = true;
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/ai/goal/BreakBlockGoal.java
+++ b/net/minecraft/entity/ai/goal/BreakBlockGoal.java
@@ -30,7 +30,7 @@
@@ -32,7 +32,7 @@
}
public boolean func_75250_a() {
@@ -15,14 +15,14 @@
} else {
+ if (canPenalize) {
+ if (--this.field_75445_i <= 0) {
+ this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity);
+ this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity, 0);
+ this.field_75445_i = 4 + this.field_75441_b.func_70681_au().nextInt(7);
+ return this.field_75438_g != null;
+ } else {
+ return true;
+ }
+ }
this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity);
this.field_75438_g = this.field_75441_b.func_70661_as().func_75494_a(livingentity, 0);
if (this.field_75438_g != null) {
return true;
@@ -92,6 +103,18 @@
@@ -6,7 +6,7 @@
ServerPlayerEntity serverplayerentity = (ServerPlayerEntity)livingentity;
+ net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(serverplayerentity, this.field_70165_t, this.field_70163_u, this.field_70161_v, 5.0F);
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) { // Don't indent to lower patch size
if (serverplayerentity.field_71135_a.func_147362_b().func_150724_d() && serverplayerentity.field_70170_p == this.field_70170_p && !serverplayerentity.func_70608_bn()) {
if (serverplayerentity.field_71135_a.func_147298_b().func_150724_d() && serverplayerentity.field_70170_p == this.field_70170_p && !serverplayerentity.func_70608_bn()) {
if (this.field_70146_Z.nextFloat() < 0.05F && this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223601_d)) {
EndermiteEntity endermiteentity = EntityType.field_200804_r.func_200721_a(this.field_70170_p);
@@ -96,9 +98,10 @@
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/item/FallingBlockEntity.java
+++ b/net/minecraft/entity/item/FallingBlockEntity.java
@@ -153,7 +153,7 @@
@@ -155,7 +155,7 @@
((FallingBlock)block).func_176502_a_(this.field_70170_p, blockpos1, this.field_175132_d, blockstate);
}
@@ -4,7 +4,7 @@
this.field_70165_t = (double)this.field_174861_a.func_177958_n() + 0.5D;
this.field_70163_u = (double)this.field_174861_a.func_177956_o() + 0.5D;
this.field_70161_v = (double)this.field_174861_a.func_177952_p() + 0.5D;
+ if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.ServerWorld) ((net.minecraft.world.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
+ if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
}
public void func_174859_a(Direction p_174859_1_) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/merchant/villager/VillagerEntity.java
+++ b/net/minecraft/entity/merchant/villager/VillagerEntity.java
@@ -227,7 +227,7 @@
@@ -230,7 +230,7 @@
if (flag) {
itemstack.func_111282_a(p_184645_1_, this, p_184645_2_);
return true;
@@ -1,5 +1,21 @@
--- a/net/minecraft/entity/monster/EndermanEntity.java
+++ b/net/minecraft/entity/monster/EndermanEntity.java
@@ -92,7 +92,6 @@
}
public void func_70624_b(@Nullable LivingEntity p_70624_1_) {
- super.func_70624_b(p_70624_1_);
IAttributeInstance iattributeinstance = this.func_110148_a(SharedMonsterAttributes.field_111263_d);
if (p_70624_1_ == null) {
this.field_184721_by = 0;
@@ -106,6 +105,7 @@
}
}
+ super.func_70624_b(p_70624_1_); //Forge: Moved down to allow event handlers to write data manager values.
}
protected void func_70088_a() {
@@ -226,7 +226,9 @@
if (!this.field_70170_p.func_180495_p(blockpos$mutableblockpos).func_185904_a().func_76230_c()) {
return false;
@@ -33,8 +49,8 @@
}
private boolean func_220836_a(IWorldReader p_220836_1_, BlockPos p_220836_2_, BlockState p_220836_3_, BlockState p_220836_4_, BlockState p_220836_5_, BlockPos p_220836_6_) {
- return p_220836_4_.func_196958_f() && !p_220836_5_.func_196958_f() && Block.func_208062_a(p_220836_5_.func_196952_d(p_220836_1_, p_220836_6_)) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_);
+ return p_220836_4_.isAir(p_220836_1_, p_220836_2_) && !p_220836_5_.isAir(p_220836_1_, p_220836_6_) && Block.func_208062_a(p_220836_5_.func_196952_d(p_220836_1_, p_220836_6_)) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_);
- return p_220836_4_.func_196958_f() && !p_220836_5_.func_196958_f() && p_220836_5_.func_224756_o(p_220836_1_, p_220836_6_) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_);
+ return p_220836_4_.isAir(p_220836_1_, p_220836_2_) && !p_220836_5_.isAir(p_220836_1_, p_220836_6_) && p_220836_5_.func_224756_o(p_220836_1_, p_220836_6_) && p_220836_3_.func_196955_c(p_220836_1_, p_220836_2_);
}
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/monster/EvokerEntity.java
+++ b/net/minecraft/entity/monster/EvokerEntity.java
@@ -287,7 +287,7 @@
@@ -286,7 +286,7 @@
return false;
} else if (EvokerEntity.this.field_70173_aa < this.field_193322_d) {
return false;
@@ -4,7 +4,7 @@
this.field_70165_t = (double)blockpos.func_177958_n() + 0.5D;
this.field_70163_u = (double)blockpos.func_177956_o();
this.field_70161_v = (double)blockpos.func_177952_p() + 0.5D;
+ if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.ServerWorld) ((net.minecraft.world.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
+ if (this.isAddedToWorld() && this.field_70170_p instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
this.field_70169_q = this.field_70165_t;
this.field_70167_r = this.field_70163_u;
this.field_70166_s = this.field_70161_v;
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/monster/SilverfishEntity.java
+++ b/net/minecraft/entity/monster/SilverfishEntity.java
@@ -138,7 +138,7 @@
@@ -136,7 +136,7 @@
return false;
} else {
Random random = this.field_75457_a.func_70681_au();
@@ -9,7 +9,7 @@
this.field_179483_b = Direction.func_176741_a(random);
BlockPos blockpos = (new BlockPos(this.field_75457_a.field_70165_t, this.field_75457_a.field_70163_u + 0.5D, this.field_75457_a.field_70161_v)).func_177972_a(this.field_179483_b);
BlockState blockstate = this.field_75457_a.field_70170_p.func_180495_p(blockpos);
@@ -207,7 +207,7 @@
@@ -205,7 +205,7 @@
BlockState blockstate = world.func_180495_p(blockpos1);
Block block = blockstate.func_177230_c();
if (block instanceof SilverfishBlock) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/monster/ZombieEntity.java
+++ b/net/minecraft/entity/monster/ZombieEntity.java
@@ -106,7 +106,7 @@
@@ -107,7 +107,7 @@
this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a((double)0.23F);
this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(3.0D);
this.func_110148_a(SharedMonsterAttributes.field_188791_g).func_111128_a(2.0D);
@@ -9,7 +9,7 @@
}
protected void func_70088_a() {
@@ -279,12 +279,16 @@
@@ -281,12 +281,16 @@
livingentity = (LivingEntity)p_70097_1_.func_76346_g();
}
@@ -28,7 +28,7 @@
for(int l = 0; l < 50; ++l) {
int i1 = i + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1);
int j1 = j + MathHelper.func_76136_a(this.field_70146_Z, 7, 40) * MathHelper.func_76136_a(this.field_70146_Z, -1, 1);
@@ -294,6 +298,7 @@
@@ -296,6 +300,7 @@
zombieentity.func_70107_b((double)i1, (double)j1, (double)k1);
if (!this.field_70170_p.func_217358_a((double)i1, (double)j1, (double)k1, 7.0D) && this.field_70170_p.func_217346_i(zombieentity) && this.field_70170_p.func_217345_j(zombieentity) && !this.field_70170_p.func_72953_d(zombieentity.func_174813_aQ())) {
this.field_70170_p.func_217376_c(zombieentity);
@@ -36,7 +36,7 @@
zombieentity.func_70624_b(livingentity);
zombieentity.func_213386_a(this.field_70170_p, this.field_70170_p.func_175649_E(new BlockPos(zombieentity)), SpawnReason.REINFORCEMENT, (ILivingEntityData)null, (CompoundNBT)null);
this.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement caller charge", (double)-0.05F, AttributeModifier.Operation.ADDITION));
@@ -426,7 +431,7 @@
@@ -429,7 +434,7 @@
float f = p_213386_2_.func_180170_c();
this.func_98053_h(this.field_70146_Z.nextFloat() < 0.55F * f);
if (p_213386_4_ == null) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/passive/RabbitEntity.java
+++ b/net/minecraft/entity/passive/RabbitEntity.java
@@ -502,7 +502,7 @@
@@ -498,7 +498,7 @@
public boolean func_75250_a() {
if (this.field_179496_a <= 0) {
@@ -22,8 +22,8 @@
j = MathHelper.func_76128_c(this.field_70163_u);
k = MathHelper.func_76128_c(this.field_70161_v + (double)((float)(l / 2 % 2 * 2 - 1) * 0.25F));
BlockPos blockpos = new BlockPos(i, j, k);
- if (this.field_70170_p.func_180495_p(blockpos).func_196958_f() && this.field_70170_p.func_180494_b(blockpos).func_180626_a(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
+ if (this.field_70170_p.func_175623_d(blockpos) && this.field_70170_p.func_180494_b(blockpos).func_180626_a(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
- if (this.field_70170_p.func_180495_p(blockpos).func_196958_f() && this.field_70170_p.func_180494_b(blockpos).func_225486_c(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
+ if (this.field_70170_p.func_175623_d(blockpos) && this.field_70170_p.func_180494_b(blockpos).func_225486_c(blockpos) < 0.8F && blockstate.func_196955_c(this.field_70170_p, blockpos)) {
this.field_70170_p.func_175656_a(blockpos, blockstate);
}
}
@@ -11,7 +11,7 @@
public static final EntitySize field_213835_bs = EntitySize.func_220314_b(0.6F, 1.8F);
private static final Map<Pose, EntitySize> field_213836_b = ImmutableMap.<Pose, EntitySize>builder().put(Pose.STANDING, field_213835_bs).put(Pose.SLEEPING, field_213377_as).put(Pose.FALL_FLYING, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SWIMMING, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SPIN_ATTACK, EntitySize.func_220314_b(0.6F, 0.6F)).put(Pose.SNEAKING, EntitySize.func_220314_b(0.6F, 1.5F)).put(Pose.DYING, EntitySize.func_220311_c(0.2F, 0.2F)).build();
private static final DataParameter<Float> field_184829_a = EntityDataManager.func_187226_a(PlayerEntity.class, DataSerializers.field_187193_c);
@@ -149,6 +153,9 @@
@@ -150,6 +154,9 @@
private final CooldownTracker field_184832_bU = this.func_184815_l();
@Nullable
public FishingBobberEntity field_71104_cf;
@@ -21,7 +21,7 @@
public PlayerEntity(World p_i45324_1_, GameProfile p_i45324_2_) {
super(EntityType.field_200729_aH, p_i45324_1_);
@@ -167,6 +174,7 @@
@@ -181,6 +188,7 @@
this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a((double)0.1F);
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188790_f);
this.func_110140_aT().func_111150_b(SharedMonsterAttributes.field_188792_h);
@@ -29,7 +29,7 @@
}
protected void func_70088_a() {
@@ -180,6 +188,7 @@
@@ -194,6 +202,7 @@
}
public void func_70071_h_() {
@@ -37,7 +37,7 @@
this.field_70145_X = this.func_175149_v();
if (this.func_175149_v()) {
this.field_70122_E = false;
@@ -195,7 +204,7 @@
@@ -209,7 +218,7 @@
this.field_71076_b = 100;
}
@@ -46,7 +46,7 @@
this.func_70999_a(false, true, true);
}
} else if (this.field_71076_b > 0) {
@@ -253,6 +262,7 @@
@@ -267,6 +276,7 @@
this.func_203041_m();
this.field_184832_bU.func_185144_a();
this.func_213832_dB();
@@ -54,15 +54,7 @@
}
protected boolean func_204229_de() {
@@ -261,6 +271,7 @@
}
private void func_203041_m() {
+ net.minecraftforge.fml.hooks.BasicEventHooks.onPlayerPostTick(this);
ItemStack itemstack = this.func_184582_a(EquipmentSlotType.HEAD);
if (itemstack.func_77973_b() == Items.field_203179_ao && !this.func_208600_a(FluidTags.field_206959_a)) {
this.func_195064_c(new EffectInstance(Effects.field_76427_o, 200, 0, false, false, true));
@@ -427,10 +438,10 @@
@@ -441,10 +451,10 @@
this.field_71107_bF = this.field_71109_bG;
this.field_71109_bG = 0.0F;
this.func_71015_k(this.field_70165_t - d0, this.field_70163_u - d1, this.field_70161_v - d2);
@@ -75,7 +67,7 @@
}
}
@@ -543,6 +554,7 @@
@@ -557,6 +567,7 @@
}
public void func_70645_a(DamageSource p_70645_1_) {
@@ -83,7 +75,7 @@
super.func_70645_a(p_70645_1_);
this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v);
if (!this.func_175149_v()) {
@@ -597,12 +609,14 @@
@@ -611,12 +622,14 @@
@Nullable
public ItemEntity func_71040_bB(boolean p_71040_1_) {
@@ -100,7 +92,7 @@
}
@Nullable
@@ -636,7 +650,12 @@
@@ -650,7 +663,12 @@
}
}
@@ -113,7 +105,7 @@
float f = this.field_71071_by.func_184438_a(p_184813_1_);
if (f > 1.0F) {
int i = EnchantmentHelper.func_185293_e(this);
@@ -678,11 +697,12 @@
@@ -692,11 +710,12 @@
f /= 5.0F;
}
@@ -127,7 +119,7 @@
}
public void func_70037_a(CompoundNBT p_70037_1_) {
@@ -706,6 +726,17 @@
@@ -720,6 +739,17 @@
this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced");
}
@@ -145,7 +137,7 @@
this.field_71100_bB.func_75112_a(p_70037_1_);
this.field_71075_bZ.func_75095_b(p_70037_1_);
if (p_70037_1_.func_150297_b("EnderItems", 9)) {
@@ -751,9 +782,26 @@
@@ -765,9 +795,26 @@
p_213281_1_.func_218657_a("ShoulderEntityRight", this.func_192025_dl());
}
@@ -172,7 +164,7 @@
if (this.func_180431_b(p_70097_1_)) {
return false;
} else if (this.field_71075_bZ.field_75102_a && !p_70097_1_.func_76357_e()) {
@@ -785,7 +833,7 @@
@@ -799,7 +846,7 @@
protected void func_190629_c(LivingEntity p_190629_1_) {
super.func_190629_c(p_190629_1_);
@@ -181,7 +173,7 @@
this.func_190777_m(true);
}
@@ -806,13 +854,15 @@
@@ -820,13 +867,15 @@
}
protected void func_184590_k(float p_184590_1_) {
@@ -198,7 +190,7 @@
if (hand == Hand.MAIN_HAND) {
this.func_184201_a(EquipmentSlotType.MAINHAND, ItemStack.field_190927_a);
} else {
@@ -828,11 +878,14 @@
@@ -842,11 +891,14 @@
protected void func_70665_d(DamageSource p_70665_1_, float p_70665_2_) {
if (!this.func_180431_b(p_70665_1_)) {
@@ -213,7 +205,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));
@@ -887,6 +940,8 @@
@@ -901,6 +953,8 @@
return ActionResultType.PASS;
} else {
@@ -222,7 +214,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_)) {
@@ -894,6 +949,9 @@
@@ -908,6 +962,9 @@
itemstack.func_190920_e(itemstack1.func_190916_E());
}
@@ -232,7 +224,7 @@
return ActionResultType.SUCCESS;
} else {
if (!itemstack.func_190926_b() && p_190775_1_ instanceof LivingEntity) {
@@ -903,6 +961,7 @@
@@ -917,6 +974,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) {
@@ -240,7 +232,7 @@
this.func_184611_a(p_190775_2_, ItemStack.field_190927_a);
}
@@ -929,6 +988,7 @@
@@ -943,6 +1001,7 @@
}
public void func_71059_n(Entity p_71059_1_) {
@@ -248,7 +240,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();
@@ -956,8 +1016,10 @@
@@ -970,8 +1029,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();
@@ -260,7 +252,7 @@
}
f = f + f1;
@@ -1045,8 +1107,10 @@
@@ -1059,8 +1120,10 @@
}
if (!this.field_70170_p.field_72995_K && !itemstack1.func_190926_b() && entity instanceof LivingEntity) {
@@ -271,7 +263,7 @@
this.func_184611_a(Hand.MAIN_HAND, ItemStack.field_190927_a);
}
}
@@ -1088,7 +1152,7 @@
@@ -1102,7 +1165,7 @@
}
if (this.field_70146_Z.nextFloat() < f) {
@@ -280,25 +272,26 @@
this.func_184602_cy();
this.field_70170_p.func_72960_a(this, (byte)30);
}
@@ -1132,6 +1196,8 @@
@@ -1146,6 +1209,9 @@
}
public Either<PlayerEntity.SleepResult, Unit> func_213819_a(BlockPos p_213819_1_) {
+ PlayerEntity.SleepResult ret = net.minecraftforge.event.ForgeEventFactory.onPlayerSleepInBed(this, func_213374_dv());
+ Optional<BlockPos> optAt = Optional.of(p_213819_1_);
+ PlayerEntity.SleepResult ret = net.minecraftforge.event.ForgeEventFactory.onPlayerSleepInBed(this, optAt);
+ if (ret != null) return Either.left(ret);
Direction direction = this.field_70170_p.func_180495_p(p_213819_1_).func_177229_b(HorizontalBlock.field_185512_D);
if (!this.field_70170_p.field_72995_K) {
if (this.func_70608_bn() || !this.func_70089_S()) {
@@ -1142,7 +1208,7 @@
@@ -1156,7 +1222,7 @@
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_HERE);
}
- if (this.field_70170_p.func_72935_r()) {
+ if (!net.minecraftforge.event.ForgeEventFactory.fireSleepingTimeCheck(this, func_213374_dv())) {
+ if (!net.minecraftforge.event.ForgeEventFactory.fireSleepingTimeCheck(this, optAt)) {
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_NOW);
}
@@ -1184,6 +1250,8 @@
@@ -1197,6 +1263,8 @@
private boolean func_190774_a(BlockPos p_190774_1_, Direction p_190774_2_) {
if (Math.abs(this.field_70165_t - (double)p_190774_1_.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)p_190774_1_.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)p_190774_1_.func_177952_p()) <= 3.0D) {
return true;
@@ -307,7 +300,7 @@
} else {
BlockPos blockpos = p_190774_1_.func_177972_a(p_190774_2_.func_176734_d());
return Math.abs(this.field_70165_t - (double)blockpos.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)blockpos.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)blockpos.func_177952_p()) <= 3.0D;
@@ -1196,6 +1264,7 @@
@@ -1209,6 +1277,7 @@
}
public void func_70999_a(boolean p_70999_1_, boolean p_70999_2_, boolean p_70999_3_) {
@@ -315,7 +308,7 @@
Optional<BlockPos> optional = this.func_213374_dv();
super.func_213366_dy();
if (this.field_70170_p instanceof ServerWorld && p_70999_2_) {
@@ -1216,17 +1285,17 @@
@@ -1229,17 +1298,17 @@
}
public static Optional<Vec3d> func_213822_a(IWorldReader p_213822_0_, BlockPos p_213822_1_, boolean p_213822_2_) {
@@ -337,7 +330,7 @@
}
}
@@ -1241,23 +1310,67 @@
@@ -1254,23 +1323,67 @@
public void func_146105_b(ITextComponent p_146105_1_, boolean p_146105_2_) {
}
@@ -414,7 +407,7 @@
}
public void func_195066_a(ResourceLocation p_195066_1_) {
@@ -1423,6 +1536,8 @@
@@ -1436,6 +1549,8 @@
}
super.func_180430_e(p_180430_1_, p_180430_2_);
@@ -423,7 +416,7 @@
}
}
@@ -1685,7 +1800,10 @@
@@ -1703,7 +1818,10 @@
}
public ITextComponent func_145748_c_() {
@@ -435,7 +428,7 @@
return this.func_208016_c(itextcomponent);
}
@@ -1921,4 +2039,44 @@
@@ -1939,4 +2057,44 @@
return this.field_221260_g;
}
}
@@ -0,0 +1,21 @@
--- a/net/minecraft/inventory/container/GrindstoneContainer.java
+++ b/net/minecraft/inventory/container/GrindstoneContainer.java
@@ -141,12 +141,13 @@
}
Item item = itemstack.func_77973_b();
- int k = item.func_77612_l() - itemstack.func_77952_i();
- int l = item.func_77612_l() - itemstack1.func_77952_i();
- int i1 = k + l + item.func_77612_l() * 5 / 100;
- i = Math.max(item.func_77612_l() - i1, 0);
+ int k = itemstack.func_77958_k() - itemstack.func_77952_i();
+ int l = itemstack.func_77958_k() - itemstack1.func_77952_i();
+ int i1 = k + l + itemstack.func_77958_k() * 5 / 100;
+ i = Math.max(itemstack.func_77958_k() - i1, 0);
itemstack2 = this.func_217011_b(itemstack, itemstack1);
- if (!itemstack2.func_77984_f()) {
+ if (!itemstack2.isRepairable()) i = itemstack.func_77952_i();
+ if (!itemstack2.func_77984_f() || !itemstack2.isRepairable()) {
if (!ItemStack.func_77989_b(itemstack, itemstack1)) {
this.field_217013_c.func_70299_a(0, ItemStack.field_190927_a);
this.func_75142_b();
@@ -0,0 +1,11 @@
--- a/net/minecraft/inventory/container/RecipeBookContainer.java
+++ b/net/minecraft/inventory/container/RecipeBookContainer.java
@@ -31,4 +31,8 @@
@OnlyIn(Dist.CLIENT)
public abstract int func_203721_h();
+
+ public java.util.List<net.minecraft.client.util.RecipeBookCategories> getRecipeBookCategories() {
+ return net.minecraft.client.util.ClientRecipeBook.func_216769_b(this);
+ }
}
@@ -3,7 +3,7 @@
@@ -21,7 +21,7 @@
protected static final Map<Block, Block> field_203176_a = (new Builder<Block, Block>()).put(Blocks.field_196626_Q, Blocks.field_209389_ab).put(Blocks.field_196617_K, Blocks.field_203204_R).put(Blocks.field_196639_V, Blocks.field_209394_ag).put(Blocks.field_196623_P, Blocks.field_203209_W).put(Blocks.field_196637_U, Blocks.field_209393_af).put(Blocks.field_196621_O, Blocks.field_203208_V).put(Blocks.field_196631_S, Blocks.field_209391_ad).put(Blocks.field_196619_M, Blocks.field_203206_T).put(Blocks.field_196634_T, Blocks.field_209392_ae).put(Blocks.field_196620_N, Blocks.field_203207_U).put(Blocks.field_196629_R, Blocks.field_209390_ac).put(Blocks.field_196618_L, Blocks.field_203205_S).build();
protected AxeItem(IItemTier p_i48530_1_, float p_i48530_2_, float p_i48530_3_, Item.Properties p_i48530_4_) {
public AxeItem(IItemTier p_i48530_1_, float p_i48530_2_, float p_i48530_3_, Item.Properties p_i48530_4_) {
- super(p_i48530_2_, p_i48530_3_, p_i48530_1_, field_150917_c, p_i48530_4_);
+ super(p_i48530_2_, p_i48530_3_, p_i48530_1_, field_150917_c, p_i48530_4_.addToolType(net.minecraftforge.common.ToolType.AXE, p_i48530_1_.func_200925_d()));
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/item/BoneMealItem.java
+++ b/net/minecraft/item/BoneMealItem.java
@@ -27,7 +27,7 @@
@@ -26,7 +26,7 @@
World world = p_195939_1_.func_195991_k();
BlockPos blockpos = p_195939_1_.func_195995_a();
BlockPos blockpos1 = blockpos.func_177972_a(p_195939_1_.func_196000_l());
@@ -9,14 +9,14 @@
if (!world.field_72995_K) {
world.func_217379_c(2005, blockpos, 0);
}
@@ -48,8 +48,17 @@
@@ -47,8 +47,17 @@
}
}
+ @Deprecated //Forge: Use Player/Hand version
public static boolean func_195966_a(ItemStack p_195966_0_, World p_195966_1_, BlockPos p_195966_2_) {
+ if (p_195966_1_ instanceof net.minecraft.world.ServerWorld)
+ return applyBonemeal(p_195966_0_, p_195966_1_, p_195966_2_, net.minecraftforge.common.util.FakePlayerFactory.getMinecraft((net.minecraft.world.ServerWorld)p_195966_1_));
+ if (p_195966_1_ instanceof net.minecraft.world.server.ServerWorld)
+ return applyBonemeal(p_195966_0_, p_195966_1_, p_195966_2_, net.minecraftforge.common.util.FakePlayerFactory.getMinecraft((net.minecraft.world.server.ServerWorld)p_195966_1_));
+ return false;
+ }
+
@@ -27,7 +27,7 @@
if (blockstate.func_177230_c() instanceof IGrowable) {
IGrowable igrowable = (IGrowable)blockstate.func_177230_c();
if (igrowable.func_176473_a(p_195966_1_, p_195966_2_, blockstate, p_195966_1_.field_72995_K)) {
@@ -125,7 +134,7 @@
@@ -124,7 +133,7 @@
}
BlockState blockstate = p_195965_0_.func_180495_p(p_195965_1_);
@@ -1,6 +1,6 @@
--- a/net/minecraft/item/FilledMapItem.java
+++ b/net/minecraft/item/FilledMapItem.java
@@ -52,6 +52,16 @@
@@ -51,6 +51,16 @@
@Nullable
public static MapData func_195950_a(ItemStack p_195950_0_, World p_195950_1_) {
@@ -92,7 +92,7 @@
+ protected final boolean canRepair;
+
+ @Override
+ public boolean isRepairable() {
+ public boolean isRepairable(ItemStack stack) {
+ return canRepair && func_77645_m();
+ }
+
@@ -118,7 +118,7 @@
CompoundNBT compoundnbt = this.func_77978_p();
return compoundnbt == null || !compoundnbt.func_74767_n("Unbreakable");
} else {
@@ -206,7 +228,7 @@
@@ -206,19 +228,19 @@
}
public boolean func_77951_h() {
@@ -127,7 +127,13 @@
}
public int func_77952_i() {
@@ -218,7 +240,7 @@
- return this.field_77990_d == null ? 0 : this.field_77990_d.func_74762_e("Damage");
+ return this.func_77973_b().getDamage(this);
}
public void func_196085_b(int p_196085_1_) {
- this.func_196082_o().func_74768_a("Damage", Math.max(0, p_196085_1_));
+ this.func_77973_b().setDamage(this, p_196085_1_);
}
public int func_77958_k() {
@@ -136,7 +142,15 @@
}
public boolean func_96631_a(int p_96631_1_, Random p_96631_2_, @Nullable ServerPlayerEntity p_96631_3_) {
@@ -286,7 +308,7 @@
@@ -254,6 +276,7 @@
public <T extends LivingEntity> void func_222118_a(int p_222118_1_, T p_222118_2_, Consumer<T> p_222118_3_) {
if (!p_222118_2_.field_70170_p.field_72995_K && (!(p_222118_2_ instanceof PlayerEntity) || !((PlayerEntity)p_222118_2_).field_71075_bZ.field_75098_d)) {
if (this.func_77984_f()) {
+ p_222118_1_ = this.func_77973_b().damageItem(this, p_222118_1_, p_222118_2_, p_222118_3_);
if (this.func_96631_a(p_222118_1_, p_222118_2_.func_70681_au(), p_222118_2_ instanceof ServerPlayerEntity ? (ServerPlayerEntity)p_222118_2_ : null)) {
p_222118_3_.accept(p_222118_2_);
Item item = this.func_77973_b();
@@ -286,7 +309,7 @@
}
public boolean func_150998_b(BlockState p_150998_1_) {
@@ -145,7 +159,7 @@
}
public boolean func_111282_a(PlayerEntity p_111282_1_, LivingEntity p_111282_2_, Hand p_111282_3_) {
@@ -294,7 +316,7 @@
@@ -294,7 +317,7 @@
}
public ItemStack func_77946_l() {
@@ -154,7 +168,7 @@
itemstack.func_190915_d(this.func_190921_D());
if (this.field_77990_d != null) {
itemstack.field_77990_d = this.field_77990_d.func_74737_b();
@@ -310,7 +332,7 @@
@@ -310,7 +333,7 @@
if (p_77970_0_.field_77990_d == null && p_77970_1_.field_77990_d != null) {
return false;
} else {
@@ -163,7 +177,7 @@
}
} else {
return false;
@@ -333,7 +355,7 @@
@@ -333,7 +356,7 @@
} else if (this.field_77990_d == null && p_77959_1_.field_77990_d != null) {
return false;
} else {
@@ -172,7 +186,7 @@
}
}
@@ -639,6 +661,7 @@
@@ -639,6 +662,7 @@
}
}
@@ -180,7 +194,7 @@
return list;
}
@@ -760,7 +783,7 @@
@@ -760,7 +784,7 @@
}
}
} else {
@@ -189,7 +203,7 @@
}
return multimap;
@@ -899,4 +922,33 @@
@@ -899,4 +923,33 @@
public boolean func_222117_E() {
return this.func_77973_b().func_219971_r();
}
@@ -3,7 +3,7 @@
@@ -11,24 +11,17 @@
private static final Set<Block> field_150915_c = ImmutableSet.of(Blocks.field_150408_cc, Blocks.field_150365_q, Blocks.field_150347_e, Blocks.field_150319_E, Blocks.field_150484_ah, Blocks.field_150482_ag, Blocks.field_196552_aC, Blocks.field_150340_R, Blocks.field_150352_o, Blocks.field_150432_aD, Blocks.field_150339_S, Blocks.field_150366_p, Blocks.field_150368_y, Blocks.field_150369_x, Blocks.field_150341_Y, Blocks.field_150424_aL, Blocks.field_150403_cj, Blocks.field_205164_gk, Blocks.field_150448_aq, Blocks.field_150450_ax, Blocks.field_150322_A, Blocks.field_196583_aj, Blocks.field_196585_ak, Blocks.field_196798_hA, Blocks.field_196799_hB, Blocks.field_180395_cM, Blocks.field_150348_b, Blocks.field_196650_c, Blocks.field_196652_d, Blocks.field_196654_e, Blocks.field_196655_f, Blocks.field_196656_g, Blocks.field_196657_h, Blocks.field_150333_U, Blocks.field_222401_hJ, Blocks.field_196640_bx, Blocks.field_196643_by, Blocks.field_196646_bz, Blocks.field_196571_bA, Blocks.field_196573_bB, Blocks.field_196575_bC, Blocks.field_196576_bD, Blocks.field_196578_bE, Blocks.field_185771_cX, Blocks.field_196581_bI, Blocks.field_196582_bJ, Blocks.field_196580_bH, Blocks.field_196579_bG, Blocks.field_150430_aB, Blocks.field_150456_au, Blocks.field_222446_lj, Blocks.field_222447_lk, Blocks.field_222448_ll, Blocks.field_222449_lm, Blocks.field_222450_ln, Blocks.field_222451_lo, Blocks.field_222452_lp, Blocks.field_222453_lq, Blocks.field_222454_lr, Blocks.field_222455_ls, Blocks.field_222456_lt, Blocks.field_222457_lu, Blocks.field_222458_lv, Blocks.field_204409_il, Blocks.field_190975_dA, Blocks.field_190988_dw, Blocks.field_190989_dx, Blocks.field_190986_du, Blocks.field_190984_ds, Blocks.field_190990_dy, Blocks.field_190980_do, Blocks.field_196875_ie, Blocks.field_190982_dq, Blocks.field_190979_dn, Blocks.field_190978_dm, Blocks.field_190983_dr, Blocks.field_190987_dv, Blocks.field_190991_dz, Blocks.field_190977_dl, Blocks.field_190981_dp);
protected PickaxeItem(IItemTier p_i48478_1_, int p_i48478_2_, float p_i48478_3_, Item.Properties p_i48478_4_) {
public PickaxeItem(IItemTier p_i48478_1_, int p_i48478_2_, float p_i48478_3_, Item.Properties p_i48478_4_) {
- super((float)p_i48478_2_, p_i48478_3_, p_i48478_1_, field_150915_c, p_i48478_4_);
+ super((float)p_i48478_2_, p_i48478_3_, p_i48478_1_, field_150915_c, p_i48478_4_.addToolType(net.minecraftforge.common.ToolType.PICKAXE, p_i48478_1_.func_200925_d()));
}
@@ -0,0 +1,38 @@
--- a/net/minecraft/item/crafting/RepairItemRecipe.java
+++ b/net/minecraft/item/crafting/RepairItemRecipe.java
@@ -24,7 +24,7 @@
list.add(itemstack);
if (list.size() > 1) {
ItemStack itemstack1 = list.get(0);
- if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.func_77973_b().func_77645_m()) {
+ if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.isRepairable()) {
return false;
}
}
@@ -43,7 +43,7 @@
list.add(itemstack);
if (list.size() > 1) {
ItemStack itemstack1 = list.get(0);
- if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.func_77973_b().func_77645_m()) {
+ if (itemstack.func_77973_b() != itemstack1.func_77973_b() || itemstack1.func_190916_E() != 1 || itemstack.func_190916_E() != 1 || !itemstack1.isRepairable()) {
return ItemStack.field_190927_a;
}
}
@@ -53,12 +53,12 @@
if (list.size() == 2) {
ItemStack itemstack3 = list.get(0);
ItemStack itemstack4 = list.get(1);
- if (itemstack3.func_77973_b() == itemstack4.func_77973_b() && itemstack3.func_190916_E() == 1 && itemstack4.func_190916_E() == 1 && itemstack3.func_77973_b().func_77645_m()) {
+ if (itemstack3.func_77973_b() == itemstack4.func_77973_b() && itemstack3.func_190916_E() == 1 && itemstack4.func_190916_E() == 1 && itemstack3.isRepairable()) {
Item item = itemstack3.func_77973_b();
- int j = item.func_77612_l() - itemstack3.func_77952_i();
- int k = item.func_77612_l() - itemstack4.func_77952_i();
- int l = j + k + item.func_77612_l() * 5 / 100;
- int i1 = item.func_77612_l() - l;
+ int j = itemstack3.func_77958_k() - itemstack3.func_77952_i();
+ int k = itemstack3.func_77958_k() - itemstack4.func_77952_i();
+ int l = j + k + itemstack3.func_77958_k() * 5 / 100;
+ int i1 = itemstack3.func_77958_k() - l;
if (i1 < 0) {
i1 = 0;
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -76,6 +76,7 @@
@@ -74,6 +74,7 @@
private float field_211397_t;
private int field_211398_u;
private boolean field_211399_v;
@@ -8,7 +8,7 @@
public NetworkManager(PacketDirection p_i46004_1_) {
this.field_179294_g = p_i46004_1_;
@@ -85,6 +86,7 @@
@@ -83,6 +84,7 @@
super.channelActive(p_channelActive_1_);
this.field_150746_k = p_channelActive_1_.channel();
this.field_150743_l = this.field_150746_k.remoteAddress();
@@ -16,7 +16,7 @@
try {
this.func_150723_a(ProtocolType.HANDSHAKING);
@@ -269,7 +271,9 @@
@@ -257,7 +259,9 @@
@OnlyIn(Dist.CLIENT)
public static NetworkManager func_181124_a(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_) {
@@ -26,7 +26,7 @@
Class<? extends SocketChannel> oclass;
LazyLoadBase<? extends EventLoopGroup> lazyloadbase;
if (Epoll.isAvailable() && p_181124_2_) {
@@ -297,6 +301,7 @@
@@ -285,6 +289,7 @@
@OnlyIn(Dist.CLIENT)
public static NetworkManager func_150722_a(SocketAddress p_150722_0_) {
final NetworkManager networkmanager = new NetworkManager(PacketDirection.CLIENTBOUND);
@@ -34,7 +34,7 @@
(new Bootstrap()).group(field_179296_e.func_179281_c()).handler(new ChannelInitializer<Channel>() {
protected void initChannel(Channel p_initChannel_1_) throws Exception {
p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager);
@@ -388,6 +393,14 @@
@@ -376,6 +381,14 @@
return this.field_211397_t;
}
@@ -1,5 +1,14 @@
--- a/net/minecraft/network/PacketBuffer.java
+++ b/net/minecraft/network/PacketBuffer.java
@@ -35,7 +35,7 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
-public class PacketBuffer extends ByteBuf {
+public class PacketBuffer extends ByteBuf implements net.minecraftforge.common.extensions.IForgePacketBuffer{
private final ByteBuf field_150794_a;
public PacketBuffer(ByteBuf p_i45154_1_) {
@@ -265,6 +265,15 @@
}
@@ -15,7 +15,7 @@
this.func_147326_c();
} else if (this.field_147328_g == ServerLoginNetHandler.State.DELAY_ACCEPT) {
ServerPlayerEntity serverplayerentity = this.field_147327_f.func_184103_al().func_177451_a(this.field_147337_i.getId());
@@ -124,7 +130,7 @@
@@ -128,7 +134,7 @@
this.field_147328_g = ServerLoginNetHandler.State.KEY;
this.field_147333_a.func_179290_a(new SEncryptionRequestPacket("", this.field_147327_f.func_71250_E().getPublic(), this.field_147330_e));
} else {
@@ -24,7 +24,7 @@
}
}
@@ -138,7 +144,7 @@
@@ -142,7 +148,7 @@
this.field_147335_k = p_147315_1_.func_149300_a(privatekey);
this.field_147328_g = ServerLoginNetHandler.State.AUTHENTICATING;
this.field_147333_a.func_150727_a(this.field_147335_k);
@@ -33,7 +33,7 @@
public void run() {
GameProfile gameprofile = ServerLoginNetHandler.this.field_147337_i;
@@ -147,11 +153,11 @@
@@ -151,11 +157,11 @@
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.field_147327_f.func_147130_as().hasJoinedServer(new GameProfile((UUID)null, gameprofile.getName()), s, this.func_191235_a());
if (ServerLoginNetHandler.this.field_147337_i != null) {
ServerLoginNetHandler.field_147332_c.info("UUID of player {} is {}", ServerLoginNetHandler.this.field_147337_i.getName(), ServerLoginNetHandler.this.field_147337_i.getId());
@@ -47,7 +47,7 @@
} else {
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.unverified_username"));
ServerLoginNetHandler.field_147332_c.error("Username '{}' tried to join with an invalid session", (Object)gameprofile.getName());
@@ -160,7 +166,7 @@
@@ -164,7 +170,7 @@
if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) {
ServerLoginNetHandler.field_147332_c.warn("Authentication servers are down but will let them in anyway!");
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile);
@@ -56,7 +56,7 @@
} else {
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.authservers_down"));
ServerLoginNetHandler.field_147332_c.error("Couldn't verify username because servers are unavailable");
@@ -181,6 +187,7 @@
@@ -185,6 +191,7 @@
}
public void func_209526_a(CCustomPayloadLoginPacket p_209526_1_) {
@@ -12,29 +12,18 @@
this.field_147371_a.func_179290_a(new SMoveVehiclePacket(entity));
return;
}
@@ -826,7 +828,9 @@
double d1 = this.field_147369_b.field_70163_u - ((double)blockpos.func_177956_o() + 0.5D) + 1.5D;
double d2 = this.field_147369_b.field_70161_v - ((double)blockpos.func_177952_p() + 0.5D);
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
- if (d3 > 36.0D) {
+ double dist = field_147369_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 1;
+ dist *= dist;
+ if (d3 > dist) {
return;
} else if (blockpos.func_177956_o() >= this.field_147367_d.func_71207_Z()) {
return;
@@ -866,7 +870,9 @@
@@ -839,7 +841,9 @@
Direction direction = blockraytraceresult.func_216354_b();
this.field_147369_b.func_143004_u();
if (blockpos.func_177956_o() < this.field_147367_d.func_71207_Z() - 1 || direction != Direction.UP && blockpos.func_177956_o() < this.field_147367_d.func_71207_Z()) {
- if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < 64.0D && !this.field_147367_d.func_175579_a(serverworld, blockpos, this.field_147369_b) && serverworld.func_175723_af().func_177746_a(blockpos)) {
- if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < 64.0D && serverworld.func_175660_a(this.field_147369_b, blockpos)) {
+ double dist = field_147369_b.func_110148_a(net.minecraft.entity.player.PlayerEntity.REACH_DISTANCE).func_111126_e() + 3;
+ dist *= dist;
+ if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < dist && !this.field_147367_d.func_175579_a(serverworld, blockpos, this.field_147369_b) && serverworld.func_175723_af().func_177746_a(blockpos)) {
+ if (this.field_184362_y == null && this.field_147369_b.func_70092_e((double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D) < dist && serverworld.func_175660_a(this.field_147369_b, blockpos)) {
this.field_147369_b.field_71134_c.func_219441_a(this.field_147369_b, serverworld, itemstack, hand, blockraytraceresult);
}
} else {
@@ -986,7 +992,9 @@
@@ -959,7 +963,9 @@
if (s.startsWith("/")) {
this.func_147361_d(s);
} else {
@@ -45,7 +34,7 @@
this.field_147367_d.func_184103_al().func_148544_a(itextcomponent, false);
}
@@ -1084,6 +1092,7 @@
@@ -1057,6 +1063,7 @@
this.field_147369_b.func_190775_a(entity, hand);
} else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.INTERACT_AT) {
Hand hand1 = p_147340_1_.func_186994_b();
@@ -53,7 +42,7 @@
entity.func_184199_a(this.field_147369_b, p_147340_1_.func_179712_b(), hand1);
} else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.ATTACK) {
if (entity instanceof ItemEntity || entity instanceof ExperienceOrbEntity || entity instanceof AbstractArrowEntity || entity == this.field_147369_b) {
@@ -1114,7 +1123,7 @@
@@ -1087,7 +1094,7 @@
return;
}
@@ -62,7 +51,7 @@
if (this.field_147367_d.func_71199_h()) {
this.field_147369_b.func_71033_a(GameType.SPECTATOR);
this.field_147369_b.func_71121_q().func_82736_K().func_223585_a(GameRules.field_223613_p).func_223570_a(false, this.field_147367_d);
@@ -1291,6 +1300,8 @@
@@ -1264,6 +1271,8 @@
}
public void func_147349_a(CCustomPayloadPacket p_147349_1_) {
@@ -0,0 +1,11 @@
--- a/net/minecraft/particles/ItemParticleData.java
+++ b/net/minecraft/particles/ItemParticleData.java
@@ -28,7 +28,7 @@
public ItemParticleData(ParticleType<ItemParticleData> p_i47952_1_, ItemStack p_i47952_2_) {
this.field_197558_b = p_i47952_1_;
- this.field_197559_c = p_i47952_2_;
+ this.field_197559_c = p_i47952_2_.func_77946_l(); //Forge: Fix stack updating after the fact causing particle changes.
}
public void func_197553_a(PacketBuffer p_197553_1_) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/pathfinding/WalkNodeProcessor.java
+++ b/net/minecraft/pathfinding/WalkNodeProcessor.java
@@ -26,6 +26,7 @@
@@ -27,6 +27,7 @@
public class WalkNodeProcessor extends NodeProcessor {
protected float field_176183_h;
@@ -8,7 +8,7 @@
public void func_186315_a(IWorldReader p_186315_1_, MobEntity p_186315_2_) {
super.func_186315_a(p_186315_1_, p_186315_2_);
@@ -258,7 +259,9 @@
@@ -269,7 +270,9 @@
PathNodeType pathnodetype = PathNodeType.BLOCKED;
double d0 = (double)p_186319_5_.func_213311_cf() / 2.0D;
BlockPos blockpos = new BlockPos(p_186319_5_);
@@ -18,7 +18,7 @@
if (enumset.contains(PathNodeType.FENCE)) {
return PathNodeType.FENCE;
} else {
@@ -348,6 +351,7 @@
@@ -359,6 +362,7 @@
if (pathnodetype1 == PathNodeType.DAMAGE_OTHER) {
pathnodetype = PathNodeType.DAMAGE_OTHER;
}
@@ -26,7 +26,7 @@
}
pathnodetype = this.func_193578_a(p_186330_1_, p_186330_2_, p_186330_3_, p_186330_4_, pathnodetype);
@@ -360,12 +364,14 @@
@@ -371,12 +375,14 @@
for(int i = -1; i <= 1; ++i) {
for(int j = -1; j <= 1; ++j) {
if (i != 0 || j != 0) {
@@ -45,7 +45,7 @@
p_193578_5_ = PathNodeType.DANGER_OTHER;
}
}
@@ -380,9 +386,11 @@
@@ -391,9 +397,11 @@
protected PathNodeType func_189553_b(IBlockReader p_189553_1_, int p_189553_2_, int p_189553_3_, int p_189553_4_) {
BlockPos blockpos = new BlockPos(p_189553_2_, p_189553_3_, p_189553_4_);
BlockState blockstate = p_189553_1_.func_180495_p(blockpos);
@@ -9,7 +9,15 @@
private final Map<IAttribute, AttributeModifier> field_111188_I = Maps.newHashMap();
private final EffectType field_220305_b;
private final int field_76414_N;
@@ -149,7 +149,6 @@
@@ -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;
}
@@ -17,3 +25,11 @@
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;
}
@@ -0,0 +1,10 @@
--- 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;
}
@@ -2,7 +2,7 @@
+++ b/net/minecraft/potion/Effects.java
@@ -9,6 +9,7 @@
import net.minecraft.world.Difficulty;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.server.ServerWorld;
[email protected]("minecraft")
public class Effects {
@@ -16,7 +16,7 @@
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,18 +116,20 @@
@@ -118,7 +116,6 @@
return iasyncreloader;
}
@@ -24,17 +24,3 @@
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_);
}
public IAsyncReloader func_219537_a(Executor p_219537_1_, Executor p_219537_2_, CompletableFuture<Unit> p_219537_3_, List<IResourcePack> p_219537_4_) {
+ net.minecraftforge.fml.common.progress.StartupProgressManager.start("Loading Resources", p_219537_4_.size(), true, bar -> {
this.func_199008_b();
field_199012_a.info("Reloading ResourceManager: {}", p_219537_4_.stream().map(IResourcePack::func_195762_a).collect(Collectors.joining(", ")));
for(IResourcePack iresourcepack : p_219537_4_) {
+ bar.step(iresourcepack.func_195762_a());
this.func_199021_a(iresourcepack);
}
+ });
return this.func_219538_b(p_219537_1_, p_219537_2_, this.field_199015_d, p_219537_3_);
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -181,7 +181,7 @@
@@ -191,7 +191,7 @@
private final GameProfileRepository field_152365_W;
private final PlayerProfileCache field_152366_X;
private long field_147142_T;
@@ -9,7 +9,7 @@
p_213187_0_.setUncaughtExceptionHandler((p_213206_0_, p_213206_1_) -> {
field_147145_h.error(p_213206_1_);
});
@@ -317,6 +317,8 @@
@@ -327,6 +327,8 @@
this.func_200245_b(new TranslationTextComponent("menu.loadingLevel"));
SaveHandler savehandler = this.func_71254_M().func_197715_a(p_71247_1_, this);
this.func_175584_a(this.func_71270_I(), savehandler);
@@ -18,7 +18,7 @@
WorldInfo worldinfo = savehandler.func_75757_d();
WorldSettings worldsettings;
if (worldinfo == null) {
@@ -337,7 +339,6 @@
@@ -347,7 +349,6 @@
}
this.func_195560_a(savehandler.func_75765_b(), worldinfo);
@@ -26,7 +26,7 @@
this.func_213194_a(savehandler, worldinfo, worldsettings, ichunkstatuslistener);
this.func_147139_a(this.func_147135_j(), true);
this.func_213186_a(ichunkstatuslistener);
@@ -385,6 +386,7 @@
@@ -395,6 +396,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 +34,7 @@
}
}
@@ -540,6 +542,7 @@
@@ -552,6 +554,7 @@
for(ServerWorld serverworld1 : this.func_212370_w()) {
if (serverworld1 != null) {
try {
@@ -42,7 +42,7 @@
serverworld1.close();
} catch (IOException ioexception) {
field_147145_h.error("Exception closing the level", (Throwable)ioexception);
@@ -580,6 +583,7 @@
@@ -592,6 +595,7 @@
public void run() {
try {
if (this.func_71197_b()) {
@@ -50,7 +50,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()));
@@ -611,7 +615,10 @@
@@ -623,9 +627,15 @@
this.field_71304_b.func_219897_b();
this.field_71296_Q = true;
}
@@ -60,8 +60,13 @@
+ net.minecraftforge.fml.server.ServerLifecycleHooks.expectServerStopped(); // has to come before finalTick to avoid race conditions
this.func_71228_a((CrashReport)null);
}
+ } catch (net.minecraftforge.fml.StartupQuery.AbortedException e) {
+ // ignore silently
+ net.minecraftforge.fml.server.ServerLifecycleHooks.expectServerStopped(); // has to come before finalTick to avoid race conditions
} catch (Throwable throwable1) {
@@ -630,6 +637,7 @@
field_147145_h.error("Encountered an unexpected exception", throwable1);
CrashReport crashreport;
@@ -642,6 +652,7 @@
field_147145_h.error("We were unable to save this crash report to disk.");
}
@@ -69,7 +74,7 @@
this.func_71228_a(crashreport);
} finally {
try {
@@ -638,6 +646,7 @@
@@ -650,6 +661,7 @@
} catch (Throwable throwable) {
field_147145_h.error("Exception stopping the server", throwable);
} finally {
@@ -77,7 +82,7 @@
this.func_71240_o();
}
@@ -734,6 +743,7 @@
@@ -746,6 +758,7 @@
protected void func_71217_p(BooleanSupplier p_71217_1_) {
long i = Util.func_211178_c();
@@ -85,7 +90,7 @@
++this.field_71315_w;
this.func_71190_q(p_71217_1_);
if (i - this.field_147142_T >= 5000000000L) {
@@ -748,6 +758,7 @@
@@ -760,6 +773,7 @@
Collections.shuffle(Arrays.asList(agameprofile));
this.field_147147_p.func_151318_b().func_151330_a(agameprofile);
@@ -93,7 +98,7 @@
}
if (this.field_71315_w % 6000 == 0) {
@@ -775,6 +786,7 @@
@@ -787,6 +801,7 @@
long i1 = Util.func_211178_c();
this.field_213215_ap.func_181747_a(i1 - i);
this.field_71304_b.func_76319_b();
@@ -101,15 +106,17 @@
}
protected void func_71190_q(BooleanSupplier p_71190_1_) {
@@ -783,6 +795,7 @@
@@ -794,7 +809,8 @@
this.func_193030_aL().func_73660_a();
this.field_71304_b.func_219895_b("levels");
for(ServerWorld serverworld : this.func_212370_w()) {
- for(ServerWorld serverworld : this.func_212370_w()) {
+ for(ServerWorld serverworld : this.getWorldArray()) {
+ long tickStart = Util.func_211178_c();
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());
@@ -794,6 +807,7 @@
@@ -806,6 +822,7 @@
}
this.field_71304_b.func_76320_a("tick");
@@ -117,7 +124,7 @@
try {
serverworld.func_72835_b(p_71190_1_);
@@ -802,12 +816,16 @@
@@ -814,12 +831,16 @@
serverworld.func_72914_a(crashreport);
throw new ReportedException(crashreport);
}
@@ -134,7 +141,7 @@
this.field_71304_b.func_219895_b("connection");
this.func_147137_ag().func_151269_c();
this.field_71304_b.func_219895_b("players");
@@ -844,6 +862,7 @@
@@ -856,6 +877,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();
@@ -142,7 +149,7 @@
try {
OptionSet optionset = optionparser.parse(p_main_0_);
@@ -936,7 +955,7 @@
@@ -948,7 +970,7 @@
}
public ServerWorld func_71218_a(DimensionType p_71218_1_) {
@@ -151,7 +158,7 @@
}
public Iterable<ServerWorld> func_212370_w() {
@@ -975,7 +994,7 @@
@@ -987,7 +1009,7 @@
}
public String getServerModName() {
@@ -160,11 +167,10 @@
}
public CrashReport func_71230_b(CrashReport p_71230_1_) {
@@ -1517,4 +1536,15 @@
}
@@ -1529,6 +1551,31 @@
public abstract boolean func_213199_b(GameProfile p_213199_1_);
+
+ private Map<DimensionType, long[]> tickTimes = Maps.newIdentityHashMap();
+ @Nullable
+ public long[] getTickTime(DimensionType dim) {
@@ -175,4 +181,21 @@
+ public synchronized Map<DimensionType, ServerWorld> forgeGetWorldMap() {
+ return this.field_71305_c;
+ }
}
+ private int worldArrayMarker = 0;
+ private int worldArrayLast = -1;
+ private ServerWorld[] worldArray;
+ @Deprecated //Forge Internal use Only, use to protect against concurrent modifications in the world tick loop.
+ public synchronized void markWorldsDirty() {
+ worldArrayMarker++;
+ }
+ private ServerWorld[] getWorldArray() {
+ if (worldArrayMarker == worldArrayLast && worldArray != null)
+ return worldArray;
+ worldArray = this.field_71305_c.values().stream().toArray(x -> new ServerWorld[x]);
+ worldArrayLast = worldArrayMarker;
+ return worldArray;
+ }
+
public void func_223711_a(Path p_223711_1_) throws IOException {
Path path = p_223711_1_.resolve("levels");
@@ -50,7 +50,7 @@
}
}
@@ -538,4 +544,9 @@
@@ -542,4 +548,9 @@
public boolean func_213199_b(GameProfile p_213199_1_) {
return false;
}
@@ -1,15 +1,15 @@
--- a/net/minecraft/server/management/PlayerInteractionManager.java
+++ b/net/minecraft/server/management/PlayerInteractionManager.java
@@ -74,7 +74,7 @@
@@ -76,7 +76,7 @@
++this.field_73100_i;
if (this.field_73097_j) {
int i = this.field_73100_i - this.field_73093_n;
BlockState blockstate = this.field_73092_a.func_180495_p(this.field_180241_i);
- if (blockstate.func_196958_f()) {
+ if (blockstate.isAir(field_73092_a, field_180241_i)) {
this.field_73097_j = false;
} else {
float f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, this.field_180241_i) * (float)(i + 1);
@@ -91,13 +91,13 @@
float f = this.func_225417_a(blockstate, this.field_180241_i);
@@ -87,7 +87,7 @@
}
} else if (this.field_73088_d) {
BlockState blockstate1 = this.field_73092_a.func_180495_p(this.field_180240_f);
@@ -18,199 +18,29 @@
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;
} else {
int k = this.field_73100_i - this.field_73089_e;
- float f1 = blockstate1.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, this.field_180241_i) * (float)(k + 1);
+ float f1 = blockstate1.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, this.field_180240_f) * (float)(k + 1); // Forge: Fix network break progress using wrong position
int l = (int)(f1 * 10.0F);
if (l != this.field_73094_o) {
this.field_73092_a.func_175715_c(this.field_73090_b.func_145782_y(), this.field_180240_f, l);
@@ -109,6 +109,12 @@
}
public void func_180784_a(BlockPos p_180784_1_, Direction p_180784_2_) {
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock event = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(field_73090_b, p_180784_1_, p_180784_2_);
+ if (event.isCanceled()) { // Restore block and te data
+ field_73090_b.field_71135_a.func_147359_a(new SChangeBlockPacket(field_73092_a, p_180784_1_));
+ field_73092_a.func_184138_a(p_180784_1_, field_73092_a.func_180495_p(p_180784_1_), field_73092_a.func_180495_p(p_180784_1_), 3);
+ return;
+ }
if (this.func_73083_d()) {
if (!this.field_73092_a.func_175719_a((PlayerEntity)null, p_180784_1_, p_180784_2_)) {
this.func_180237_b(p_180784_1_);
@@ -137,12 +143,26 @@
this.field_73089_e = this.field_73100_i;
float f = 1.0F;
BlockState blockstate = this.field_73092_a.func_180495_p(p_180784_1_);
- if (!blockstate.func_196958_f()) {
+ if (!blockstate.isAir(field_73092_a, p_180784_1_)) {
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
blockstate.func_196942_a(this.field_73092_a, p_180784_1_, this.field_73090_b);
+ this.field_73092_a.func_175719_a((PlayerEntity)null, p_180784_1_, p_180784_2_);
+ } else { // Restore block and te data
+ field_73090_b.field_71135_a.func_147359_a(new SChangeBlockPacket(field_73092_a, p_180784_1_));
+ field_73092_a.func_184138_a(p_180784_1_, field_73092_a.func_180495_p(p_180784_1_), field_73092_a.func_180495_p(p_180784_1_), 3);
+ }
f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_180784_1_);
}
- if (!blockstate.func_196958_f() && f >= 1.0F) {
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) {
+ if (f >= 1.0F) { // Restore block and te data
+ field_73090_b.field_71135_a.func_147359_a(new SChangeBlockPacket(field_73092_a, p_180784_1_));
+ field_73092_a.func_184138_a(p_180784_1_, field_73092_a.func_180495_p(p_180784_1_), field_73092_a.func_180495_p(p_180784_1_), 3);
+ }
+ return;
+ }
+
+ if (!blockstate.isAir(field_73092_a, p_180784_1_) && f >= 1.0F) {
this.func_180237_b(p_180784_1_);
} else {
this.field_73088_d = true;
@@ -160,7 +180,7 @@
if (p_180785_1_.equals(this.field_180240_f)) {
int i = this.field_73100_i - this.field_73089_e;
BlockState blockstate = this.field_73092_a.func_180495_p(p_180785_1_);
- if (!blockstate.func_196958_f()) {
+ if (!blockstate.isAir(field_73092_a, p_180785_1_)) {
float f = blockstate.func_185903_a(this.field_73090_b, this.field_73090_b.field_70170_p, p_180785_1_) * (float)(i + 1);
if (f >= 0.7F) {
this.field_73088_d = false;
@@ -183,9 +203,11 @@
}
private boolean func_180235_c(BlockPos p_180235_1_) {
+ return removeBlock(p_180235_1_, false);
+ }
+ private boolean removeBlock(BlockPos p_180235_1_, boolean canHarvest) {
BlockState blockstate = this.field_73092_a.func_180495_p(p_180235_1_);
- blockstate.func_177230_c().func_176208_a(this.field_73092_a, p_180235_1_, blockstate, this.field_73090_b);
- boolean flag = this.field_73092_a.func_217377_a(p_180235_1_, false);
+ boolean flag = blockstate.removedByPlayer(field_73092_a, p_180235_1_, field_73090_b, canHarvest, field_73092_a.func_204610_c(p_180235_1_));
if (flag) {
blockstate.func_177230_c().func_176206_d(this.field_73092_a, p_180235_1_, blockstate);
}
@@ -195,7 +217,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_);
@@ -204,6 +227,11 @@
this.field_73092_a.func_184138_a(p_180237_1_, blockstate, blockstate, 3);
return false;
} else {
+ ItemStack stack = field_73090_b.func_184614_ca();
+ if (stack.onBlockStartBreak(p_180237_1_, field_73090_b)) {
+ return false;
+ }
+
if (this.field_73091_c.func_82752_c()) {
if (this.field_73091_c == GameType.SPECTATOR) {
return false;
@@ -222,17 +250,28 @@
}
@@ -115,7 +115,9 @@
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;
+ 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 @@
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_)) {
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_);
}
- boolean flag1 = this.func_180235_c(p_180237_1_);
+ boolean flag1 = false;
if (!this.func_73083_d()) {
ItemStack itemstack2 = this.field_73090_b.func_184614_ca();
- boolean flag = this.field_73090_b.func_184823_b(blockstate);
+ ItemStack copy = itemstack2.func_77946_l();
+ boolean flag = blockstate.canHarvestBlock(field_73092_a, p_180237_1_, field_73090_b);
itemstack2.func_179548_a(this.field_73092_a, blockstate, p_180237_1_, this.field_73090_b);
+ if (itemstack2.func_190926_b() && !copy.func_190926_b()) {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_73090_b, copy, Hand.MAIN_HAND);
+ }
+ flag1 = this.removeBlock(p_180237_1_, flag);
if (flag1 && flag) {
ItemStack itemstack1 = itemstack2.func_190926_b() ? ItemStack.field_190927_a : itemstack2.func_77946_l();
blockstate.func_177230_c().func_180657_a(this.field_73092_a, this.field_73090_b, p_180237_1_, blockstate, tileentity, itemstack1);
}
+ } else {
+ flag1 = this.func_180235_c(p_180237_1_);
}
+ if (!this.func_73083_d() && flag1 && exp > 0) { // Drop experience
+ blockstate.func_177230_c().func_180637_b(field_73092_a, p_180237_1_, exp);
+ }
+
return flag1;
}
}
@@ -244,8 +283,11 @@
} 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();
+ ItemStack copyBeforeUse = p_187250_3_.func_77946_l();
ActionResult<ItemStack> actionresult = p_187250_3_.func_77957_a(p_187250_2_, p_187250_1_, p_187250_4_);
ItemStack itemstack = actionresult.func_188398_b();
if (itemstack == p_187250_3_ && itemstack.func_190916_E() == i && itemstack.func_77988_m() <= 0 && itemstack.func_77952_i() == j) {
@@ -262,6 +304,7 @@
}
if (itemstack.func_190926_b()) {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187250_1_, copyBeforeUse, p_187250_4_);
p_187250_1_.func_184611_a(p_187250_4_, ItemStack.field_190927_a);
}
@@ -286,19 +329,45 @@
return ActionResultType.PASS;
}
} else {
- boolean flag = !p_219441_1_.func_184614_ca().func_190926_b() || !p_219441_1_.func_184592_cb().func_190926_b();
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks.onRightClickBlock(field_73090_b, p_219441_4_, blockpos, p_219441_5_.func_216354_b());
+ if (event.isCanceled()) return event.getCancellationResult();
+
+ ActionResultType result = ActionResultType.PASS;
+ if (event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
+ result = p_219441_3_.onItemUseFirst(new ItemUseContext(p_219441_1_, p_219441_4_, p_219441_5_));
+ if (result != ActionResultType.PASS) {
+ return result;
+ }
+ }
+
+ boolean flag = !(field_73090_b.func_184614_ca().doesSneakBypassUse(p_219441_2_, blockpos, p_219441_1_) && field_73090_b.func_184592_cb().doesSneakBypassUse(p_219441_2_, blockpos, p_219441_1_));
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())) {
+ if ((!flag1 || event.getUseBlock() == net.minecraftforge.eventbus.api.Event.Result.ALLOW) &&
+ event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY &&
+ blockstate.func_215687_a(p_219441_2_, p_219441_1_, p_219441_4_, p_219441_5_)) {
+ result = ActionResultType.SUCCESS;
+ }
+
+ 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();
+ if ((result != ActionResultType.SUCCESS && event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) ||
+ (result == ActionResultType.SUCCESS && event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.ALLOW)) {
ActionResultType actionresulttype = p_219441_3_.func_196084_a(itemusecontext);
p_219441_3_.func_190920_e(i);
return actionresulttype;
+ } else return result;
- if (!blockstate.func_196958_f() && f >= 1.0F) {
+ if (!blockstate.isAir(field_73092_a, p_225416_1_) && f >= 1.0F) {
this.func_225415_a(p_225416_1_, p_225416_2_);
} else {
- return p_219441_3_.func_196084_a(itemusecontext);
+ if ((result != ActionResultType.SUCCESS && event.getUseItem() != net.minecraftforge.eventbus.api.Event.Result.DENY) ||
+ (result == ActionResultType.SUCCESS && event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.ALLOW)) {
+ ItemStack copyBeforeUse = p_219441_3_.func_77946_l();
+ result = p_219441_3_.func_196084_a(itemusecontext);
+ if (p_219441_3_.func_190926_b()) {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(field_73090_b, copyBeforeUse, p_219441_4_);
+ }
+ }
+ return result;
}
} else {
return ActionResultType.PASS;
this.field_73088_d = true;
@@ -11,7 +11,7 @@
if (this.field_213934_g.size() <= 1) {
beacontileentity$beamsegment = new BeaconTileEntity.BeamSegment(afloat);
this.field_213934_g.add(beacontileentity$beamsegment);
@@ -181,8 +181,7 @@
@@ -183,8 +183,7 @@
for(int k = p_213927_1_ - i; k <= p_213927_1_ + i && flag; ++k) {
for(int l = p_213927_3_ - i; l <= p_213927_3_ + i; ++l) {
@@ -4,10 +4,10 @@
this.field_75532_g = blockpos.func_177958_n() + MathHelper.func_76141_d(MathHelper.func_76134_b(f) * 32.0F);
this.field_75538_h = blockpos.func_177956_o();
this.field_75539_i = blockpos.func_177952_p() + MathHelper.func_76141_d(MathHelper.func_76126_a(f) * 32.0F);
- if (this.func_179867_a(new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i)) != null) {
+ Vec3d siegeLocation = this.func_179867_a(new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i));
- if (this.func_225476_a(p_75529_1_, new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i)) != null) {
+ Vec3d siegeLocation = this.func_225476_a(p_75529_1_, new BlockPos(this.field_75532_g, this.field_75538_h, this.field_75539_i));
+ if (siegeLocation != null) {
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.village.VillageSiegeEvent(this, field_75537_a, playerentity, siegeLocation))) return false;
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.village.VillageSiegeEvent(this, p_75529_1_, playerentity, siegeLocation))) return false;
this.field_75534_e = 0;
this.field_75533_d = 20;
break;
@@ -15,8 +15,8 @@
if (vec3d != null) {
ZombieEntity zombieentity;
try {
- zombieentity = new ZombieEntity(this.field_75537_a);
+ zombieentity = EntityType.field_200725_aD.func_200721_a(this.field_75537_a); //Forge: Direct Initialization is deprecated, use EntityType.
zombieentity.func_213386_a(this.field_75537_a, this.field_75537_a.func_175649_E(new BlockPos(zombieentity)), SpawnReason.EVENT, (ILivingEntityData)null, (CompoundNBT)null);
- zombieentity = new ZombieEntity(p_75530_1_);
+ zombieentity = EntityType.field_200725_aD.func_200721_a(p_75530_1_); //Forge: Direct Initialization is deprecated, use EntityType.
zombieentity.func_213386_a(p_75530_1_, p_75530_1_.func_175649_E(new BlockPos(zombieentity)), SpawnReason.EVENT, (ILivingEntityData)null, (CompoundNBT)null);
} catch (Exception exception) {
exception.printStackTrace();
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/Explosion.java
+++ b/net/minecraft/world/Explosion.java
@@ -47,6 +47,7 @@
@@ -48,6 +48,7 @@
private DamageSource field_199593_j;
private final List<BlockPos> field_77281_g = Lists.newArrayList();
private final Map<PlayerEntity, Vec3d> field_77288_k = Maps.newHashMap();
@@ -8,7 +8,7 @@
@OnlyIn(Dist.CLIENT)
public Explosion(World p_i45752_1_, @Nullable Entity p_i45752_2_, double p_i45752_3_, double p_i45752_5_, double p_i45752_7_, float p_i45752_9_, List<BlockPos> p_i45752_10_) {
@@ -69,6 +70,7 @@
@@ -70,6 +71,7 @@
this.field_77286_a = p_i50007_10_;
this.field_222260_b = p_i50007_11_;
this.field_199593_j = DamageSource.func_94539_a(this);
@@ -16,7 +16,7 @@
}
public static float func_222259_a(Vec3d p_222259_0_, Entity p_222259_1_) {
@@ -128,8 +130,8 @@
@@ -129,8 +131,8 @@
BlockPos blockpos = new BlockPos(d4, d6, d8);
BlockState blockstate = this.field_77287_j.func_180495_p(blockpos);
IFluidState ifluidstate = this.field_77287_j.func_204610_c(blockpos);
@@ -27,7 +27,7 @@
if (this.field_77283_e != null) {
f2 = this.field_77283_e.func_180428_a(this, this.field_77287_j, blockpos, blockstate, ifluidstate, f2);
}
@@ -159,6 +161,7 @@
@@ -160,6 +162,7 @@
int j2 = MathHelper.func_76128_c(this.field_77282_d - (double)f3 - 1.0D);
int j1 = MathHelper.func_76128_c(this.field_77282_d + (double)f3 + 1.0D);
List<Entity> list = this.field_77287_j.func_72839_b(this.field_77283_e, new AxisAlignedBB((double)k1, (double)i2, (double)j2, (double)l1, (double)i1, (double)j1));
@@ -35,7 +35,7 @@
Vec3d vec3d = new Vec3d(this.field_77284_b, this.field_77285_c, this.field_77282_d);
for(int k2 = 0; k2 < list.size(); ++k2) {
@@ -229,9 +232,9 @@
@@ -230,9 +233,9 @@
this.field_77287_j.func_195594_a(ParticleTypes.field_197601_L, d0, d1, d2, d3, d4, d5);
}
@@ -48,7 +48,16 @@
LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld)this.field_77287_j)).func_216023_a(this.field_77287_j.field_73012_v).func_216015_a(LootParameters.field_216286_f, blockpos).func_216015_a(LootParameters.field_216289_i, ItemStack.field_190927_a).func_216021_b(LootParameters.field_216288_h, tileentity);
if (this.field_222260_b == Explosion.Mode.DESTROY) {
lootcontext$builder.func_216015_a(LootParameters.field_216290_j, this.field_77280_f);
@@ -248,7 +251,7 @@
@@ -241,15 +244,14 @@
Block.func_220078_b(blockstate, lootcontext$builder);
}
- this.field_77287_j.func_180501_a(blockpos, Blocks.field_150350_a.func_176223_P(), 3);
- block.func_180652_a(this.field_77287_j, blockpos, this);
+ blockstate.onBlockExploded(this.field_77287_j, blockpos, this);
}
}
}
if (this.field_77286_a) {
for(BlockPos blockpos1 : this.field_77281_g) {
@@ -57,7 +66,7 @@
this.field_77287_j.func_175656_a(blockpos1, Blocks.field_150480_ab.func_176223_P());
}
}
@@ -287,6 +290,10 @@
@@ -288,6 +290,10 @@
return this.field_77281_g;
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/ServerMultiWorld.java
+++ b/net/minecraft/world/ServerMultiWorld.java
@@ -10,11 +10,18 @@
@@ -11,11 +11,18 @@
import net.minecraft.world.storage.SaveHandler;
public class ServerMultiWorld extends ServerWorld {
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/TrackedEntity.java
+++ b/net/minecraft/world/TrackedEntity.java
@@ -77,9 +77,8 @@
@@ -78,9 +78,8 @@
if (this.field_219461_c instanceof ItemFrameEntity && this.field_219472_n % 10 == 0) {
ItemFrameEntity itemframeentity = (ItemFrameEntity)this.field_219461_c;
ItemStack itemstack = itemframeentity.func_82335_i();
@@ -12,7 +12,7 @@
for(ServerPlayerEntity serverplayerentity : this.field_219460_b.func_217369_A()) {
mapdata.func_76191_a(serverplayerentity, itemstack);
IPacket<?> ipacket = ((FilledMapItem)itemstack.func_77973_b()).func_150911_c(itemstack, this.field_219460_b, serverplayerentity);
@@ -183,12 +182,14 @@
@@ -184,12 +183,14 @@
public void func_219454_a(ServerPlayerEntity p_219454_1_) {
this.field_219461_c.func_184203_c(p_219454_1_);
p_219454_1_.func_152339_d(this.field_219461_c);
@@ -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,23 +177,51 @@
@@ -169,17 +177,45 @@
} else {
Chunk chunk = this.func_175726_f(p_180501_1_);
Block block = p_180501_2_.func_177230_c();
@@ -86,14 +86,7 @@
+ {
if (blockstate1 == p_180501_2_) {
if (blockstate != blockstate1) {
this.func_217396_m(p_180501_1_);
}
- 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_);
}
this.func_225319_b(p_180501_1_, blockstate, blockstate1);
@@ -205,8 +241,6 @@
this.func_217393_a(p_180501_1_, blockstate, blockstate1);
@@ -178,7 +171,7 @@
@OnlyIn(Dist.CLIENT)
public Vec3d func_217382_a(BlockPos p_217382_1_, float p_217382_2_) {
+ return this.field_73011_w.getSkyColor(p_217382_1_, p_217382_2_);
+ return this.field_73011_w.getSkyColor(p_217382_1_, p_217382_2_);
+ }
+
+ @OnlyIn(Dist.CLIENT)
@@ -187,7 +180,7 @@
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);
- Biome biome = this.func_180494_b(p_217382_1_);
- float f2 = biome.func_180626_a(p_217382_1_);
- float f2 = biome.func_225486_c(p_217382_1_);
- int i = biome.func_76731_a(f2);
+ int i = net.minecraftforge.client.ForgeHooksClient.getSkyBlendColour(this, p_217382_1_);
float f3 = (float)(i >> 16 & 255) / 255.0F;
@@ -448,9 +441,9 @@
+ int k = MathHelper.func_76128_c((p_175647_2_.field_72339_c - getMaxEntityRadius()) / 16.0D);
+ int l = MathHelper.func_76143_f((p_175647_2_.field_72334_f + getMaxEntityRadius()) / 16.0D);
List<T> list = Lists.newArrayList();
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
for(int i1 = i; i1 < j; ++i1) {
@@ -980,7 +1071,7 @@
@@ -1001,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_);
@@ -459,7 +452,7 @@
}
public boolean func_175640_z(BlockPos p_175640_1_) {
@@ -1025,7 +1116,7 @@
@@ -1046,7 +1137,7 @@
}
public long func_72905_C() {
@@ -468,7 +461,7 @@
}
public long func_82737_E() {
@@ -1033,11 +1124,11 @@
@@ -1054,11 +1145,11 @@
}
public long func_72820_D() {
@@ -482,7 +475,7 @@
}
protected void func_217389_a() {
@@ -1049,7 +1140,7 @@
@@ -1070,7 +1161,7 @@
}
public BlockPos func_175694_M() {
@@ -491,7 +484,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()));
}
@@ -1058,10 +1149,14 @@
@@ -1079,10 +1170,14 @@
}
public void func_175652_B(BlockPos p_175652_1_) {
@@ -507,7 +500,7 @@
return true;
}
@@ -1129,8 +1224,7 @@
@@ -1150,8 +1245,7 @@
}
public boolean func_180502_D(BlockPos p_180502_1_) {
@@ -517,7 +510,7 @@
}
@Nullable
@@ -1144,12 +1238,11 @@
@@ -1165,12 +1259,11 @@
}
public int func_72940_L() {
@@ -532,7 +525,7 @@
}
public CrashReportCategory func_72914_a(CrashReport p_72914_1_) {
@@ -1180,16 +1273,15 @@
@@ -1201,16 +1294,15 @@
public abstract Scoreboard func_96441_U();
public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) {
@@ -553,7 +546,7 @@
blockstate.func_215697_a(this, blockpos, p_175666_2_, p_175666_1_, false);
}
}
@@ -1268,4 +1360,16 @@
@@ -1289,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());
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/biome/Biome.java
+++ b/net/minecraft/world/biome/Biome.java
@@ -55,7 +55,7 @@
@@ -58,7 +58,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -9,7 +9,7 @@
public static final Logger field_150586_aC = LogManager.getLogger();
public static final Set<Biome> field_201870_ab = Sets.newHashSet();
public static final ObjectIntIdentityMap<Biome> field_185373_j = new ObjectIntIdentityMap<>();
@@ -132,11 +132,11 @@
@@ -145,11 +145,11 @@
}
protected void func_201866_a(EntityClassification p_201866_1_, Biome.SpawnListEntry p_201866_2_) {
@@ -23,8 +23,8 @@
}
public Biome.RainType func_201851_b() {
@@ -168,7 +168,7 @@
if (this.func_180626_a(p_201854_2_) >= 0.15F) {
@@ -198,7 +198,7 @@
if (this.func_225486_c(p_201854_2_) >= 0.15F) {
return false;
} else {
- if (p_201854_2_.func_177956_o() >= 0 && p_201854_2_.func_177956_o() < 256 && p_201854_1_.func_175642_b(LightType.BLOCK, p_201854_2_) < 10) {
@@ -32,7 +32,7 @@
BlockState blockstate = p_201854_1_.func_180495_p(p_201854_2_);
IFluidState ifluidstate = p_201854_1_.func_204610_c(p_201854_2_);
if (ifluidstate.func_206886_c() == Fluids.field_204546_a && blockstate.func_177230_c() instanceof FlowingFluidBlock) {
@@ -193,7 +193,7 @@
@@ -223,7 +223,7 @@
} else {
if (p_201850_2_.func_177956_o() >= 0 && p_201850_2_.func_177956_o() < 256 && p_201850_1_.func_175642_b(LightType.BLOCK, p_201850_2_) < 10) {
BlockState blockstate = p_201850_1_.func_180495_p(p_201850_2_);
@@ -41,7 +41,7 @@
return true;
}
}
@@ -488,6 +488,18 @@
@@ -526,6 +526,18 @@
}
}
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/chunk/BlockStateContainer.java
+++ b/net/minecraft/world/chunk/BlockStateContainer.java
@@ -63,6 +63,9 @@
@@ -65,6 +65,9 @@
}
private void func_186012_b(int p_186012_1_) {
@@ -10,7 +10,7 @@
if (p_186012_1_ != this.field_186024_e) {
this.field_186024_e = p_186012_1_;
if (this.field_186024_e <= 4) {
@@ -73,6 +76,8 @@
@@ -75,6 +78,8 @@
} else {
this.field_186022_c = this.field_205521_b;
this.field_186024_e = MathHelper.func_151241_e(this.field_205523_d.func_186804_a());
@@ -19,7 +19,7 @@
}
this.field_186022_c.func_186041_a(this.field_205526_g);
@@ -135,12 +140,16 @@
@@ -137,12 +142,16 @@
this.func_210459_b();
int i = p_186010_1_.readByte();
if (this.field_186024_e != i) {
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/chunk/Chunk.java
+++ b/net/minecraft/world/chunk/Chunk.java
@@ -56,7 +56,7 @@
@@ -57,7 +57,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -9,7 +9,7 @@
private static final Logger field_150817_t = LogManager.getLogger();
public static final ChunkSection field_186036_a = null;
private final ChunkSection[] field_76652_q = new ChunkSection[16];
@@ -89,6 +89,7 @@
@@ -90,6 +90,7 @@
}
public Chunk(World p_i49946_1_, ChunkPos p_i49946_2_, Biome[] p_i49946_3_, UpgradeData p_i49946_4_, ITickList<Block> p_i49946_5_, ITickList<Fluid> p_i49946_6_, long p_i49946_7_, @Nullable ChunkSection[] p_i49946_9_, @Nullable Consumer<Chunk> p_i49946_10_) {
@@ -17,7 +17,7 @@
this.field_76645_j = new ClassInheritanceMultiMap[16];
this.field_76637_e = p_i49946_1_;
this.field_212816_F = p_i49946_2_;
@@ -116,6 +117,7 @@
@@ -117,6 +118,7 @@
field_150817_t.warn("Could not set level chunk sections, array length is {} instead of {}", p_i49946_9_.length, this.field_76652_q.length);
}
}
@@ -25,7 +25,7 @@
}
@@ -261,14 +263,14 @@
@@ -262,14 +264,14 @@
if (!this.field_76637_e.field_72995_K) {
blockstate.func_196947_b(this.field_76637_e, p_177436_1_, p_177436_2_, p_177436_3_);
@@ -42,7 +42,7 @@
TileEntity tileentity = this.func_177424_a(p_177436_1_, Chunk.CreateEntityType.CHECK);
if (tileentity != null) {
tileentity.func_145836_u();
@@ -279,10 +281,10 @@
@@ -280,10 +282,10 @@
p_177436_2_.func_215705_a(this.field_76637_e, p_177436_1_, blockstate, p_177436_3_);
}
@@ -55,7 +55,7 @@
this.field_76637_e.func_175690_a(p_177436_1_, tileentity1);
} else {
tileentity1.func_145836_u();
@@ -322,11 +324,13 @@
@@ -323,11 +325,13 @@
k = this.field_76645_j.length - 1;
}
@@ -69,7 +69,7 @@
}
public void func_201607_a(Heightmap.Type p_201607_1_, long[] p_201607_2_) {
@@ -347,6 +351,7 @@
@@ -348,6 +352,7 @@
}
this.field_76645_j[p_76608_2_].remove(p_76608_1_);
@@ -77,7 +77,7 @@
}
public int func_201576_a(Heightmap.Type p_201576_1_, int p_201576_2_, int p_201576_3_) {
@@ -357,7 +362,7 @@
@@ -358,7 +363,7 @@
private TileEntity func_177422_i(BlockPos p_177422_1_) {
BlockState blockstate = this.func_180495_p(p_177422_1_);
Block block = blockstate.func_177230_c();
@@ -86,7 +86,7 @@
}
@Nullable
@@ -368,6 +373,10 @@
@@ -369,6 +374,10 @@
@Nullable
public TileEntity func_177424_a(BlockPos p_177424_1_, Chunk.CreateEntityType p_177424_2_) {
TileEntity tileentity = this.field_150816_i.get(p_177424_1_);
@@ -97,7 +97,7 @@
if (tileentity == null) {
CompoundNBT compoundnbt = this.field_201618_i.remove(p_177424_1_);
if (compoundnbt != null) {
@@ -383,9 +392,6 @@
@@ -384,9 +393,6 @@
tileentity = this.func_177422_i(p_177424_1_);
this.field_76637_e.func_175690_a(p_177424_1_, tileentity);
}
@@ -107,7 +107,7 @@
}
return tileentity;
@@ -400,7 +406,8 @@
@@ -401,7 +407,8 @@
}
public void func_177426_a(BlockPos p_177426_1_, TileEntity p_177426_2_) {
@@ -117,7 +117,7 @@
p_177426_2_.func_145834_a(this.field_76637_e);
p_177426_2_.func_174878_a(p_177426_1_);
p_177426_2_.func_145829_t();
@@ -420,9 +427,14 @@
@@ -421,9 +428,14 @@
public CompoundNBT func_223134_j(BlockPos p_223134_1_) {
TileEntity tileentity = this.func_175625_s(p_223134_1_);
if (tileentity != null && !tileentity.func_145837_r()) {
@@ -132,7 +132,7 @@
} else {
CompoundNBT compoundnbt = this.field_201618_i.get(p_223134_1_);
if (compoundnbt != null) {
@@ -457,8 +469,8 @@
@@ -458,8 +470,8 @@
}
public void func_177414_a(@Nullable Entity p_177414_1_, AxisAlignedBB p_177414_2_, List<Entity> p_177414_3_, @Nullable Predicate<? super Entity> p_177414_4_) {
@@ -143,7 +143,7 @@
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
@@ -485,8 +497,8 @@
@@ -486,8 +498,8 @@
}
public void func_217313_a(@Nullable EntityType<?> p_217313_1_, AxisAlignedBB p_217313_2_, List<Entity> p_217313_3_, Predicate<? super Entity> p_217313_4_) {
@@ -154,7 +154,7 @@
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
@@ -501,8 +513,8 @@
@@ -502,8 +514,8 @@
}
public <T extends Entity> void func_177430_a(Class<? extends T> p_177430_1_, AxisAlignedBB p_177430_2_, List<T> p_177430_3_, @Nullable Predicate<? super T> p_177430_4_) {
@@ -165,7 +165,7 @@
i = MathHelper.func_76125_a(i, 0, this.field_76645_j.length - 1);
j = MathHelper.func_76125_a(j, 0, this.field_76645_j.length - 1);
@@ -533,6 +545,11 @@
@@ -534,6 +546,11 @@
};
Sets.newHashSet(this.field_150816_i.keySet()).stream().filter(predicate).forEach(this.field_76637_e::func_175713_t);
@@ -177,7 +177,7 @@
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) {
@@ -703,9 +720,9 @@
@@ -704,9 +721,9 @@
private TileEntity func_212815_a(BlockPos p_212815_1_, CompoundNBT p_212815_2_) {
TileEntity tileentity;
if ("DUMMY".equals(p_212815_2_.func_74779_i("id"))) {
@@ -190,7 +190,7 @@
} else {
tileentity = null;
field_150817_t.warn("Tried to load a DUMMY block entity @ {} but found not block entity block {} at location", p_212815_1_, this.func_180495_p(p_212815_1_));
@@ -797,4 +814,30 @@
@@ -798,4 +815,30 @@
QUEUED,
CHECK;
}
@@ -1,8 +1,8 @@
--- a/net/minecraft/world/chunk/ChunkStatus.java
+++ b/net/minecraft/world/chunk/ChunkStatus.java
@@ -21,7 +21,7 @@
import net.minecraft.world.gen.WorldGenRegion;
import net.minecraft.world.gen.feature.template.TemplateManager;
@@ -23,7 +23,7 @@
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.server.ServerWorldLightManager;
-public class ChunkStatus {
+public class ChunkStatus extends net.minecraftforge.registries.ForgeRegistryEntry<ChunkStatus> {
Loaded 100 of 316 files, more files were not shown because too many files have changed in this diff. Show more