mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4caf46cb9 | ||
|
|
7b866e7e43 | ||
|
|
c2b79dd6ad | ||
|
|
b290cc6477 | ||
|
|
16127a61c7 | ||
|
|
0965ebae09 | ||
|
|
b06fb810ca | ||
|
|
261313a682 | ||
|
|
da96dd3514 | ||
|
|
201be84b9c | ||
|
|
03d7eaae23 | ||
|
|
1be1bb59c5 | ||
|
|
fb44ba2e6d | ||
|
|
b16994717f | ||
|
|
b2964a1ae7 | ||
|
|
6f361dafa8 | ||
|
|
376f172990 | ||
|
|
9fe6385e1f | ||
|
|
b0ae0be80e | ||
|
|
b109baf7d6 | ||
|
|
7065cb36bf | ||
|
|
a6b9fdf8c4 | ||
|
|
6e8dd77bbe | ||
|
|
a4983be979 | ||
|
|
62cc9f2e63 | ||
|
|
49ec3d1b93 | ||
|
|
cf26f4acbe | ||
|
|
882e0e3bf2 | ||
|
|
2cb99f0e74 | ||
|
|
be73ec3d5e | ||
|
|
0348760a77 | ||
|
|
2f802b6d71 | ||
|
|
6b52023a5c | ||
|
|
5bea8218d2 | ||
|
|
b24eb9af3c | ||
|
|
d48985fafa | ||
|
|
c416f38461 | ||
|
|
0a5ef64d6e | ||
|
|
c177219ff3 | ||
|
|
9ab96fbda6 | ||
|
|
7a4aa5a1c4 | ||
|
|
998a78c3c1 | ||
|
|
42e0fbbb02 | ||
|
|
27ebd0e9b9 | ||
|
|
9a9c02fa25 | ||
|
|
5802a3b0b6 | ||
|
|
dc871ea273 | ||
|
|
5c78361b27 | ||
|
|
56e347d05a | ||
|
|
5f9034d95b | ||
|
|
858056c089 | ||
|
|
bd62cf81fd | ||
|
|
a1bbcf8a0b | ||
|
|
1eee6cd382 | ||
|
|
129f58c02f | ||
|
|
159ca09c54 | ||
|
|
9ecb005e98 | ||
|
|
b0558c63de | ||
|
|
80f0e0bb93 | ||
|
|
bea5d44273 | ||
|
|
7bbd3954f5 | ||
|
|
cfa63792bc | ||
|
|
490573a71f | ||
|
|
9c7d20b3a1 | ||
|
|
d7b241c224 | ||
|
|
d7dda9e960 | ||
|
|
5f06c95cfa | ||
|
|
6e8c05343c | ||
|
|
d3da111c08 | ||
|
|
7a63e67e9d | ||
|
|
d159f5f4e2 | ||
|
|
92eb71ae9c | ||
|
|
bc303074f6 | ||
|
|
c0db34796b | ||
|
|
ad1324d478 | ||
|
|
3a3c436e3f | ||
|
|
4feb1dff50 | ||
|
|
d3ad8aed76 | ||
|
|
7a84376044 | ||
|
|
1107088acb | ||
|
|
c58a66a816 | ||
|
|
2aaa4f424d | ||
|
|
89eb8f067d | ||
|
|
f08f3c1105 | ||
|
|
3b5ada083e | ||
|
|
8dca9f2694 | ||
|
|
4e3b6b0f15 | ||
|
|
cac55abec2 | ||
|
|
bf6437c12a | ||
|
|
853667c084 | ||
|
|
b879cc9b73 | ||
|
|
45097fed0c | ||
|
|
5964bf8cb2 | ||
|
|
24cccab718 | ||
|
|
ca1f704e2f | ||
|
|
f9c7caaf0c | ||
|
|
a05d4234f0 | ||
|
|
c3fe6ecf7c | ||
|
|
0c8f51bc95 | ||
|
|
12769dbaae | ||
|
|
ec2977afc9 | ||
|
|
a01bfc260a | ||
|
|
d6d9a45100 | ||
|
|
3222a9a771 | ||
|
|
8dbfe1baad | ||
|
|
7f40d90b75 | ||
|
|
b25a9256d3 | ||
|
|
f3d0d99404 | ||
|
|
dd41990db4 | ||
|
|
0e286f880e | ||
|
|
bfddcfb4fc | ||
|
|
b5db198f8b | ||
|
|
d17c025557 | ||
|
|
03c8852961 | ||
|
|
3a48a9cd73 | ||
|
|
20c662c1d0 | ||
|
|
8195c36434 | ||
|
|
180692ae5d | ||
|
|
7643be8cdc | ||
|
|
4cd0f88a69 | ||
|
|
1c8f22ed43 | ||
|
|
f20d728ed7 | ||
|
|
704b683e27 | ||
|
|
1c11a3622e | ||
|
|
fe2243df9f | ||
|
|
fdea60f89a | ||
|
|
62ec59103a | ||
|
|
69af6a9b8c | ||
|
|
ef28edb526 | ||
|
|
bc6b008364 | ||
|
|
7c4ffde39c | ||
|
|
f4e8804c8a | ||
|
|
f088e3df6b | ||
|
|
0f6b16cada | ||
|
|
4694152124 | ||
|
|
0cba2ed4eb | ||
|
|
4dcee246d5 | ||
|
|
53b43a6e1f | ||
|
|
1473334f61 | ||
|
|
7e15ab7da1 | ||
|
|
40f335ba66 | ||
|
|
de80d4c4af | ||
|
|
2aa7260bbb | ||
|
|
2eb3b72618 | ||
|
|
36d7148c5f | ||
|
|
579f028294 | ||
|
|
a3d8664028 | ||
|
|
b380ba717f | ||
|
|
9f9554f7e2 | ||
|
|
46cfaae3db | ||
|
|
5d9169db0f | ||
|
|
bc82f2ae5a | ||
|
|
b0fd97557e | ||
|
|
543156a008 | ||
|
|
056ff67a81 | ||
|
|
ab64d1a166 | ||
|
|
0cf2cdfdb3 | ||
|
|
f8ec3602f2 | ||
|
|
5a3047fbc2 | ||
|
|
fe96792506 | ||
|
|
cfba330459 | ||
|
|
31b3825069 | ||
|
|
cace1f00b2 | ||
|
|
f96a31c945 | ||
|
|
bc27f0e204 | ||
|
|
fc43ebbd7e | ||
|
|
5ebf77bfd9 | ||
|
|
b95d443f22 | ||
|
|
d7245c5ffe | ||
|
|
45b299ce06 | ||
|
|
7ed5fc7e00 | ||
|
|
94a41e1fcc | ||
|
|
a963c9854d | ||
|
|
cc0e6a1825 | ||
|
|
b7739ffc71 | ||
|
|
8f74d05d02 | ||
|
|
93a7ac3d89 | ||
|
|
db2f5ab416 | ||
|
|
ae0c02159f | ||
|
|
17858ef497 | ||
|
|
591ecdd7c9 | ||
|
|
7b5a5fbcbe | ||
|
|
32459b01b6 |
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# On the Contribution of an RF-lite Energy System: "Energy"
|
||||
Forge has acquired an Energy system, after many years of debate on the topic. The prevalence of the RF API has warranted the inclusion of a similar (but simpler) implementation to forge for 1.10.2 and onwards.
|
||||
Those who wish to use an RF like API, feel free to use it. If you don't want to think about Energy, but know you need it, you can use it *if you wish*. If you want to interoperate with other energy systems, feel free to use this to broker with them.
|
||||
|
||||
# On Diversity in Energy Systems
|
||||
Forge has always supported diversity in energy-like systems. If you have a burning desire to simulate electricity flow in all it's glory, we fully support you and look forward to playing your mod. If you wish to have pneumatic power, we have no objections, and would love to see your wonderful creations. If you have a power system of your own devising that is simply beyond our imagination, please, blow us away.
|
||||
|
||||
# On Modder Obligations
|
||||
As a modder, you are under *no* obligation to use or support the forge Energy system. If anyone, user, mod-pack maker or even us, tells you otherwise, refer them to this statement. The Forge energy system is not intended to supplant diversity in energy systems. It is not intended to be one-size-fits-all. The choice to support it, is the choice of the modder.
|
||||
@@ -35,8 +35,11 @@ Here is a short video from @cpw showing how to install and setup the MDK
|
||||
If you wish to actually inspect Forge, submit PRs or otherwise work
|
||||
with Forge itself, you're in the right place! Clone this (either
|
||||
directly, or make a Fork first if you want to make a PR) and run
|
||||
```gradlew.bat setup``` or ```gradlew setup```. This will download and
|
||||
```gradlew.bat setupForge``` or ```gradlew setupForge```. This will download and
|
||||
setup all the bits you need to have a functional Forge workspace.
|
||||
|
||||
After that, open a workspace in your favorite IDE and import existing projects
|
||||
the projects folder.
|
||||
|
||||
Here is a short video from @cpw showing how to install and setup Forge
|
||||
in Intellij.
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
*** HOW TO INSTALL ***
|
||||
For Mod Users:
|
||||
|
||||
Download the latest installer from http://files.minecraftforge.net and follow instructions given by the installer.
|
||||
|
||||
|
||||
For Mod Devs:
|
||||
|
||||
Download the latest Forge source distribution from http://files.minecraftforge.net and unzip it to a folder.
|
||||
Open a command prompt, navigate to the directory where you unzipped the Forge sources, and run:
|
||||
If you have Gradle: gradle setupDevWorkspace
|
||||
If you DO NOT have Gradle installed:
|
||||
Windows: ./gradlew.bat setupDevWorkspace
|
||||
MacOS/Linux: ./gradlew setupDevWorkspace
|
||||
|
||||
If you wish to use the Eclipse IDE, run gradle eclipse instead of gradle setupDevWorkspace, or install the Gradle plugin for Eclipse and import the Forge source folder as a Gradle project.
|
||||
|
||||
To get the decompiled classes:
|
||||
If you have Gradle: gradle setupDecompWorkspace
|
||||
If you DO NOT have Gradle installed:
|
||||
Windows: ./gradlew.bat setupDecompWorkspace
|
||||
MacOS/Linux: ./gradlew setupDecompWorkspace
|
||||
|
||||
For Contributors: (Note: This assumes you have Gradle installed. If you don't, use ./gradlew(.bat) instead of gradle.
|
||||
|
||||
Clone this repository to a folder.
|
||||
Open a command prompt and navigate to the folder where you cloned this repo.
|
||||
Run gradle setupForge to setup your development environment.
|
||||
|
||||
To use Eclipse, point your Eclipse workspace at the eclipse folder inside the repo.
|
||||
|
||||
|
||||
Requirements (for both mod devs and contributors):
|
||||
You must have a JDK installed and accessible.
|
||||
If you do not wish to use the gradle wrapper, you can install Gradle from http://www.gradle.org/ .
|
||||
|
||||
+9
-7
@@ -29,12 +29,12 @@ apply plugin: "net.minecraftforge.gradle.launch4j"
|
||||
minecraft.version = "1.10.2"
|
||||
|
||||
minecraft {
|
||||
mappings = 'snapshot_nodoc_20160518'
|
||||
mappings = 'snapshot_nodoc_20161111'
|
||||
workspaceDir = "projects"
|
||||
versionJson = "jsons/${minecraft.version}-dev.json"
|
||||
buildUserdev = true
|
||||
buildInstaller = true
|
||||
installerVersion = "1.4"
|
||||
installerVersion = "1.5"
|
||||
|
||||
def common = {
|
||||
patchPrefixOriginal "../src-base/minecraft"
|
||||
@@ -84,8 +84,6 @@ task changelog(type: JenkinsChangelog) {
|
||||
// skip if there is no forge jenkins pass
|
||||
onlyIf {
|
||||
project.hasProperty('forgeJenkinsPass')
|
||||
// Not sure what abrar was trying to do here...
|
||||
//project.file("build/distributions/${project.name}-${project.version}-changelog.txt").text = ""
|
||||
}
|
||||
|
||||
outputs.upToDateWhen { false } // never up to date
|
||||
@@ -108,13 +106,14 @@ task crowdin(type: CrowdinDownload) {
|
||||
}
|
||||
|
||||
def extraTxts = [
|
||||
changelog, // yeah we can do thi, because gradle and groovy are awesome
|
||||
"CREDITS-fml.txt",
|
||||
"LICENSE-new.txt",
|
||||
"MinecraftForge-Credits.txt",
|
||||
"Paulscode SoundSystem CodecIBXM License.txt",
|
||||
"Paulscode IBXM Library License.txt"
|
||||
]
|
||||
if (project.hasProperty('forgeJenkinsPass'))
|
||||
extraTxts += changelog
|
||||
|
||||
outputJar {
|
||||
classifier = 'universal'
|
||||
@@ -135,6 +134,7 @@ installer {
|
||||
classifier = 'installer'
|
||||
from extraTxts
|
||||
from "src/main/resources/forge_logo.png"
|
||||
from "src/main/resources/url.png"
|
||||
rename "forge_logo\\.png", "big_logo.png"
|
||||
}
|
||||
|
||||
@@ -177,7 +177,8 @@ task makeMdk(type: Zip) {
|
||||
into ('eclipse') {
|
||||
from 'mdk/eclipse'
|
||||
}
|
||||
from changelog.output
|
||||
if (project.hasProperty('forgeJenkinsPass'))
|
||||
from changelog.output
|
||||
from ('mdk') {
|
||||
filter(ReplaceTokens, tokens: [
|
||||
VERSION: project.version,
|
||||
@@ -211,7 +212,8 @@ tasks.build.dependsOn 'launch4j'
|
||||
// MAVEN
|
||||
|
||||
artifacts {
|
||||
archives changelog.output
|
||||
if (project.hasProperty('forgeJenkinsPass'))
|
||||
archives changelog.output
|
||||
archives file("build/distributions/${project.name}-${project.version}-installer-win.exe")
|
||||
archives makeMdk
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
|
||||
+16
-2
@@ -8,7 +8,8 @@
|
||||
"welcome":"Welcome to the simple @project@ installer.",
|
||||
"minecraft":"@minecraft_version@",
|
||||
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
|
||||
"logo":"/big_logo.png"
|
||||
"logo":"/big_logo.png",
|
||||
"modList": "none"
|
||||
},
|
||||
"versionInfo": {
|
||||
"id": "@minecraft_version@-@project@@version@",
|
||||
@@ -135,5 +136,18 @@
|
||||
"serverreq":true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"optionals": [
|
||||
{
|
||||
"name": "Mercurius",
|
||||
"client": true,
|
||||
"server": true,
|
||||
"default": true,
|
||||
"inject": true,
|
||||
"desc": "A mod that collects statistics about Minecraft and your system.<br>Useful for Forge to understand how Minecraft/Forge are used.",
|
||||
"url": "http://www.minecraftforge.net/forum/index.php?topic=43278.0",
|
||||
"artifact": "net.minecraftforge:MercuriusUpdater:1.10.2",
|
||||
"maven": "http://files.minecraftforge.net/maven/"
|
||||
}
|
||||
]
|
||||
}
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"assetIndex": {
|
||||
"id": "1.10",
|
||||
"sha1": "d3bfc4ffba1ea334c725dd91eaf4ecd402d641f7",
|
||||
"size": 145627,
|
||||
"url": "https://launchermeta.mojang.com/mc/assets/1.10/d3bfc4ffba1ea334c725dd91eaf4ecd402d641f7/1.10.json",
|
||||
"totalSize": 121931230
|
||||
"sha1": "72241db3c0bdc39e39b202182ff0000da5271a1d",
|
||||
"size": 145874,
|
||||
"url": "https://launchermeta.mojang.com/mc/assets/1.10/72241db3c0bdc39e39b202182ff0000da5271a1d/1.10.json",
|
||||
"totalSize": 122198775
|
||||
},
|
||||
"assets": "1.10",
|
||||
"downloads": {
|
||||
@@ -242,13 +242,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "com.mojang:realms:1.9.3",
|
||||
"name": "com.mojang:realms:1.9.8",
|
||||
"downloads": {
|
||||
"artifact": {
|
||||
"size": 1575798,
|
||||
"sha1": "b291425bf7ef763452eaa894575018706339f72b",
|
||||
"path": "com/mojang/realms/1.9.3/realms-1.9.3.jar",
|
||||
"url": "https://libraries.minecraft.net/com/mojang/realms/1.9.3/realms-1.9.3.jar"
|
||||
"size": 1577897,
|
||||
"sha1": "c9609760e050cd7c369292252552c0cc81c54331",
|
||||
"path": "com/mojang/realms/1.9.8/realms-1.9.8.jar",
|
||||
"url": "https://libraries.minecraft.net/com/mojang/realms/1.9.8/realms-1.9.8.jar"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -558,6 +558,6 @@
|
||||
"minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}",
|
||||
"minimumLauncherVersion": 18,
|
||||
"releaseTime": "2016-06-23T09:17:32+00:00",
|
||||
"time": "2016-06-23T09:45:47+00:00",
|
||||
"time": "2016-10-22T20:28:03+00:00",
|
||||
"type": "release"
|
||||
}
|
||||
+8
-12
@@ -1,29 +1,25 @@
|
||||
|
||||
// For those who want the bleeding edge
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
//Only edit below this line, the above code adds and enables the nessasary things for Forge to be setup.
|
||||
|
||||
|
||||
/*
|
||||
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
|
||||
plugins {
|
||||
id "net.minecraftforge.gradle.forge" version "2.0.2"
|
||||
}
|
||||
*/
|
||||
version = "1.0"
|
||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "modid"
|
||||
|
||||
sourceCompatibility = targetCompatibility = "1.6" // Need this here so eclipse task generates correctly.
|
||||
compileJava {
|
||||
sourceCompatibility = targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = "@VERSION@"
|
||||
runDir = "run"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
@@ -143,7 +143,16 @@
|
||||
}
|
||||
|
||||
public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, @Nullable ItemStack p_180639_6_, EnumFacing p_180639_7_, float p_180639_8_, float p_180639_9_, float p_180639_10_)
|
||||
@@ -680,25 +687,35 @@
|
||||
@@ -639,6 +646,8 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ // Forge: use getStateForPlacement
|
||||
+ @Deprecated
|
||||
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||
{
|
||||
return this.func_176203_a(p_180642_7_);
|
||||
@@ -680,25 +689,35 @@
|
||||
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
|
||||
p_180657_2_.func_71020_j(0.025F);
|
||||
|
||||
@@ -182,7 +191,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -794,9 +811,11 @@
|
||||
@@ -794,9 +813,11 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -195,7 +204,15 @@
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -893,6 +912,1141 @@
|
||||
@@ -883,6 +904,7 @@
|
||||
return Block.EnumOffsetType.NONE;
|
||||
}
|
||||
|
||||
+ @Deprecated // Forge - World/state/pos/entity sensitive version below
|
||||
public SoundType func_185467_w()
|
||||
{
|
||||
return this.field_149762_H;
|
||||
@@ -893,6 +915,1187 @@
|
||||
return "Block{" + field_149771_c.func_177774_c(this) + "}";
|
||||
}
|
||||
|
||||
@@ -612,7 +629,7 @@
|
||||
+ {
|
||||
+ IBlockState state = world.func_180495_p(pos);
|
||||
+ state = state.func_177230_c().func_176221_a(state, world, pos);
|
||||
+ state = state.func_177226_a(BlockBed.field_176471_b, true);
|
||||
+ state = state.func_177226_a(BlockBed.field_176471_b, occupied);
|
||||
+ ((World)world).func_180501_a(pos, state, 4);
|
||||
+ }
|
||||
+ }
|
||||
@@ -891,9 +908,9 @@
|
||||
+ IBlockState plant = plantable.getPlant(world, pos.func_177972_a(direction));
|
||||
+ net.minecraftforge.common.EnumPlantType plantType = plantable.getPlantType(world, pos.func_177972_a(direction));
|
||||
+
|
||||
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150434_aF && this == net.minecraft.init.Blocks.field_150434_aF)
|
||||
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150434_aF)
|
||||
+ {
|
||||
+ return true;
|
||||
+ return this == net.minecraft.init.Blocks.field_150434_aF || this == net.minecraft.init.Blocks.field_150354_m;
|
||||
+ }
|
||||
+
|
||||
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150436_aH && this == net.minecraft.init.Blocks.field_150436_aH)
|
||||
@@ -908,7 +925,7 @@
|
||||
+
|
||||
+ switch (plantType)
|
||||
+ {
|
||||
+ case Desert: return this == net.minecraft.init.Blocks.field_150354_m || this == net.minecraft.init.Blocks.field_150405_ch || this == net.minecraft.init.Blocks.field_150406_ce || this == net.minecraft.init.Blocks.field_150346_d;
|
||||
+ case Desert: return this == net.minecraft.init.Blocks.field_150354_m || this == net.minecraft.init.Blocks.field_150405_ch || this == net.minecraft.init.Blocks.field_150406_ce;
|
||||
+ case Nether: return this == net.minecraft.init.Blocks.field_150425_aM;
|
||||
+ case Crop: return this == net.minecraft.init.Blocks.field_150458_ak;
|
||||
+ case Cave: return state.isSideSolid(world, pos, EnumFacing.UP);
|
||||
@@ -1009,7 +1026,8 @@
|
||||
+ this != net.minecraft.init.Blocks.field_150411_aY &&
|
||||
+ this != net.minecraft.init.Blocks.field_185775_db;
|
||||
+ }
|
||||
+ else if (entity instanceof net.minecraft.entity.boss.EntityWither)
|
||||
+ else if ((entity instanceof net.minecraft.entity.boss.EntityWither) ||
|
||||
+ (entity instanceof net.minecraft.entity.projectile.EntityWitherSkull))
|
||||
+ {
|
||||
+ return net.minecraft.entity.boss.EntityWither.func_181033_a(this);
|
||||
+ }
|
||||
@@ -1332,8 +1350,66 @@
|
||||
+ public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sensitive version of getSoundType
|
||||
+ * @param state The state
|
||||
+ * @param world The world
|
||||
+ * @param pos The position. Note that the world may not necessarily have {@code state} here!
|
||||
+ * @param entity The entity that is breaking/stepping on/placing/hitting/falling on this block, or null if no entity is in this context
|
||||
+ * @return A SoundType to use
|
||||
+ */
|
||||
+ public SoundType getSoundType(IBlockState state, World world, BlockPos pos, @Nullable Entity entity)
|
||||
+ {
|
||||
+ return func_185467_w();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @param state The state
|
||||
+ * @param world The world
|
||||
+ * @param pos The position of this state
|
||||
+ * @param beaconPos The position of the beacon
|
||||
+ * @return A float RGB [0.0, 1.0] array to be averaged with a beacon's existing beam color, or null to do nothing to the beam
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public float[] getBeaconColorMultiplier(IBlockState state, World world, BlockPos pos, BlockPos beaconPos)
|
||||
+ {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the {@link IBlockState} to place
|
||||
+ * @param world The world the block is being placed in
|
||||
+ * @param pos The position the block is being placed at
|
||||
+ * @param facing The side the block is being placed on
|
||||
+ * @param hitX The X coordinate of the hit vector
|
||||
+ * @param hitY The Y coordinate of the hit vector
|
||||
+ * @param hitZ The Z coordinate of the hit vector
|
||||
+ * @param meta The metadata of {@link ItemStack} as processed by {@link Item#getMetadata(int)}
|
||||
+ * @param placer The entity placing the block
|
||||
+ * @param stack The stack being used to place this block
|
||||
+ * @return The state to be placed in the world
|
||||
+ */
|
||||
+ public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, ItemStack stack)
|
||||
+ {
|
||||
+ return func_180642_a(world, pos, facing, hitX, hitY, hitZ, meta, placer);
|
||||
+ }
|
||||
+
|
||||
+ /* ========================================= FORGE END ======================================*/
|
||||
+
|
||||
public static void func_149671_p()
|
||||
{
|
||||
func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air"));
|
||||
@@ -1169,11 +2372,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- for (IBlockState iblockstate : block16.func_176194_O().func_177619_a())
|
||||
- {
|
||||
- int k = field_149771_c.func_148757_b(block16) << 4 | block16.func_176201_c(iblockstate);
|
||||
- field_176229_d.func_148746_a(iblockstate, k);
|
||||
- }
|
||||
+// Handled in GameData.BlockCallbacks - leaving tripwire as it seems to be special cased
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,25 @@
|
||||
{
|
||||
public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15);
|
||||
protected static final AxisAlignedBB field_185593_b = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D);
|
||||
@@ -110,8 +110,8 @@
|
||||
@@ -49,6 +49,8 @@
|
||||
{
|
||||
int j = ((Integer)p_180650_3_.func_177229_b(field_176587_a)).intValue();
|
||||
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, blockpos, p_180650_3_, true))
|
||||
+ {
|
||||
if (j == 15)
|
||||
{
|
||||
p_180650_1_.func_175656_a(blockpos, this.func_176223_P());
|
||||
@@ -60,6 +62,8 @@
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176587_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,8 +114,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +38,7 @@
|
||||
}
|
||||
|
||||
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
|
||||
@@ -135,6 +135,18 @@
|
||||
@@ -135,6 +139,18 @@
|
||||
return ((Integer)p_176201_1_.func_177229_b(field_176587_a)).intValue();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockChorusFlower.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockChorusFlower.java
|
||||
@@ -52,7 +52,7 @@
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_185607_a)).intValue();
|
||||
|
||||
- if (i < 5 && p_180650_4_.nextInt(1) == 0)
|
||||
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, blockpos, p_180650_3_, p_180650_4_.nextInt(1) == 0))
|
||||
{
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
@@ -141,6 +141,7 @@
|
||||
{
|
||||
this.func_185605_c(p_180650_1_, p_180650_2_);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,23 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java
|
||||
@@ -131,7 +131,14 @@
|
||||
@@ -43,13 +43,14 @@
|
||||
{
|
||||
this.func_176500_f(p_180650_1_, p_180650_2_, p_180650_3_);
|
||||
}
|
||||
- else if (p_180650_1_.field_73012_v.nextInt(5) == 0)
|
||||
+ else
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176501_a)).intValue();
|
||||
|
||||
- if (i < 2)
|
||||
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt(5) == 0))
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176501_a, Integer.valueOf(i + 1)), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +132,14 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
@@ -16,7 +33,7 @@
|
||||
int j = 1;
|
||||
|
||||
if (i >= 2)
|
||||
@@ -141,8 +148,9 @@
|
||||
@@ -141,8 +149,9 @@
|
||||
|
||||
for (int k = 0; k < j; ++k)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockCrops.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java
|
||||
@@ -117,11 +117,11 @@
|
||||
@@ -79,9 +79,10 @@
|
||||
{
|
||||
float f = func_180672_a(this, p_180650_1_, p_180650_2_);
|
||||
|
||||
- if (p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0)
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0))
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, this.func_185528_e(i + 1), 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,11 +118,11 @@
|
||||
float f1 = 0.0F;
|
||||
IBlockState iblockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
|
||||
|
||||
@@ -14,7 +26,7 @@
|
||||
{
|
||||
f1 = 3.0F;
|
||||
}
|
||||
@@ -162,7 +162,8 @@
|
||||
@@ -162,7 +163,8 @@
|
||||
|
||||
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||
{
|
||||
@@ -24,7 +36,7 @@
|
||||
}
|
||||
|
||||
protected Item func_149866_i()
|
||||
@@ -175,11 +176,33 @@
|
||||
@@ -175,11 +177,33 @@
|
||||
return Items.field_151015_O;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockDynamicLiquid.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockDynamicLiquid.java
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.field_149815_a >= 2 && this.field_149764_J == Material.field_151586_h)
|
||||
+ if (this.field_149815_a >= 2 && net.minecraftforge.event.ForgeEventFactory.canCreateFluidSource(p_180650_1_, p_180650_2_, p_180650_3_, this.field_149764_J == Material.field_151586_h))
|
||||
{
|
||||
IBlockState iblockstate = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b());
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ if (p_176375_3_.func_177230_c() != Blocks.field_150431_aC) //Forge: Vanilla has a 'bug' where snowballs don't drop like every other block. So special case because ewww...
|
||||
p_176375_3_.func_177230_c().func_176226_b(p_176375_1_, p_176375_2_, p_176375_3_, 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockEnchantmentTable.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockEnchantmentTable.java
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);
|
||||
|
||||
- if (p_180655_2_.func_180495_p(blockpos).func_177230_c() == Blocks.field_150342_X)
|
||||
+ if (net.minecraftforge.common.ForgeHooks.getEnchantPower(p_180655_2_, blockpos) > 0)
|
||||
{
|
||||
if (!p_180655_2_.func_175623_d(p_180655_3_.func_177982_a(i / 2, 0, j / 2)))
|
||||
{
|
||||
@@ -9,7 +9,11 @@
|
||||
{
|
||||
int i = 32;
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
@@ -62,17 +62,18 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ IBlockState state = p_176503_1_.func_180495_p(p_176503_2_);
|
||||
p_176503_1_.func_175698_g(p_176503_2_);
|
||||
BlockPos blockpos;
|
||||
|
||||
@@ -18,3 +22,11 @@
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
if (blockpos.func_177956_o() > 0)
|
||||
{
|
||||
- p_176503_1_.func_175656_a(blockpos.func_177984_a(), this.func_176223_P());
|
||||
+ p_176503_1_.func_175656_a(blockpos.func_177984_a(), state); //Forge: Fix loss of state information during world gen.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@
|
||||
for (EnumFacing enumfacing : EnumFacing.values())
|
||||
{
|
||||
- i = Math.max(this.func_176534_d(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c()), i);
|
||||
+ i = Math.max(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c().getFlammability(p_176538_1_, p_176538_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()), i);
|
||||
+ i = Math.max(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c().getFireSpreadSpeed(p_176538_1_, p_176538_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()), i);
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{
|
||||
p_180650_1_.func_175656_a(blockpos, Blocks.field_150349_c.func_176223_P());
|
||||
}
|
||||
@@ -98,7 +98,7 @@
|
||||
@@ -98,18 +98,11 @@
|
||||
{
|
||||
if (j >= i / 16)
|
||||
{
|
||||
@@ -27,3 +27,15 @@
|
||||
{
|
||||
if (p_176474_2_.nextInt(8) == 0)
|
||||
{
|
||||
- BlockFlower.EnumFlowerType blockflower$enumflowertype = p_176474_1_.func_180494_b(blockpos1).func_180623_a(p_176474_2_, blockpos1);
|
||||
- BlockFlower blockflower = blockflower$enumflowertype.func_176964_a().func_180346_a();
|
||||
- IBlockState iblockstate = blockflower.func_176223_P().func_177226_a(blockflower.func_176494_l(), blockflower$enumflowertype);
|
||||
-
|
||||
- if (blockflower.func_180671_f(p_176474_1_, blockpos1, iblockstate))
|
||||
- {
|
||||
- p_176474_1_.func_180501_a(blockpos1, iblockstate, 3);
|
||||
- }
|
||||
+ p_176474_1_.func_180494_b(blockpos1).plantFlower(p_176474_1_, p_176474_2_, blockpos1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockNetherWart.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
|
||||
@@ -43,7 +43,7 @@
|
||||
@@ -43,25 +43,28 @@
|
||||
|
||||
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
|
||||
{
|
||||
@@ -9,7 +9,17 @@
|
||||
}
|
||||
|
||||
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
|
||||
@@ -59,9 +59,11 @@
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176486_a)).intValue();
|
||||
|
||||
- if (i < 3 && p_180650_4_.nextInt(10) == 0)
|
||||
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt(10) == 0))
|
||||
{
|
||||
p_180650_3_ = p_180650_3_.func_177226_a(field_176486_a, Integer.valueOf(i + 1));
|
||||
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_, 2);
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
|
||||
super.func_180650_b(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_);
|
||||
}
|
||||
|
||||
@@ -22,7 +32,7 @@
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
@@ -108,6 +110,26 @@
|
||||
@@ -108,6 +111,26 @@
|
||||
return ((Integer)p_176201_1_.func_177229_b(field_176486_a)).intValue();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRailDetector.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRailDetector.java
|
||||
@@ -156,6 +156,8 @@
|
||||
{
|
||||
if (((Boolean)p_180641_1_.func_177229_b(field_176574_M)).booleanValue())
|
||||
{
|
||||
+ List<EntityMinecart> carts = this.func_176571_a(p_180641_2_, p_180641_3_, EntityMinecart.class);
|
||||
+ if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
|
||||
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>func_176571_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class, new Predicate[0]);
|
||||
|
||||
if (!list.isEmpty())
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneTorch.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneTorch.java
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
public class BlockRedstoneTorch extends BlockTorch
|
||||
{
|
||||
- private static final Map<World, List<BlockRedstoneTorch.Toggle>> field_150112_b = Maps.<World, List<BlockRedstoneTorch.Toggle>>newHashMap();
|
||||
+ private static final Map<World, List<BlockRedstoneTorch.Toggle>> field_150112_b = new java.util.WeakHashMap<World, List<BlockRedstoneTorch.Toggle>>(); // FORGE - fix vanilla MC-101233
|
||||
private final boolean field_150113_a;
|
||||
|
||||
private boolean func_176598_a(World p_176598_1_, BlockPos p_176598_2_, boolean p_176598_3_)
|
||||
@@ -9,7 +9,25 @@
|
||||
{
|
||||
public static final PropertyInteger field_176355_a = PropertyInteger.func_177719_a("age", 0, 15);
|
||||
protected static final AxisAlignedBB field_185701_b = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 1.0D, 0.875D);
|
||||
@@ -70,7 +70,9 @@
|
||||
@@ -54,6 +54,8 @@
|
||||
{
|
||||
int j = ((Integer)p_180650_3_.func_177229_b(field_176355_a)).intValue();
|
||||
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, true))
|
||||
+ {
|
||||
if (j == 15)
|
||||
{
|
||||
p_180650_1_.func_175656_a(p_180650_2_.func_177984_a(), this.func_176223_P());
|
||||
@@ -63,6 +65,8 @@
|
||||
{
|
||||
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176355_a, Integer.valueOf(j + 1)), 4);
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +74,9 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
@@ -20,7 +38,7 @@
|
||||
|
||||
if (block == this)
|
||||
{
|
||||
@@ -165,6 +167,17 @@
|
||||
@@ -165,6 +171,17 @@
|
||||
return ((Integer)p_176201_1_.func_177229_b(field_176355_a)).intValue();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockSlab.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockSlab.java
|
||||
@@ -50,6 +50,16 @@
|
||||
@@ -50,6 +50,19 @@
|
||||
return this.func_176552_j();
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
+ {
|
||||
+ if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
|
||||
+ return super.doesSideBlockRendering(state, world, pos, face);
|
||||
+
|
||||
+ if ( state.func_185914_p() )
|
||||
+ return true;
|
||||
+
|
||||
@@ -17,7 +20,7 @@
|
||||
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
|
||||
{
|
||||
IBlockState iblockstate = super.func_180642_a(p_180642_1_, p_180642_2_, p_180642_3_, p_180642_4_, p_180642_5_, p_180642_6_, p_180642_7_, p_180642_8_).func_177226_a(field_176554_a, BlockSlab.EnumBlockHalf.BOTTOM);
|
||||
@@ -77,13 +87,14 @@
|
||||
@@ -77,13 +90,14 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,30 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockStairs.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockStairs.java
|
||||
@@ -445,6 +445,17 @@
|
||||
@@ -445,6 +445,29 @@
|
||||
return new BlockStateContainer(this, new IProperty[] {field_176309_a, field_176308_b, field_176310_M});
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
+ {
|
||||
+ if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
|
||||
+ return super.doesSideBlockRendering(state, world, pos, face);
|
||||
+
|
||||
+ if ( state.func_185914_p() )
|
||||
+ return true;
|
||||
+
|
||||
+ state = this.func_176221_a(state, world, pos);
|
||||
+
|
||||
+ EnumHalf half = state.func_177229_b(field_176308_b);
|
||||
+ EnumFacing side = state.func_177229_b(field_176309_a);
|
||||
+ return side == face || (half == EnumHalf.TOP && face == EnumFacing.UP) || (half == EnumHalf.BOTTOM && face == EnumFacing.DOWN);
|
||||
+ EnumShape shape = state.func_177229_b(field_176310_M);
|
||||
+ if (face == EnumFacing.UP) return half == EnumHalf.TOP;
|
||||
+ if (face == EnumFacing.DOWN) return half == EnumHalf.BOTTOM;
|
||||
+ if (shape == EnumShape.OUTER_LEFT || shape == EnumShape.OUTER_RIGHT) return false;
|
||||
+ if (face == side) return true;
|
||||
+ if (shape == EnumShape.INNER_LEFT && face.func_176746_e() == side) return true;
|
||||
+ if (shape == EnumShape.INNER_RIGHT && face.func_176735_f() == side) return true;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
public static enum EnumHalf implements IStringSerializable
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/BlockStem.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/BlockStem.java
|
||||
@@ -90,9 +90,10 @@
|
||||
@@ -70,7 +70,7 @@
|
||||
{
|
||||
float f = BlockCrops.func_180672_a(this, p_180650_1_, p_180650_2_);
|
||||
|
||||
- if (p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0)
|
||||
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0))
|
||||
{
|
||||
int i = ((Integer)p_180650_3_.func_177229_b(field_176484_a)).intValue();
|
||||
|
||||
@@ -90,13 +90,15 @@
|
||||
}
|
||||
|
||||
p_180650_2_ = p_180650_2_.func_177972_a(EnumFacing.Plane.HORIZONTAL.func_179518_a(p_180650_4_));
|
||||
@@ -13,7 +22,12 @@
|
||||
{
|
||||
p_180650_1_.func_175656_a(p_180650_2_, this.field_149877_a.func_176223_P());
|
||||
}
|
||||
@@ -110,24 +111,29 @@
|
||||
}
|
||||
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,24 +112,29 @@
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--- ../src-base/minecraft/net/minecraft/block/SoundType.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/SoundType.java
|
||||
@@ -48,7 +48,6 @@
|
||||
return this.field_185861_n;
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public SoundEvent func_185845_c()
|
||||
{
|
||||
return this.field_185862_o;
|
||||
@@ -64,7 +63,6 @@
|
||||
return this.field_185864_q;
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public SoundEvent func_185846_f()
|
||||
{
|
||||
return this.field_185865_r;
|
||||
@@ -16,7 +16,15 @@
|
||||
}
|
||||
|
||||
private synchronized void func_148608_i()
|
||||
@@ -338,6 +340,9 @@
|
||||
@@ -205,6 +207,7 @@
|
||||
this.field_148620_e.stop(s);
|
||||
}
|
||||
|
||||
+ this.field_189000_p.clear(); //Forge: MC-35856 Fixed paused sounds repeating when switching worlds
|
||||
this.field_148629_h.clear();
|
||||
this.field_148626_m.clear();
|
||||
this.field_148625_l.clear();
|
||||
@@ -338,6 +341,9 @@
|
||||
{
|
||||
if (this.field_148617_f)
|
||||
{
|
||||
@@ -26,7 +34,7 @@
|
||||
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
|
||||
ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
|
||||
|
||||
@@ -400,10 +405,12 @@
|
||||
@@ -400,10 +406,12 @@
|
||||
if (sound.func_188723_h())
|
||||
{
|
||||
this.field_148620_e.newStreamingSource(false, s, func_148612_a(resourcelocation1), resourcelocation1.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f);
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiScreen.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreen.java
|
||||
@@ -147,7 +147,8 @@
|
||||
@@ -147,7 +147,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- this.func_146283_a(list, p_146285_2_, p_146285_3_);
|
||||
+ FontRenderer font = p_146285_1_.func_77973_b().getFontRenderer(p_146285_1_);
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_146285_1_);
|
||||
+ this.drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font));
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip();
|
||||
}
|
||||
|
||||
protected void func_146279_a(String p_146279_1_, int p_146279_2_, int p_146279_3_)
|
||||
@@ -157,7 +158,13 @@
|
||||
@@ -157,7 +160,13 @@
|
||||
|
||||
protected void func_146283_a(List<String> p_146283_1_, int p_146283_2_, int p_146283_3_)
|
||||
{
|
||||
- if (!p_146283_1_.isEmpty())
|
||||
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
|
||||
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
|
||||
+ }
|
||||
+
|
||||
+ protected void drawHoveringText(List<String> p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font)
|
||||
@@ -25,7 +27,7 @@
|
||||
{
|
||||
GlStateManager.func_179101_C();
|
||||
RenderHelper.func_74518_a();
|
||||
@@ -427,6 +434,7 @@
|
||||
@@ -427,6 +436,7 @@
|
||||
{
|
||||
this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_175281_1_);
|
||||
}
|
||||
@@ -33,7 +35,7 @@
|
||||
|
||||
this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_);
|
||||
}
|
||||
@@ -441,9 +449,15 @@
|
||||
@@ -441,9 +451,15 @@
|
||||
|
||||
if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_))
|
||||
{
|
||||
@@ -49,7 +51,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -473,8 +487,12 @@
|
||||
@@ -473,8 +489,12 @@
|
||||
this.field_146289_q = p_146280_1_.field_71466_p;
|
||||
this.field_146294_l = p_146280_2_;
|
||||
this.field_146295_m = p_146280_3_;
|
||||
@@ -62,7 +64,7 @@
|
||||
}
|
||||
|
||||
public void func_183500_a(int p_183500_1_, int p_183500_2_)
|
||||
@@ -493,7 +511,9 @@
|
||||
@@ -493,7 +513,9 @@
|
||||
{
|
||||
while (Mouse.next())
|
||||
{
|
||||
@@ -72,7 +74,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,7 +521,9 @@
|
||||
@@ -501,7 +523,9 @@
|
||||
{
|
||||
while (Keyboard.next())
|
||||
{
|
||||
@@ -82,7 +84,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -563,6 +585,7 @@
|
||||
@@ -563,6 +587,7 @@
|
||||
public void func_146276_q_()
|
||||
{
|
||||
this.func_146270_b(0);
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiVideoSettings.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiVideoSettings.java
|
||||
@@ -107,4 +107,12 @@
|
||||
this.func_73732_a(this.field_146289_q, this.field_146500_a, this.field_146294_l / 2, 5, 16777215);
|
||||
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
+
|
||||
+ // FORGE: fix for MC-64581 very laggy mipmap slider
|
||||
+ @Override
|
||||
+ public void func_146281_b()
|
||||
+ {
|
||||
+ super.func_146281_b();
|
||||
+ this.field_146297_k.field_71474_y.onGuiClosed();
|
||||
+ }
|
||||
}
|
||||
+15
-5
@@ -162,7 +162,17 @@
|
||||
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.func_179140_f();
|
||||
}
|
||||
@@ -638,16 +687,35 @@
|
||||
@@ -624,7 +673,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_146285_1_);
|
||||
this.func_146283_a(list, p_146285_2_, p_146285_3_);
|
||||
+ net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -638,16 +689,35 @@
|
||||
RenderHelper.func_74520_c();
|
||||
CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w];
|
||||
|
||||
@@ -199,7 +209,7 @@
|
||||
this.field_146297_k.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.func_78015_f()));
|
||||
this.func_73729_b(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g);
|
||||
this.field_147062_A.func_146194_f();
|
||||
@@ -662,6 +730,14 @@
|
||||
@@ -662,6 +732,14 @@
|
||||
this.func_73729_b(i, j + (int)((float)(k - j - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15);
|
||||
}
|
||||
|
||||
@@ -214,7 +224,7 @@
|
||||
this.func_147051_a(creativetabs);
|
||||
|
||||
if (creativetabs == CreativeTabs.field_78036_m)
|
||||
@@ -672,6 +748,14 @@
|
||||
@@ -672,6 +750,14 @@
|
||||
|
||||
protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_)
|
||||
{
|
||||
@@ -229,7 +239,7 @@
|
||||
int i = p_147049_1_.func_78020_k();
|
||||
int j = 28 * i;
|
||||
int k = 0;
|
||||
@@ -768,6 +852,8 @@
|
||||
@@ -768,6 +854,8 @@
|
||||
}
|
||||
|
||||
GlStateManager.func_179140_f();
|
||||
@@ -238,7 +248,7 @@
|
||||
this.func_73729_b(l, i1, j, k, 28, 32);
|
||||
this.field_73735_i = 100.0F;
|
||||
this.field_146296_j.field_77023_b = 100.0F;
|
||||
@@ -794,6 +880,15 @@
|
||||
@@ -794,6 +882,15 @@
|
||||
{
|
||||
this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.field_71439_g.func_146107_m()));
|
||||
}
|
||||
|
||||
@@ -77,6 +77,24 @@
|
||||
if (flag && iblockstate.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F)
|
||||
{
|
||||
this.func_187103_a(p_180511_1_);
|
||||
@@ -290,7 +300,7 @@
|
||||
|
||||
if (this.field_78780_h % 4.0F == 0.0F)
|
||||
{
|
||||
- SoundType soundtype = block.func_185467_w();
|
||||
+ SoundType soundtype = block.getSoundType(iblockstate, field_78776_a.field_71441_e, p_180512_1_, field_78776_a.field_71439_g);
|
||||
this.field_78776_a.func_147118_V().func_147682_a(new PositionedSoundRecord(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_));
|
||||
}
|
||||
|
||||
@@ -342,7 +352,7 @@
|
||||
|
||||
if (this.field_85183_f != null && itemstack != null)
|
||||
{
|
||||
- flag = itemstack.func_77973_b() == this.field_85183_f.func_77973_b() && ItemStack.func_77970_a(itemstack, this.field_85183_f) && (itemstack.func_77984_f() || itemstack.func_77960_j() == this.field_85183_f.func_77960_j());
|
||||
+ flag = !net.minecraftforge.client.ForgeHooksClient.shouldCauseBlockBreakReset(this.field_85183_f, itemstack);
|
||||
}
|
||||
|
||||
return p_178893_1_.equals(this.field_178895_c) && flag;
|
||||
@@ -373,13 +383,32 @@
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
|
||||
@@ -60,17 +60,18 @@
|
||||
@@ -60,17 +60,19 @@
|
||||
|
||||
public WorldClient(NetHandlerPlayClient p_i45063_1_, WorldSettings p_i45063_2_, int p_i45063_3_, EnumDifficulty p_i45063_4_, Profiler p_i45063_5_)
|
||||
{
|
||||
@@ -17,6 +17,7 @@
|
||||
this.field_72988_C = new SaveDataMemoryStorage();
|
||||
this.func_72966_v();
|
||||
this.func_72947_a();
|
||||
+ this.initCapabilities();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -58,18 +58,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1169,6 +1176,10 @@
|
||||
@@ -1169,6 +1176,15 @@
|
||||
{
|
||||
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ if(tileentity == null)
|
||||
+ {
|
||||
+ field_147301_d.error("Received invalid update packet for null tile entity at {} with data: {}", p_147273_1_.func_179823_a(), p_147273_1_.func_148857_g());
|
||||
+ return;
|
||||
+ }
|
||||
+ tileentity.onDataPacket(field_147302_e, p_147273_1_);
|
||||
+ }
|
||||
|
||||
if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock)
|
||||
{
|
||||
@@ -1266,15 +1277,15 @@
|
||||
@@ -1266,15 +1282,15 @@
|
||||
}
|
||||
else if (f == 101.0F)
|
||||
{
|
||||
@@ -88,7 +93,7 @@
|
||||
}
|
||||
}
|
||||
else if (i == 6)
|
||||
@@ -1368,7 +1379,7 @@
|
||||
@@ -1368,7 +1384,7 @@
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,23 @@
|
||||
{
|
||||
EnumHand enumhand1 = abstractclientplayer.func_184600_cs();
|
||||
flag = enumhand1 == EnumHand.MAIN_HAND;
|
||||
@@ -361,7 +361,7 @@
|
||||
@@ -334,6 +334,7 @@
|
||||
{
|
||||
float f3 = enumhand == EnumHand.MAIN_HAND ? f : 0.0F;
|
||||
float f5 = 1.0F - (this.field_187470_g + (this.field_187469_f - this.field_187470_g) * p_78440_1_);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(EnumHand.MAIN_HAND, p_78440_1_, f1, f3, f5, this.field_187467_d))
|
||||
this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.MAIN_HAND, f3, this.field_187467_d, f5);
|
||||
}
|
||||
|
||||
@@ -341,6 +342,7 @@
|
||||
{
|
||||
float f4 = enumhand == EnumHand.OFF_HAND ? f : 0.0F;
|
||||
float f6 = 1.0F - (this.field_187472_i + (this.field_187471_h - this.field_187472_i) * p_78440_1_);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(EnumHand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e))
|
||||
this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.OFF_HAND, f4, this.field_187468_e, f6);
|
||||
}
|
||||
|
||||
@@ -361,7 +363,7 @@
|
||||
this.func_187456_a(p_187457_7_, p_187457_5_, enumhandside);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +34,7 @@
|
||||
{
|
||||
if (flag && this.field_187468_e == null)
|
||||
{
|
||||
@@ -445,6 +445,7 @@
|
||||
@@ -445,6 +447,7 @@
|
||||
if (this.field_78455_a.field_71439_g.func_70094_T())
|
||||
{
|
||||
IBlockState iblockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g));
|
||||
@@ -26,7 +42,7 @@
|
||||
EntityPlayer entityplayer = this.field_78455_a.field_71439_g;
|
||||
|
||||
for (int i = 0; i < 8; ++i)
|
||||
@@ -458,11 +459,13 @@
|
||||
@@ -458,11 +461,13 @@
|
||||
if (iblockstate1.func_177230_c().func_176214_u())
|
||||
{
|
||||
iblockstate = iblockstate1;
|
||||
@@ -40,7 +56,7 @@
|
||||
this.func_178108_a(p_78447_1_, this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate));
|
||||
}
|
||||
}
|
||||
@@ -471,11 +474,13 @@
|
||||
@@ -471,11 +476,13 @@
|
||||
{
|
||||
if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_151586_h))
|
||||
{
|
||||
@@ -54,7 +70,7 @@
|
||||
this.func_78442_d(p_78447_1_);
|
||||
}
|
||||
}
|
||||
@@ -597,8 +602,8 @@
|
||||
@@ -597,8 +604,8 @@
|
||||
else
|
||||
{
|
||||
float f = entityplayersp.func_184825_o(1.0F);
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
||||
@@ -548,8 +548,10 @@
|
||||
@@ -456,6 +456,7 @@
|
||||
{
|
||||
this.field_175009_l.clear();
|
||||
this.field_72755_R.clear();
|
||||
+ if (field_175008_n != null) field_175008_n.func_178160_a(); // Forge: Fix MC-105406
|
||||
this.field_175008_n = null;
|
||||
|
||||
if (this.field_174995_M != null)
|
||||
@@ -548,8 +549,10 @@
|
||||
|
||||
public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float p_180446_3_)
|
||||
{
|
||||
@@ -11,7 +19,7 @@
|
||||
--this.field_72740_G;
|
||||
}
|
||||
else
|
||||
@@ -560,9 +562,12 @@
|
||||
@@ -560,9 +563,12 @@
|
||||
this.field_72769_h.field_72984_F.func_76320_a("prepare");
|
||||
TileEntityRendererDispatcher.field_147556_a.func_190056_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_71476_x, p_180446_3_);
|
||||
this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_180446_3_);
|
||||
@@ -24,7 +32,7 @@
|
||||
Entity entity = this.field_72777_q.func_175606_aa();
|
||||
double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_;
|
||||
double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_;
|
||||
@@ -574,11 +579,15 @@
|
||||
@@ -574,11 +580,15 @@
|
||||
this.field_72777_q.field_71460_t.func_180436_i();
|
||||
this.field_72769_h.field_72984_F.func_76318_c("global");
|
||||
List<Entity> list = this.field_72769_h.func_72910_y();
|
||||
@@ -40,7 +48,7 @@
|
||||
++this.field_72749_I;
|
||||
|
||||
if (entity1.func_145770_h(d0, d1, d2))
|
||||
@@ -601,6 +610,7 @@
|
||||
@@ -601,6 +611,7 @@
|
||||
{
|
||||
for (Entity entity2 : classinheritancemultimap)
|
||||
{
|
||||
@@ -48,7 +56,7 @@
|
||||
boolean flag = this.field_175010_j.func_178635_a(entity2, p_180446_2_, d0, d1, d2) || entity2.func_184215_y(this.field_72777_q.field_71439_g);
|
||||
|
||||
if (flag)
|
||||
@@ -637,6 +647,7 @@
|
||||
@@ -637,6 +648,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +64,7 @@
|
||||
if (this.func_174985_d() && (!list1.isEmpty() || this.field_184386_ad))
|
||||
{
|
||||
this.field_72769_h.field_72984_F.func_76318_c("entityOutlines");
|
||||
@@ -676,6 +687,7 @@
|
||||
@@ -676,6 +688,7 @@
|
||||
this.field_72769_h.field_72984_F.func_76318_c("blockentities");
|
||||
RenderHelper.func_74519_b();
|
||||
|
||||
@@ -64,7 +72,7 @@
|
||||
for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation1 : this.field_72755_R)
|
||||
{
|
||||
List<TileEntity> list3 = renderglobal$containerlocalrenderinformation1.field_178036_a.func_178571_g().func_178485_b();
|
||||
@@ -684,6 +696,7 @@
|
||||
@@ -684,6 +697,7 @@
|
||||
{
|
||||
for (TileEntity tileentity2 : list3)
|
||||
{
|
||||
@@ -72,7 +80,7 @@
|
||||
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity2, p_180446_3_, -1);
|
||||
}
|
||||
}
|
||||
@@ -693,9 +706,11 @@
|
||||
@@ -693,9 +707,11 @@
|
||||
{
|
||||
for (TileEntity tileentity : this.field_181024_n)
|
||||
{
|
||||
@@ -84,7 +92,7 @@
|
||||
|
||||
this.func_180443_s();
|
||||
|
||||
@@ -722,7 +737,7 @@
|
||||
@@ -722,7 +738,7 @@
|
||||
|
||||
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
|
||||
|
||||
@@ -93,7 +101,16 @@
|
||||
{
|
||||
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity1, p_180446_3_, destroyblockprogress.func_73106_e());
|
||||
}
|
||||
@@ -1213,6 +1228,13 @@
|
||||
@@ -926,7 +942,7 @@
|
||||
BlockPos blockpos2 = renderchunk4.func_178568_j().func_177982_a(8, 8, 8);
|
||||
boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D;
|
||||
|
||||
- if (!renderchunk4.func_188281_o() && !flag3)
|
||||
+ if (net.minecraftforge.common.ForgeModContainer.alwaysSetupTerrainOffThread || (!renderchunk4.func_188281_o() && !flag3))
|
||||
{
|
||||
this.field_175009_l.add(renderchunk4);
|
||||
}
|
||||
@@ -1213,6 +1229,13 @@
|
||||
|
||||
public void func_174976_a(float p_174976_1_, int p_174976_2_)
|
||||
{
|
||||
@@ -107,7 +124,7 @@
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p().func_186068_a() == 1)
|
||||
{
|
||||
this.func_180448_r();
|
||||
@@ -1430,6 +1452,12 @@
|
||||
@@ -1430,6 +1453,12 @@
|
||||
|
||||
public void func_180447_b(float p_180447_1_, int p_180447_2_)
|
||||
{
|
||||
@@ -120,7 +137,7 @@
|
||||
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d())
|
||||
{
|
||||
if (this.field_72777_q.field_71474_y.func_181147_e() == 2)
|
||||
@@ -1857,8 +1885,11 @@
|
||||
@@ -1857,8 +1886,11 @@
|
||||
double d4 = (double)blockpos.func_177956_o() - d1;
|
||||
double d5 = (double)blockpos.func_177952_p() - d2;
|
||||
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
|
||||
@@ -133,3 +150,12 @@
|
||||
{
|
||||
if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0D)
|
||||
{
|
||||
@@ -2304,7 +2336,7 @@
|
||||
|
||||
if (block.func_176223_P().func_185904_a() != Material.field_151579_a)
|
||||
{
|
||||
- SoundType soundtype = block.func_185467_w();
|
||||
+ SoundType soundtype = block.getSoundType(Block.func_176220_d(p_180439_4_), field_72769_h, p_180439_3_, null);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -16,3 +16,15 @@
|
||||
}
|
||||
|
||||
private void func_177137_d(AbstractClientPlayer p_177137_1_)
|
||||
@@ -127,6 +129,11 @@
|
||||
{
|
||||
modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
|
||||
}
|
||||
+ // FORGE: fix MC-88356 allow offhand to use bow and arrow animation
|
||||
+ else if (enumaction1 == EnumAction.BOW)
|
||||
+ {
|
||||
+ modelbiped$armpose1 = ModelBiped.ArmPose.BOW_AND_ARROW;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -13,12 +13,11 @@
|
||||
+ this.field_177190_a.func_110776_a(this.getArmorResource(p_188361_1_, itemstack, p_188361_9_, null));
|
||||
|
||||
- switch (itemarmor.func_82812_d())
|
||||
- {
|
||||
{
|
||||
- case LEATHER:
|
||||
int i = itemarmor.func_82814_b(itemstack);
|
||||
+ {
|
||||
+ if (i != 0xFFFFFF) // Allow this for anything, not only cloth
|
||||
+ if (itemarmor.hasOverlay(itemstack)) // Allow this for anything, not only cloth
|
||||
+ {
|
||||
int i = itemarmor.func_82814_b(itemstack);
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
}
|
||||
|
||||
public List<TextureAtlasSprite> func_94309_g()
|
||||
@@ -148,7 +154,7 @@
|
||||
|
||||
if (flag3 ^ flag4)
|
||||
{
|
||||
- flag = flag3;
|
||||
+ flag = !flag3 && flag1; //Forge: Fix stitcher not expanding entire height before growing width, and {potentially} growing larger then the max size.
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -240,7 +246,7 @@
|
||||
|
||||
public String toString()
|
||||
|
||||
@@ -84,7 +84,16 @@
|
||||
continue;
|
||||
}
|
||||
finally
|
||||
@@ -129,6 +158,7 @@
|
||||
@@ -122,17 +151,18 @@
|
||||
|
||||
if (lvt_11_2_ < k)
|
||||
{
|
||||
- field_147635_d.warn("Texture {} with size {}x{} limits mip level from {} to {}", new Object[] {resourcelocation, Integer.valueOf(textureatlassprite.func_94211_a()), Integer.valueOf(textureatlassprite.func_94216_b()), Integer.valueOf(MathHelper.func_151239_c(k)), Integer.valueOf(MathHelper.func_151239_c(lvt_11_2_))});
|
||||
- k = lvt_11_2_;
|
||||
+ // FORGE: do not lower the mipmap level, just log the problematic textures
|
||||
+ field_147635_d.warn("Texture {} with size {}x{} will have visual artifacts at mip level {}, it can only support level {}. Please report to the mod author that the texture should be some multiple of 16x16.", resourcelocation, textureatlassprite.func_94211_a(), textureatlassprite.func_94216_b(), MathHelper.func_151239_c(k), MathHelper.func_151239_c(lvt_11_2_));
|
||||
}
|
||||
|
||||
stitcher.func_110934_a(textureatlassprite);
|
||||
}
|
||||
|
||||
@@ -92,6 +101,11 @@
|
||||
int l = Math.min(j, k);
|
||||
int i1 = MathHelper.func_151239_c(l);
|
||||
|
||||
- if (i1 < this.field_147636_j)
|
||||
+ if (false && i1 < this.field_147636_j) // FORGE: do not lower the mipmap level
|
||||
{
|
||||
field_147635_d.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", new Object[] {this.field_94254_c, Integer.valueOf(this.field_147636_j), Integer.valueOf(i1), Integer.valueOf(l)});
|
||||
this.field_147636_j = i1;
|
||||
@@ -140,9 +170,12 @@
|
||||
|
||||
this.field_94249_f.func_147963_d(this.field_147636_j);
|
||||
@@ -154,7 +168,7 @@
|
||||
|
||||
if (textureatlassprite == null)
|
||||
{
|
||||
@@ -318,4 +363,42 @@
|
||||
@@ -318,4 +363,52 @@
|
||||
{
|
||||
return this.field_94249_f;
|
||||
}
|
||||
@@ -195,5 +209,15 @@
|
||||
+ public boolean setTextureEntry(TextureAtlasSprite entry)
|
||||
+ {
|
||||
+ return setTextureEntry(entry.func_94215_i(), entry);
|
||||
+ }
|
||||
+
|
||||
+ public String getBasePath()
|
||||
+ {
|
||||
+ return field_94254_c;
|
||||
+ }
|
||||
+
|
||||
+ public int getMipmapLevels()
|
||||
+ {
|
||||
+ return field_147636_j;
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,30 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
||||
@@ -202,9 +202,11 @@
|
||||
@@ -83,6 +83,7 @@
|
||||
int[] aint1 = aint[l1 - 1];
|
||||
int[] aint2 = new int[aint1.length >> 2];
|
||||
int j = p_147949_1_ >> l1;
|
||||
+ if (j > 0) { // FORGE: forcing higher mipmap levels on odd textures needs this check
|
||||
int k = aint2.length / j;
|
||||
int l = j << 1;
|
||||
|
||||
@@ -94,6 +95,7 @@
|
||||
aint2[i1 + j1 * j] = func_147943_a(aint1[k1 + 0], aint1[k1 + 1], aint1[k1 + 0 + l], aint1[k1 + 1 + l], flag);
|
||||
}
|
||||
}
|
||||
+ } // end if (j > 0)
|
||||
|
||||
aint[l1] = aint2;
|
||||
}
|
||||
@@ -168,6 +170,7 @@
|
||||
for (int i = 0; i < p_147955_0_.length; ++i)
|
||||
{
|
||||
int[] aint = p_147955_0_[i];
|
||||
+ if ((p_147955_1_ >> i <= 0) || (p_147955_2_ >> i <= 0)) break;
|
||||
func_147947_a(i, aint, p_147955_1_ >> i, p_147955_2_ >> i, p_147955_3_ >> i, p_147955_4_ >> i, p_147955_5_, p_147955_6_, p_147955_0_.length > 1);
|
||||
}
|
||||
}
|
||||
@@ -202,9 +205,11 @@
|
||||
|
||||
public static void func_180600_a(int p_180600_0_, int p_180600_1_, int p_180600_2_, int p_180600_3_)
|
||||
{
|
||||
|
||||
+3
-2
@@ -1,11 +1,12 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
|
||||
@@ -113,11 +113,14 @@
|
||||
@@ -112,12 +112,15 @@
|
||||
{
|
||||
if (p_180546_1_.func_145835_a(this.field_147560_j, this.field_147561_k, this.field_147558_l) < p_180546_1_.func_145833_n())
|
||||
{
|
||||
RenderHelper.func_74519_b();
|
||||
+ if(!drawingBatch || !p_180546_1_.hasFastRenderer())
|
||||
+ {
|
||||
RenderHelper.func_74519_b();
|
||||
int i = this.field_147550_f.func_175626_b(p_180546_1_.func_174877_v(), 0);
|
||||
int j = i % 65536;
|
||||
int k = i / 65536;
|
||||
|
||||
@@ -16,18 +16,29 @@
|
||||
this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[] {this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X}, this.field_151456_ac);
|
||||
this.field_74318_M = EnumDifficulty.NORMAL;
|
||||
this.field_74332_R = "";
|
||||
@@ -887,6 +889,11 @@
|
||||
@@ -265,7 +267,7 @@
|
||||
this.field_74317_L.func_147117_R().func_147633_a(this.field_151442_I);
|
||||
this.field_74317_L.func_110434_K().func_110577_a(TextureMap.field_110575_b);
|
||||
this.field_74317_L.func_147117_R().func_174937_a(false, this.field_151442_I > 0);
|
||||
- this.field_74317_L.func_175603_A();
|
||||
+ this.needsResourceRefresh = true; // FORGE: fix for MC-64581 very laggy mipmap slider
|
||||
}
|
||||
}
|
||||
|
||||
@@ -887,7 +889,12 @@
|
||||
{
|
||||
if (s1.equals("key_" + keybinding.func_151464_g()))
|
||||
{
|
||||
- keybinding.func_151462_b(Integer.parseInt(s2));
|
||||
+ if (s2.indexOf(':') != -1)
|
||||
+ {
|
||||
+ String[] t = s2.split(":");
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(t[1]), Integer.parseInt(t[0]));
|
||||
+ } else
|
||||
keybinding.func_151462_b(Integer.parseInt(s2));
|
||||
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, Integer.parseInt(s2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,6 +951,7 @@
|
||||
|
||||
public void func_74303_b()
|
||||
@@ -46,7 +57,7 @@
|
||||
}
|
||||
|
||||
for (SoundCategory soundcategory : SoundCategory.values())
|
||||
@@ -1250,4 +1259,24 @@
|
||||
@@ -1250,4 +1259,35 @@
|
||||
return p_148264_1_;
|
||||
}
|
||||
}
|
||||
@@ -69,5 +80,16 @@
|
||||
+ field_151458_ab.setKeyConflictContext(inGame);
|
||||
+ field_186718_X.setKeyConflictContext(inGame);
|
||||
+ }
|
||||
+
|
||||
+ // FORGE: fix for MC-64581 very laggy mipmap slider
|
||||
+ private boolean needsResourceRefresh = false;
|
||||
+ public void onGuiClosed()
|
||||
+ {
|
||||
+ if (needsResourceRefresh)
|
||||
+ {
|
||||
+ this.field_74317_L.func_175603_A();
|
||||
+ this.needsResourceRefresh = false;
|
||||
+ }
|
||||
+ }
|
||||
+ /******* Forge End ***********/
|
||||
}
|
||||
@@ -53,11 +53,11 @@
|
||||
public boolean func_151470_d()
|
||||
{
|
||||
- return this.field_74513_e;
|
||||
+ return this.field_74513_e && getKeyConflictContext().isActive() && getKeyModifier().isActive();
|
||||
+ return this.field_74513_e && getKeyConflictContext().isActive() && getKeyModifier().isActive(getKeyConflictContext());
|
||||
}
|
||||
|
||||
public String func_151466_e()
|
||||
@@ -158,4 +158,130 @@
|
||||
@@ -158,4 +158,135 @@
|
||||
|
||||
return i;
|
||||
}
|
||||
@@ -101,7 +101,7 @@
|
||||
+ */
|
||||
+ public boolean isActiveAndMatches(int keyCode)
|
||||
+ {
|
||||
+ return keyCode == this.func_151463_i() && getKeyConflictContext().isActive() && getKeyModifier().isActive();
|
||||
+ return keyCode != 0 && keyCode == this.func_151463_i() && getKeyConflictContext().isActive() && getKeyModifier().isActive(getKeyConflictContext());
|
||||
+ }
|
||||
+
|
||||
+ public void setKeyConflictContext(net.minecraftforge.client.settings.IKeyConflictContext keyConflictContext)
|
||||
@@ -159,9 +159,14 @@
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ else if (keyModifier == otherKeyModifier || keyModifier == net.minecraftforge.client.settings.KeyModifier.NONE || otherKeyModifier == net.minecraftforge.client.settings.KeyModifier.NONE)
|
||||
+ else if (func_151463_i() == other.func_151463_i())
|
||||
+ {
|
||||
+ return func_151463_i() == other.func_151463_i();
|
||||
+ return keyModifier == otherKeyModifier ||
|
||||
+ // IN_GAME key contexts have a conflict when at least one modifier is NONE.
|
||||
+ // For example: If you hold shift to crouch, you can still press E to open your inventory. This means that a Shift+E hotkey is in conflict with E.
|
||||
+ // GUI and other key contexts do not have this limitation.
|
||||
+ (getKeyConflictContext().conflicts(net.minecraftforge.client.settings.KeyConflictContext.IN_GAME) &&
|
||||
+ (keyModifier == net.minecraftforge.client.settings.KeyModifier.NONE || otherKeyModifier == net.minecraftforge.client.settings.KeyModifier.NONE));
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/command/CommandDebug.java
|
||||
+++ ../src-work/minecraft/net/minecraft/command/CommandDebug.java
|
||||
@@ -99,7 +99,7 @@
|
||||
{
|
||||
IOUtils.closeQuietly((Writer)filewriter);
|
||||
field_147208_a.error("Could not save profiler results to {}", new Object[] {file1, throwable});
|
||||
- }
|
||||
+ } finally { IOUtils.closeQuietly(filewriter); } // FORGE: Fix MC-103399
|
||||
}
|
||||
|
||||
private String func_184893_b(long p_184893_1_, int p_184893_3_, MinecraftServer p_184893_4_)
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/command/CommandHandler.java
|
||||
+++ ../src-work/minecraft/net/minecraft/command/CommandHandler.java
|
||||
@@ -47,6 +47,16 @@
|
||||
@@ -47,6 +47,17 @@
|
||||
}
|
||||
else if (icommand.func_184882_a(this.func_184879_a(), p_71556_1_))
|
||||
{
|
||||
@@ -13,11 +13,12 @@
|
||||
+ }
|
||||
+ return 1;
|
||||
+ }
|
||||
+ if (event.getParameters() != null) astring = event.getParameters();
|
||||
+
|
||||
if (i > -1)
|
||||
{
|
||||
List<Entity> list = EntitySelector.<Entity>func_179656_b(p_71556_1_, astring[i], Entity.class);
|
||||
@@ -110,7 +120,7 @@
|
||||
@@ -110,7 +121,7 @@
|
||||
TextComponentTranslation textcomponenttranslation = new TextComponentTranslation("commands.generic.exception", new Object[0]);
|
||||
textcomponenttranslation.func_150256_b().func_150238_a(TextFormatting.RED);
|
||||
p_175786_1_.func_145747_a(textcomponenttranslation);
|
||||
|
||||
@@ -5,10 +5,18 @@
|
||||
public class EntitySelector
|
||||
{
|
||||
- private static final Pattern field_82389_a = Pattern.compile("^@([pare])(?:\\[([\\w=,!-]*)\\])?$");
|
||||
+ private static final Pattern field_82389_a = Pattern.compile("^@([pare])(?:\\[([\\w\\.=,!-]*)\\])?$"); // FORGE: allow . in entity selectors
|
||||
+ private static final Pattern field_82389_a = Pattern.compile("^@([pare])(?:\\[([\\w\\.:=,!-]*)\\])?$"); // FORGE: allow '.' and ':' in entity selectors
|
||||
private static final Pattern field_82387_b = Pattern.compile("\\G([-!]?[\\w-]*)(?:$|,)");
|
||||
- private static final Pattern field_82388_c = Pattern.compile("\\G(\\w+)=([-!]?[\\w-]*)(?:$|,)");
|
||||
+ private static final Pattern field_82388_c = Pattern.compile("\\G(\\w+)=([-!]?[\\w\\.-]*)(?:$|,)"); // FORGE: allow . in entity selectors
|
||||
+ private static final Pattern field_82388_c = Pattern.compile("\\G([\\w:]+)=([-!]?[\\w\\.-]*)(?:$|,)"); // FORGE: allow ':' in arguments and '.' in value of entity selectors
|
||||
private static final Set<String> field_179666_d = Sets.newHashSet(new String[] {"x", "y", "z", "dx", "dy", "dz", "rm", "r"});
|
||||
|
||||
@Nullable
|
||||
@@ -111,6 +111,7 @@
|
||||
list2.addAll(func_184951_f(map));
|
||||
list2.addAll(func_180698_a(map, vec3d));
|
||||
list2.addAll(func_179662_g(map));
|
||||
+ list2.addAll(net.minecraftforge.event.ForgeEventFactory.gatherEntitySelectors(map, s, p_179656_0_, vec3d));
|
||||
list1.addAll(func_179660_a(map, p_179656_2_, list2, s, world, blockpos));
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,15 @@
|
||||
public int func_145782_y()
|
||||
{
|
||||
return this.field_145783_c;
|
||||
@@ -944,7 +952,7 @@
|
||||
|
||||
protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_)
|
||||
{
|
||||
- SoundType soundtype = p_180429_2_.func_185467_w();
|
||||
+ SoundType soundtype = p_180429_2_.getSoundType(field_70170_p.func_180495_p(p_180429_1_), field_70170_p, p_180429_1_, this);
|
||||
|
||||
if (this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a()).func_177230_c() == Blocks.field_150431_aC)
|
||||
{
|
||||
@@ -1151,12 +1159,12 @@
|
||||
BlockPos blockpos = new BlockPos(this.field_70165_t, d0, this.field_70161_v);
|
||||
IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos);
|
||||
@@ -92,7 +101,24 @@
|
||||
if (p_184205_2_ || this.func_184228_n(p_184205_1_) && p_184205_1_.func_184219_q(this))
|
||||
{
|
||||
if (this.func_184218_aH())
|
||||
@@ -2336,6 +2354,7 @@
|
||||
@@ -1902,6 +1920,7 @@
|
||||
if (this.field_184239_as != null)
|
||||
{
|
||||
Entity entity = this.field_184239_as;
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.canMountEntity(this, entity, false)) return;
|
||||
this.field_184239_as = null;
|
||||
entity.func_184225_p(this);
|
||||
}
|
||||
@@ -2182,7 +2201,7 @@
|
||||
double d1 = p_145771_3_ - (double)blockpos.func_177956_o();
|
||||
double d2 = p_145771_5_ - (double)blockpos.func_177952_p();
|
||||
List<AxisAlignedBB> list = this.field_70170_p.func_147461_a(this.func_174813_aQ());
|
||||
-
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.GetCollisionBoxesEvent(this.field_70170_p, this, this.func_174813_aQ(), list));
|
||||
if (list.isEmpty())
|
||||
{
|
||||
return false;
|
||||
@@ -2336,6 +2355,7 @@
|
||||
{
|
||||
if (!this.field_70170_p.field_72995_K && !this.field_70128_L)
|
||||
{
|
||||
@@ -100,7 +126,7 @@
|
||||
this.field_70170_p.field_72984_F.func_76320_a("changeDimension");
|
||||
MinecraftServer minecraftserver = this.func_184102_h();
|
||||
int i = this.field_71093_bK;
|
||||
@@ -2429,7 +2448,7 @@
|
||||
@@ -2429,7 +2449,7 @@
|
||||
|
||||
public float func_180428_a(Explosion p_180428_1_, World p_180428_2_, BlockPos p_180428_3_, IBlockState p_180428_4_)
|
||||
{
|
||||
@@ -109,7 +135,7 @@
|
||||
}
|
||||
|
||||
public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_)
|
||||
@@ -2726,6 +2745,164 @@
|
||||
@@ -2726,6 +2746,164 @@
|
||||
EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/EntityList.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntityList.java
|
||||
@@ -93,6 +93,7 @@
|
||||
@@ -90,9 +90,11 @@
|
||||
private static final Map < Class <? extends Entity > , Integer > field_75624_e = Maps. < Class <? extends Entity > , Integer > newHashMap();
|
||||
private static final Map<String, Integer> field_180126_g = Maps.<String, Integer>newHashMap();
|
||||
public static final Map<String, EntityList.EntityEggInfo> field_75627_a = Maps.<String, EntityList.EntityEggInfo>newLinkedHashMap();
|
||||
+ private static final Map<String, java.lang.reflect.Constructor<? extends Entity>> CACHED_CONSTRUCTORS = Maps.newHashMap();
|
||||
|
||||
public static void func_75618_a(Class <? extends Entity > p_75618_0_, String p_75618_1_, int p_75618_2_)
|
||||
{
|
||||
@@ -8,19 +12,43 @@
|
||||
if (field_75625_b.containsKey(p_75618_1_))
|
||||
{
|
||||
throw new IllegalArgumentException("ID is already registered: " + p_75618_1_);
|
||||
@@ -152,9 +153,10 @@
|
||||
{
|
||||
Entity entity = null;
|
||||
@@ -132,12 +134,20 @@
|
||||
|
||||
+ Class <? extends Entity > oclass = null;
|
||||
try
|
||||
{
|
||||
- Class <? extends Entity > oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
+ oclass = field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
+ java.lang.reflect.Constructor<? extends Entity> ctr = CACHED_CONSTRUCTORS.get(p_75620_0_);
|
||||
+ if (ctr == null)
|
||||
+ {
|
||||
Class <? extends Entity > oclass = (Class)field_75625_b.get(p_75620_0_);
|
||||
|
||||
if (oclass != null)
|
||||
{
|
||||
@@ -168,7 +170,17 @@
|
||||
- entity = (Entity)oclass.getConstructor(new Class[] {World.class}).newInstance(new Object[] {p_75620_1_});
|
||||
+ ctr = oclass.getConstructor(World.class);
|
||||
+ CACHED_CONSTRUCTORS.put(p_75620_0_, ctr);
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ if (ctr != null)
|
||||
+ entity = ctr.newInstance(p_75620_1_);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -154,12 +164,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
- Class <? extends Entity > oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
-
|
||||
- if (oclass != null)
|
||||
- {
|
||||
- entity = (Entity)oclass.getConstructor(new Class[] {World.class}).newInstance(new Object[] {p_75615_1_});
|
||||
- }
|
||||
+ entity = func_75620_a(p_75615_0_.func_74779_i("id"), p_75615_1_);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -168,7 +173,17 @@
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
@@ -32,13 +60,13 @@
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "An Entity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
|
||||
+ p_75615_0_.func_74779_i("id"), oclass.getName());
|
||||
+ p_75615_0_.func_74779_i("id"), field_75625_b.get(p_75615_0_.func_74779_i("id")).getName());
|
||||
+ entity = null;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -208,7 +220,8 @@
|
||||
@@ -208,7 +223,8 @@
|
||||
@Nullable
|
||||
public static Entity func_188429_b(String p_188429_0_, World p_188429_1_)
|
||||
{
|
||||
|
||||
@@ -76,15 +76,20 @@
|
||||
if (!this.field_70729_aU)
|
||||
{
|
||||
Entity entity = p_70645_1_.func_76346_g();
|
||||
@@ -1069,12 +1075,26 @@
|
||||
{
|
||||
i = EnchantmentHelper.func_185283_h((EntityLivingBase)entity);
|
||||
}
|
||||
+ i = net.minecraftforge.common.ForgeHooks.getLootingLevel(this, p_70645_1_, i);
|
||||
@@ -1063,18 +1069,26 @@
|
||||
|
||||
if (!this.field_70170_p.field_72995_K)
|
||||
{
|
||||
- int i = 0;
|
||||
+ int i = net.minecraftforge.common.ForgeHooks.getLootingLevel(this, entity, p_70645_1_);
|
||||
|
||||
- if (entity instanceof EntityPlayer)
|
||||
- {
|
||||
- i = EnchantmentHelper.func_185283_h((EntityLivingBase)entity);
|
||||
- }
|
||||
+ captureDrops = true;
|
||||
+ capturedDrops.clear();
|
||||
+
|
||||
|
||||
if (this.func_146066_aG() && this.field_70170_p.func_82736_K().func_82766_b("doMobLoot"))
|
||||
{
|
||||
boolean flag = this.field_70718_bc > 0;
|
||||
@@ -103,7 +108,7 @@
|
||||
}
|
||||
|
||||
this.field_70170_p.func_72960_a(this, (byte)3);
|
||||
@@ -1151,7 +1171,7 @@
|
||||
@@ -1151,7 +1165,7 @@
|
||||
BlockPos blockpos = new BlockPos(i, j, k);
|
||||
IBlockState iblockstate = this.field_70170_p.func_180495_p(blockpos);
|
||||
Block block = iblockstate.func_177230_c();
|
||||
@@ -112,7 +117,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1177,6 +1197,9 @@
|
||||
@@ -1177,6 +1191,9 @@
|
||||
|
||||
public void func_180430_e(float p_180430_1_, float p_180430_2_)
|
||||
{
|
||||
@@ -122,7 +127,16 @@
|
||||
super.func_180430_e(p_180430_1_, p_180430_2_);
|
||||
PotionEffect potioneffect = this.func_70660_b(MobEffects.field_76430_j);
|
||||
float f = potioneffect == null ? 0.0F : (float)(potioneffect.func_76458_c() + 1);
|
||||
@@ -1270,6 +1293,8 @@
|
||||
@@ -1193,7 +1210,7 @@
|
||||
|
||||
if (iblockstate.func_185904_a() != Material.field_151579_a)
|
||||
{
|
||||
- SoundType soundtype = iblockstate.func_177230_c().func_185467_w();
|
||||
+ SoundType soundtype = iblockstate.func_177230_c().getSoundType(iblockstate, field_70170_p, new BlockPos(j, k, l), this);
|
||||
this.func_184185_a(soundtype.func_185842_g(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F);
|
||||
}
|
||||
}
|
||||
@@ -1270,6 +1287,8 @@
|
||||
{
|
||||
if (!this.func_180431_b(p_70665_1_))
|
||||
{
|
||||
@@ -131,7 +145,7 @@
|
||||
p_70665_2_ = this.func_70655_b(p_70665_1_, p_70665_2_);
|
||||
p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_);
|
||||
float f = p_70665_2_;
|
||||
@@ -1319,6 +1344,11 @@
|
||||
@@ -1319,6 +1338,11 @@
|
||||
|
||||
public void func_184609_a(EnumHand p_184609_1_)
|
||||
{
|
||||
@@ -143,15 +157,7 @@
|
||||
if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0)
|
||||
{
|
||||
this.field_110158_av = -1;
|
||||
@@ -1521,6 +1551,7 @@
|
||||
|
||||
public void func_110145_l(Entity p_110145_1_)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.canMountEntity(this, p_110145_1_, false)) return;
|
||||
if (!(p_110145_1_ instanceof EntityBoat) && !(p_110145_1_ instanceof EntityHorse))
|
||||
{
|
||||
double d1 = p_110145_1_.field_70165_t;
|
||||
@@ -1545,7 +1576,7 @@
|
||||
@@ -1545,7 +1569,7 @@
|
||||
|
||||
if (!this.field_70170_p.func_184143_b(axisalignedbb1))
|
||||
{
|
||||
@@ -160,7 +166,7 @@
|
||||
{
|
||||
this.func_70634_a(d11, this.field_70163_u + 1.0D, d12);
|
||||
return;
|
||||
@@ -1553,14 +1584,14 @@
|
||||
@@ -1553,14 +1577,14 @@
|
||||
|
||||
BlockPos blockpos = new BlockPos(d11, this.field_70163_u - 1.0D, d12);
|
||||
|
||||
@@ -177,7 +183,7 @@
|
||||
{
|
||||
d1 = d11;
|
||||
d13 = this.field_70163_u + 2.0D;
|
||||
@@ -1631,6 +1662,7 @@
|
||||
@@ -1631,6 +1655,7 @@
|
||||
}
|
||||
|
||||
this.field_70160_al = true;
|
||||
@@ -185,7 +191,7 @@
|
||||
}
|
||||
|
||||
protected void func_70629_bd()
|
||||
@@ -1903,6 +1935,7 @@
|
||||
@@ -1903,6 +1928,7 @@
|
||||
|
||||
public void func_70071_h_()
|
||||
{
|
||||
@@ -193,7 +199,7 @@
|
||||
super.func_70071_h_();
|
||||
this.func_184608_ct();
|
||||
|
||||
@@ -2409,6 +2442,40 @@
|
||||
@@ -2409,6 +2435,40 @@
|
||||
this.field_70752_e = true;
|
||||
}
|
||||
|
||||
@@ -234,7 +240,7 @@
|
||||
public abstract EnumHandSide func_184591_cq();
|
||||
|
||||
public boolean func_184587_cr()
|
||||
@@ -2429,12 +2496,19 @@
|
||||
@@ -2429,12 +2489,19 @@
|
||||
|
||||
if (itemstack == this.field_184627_bm)
|
||||
{
|
||||
@@ -255,7 +261,7 @@
|
||||
{
|
||||
this.func_71036_o();
|
||||
}
|
||||
@@ -2452,8 +2526,10 @@
|
||||
@@ -2452,8 +2519,10 @@
|
||||
|
||||
if (itemstack != null && !this.func_184587_cr())
|
||||
{
|
||||
@@ -267,7 +273,7 @@
|
||||
|
||||
if (!this.field_70170_p.field_72995_K)
|
||||
{
|
||||
@@ -2536,6 +2612,8 @@
|
||||
@@ -2536,6 +2605,8 @@
|
||||
this.func_184584_a(this.field_184627_bm, 16);
|
||||
ItemStack itemstack = this.field_184627_bm.func_77950_b(this.field_70170_p, this);
|
||||
|
||||
@@ -276,7 +282,7 @@
|
||||
if (itemstack != null && itemstack.field_77994_a == 0)
|
||||
{
|
||||
itemstack = null;
|
||||
@@ -2566,7 +2644,8 @@
|
||||
@@ -2566,7 +2637,8 @@
|
||||
{
|
||||
if (this.field_184627_bm != null)
|
||||
{
|
||||
@@ -286,7 +292,7 @@
|
||||
}
|
||||
|
||||
this.func_184602_cy();
|
||||
@@ -2685,4 +2764,28 @@
|
||||
@@ -2685,4 +2757,28 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/SharedMonsterAttributes.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/SharedMonsterAttributes.java
|
||||
@@ -16,7 +16,7 @@
|
||||
public class SharedMonsterAttributes
|
||||
{
|
||||
private static final Logger field_151476_f = LogManager.getLogger();
|
||||
- public static final IAttribute field_111267_a = (new RangedAttribute((IAttribute)null, "generic.maxHealth", 20.0D, 0.0D, 1024.0D)).func_111117_a("Max Health").func_111112_a(true);
|
||||
+ public static final IAttribute field_111267_a = (new RangedAttribute((IAttribute)null, "generic.maxHealth", 20.0D, Float.MIN_VALUE, 1024.0D)).func_111117_a("Max Health").func_111112_a(true); // Forge: set smallest max-health value to fix MC-119183. This gets rounded to float so we use the smallest positive float value.
|
||||
public static final IAttribute field_111265_b = (new RangedAttribute((IAttribute)null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).func_111117_a("Follow Range");
|
||||
public static final IAttribute field_111266_c = (new RangedAttribute((IAttribute)null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).func_111117_a("Knockback Resistance");
|
||||
public static final IAttribute field_111263_d = (new RangedAttribute((IAttribute)null, "generic.movementSpeed", 0.699999988079071D, 0.0D, 1024.0D)).func_111117_a("Movement Speed").func_111112_a(true);
|
||||
@@ -0,0 +1,21 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIMate.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIMate.java
|
||||
@@ -86,6 +86,18 @@
|
||||
{
|
||||
EntityAgeable entityageable = this.field_75390_d.func_90011_a(this.field_75391_e);
|
||||
|
||||
+ final net.minecraftforge.event.entity.living.BabyEntitySpawnEvent event = new net.minecraftforge.event.entity.living.BabyEntitySpawnEvent(field_75390_d, field_75391_e, entityageable);
|
||||
+ final boolean cancelled = net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ entityageable = event.getChild();
|
||||
+ if (cancelled) {
|
||||
+ //Reset the "inLove" state for the animals
|
||||
+ this.field_75390_d.func_70873_a(6000);
|
||||
+ this.field_75391_e.func_70873_a(6000);
|
||||
+ this.field_75390_d.func_70875_t();
|
||||
+ this.field_75391_e.func_70875_t();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (entityageable != null)
|
||||
{
|
||||
EntityPlayer entityplayer = this.field_75390_d.func_146083_cb();
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIVillagerMate.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIVillagerMate.java
|
||||
@@ -113,11 +113,15 @@
|
||||
|
||||
private void func_75447_i()
|
||||
{
|
||||
- EntityVillager entityvillager = this.field_75450_b.func_90011_a(this.field_75451_c);
|
||||
+ net.minecraft.entity.EntityAgeable entityvillager = this.field_75450_b.func_90011_a(this.field_75451_c);
|
||||
this.field_75451_c.func_70873_a(6000);
|
||||
this.field_75450_b.func_70873_a(6000);
|
||||
this.field_75451_c.func_175549_o(false);
|
||||
this.field_75450_b.func_175549_o(false);
|
||||
+
|
||||
+ final net.minecraftforge.event.entity.living.BabyEntitySpawnEvent event = new net.minecraftforge.event.entity.living.BabyEntitySpawnEvent(field_75450_b, field_75451_c, entityvillager);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event) || event.getChild() == null) { return; }
|
||||
+ entityvillager = event.getChild();
|
||||
entityvillager.func_70873_a(-24000);
|
||||
entityvillager.func_70012_b(this.field_75450_b.field_70165_t, this.field_75450_b.field_70163_u, this.field_75450_b.field_70161_v, 0.0F, 0.0F);
|
||||
this.field_75448_d.func_72838_d(entityvillager);
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java
|
||||
@@ -72,7 +72,7 @@
|
||||
double d2 = this.field_188661_a.field_70986_h.field_70163_u + (double)(this.field_188661_a.field_70986_h.field_70131_O / 2.0F);
|
||||
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(MathHelper.func_76128_c(d0), MathHelper.func_76128_c(d2), MathHelper.func_76128_c(d1));
|
||||
|
||||
- while (this.field_188661_a.field_70170_p.func_175623_d(blockpos$mutableblockpos))
|
||||
+ while (this.field_188661_a.field_70170_p.func_175623_d(blockpos$mutableblockpos) && d2 >= 0) //Forge: Fix infinite loop if ground is missing.
|
||||
{
|
||||
--d2;
|
||||
blockpos$mutableblockpos.func_181079_c(MathHelper.func_76128_c(d0), MathHelper.func_76128_c(d2), MathHelper.func_76128_c(d1));
|
||||
@@ -236,7 +236,7 @@
|
||||
{
|
||||
p_70108_1_.field_70159_w *= 0.20000000298023224D;
|
||||
p_70108_1_.field_70179_y *= 0.20000000298023224D;
|
||||
@@ -1017,6 +1049,221 @@
|
||||
@@ -1017,6 +1049,229 @@
|
||||
this.func_184212_Q().func_187227_b(field_184270_f, Boolean.valueOf(p_94096_1_));
|
||||
}
|
||||
|
||||
@@ -453,6 +453,14 @@
|
||||
+ return 0.0078125D;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called from Detector Rails to retrieve a redstone power level for comparators.
|
||||
+ */
|
||||
+ public int getComparatorLevel()
|
||||
+ {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* =================================== FORGE END ===========================================*/
|
||||
+
|
||||
public static enum Type
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/monster/EntityShulker.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntityShulker.java
|
||||
@@ -391,6 +391,13 @@
|
||||
|
||||
if (flag)
|
||||
{
|
||||
+ net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(this, blockpos1.func_177958_n(), blockpos1.func_177956_o(), blockpos1.func_177952_p(), 0);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) flag = false;
|
||||
+ blockpos1 = new BlockPos(event.getTargetX(), event.getTargetY(), event.getTargetZ());
|
||||
+ }
|
||||
+
|
||||
+ if (flag)
|
||||
+ {
|
||||
this.func_184185_a(SoundEvents.field_187791_eX, 1.0F, 1.0F);
|
||||
this.field_70180_af.func_187227_b(field_184701_b, Optional.of(blockpos1));
|
||||
this.field_70180_af.func_187227_b(field_184702_c, Byte.valueOf((byte)0));
|
||||
@@ -1,5 +1,14 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/passive/EntityHorse.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/passive/EntityHorse.java
|
||||
@@ -405,7 +405,7 @@
|
||||
|
||||
if (iblockstate.func_185904_a() != Material.field_151579_a && !this.func_174814_R())
|
||||
{
|
||||
- SoundType soundtype = block.func_185467_w();
|
||||
+ SoundType soundtype = block.getSoundType(iblockstate, field_70170_p, new BlockPos(this.field_70165_t, this.field_70163_u - 0.2D - (double)this.field_70126_B, this.field_70161_v), this);
|
||||
this.field_70170_p.func_184148_a((EntityPlayer)null, this.field_70165_t, this.field_70163_u, this.field_70161_v, soundtype.func_185844_d(), this.func_184176_by(), soundtype.func_185843_a() * 0.5F, soundtype.func_185847_b() * 0.75F);
|
||||
}
|
||||
}
|
||||
@@ -441,6 +441,7 @@
|
||||
|
||||
this.field_110296_bG.func_110134_a(this);
|
||||
@@ -8,6 +17,15 @@
|
||||
}
|
||||
|
||||
private void func_110232_cE()
|
||||
@@ -556,7 +557,7 @@
|
||||
|
||||
protected void func_180429_a(BlockPos p_180429_1_, Block p_180429_2_)
|
||||
{
|
||||
- SoundType soundtype = p_180429_2_.func_185467_w();
|
||||
+ SoundType soundtype = p_180429_2_.getSoundType(field_70170_p.func_180495_p(p_180429_1_), field_70170_p, p_180429_1_, this);
|
||||
|
||||
if (this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a()).func_177230_c() == Blocks.field_150431_aC)
|
||||
{
|
||||
@@ -1212,6 +1213,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/projectile/EntityTippedArrow.java
|
||||
@@ -182,6 +182,7 @@
|
||||
|
||||
for (PotionEffect potioneffect : this.field_184560_g.func_185170_a())
|
||||
{
|
||||
+ if(potioneffect.func_188419_a().func_76403_b()) potioneffect.func_188419_a().func_180793_a(this, field_70250_c, p_184548_1_, potioneffect.func_76458_c(), 1); else // FORGE: Fix MC-91728 Tipped Arrows do not apply instant effects
|
||||
p_184548_1_.func_70690_d(new PotionEffect(potioneffect.func_188419_a(), potioneffect.func_76459_b() / 8, potioneffect.func_76458_c(), potioneffect.func_82720_e(), potioneffect.func_188418_e()));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/projectile/EntityWitherSkull.java
|
||||
@@ -62,7 +62,7 @@
|
||||
float f = super.func_180428_a(p_180428_1_, p_180428_2_, p_180428_3_, p_180428_4_);
|
||||
Block block = p_180428_4_.func_177230_c();
|
||||
|
||||
- if (this.func_82342_d() && EntityWither.func_181033_a(block))
|
||||
+ if (this.func_82342_d() && block.canEntityDestroy(p_180428_4_, p_180428_2_, p_180428_3_, this))
|
||||
{
|
||||
f = Math.min(0.8F, f);
|
||||
}
|
||||
@@ -1,6 +1,30 @@
|
||||
--- ../src-base/minecraft/net/minecraft/inventory/Container.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/Container.java
|
||||
@@ -650,7 +650,7 @@
|
||||
@@ -606,18 +606,19 @@
|
||||
if (itemstack != null && func_184997_a(p_75135_1_, itemstack))
|
||||
{
|
||||
int j = itemstack.field_77994_a + p_75135_1_.field_77994_a;
|
||||
+ int maxSize = Math.min(slot.func_75219_a(), p_75135_1_.func_77976_d());
|
||||
|
||||
- if (j <= p_75135_1_.func_77976_d())
|
||||
+ if (j <= maxSize)
|
||||
{
|
||||
p_75135_1_.field_77994_a = 0;
|
||||
itemstack.field_77994_a = j;
|
||||
slot.func_75218_e();
|
||||
flag = true;
|
||||
}
|
||||
- else if (itemstack.field_77994_a < p_75135_1_.func_77976_d())
|
||||
+ else if (itemstack.field_77994_a < maxSize)
|
||||
{
|
||||
- p_75135_1_.field_77994_a -= p_75135_1_.func_77976_d() - itemstack.field_77994_a;
|
||||
- itemstack.field_77994_a = p_75135_1_.func_77976_d();
|
||||
+ p_75135_1_.field_77994_a -= maxSize - itemstack.field_77994_a;
|
||||
+ itemstack.field_77994_a = maxSize;
|
||||
slot.func_75218_e();
|
||||
flag = true;
|
||||
}
|
||||
@@ -650,7 +651,7 @@
|
||||
Slot slot1 = (Slot)this.field_75151_b.get(i);
|
||||
ItemStack itemstack1 = slot1.func_75211_c();
|
||||
|
||||
@@ -9,7 +33,7 @@
|
||||
{
|
||||
slot1.func_75215_d(p_75135_1_.func_77946_l());
|
||||
slot1.func_75218_e();
|
||||
@@ -728,7 +728,7 @@
|
||||
@@ -728,7 +729,7 @@
|
||||
p_94525_2_.field_77994_a = 1;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
--- ../src-base/minecraft/net/minecraft/inventory/ContainerBeacon.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/ContainerBeacon.java
|
||||
@@ -146,7 +146,7 @@
|
||||
@@ -91,12 +91,9 @@
|
||||
|
||||
slot.func_75220_a(itemstack1, itemstack);
|
||||
}
|
||||
- else if (!this.field_82864_f.func_75216_d() && this.field_82864_f.func_75214_a(itemstack1) && itemstack1.field_77994_a == 1)
|
||||
+ else if (this.func_75135_a(itemstack1, 0, 1, false)) //Forge Fix Shift Clicking in beacons with stacks larger then 1.
|
||||
{
|
||||
- if (!this.func_75135_a(itemstack1, 0, 1, false))
|
||||
- {
|
||||
- return null;
|
||||
- }
|
||||
+ return null;
|
||||
}
|
||||
else if (p_82846_2_ >= 1 && p_82846_2_ < 28)
|
||||
{
|
||||
@@ -146,7 +143,7 @@
|
||||
|
||||
public boolean func_75214_a(@Nullable ItemStack p_75214_1_)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,15 @@
|
||||
}
|
||||
|
||||
public int func_75219_a()
|
||||
@@ -245,8 +245,7 @@
|
||||
@@ -231,6 +231,7 @@
|
||||
{
|
||||
if (PotionUtils.func_185191_c(p_82870_2_) != PotionTypes.field_185230_b)
|
||||
{
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerBrewedPotion(p_82870_1_, p_82870_2_);
|
||||
this.field_75244_a.func_71029_a(AchievementList.field_187970_B);
|
||||
}
|
||||
|
||||
@@ -245,8 +246,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--- ../src-base/minecraft/net/minecraft/inventory/InventoryHelper.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/InventoryHelper.java
|
||||
@@ -44,19 +44,8 @@
|
||||
{
|
||||
int i = field_180177_a.nextInt(21) + 10;
|
||||
|
||||
- if (i > p_180173_7_.field_77994_a)
|
||||
- {
|
||||
- i = p_180173_7_.field_77994_a;
|
||||
- }
|
||||
+ EntityItem entityitem = new EntityItem(p_180173_0_, p_180173_1_ + (double)f, p_180173_3_ + (double)f1, p_180173_5_ + (double)f2, p_180173_7_.func_77979_a(i));
|
||||
|
||||
- p_180173_7_.field_77994_a -= i;
|
||||
- EntityItem entityitem = new EntityItem(p_180173_0_, p_180173_1_ + (double)f, p_180173_3_ + (double)f1, p_180173_5_ + (double)f2, new ItemStack(p_180173_7_.func_77973_b(), i, p_180173_7_.func_77960_j()));
|
||||
-
|
||||
- if (p_180173_7_.func_77942_o())
|
||||
- {
|
||||
- entityitem.func_92059_d().func_77982_d(p_180173_7_.func_77978_p().func_74737_b());
|
||||
- }
|
||||
-
|
||||
float f3 = 0.05F;
|
||||
entityitem.field_70159_w = field_180177_a.nextGaussian() * 0.05000000074505806D;
|
||||
entityitem.field_70181_x = field_180177_a.nextGaussian() * 0.05000000074505806D + 0.20000000298023224D;
|
||||
@@ -22,7 +22,15 @@
|
||||
public int func_77639_j()
|
||||
{
|
||||
return this.field_77777_bU;
|
||||
@@ -316,6 +317,7 @@
|
||||
@@ -217,6 +218,7 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
public int func_77612_l()
|
||||
{
|
||||
return this.field_77699_b;
|
||||
@@ -316,6 +318,7 @@
|
||||
return this.field_77700_c;
|
||||
}
|
||||
|
||||
@@ -30,7 +38,7 @@
|
||||
public boolean func_77634_r()
|
||||
{
|
||||
return this.field_77700_c != null;
|
||||
@@ -371,7 +373,7 @@
|
||||
@@ -371,7 +374,7 @@
|
||||
|
||||
public boolean func_77616_k(ItemStack p_77616_1_)
|
||||
{
|
||||
@@ -39,7 +47,7 @@
|
||||
}
|
||||
|
||||
protected RayTraceResult func_77621_a(World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_)
|
||||
@@ -389,7 +391,11 @@
|
||||
@@ -389,7 +392,11 @@
|
||||
float f6 = f3 * f4;
|
||||
float f7 = f2 * f4;
|
||||
double d3 = 5.0D;
|
||||
@@ -52,7 +60,7 @@
|
||||
return p_77621_1_.func_147447_a(vec3d, vec3d1, p_77621_3_, !p_77621_3_, false);
|
||||
}
|
||||
|
||||
@@ -426,11 +432,557 @@
|
||||
@@ -426,11 +433,592 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,6 +142,18 @@
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Override this method to change the NBT data being sent to the client.
|
||||
+ * You should ONLY override this when you have no other choice, as this might change behavior client side!
|
||||
+ *
|
||||
+ * @param stack The stack to send the NBT tag for
|
||||
+ * @return The NBT tag
|
||||
+ */
|
||||
+ public NBTTagCompound getNBTShareTag(ItemStack stack)
|
||||
+ {
|
||||
+ return stack.func_77978_p();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called before a block is broken. Return true to prevent default block harvesting.
|
||||
+ *
|
||||
+ * Note: In SMP, this is called on both client and server sides!
|
||||
@@ -522,13 +542,9 @@
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Queries the harvest level of this item stack for the specifred tool class,
|
||||
+ * Returns -1 if this tool is not of the specified type
|
||||
+ *
|
||||
+ * @param stack This item stack instance
|
||||
+ * @param toolClass Tool Class
|
||||
+ * @return Harvest level, or -1 if not the specified tool type.
|
||||
+ * Deprecated, Use the position aware variant instead
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||
+ {
|
||||
+ Integer ret = toolClasses.get(toolClass);
|
||||
@@ -536,6 +552,21 @@
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Queries the harvest level of this item stack for the specified tool class,
|
||||
+ * Returns -1 if this tool is not of the specified type
|
||||
+ *
|
||||
+ * @param stack This item stack instance
|
||||
+ * @param toolClass Tool Class
|
||||
+ * @param player The player trying to harvest the given blockstate
|
||||
+ * @param blockState The block to harvest
|
||||
+ * @return Harvest level, or -1 if not the specified tool type.
|
||||
+ */
|
||||
+ public int getHarvestLevel(ItemStack stack, String toolClass, @Nullable EntityPlayer player, @Nullable IBlockState blockState)
|
||||
+ {
|
||||
+ return getHarvestLevel(stack, toolClass);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * ItemStack sensitive version of getItemEnchantability
|
||||
+ *
|
||||
+ * @param stack The ItemStack
|
||||
@@ -571,6 +602,18 @@
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called when the player is mining a block and the item in his hand changes.
|
||||
+ * Allows to not reset blockbreaking if only NBT or similar changes.
|
||||
+ * @param oldStack The old stack that was used for mining. Item in players main hand
|
||||
+ * @param newStack The new stack
|
||||
+ * @return True to reset block break progress
|
||||
+ */
|
||||
+ public boolean shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack)
|
||||
+ {
|
||||
+ return !(newStack.func_77973_b() == oldStack.func_77973_b() && ItemStack.func_77970_a(newStack, oldStack) && (newStack.func_77984_f() || newStack.func_77960_j() == oldStack.func_77960_j()));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called from ItemStack.setItem, will hold extra data for the life of this ItemStack.
|
||||
+ * Can be retrieved from stack.getCapabilities()
|
||||
+ * The NBT can be null if this is not called from readNBT or if the item the stack is
|
||||
@@ -610,7 +653,7 @@
|
||||
public static void func_150900_l()
|
||||
{
|
||||
func_179214_a(Blocks.field_150348_b, (new ItemMultiTexture(Blocks.field_150348_b, Blocks.field_150348_b, new Function<ItemStack, String>()
|
||||
@@ -962,6 +1514,10 @@
|
||||
@@ -962,6 +1550,10 @@
|
||||
private final float field_78011_i;
|
||||
private final int field_78008_j;
|
||||
|
||||
@@ -621,7 +664,7 @@
|
||||
private ToolMaterial(int p_i1874_3_, int p_i1874_4_, float p_i1874_5_, float p_i1874_6_, int p_i1874_7_)
|
||||
{
|
||||
this.field_78001_f = p_i1874_3_;
|
||||
@@ -996,9 +1552,36 @@
|
||||
@@ -996,9 +1588,36 @@
|
||||
return this.field_78008_j;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,26 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemArmor.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemArmor.java
|
||||
@@ -236,6 +236,8 @@
|
||||
@@ -222,6 +222,19 @@
|
||||
return multimap;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Determines if this armor will be rendered with the secondary 'overlay' texture.
|
||||
+ * If this is true, the first texture will be rendered using a tint of the color
|
||||
+ * specified by getColor(ItemStack)
|
||||
+ *
|
||||
+ * @param stack The stack
|
||||
+ * @return true/false
|
||||
+ */
|
||||
+ public boolean hasOverlay(ItemStack stack)
|
||||
+ {
|
||||
+ return this.field_77878_bZ == ItemArmor.ArmorMaterial.LEATHER || func_82814_b(stack) != 0x00FFFFFF;
|
||||
+ }
|
||||
+
|
||||
public static enum ArmorMaterial
|
||||
{
|
||||
LEATHER("leather", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.field_187728_s, 0.0F),
|
||||
@@ -236,6 +249,8 @@
|
||||
private final int field_78055_h;
|
||||
private final SoundEvent field_185020_j;
|
||||
private final float field_189417_k;
|
||||
@@ -9,7 +29,7 @@
|
||||
|
||||
private ArmorMaterial(String p_i47117_3_, int p_i47117_4_, int[] p_i47117_5_, int p_i47117_6_, SoundEvent p_i47117_7_, float p_i47117_8_)
|
||||
{
|
||||
@@ -269,7 +271,15 @@
|
||||
@@ -269,7 +284,15 @@
|
||||
|
||||
public Item func_151685_b()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemBed.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemBed.java
|
||||
@@ -63,7 +63,7 @@
|
||||
p_180614_3_.func_180501_a(blockpos, iblockstate2, 11);
|
||||
}
|
||||
|
||||
- SoundType soundtype = iblockstate1.func_177230_c().func_185467_w();
|
||||
+ SoundType soundtype = iblockstate1.func_177230_c().getSoundType(iblockstate1, p_180614_3_, p_180614_4_, p_180614_2_);
|
||||
p_180614_3_.func_184133_a((EntityPlayer)null, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180614_1_.field_77994_a;
|
||||
return EnumActionResult.SUCCESS;
|
||||
@@ -1,8 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemBlock.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemBlock.java
|
||||
@@ -51,16 +51,8 @@
|
||||
@@ -49,19 +49,11 @@
|
||||
if (p_180614_1_.field_77994_a != 0 && p_180614_2_.func_175151_a(p_180614_4_, p_180614_6_, p_180614_1_) && p_180614_3_.func_175716_a(this.field_150939_a, p_180614_4_, false, p_180614_6_, (Entity)null, p_180614_1_))
|
||||
{
|
||||
int i = this.func_77647_b(p_180614_1_.func_77960_j());
|
||||
IBlockState iblockstate1 = this.field_150939_a.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, i, p_180614_2_);
|
||||
- IBlockState iblockstate1 = this.field_150939_a.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, i, p_180614_2_);
|
||||
+ IBlockState iblockstate1 = this.field_150939_a.getStateForPlacement(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, i, p_180614_2_, p_180614_1_);
|
||||
|
||||
- if (p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 11))
|
||||
+ if (placeBlockAt(p_180614_1_, p_180614_2_, p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, iblockstate1))
|
||||
@@ -15,9 +18,11 @@
|
||||
- this.field_150939_a.func_180633_a(p_180614_3_, p_180614_4_, iblockstate1, p_180614_2_, p_180614_1_);
|
||||
- }
|
||||
-
|
||||
SoundType soundtype = this.field_150939_a.func_185467_w();
|
||||
- SoundType soundtype = this.field_150939_a.func_185467_w();
|
||||
+ SoundType soundtype = p_180614_3_.func_180495_p(p_180614_4_).func_177230_c().getSoundType(p_180614_3_.func_180495_p(p_180614_4_), p_180614_3_, p_180614_4_, p_180614_2_);
|
||||
p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180614_1_.field_77994_a;
|
||||
}
|
||||
@@ -121,7 +113,7 @@
|
||||
{
|
||||
Block block = p_179222_1_.func_180495_p(p_179222_2_).func_177230_c();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemBlockSpecial.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemBlockSpecial.java
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
if (p_180614_2_.func_175151_a(p_180614_4_, p_180614_6_, p_180614_1_) && p_180614_1_.field_77994_a != 0 && p_180614_3_.func_175716_a(this.field_150935_a, p_180614_4_, false, p_180614_6_, (Entity)null, p_180614_1_))
|
||||
{
|
||||
- IBlockState iblockstate1 = this.field_150935_a.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_);
|
||||
+ IBlockState iblockstate1 = this.field_150935_a.getStateForPlacement(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_, p_180614_1_);
|
||||
|
||||
if (!p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 11))
|
||||
{
|
||||
@@ -55,7 +55,7 @@
|
||||
iblockstate1.func_177230_c().func_180633_a(p_180614_3_, p_180614_4_, iblockstate1, p_180614_2_, p_180614_1_);
|
||||
}
|
||||
|
||||
- SoundType soundtype = this.field_150935_a.func_185467_w();
|
||||
+ SoundType soundtype = iblockstate1.func_177230_c().getSoundType(iblockstate1, p_180614_3_, p_180614_4_, p_180614_2_);
|
||||
p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180614_1_.field_77994_a;
|
||||
return EnumActionResult.SUCCESS;
|
||||
@@ -66,4 +66,9 @@
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public Block getBlock()
|
||||
+ {
|
||||
+ return this.field_150935_a;
|
||||
+ }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemDoor.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemDoor.java
|
||||
@@ -46,7 +46,7 @@
|
||||
int j = enumfacing.func_82599_e();
|
||||
boolean flag = i < 0 && p_180614_9_ < 0.5F || i > 0 && p_180614_9_ > 0.5F || j < 0 && p_180614_7_ > 0.5F || j > 0 && p_180614_7_ < 0.5F;
|
||||
func_179235_a(p_180614_3_, p_180614_4_, enumfacing, this.field_179236_a, flag);
|
||||
- SoundType soundtype = this.field_179236_a.func_185467_w();
|
||||
+ SoundType soundtype = p_180614_3_.func_180495_p(p_180614_4_).func_177230_c().getSoundType(p_180614_3_.func_180495_p(p_180614_4_), p_180614_3_, p_180614_4_, p_180614_2_);
|
||||
p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180614_1_.field_77994_a;
|
||||
return EnumActionResult.SUCCESS;
|
||||
@@ -9,6 +9,15 @@
|
||||
{
|
||||
if (!p_180614_3_.field_72995_K)
|
||||
{
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
if (p_180614_3_.func_175623_d(p_180614_4_))
|
||||
{
|
||||
- IBlockState iblockstate1 = Blocks.field_150375_by.func_180642_a(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_);
|
||||
+ IBlockState iblockstate1 = Blocks.field_150375_by.getStateForPlacement(p_180614_3_, p_180614_4_, p_180614_6_, p_180614_7_, p_180614_8_, p_180614_9_, 0, p_180614_2_, p_180614_1_);
|
||||
p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 10);
|
||||
|
||||
if (!p_180614_2_.field_71075_bZ.field_75098_d)
|
||||
@@ -97,8 +97,18 @@
|
||||
|
||||
public static boolean func_179234_a(ItemStack p_179234_0_, World p_179234_1_, BlockPos p_179234_2_)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
+ // special case for handling block placement with water lilies
|
||||
+ net.minecraftforge.common.util.BlockSnapshot blocksnapshot = net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(p_77659_2_, blockpos1);
|
||||
+ p_77659_2_.func_175656_a(blockpos1, Blocks.field_150392_bi.func_176223_P());
|
||||
+ if (net.minecraftforge.event.ForgeEventFactory.onPlayerBlockPlace(p_77659_3_, blocksnapshot, net.minecraft.util.EnumFacing.UP).isCanceled())
|
||||
+ if (net.minecraftforge.event.ForgeEventFactory.onPlayerBlockPlace(p_77659_3_, blocksnapshot, net.minecraft.util.EnumFacing.UP, p_77659_4_).isCanceled())
|
||||
+ {
|
||||
+ blocksnapshot.restore(true, false);
|
||||
+ return new ActionResult<ItemStack>(EnumActionResult.FAIL, p_77659_1_);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemSlab.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemSlab.java
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
if (axisalignedbb != Block.field_185506_k && p_180614_3_.func_72855_b(axisalignedbb.func_186670_a(p_180614_4_)) && p_180614_3_.func_180501_a(p_180614_4_, iblockstate1, 11))
|
||||
{
|
||||
- SoundType soundtype = this.field_179226_c.func_185467_w();
|
||||
+ SoundType soundtype = this.field_179226_c.getSoundType(iblockstate1, p_180614_3_, p_180614_4_,p_180614_2_);
|
||||
p_180614_3_.func_184133_a(p_180614_2_, p_180614_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180614_1_.field_77994_a;
|
||||
}
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
if (axisalignedbb != Block.field_185506_k && p_180615_3_.func_72855_b(axisalignedbb.func_186670_a(p_180615_4_)) && p_180615_3_.func_180501_a(p_180615_4_, iblockstate1, 11))
|
||||
{
|
||||
- SoundType soundtype = this.field_179226_c.func_185467_w();
|
||||
+ SoundType soundtype = this.field_179226_c.getSoundType(iblockstate1, p_180615_3_, p_180615_4_, p_180615_1_);
|
||||
p_180615_3_.func_184133_a(p_180615_1_, p_180615_4_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180615_2_.field_77994_a;
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
--- ../src-base/minecraft/net/minecraft/item/ItemSnow.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemSnow.java
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
if (axisalignedbb != Block.field_185506_k && p_180614_3_.func_72855_b(axisalignedbb.func_186670_a(blockpos)) && p_180614_3_.func_180501_a(blockpos, iblockstate1, 10))
|
||||
{
|
||||
- SoundType soundtype = this.field_150939_a.func_185467_w();
|
||||
+ SoundType soundtype = this.field_150939_a.getSoundType(iblockstate1, p_180614_3_, blockpos, p_180614_2_);
|
||||
p_180614_3_.func_184133_a(p_180614_2_, blockpos, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
|
||||
--p_180614_1_.field_77994_a;
|
||||
return EnumActionResult.SUCCESS;
|
||||
@@ -68,4 +68,10 @@
|
||||
{
|
||||
return p_77647_1_;
|
||||
|
||||
@@ -34,7 +34,15 @@
|
||||
this.field_77994_a = p_i1881_2_;
|
||||
this.field_77991_e = p_i1881_3_;
|
||||
|
||||
@@ -117,7 +123,7 @@
|
||||
@@ -99,6 +105,7 @@
|
||||
|
||||
public static ItemStack func_77949_a(NBTTagCompound p_77949_0_)
|
||||
{
|
||||
+ if (p_77949_0_.func_82582_d()) return null; // Deserialized inventories can have empty ItemStack compounds. Fixes tons of NumberFormatExceptions
|
||||
ItemStack itemstack = new ItemStack();
|
||||
itemstack.func_77963_c(p_77949_0_);
|
||||
return itemstack.func_77973_b() != null ? itemstack : null;
|
||||
@@ -117,7 +124,7 @@
|
||||
public ItemStack func_77979_a(int p_77979_1_)
|
||||
{
|
||||
p_77979_1_ = Math.min(p_77979_1_, this.field_77994_a);
|
||||
@@ -43,7 +51,7 @@
|
||||
|
||||
if (this.field_77990_d != null)
|
||||
{
|
||||
@@ -130,11 +136,12 @@
|
||||
@@ -130,11 +137,12 @@
|
||||
|
||||
public Item func_77973_b()
|
||||
{
|
||||
@@ -57,11 +65,15 @@
|
||||
EnumActionResult enumactionresult = this.func_77973_b().func_180614_a(this, p_179546_1_, p_179546_2_, p_179546_3_, p_179546_4_, p_179546_5_, p_179546_6_, p_179546_7_, p_179546_8_);
|
||||
|
||||
if (enumactionresult == EnumActionResult.SUCCESS)
|
||||
@@ -173,12 +180,16 @@
|
||||
@@ -173,12 +181,20 @@
|
||||
p_77955_1_.func_74782_a("tag", this.field_77990_d);
|
||||
}
|
||||
|
||||
+ if (this.capabilities != null) p_77955_1_.func_74782_a("ForgeCaps", this.capabilities.serializeNBT());
|
||||
+ if (this.capabilities != null)
|
||||
+ {
|
||||
+ NBTTagCompound cnbt = this.capabilities.serializeNBT();
|
||||
+ if (!cnbt.func_82582_d()) p_77955_1_.func_74782_a("ForgeCaps", cnbt);
|
||||
+ }
|
||||
+
|
||||
return p_77955_1_;
|
||||
}
|
||||
@@ -75,7 +87,7 @@
|
||||
this.field_77994_a = p_77963_1_.func_74771_c("Count");
|
||||
this.field_77991_e = p_77963_1_.func_74765_d("Damage");
|
||||
|
||||
@@ -196,11 +207,12 @@
|
||||
@@ -196,11 +212,12 @@
|
||||
this.field_151002_e.func_179215_a(this.field_77990_d);
|
||||
}
|
||||
}
|
||||
@@ -89,7 +101,7 @@
|
||||
}
|
||||
|
||||
public boolean func_77985_e()
|
||||
@@ -210,7 +222,7 @@
|
||||
@@ -210,7 +227,7 @@
|
||||
|
||||
public boolean func_77984_f()
|
||||
{
|
||||
@@ -98,7 +110,7 @@
|
||||
}
|
||||
|
||||
public boolean func_77981_g()
|
||||
@@ -220,32 +232,27 @@
|
||||
@@ -220,32 +237,27 @@
|
||||
|
||||
public boolean func_77951_h()
|
||||
{
|
||||
@@ -136,7 +148,7 @@
|
||||
}
|
||||
|
||||
public boolean func_96631_a(int p_96631_1_, Random p_96631_2_)
|
||||
@@ -277,8 +284,8 @@
|
||||
@@ -277,8 +289,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +159,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +339,7 @@
|
||||
@@ -332,7 +344,7 @@
|
||||
|
||||
public boolean func_150998_b(IBlockState p_150998_1_)
|
||||
{
|
||||
@@ -156,7 +168,7 @@
|
||||
}
|
||||
|
||||
public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_, EnumHand p_111282_3_)
|
||||
@@ -342,7 +349,7 @@
|
||||
@@ -342,7 +354,7 @@
|
||||
|
||||
public ItemStack func_77946_l()
|
||||
{
|
||||
@@ -165,7 +177,7 @@
|
||||
|
||||
if (this.field_77990_d != null)
|
||||
{
|
||||
@@ -354,7 +361,19 @@
|
||||
@@ -354,7 +366,19 @@
|
||||
|
||||
public static boolean func_77970_a(@Nullable ItemStack p_77970_0_, @Nullable ItemStack p_77970_1_)
|
||||
{
|
||||
@@ -186,7 +198,7 @@
|
||||
}
|
||||
|
||||
public static boolean func_77989_b(@Nullable ItemStack p_77989_0_, @Nullable ItemStack p_77989_1_)
|
||||
@@ -364,7 +383,11 @@
|
||||
@@ -364,7 +388,11 @@
|
||||
|
||||
private boolean func_77959_d(ItemStack p_77959_1_)
|
||||
{
|
||||
@@ -199,7 +211,7 @@
|
||||
}
|
||||
|
||||
public static boolean func_179545_c(@Nullable ItemStack p_179545_0_, @Nullable ItemStack p_179545_1_)
|
||||
@@ -764,6 +787,7 @@
|
||||
@@ -764,6 +792,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +219,7 @@
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -875,7 +899,7 @@
|
||||
@@ -875,7 +904,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,7 +228,7 @@
|
||||
}
|
||||
|
||||
return multimap;
|
||||
@@ -908,6 +932,18 @@
|
||||
@@ -908,6 +937,18 @@
|
||||
@Deprecated
|
||||
public void func_150996_a(Item p_150996_1_)
|
||||
{
|
||||
@@ -235,7 +247,7 @@
|
||||
this.field_151002_e = p_150996_1_;
|
||||
}
|
||||
|
||||
@@ -993,4 +1029,45 @@
|
||||
@@ -993,4 +1034,45 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,15 +18,26 @@
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -67,7 +67,7 @@
|
||||
@@ -67,13 +67,13 @@
|
||||
ItemStack itemstack2 = (ItemStack)list.get(0);
|
||||
ItemStack itemstack3 = (ItemStack)list.get(1);
|
||||
|
||||
- if (itemstack2.func_77973_b() == itemstack3.func_77973_b() && itemstack2.field_77994_a == 1 && itemstack3.field_77994_a == 1 && itemstack2.func_77973_b().func_77645_m())
|
||||
+ if (itemstack2.func_77973_b() == itemstack3.func_77973_b() && itemstack2.field_77994_a == 1 && itemstack3.field_77994_a == 1 && itemstack2.func_77973_b().isRepairable())
|
||||
{
|
||||
Item item = itemstack2.func_77973_b();
|
||||
int j = item.func_77612_l() - itemstack2.func_77952_i();
|
||||
- Item item = itemstack2.func_77973_b();
|
||||
- int j = item.func_77612_l() - itemstack2.func_77952_i();
|
||||
- int k = item.func_77612_l() - itemstack3.func_77952_i();
|
||||
- int l = j + k + item.func_77612_l() * 5 / 100;
|
||||
- int i1 = item.func_77612_l() - l;
|
||||
+ // FORGE: Make itemstack sensitive // Item item = itemstack2.getItem();
|
||||
+ int j = itemstack2.func_77958_k() - itemstack2.func_77952_i();
|
||||
+ int k = itemstack2.func_77958_k() - itemstack3.func_77952_i();
|
||||
+ int l = j + k + itemstack2.func_77958_k() * 5 / 100;
|
||||
+ int i1 = itemstack2.func_77958_k() - l;
|
||||
|
||||
if (i1 < 0)
|
||||
{
|
||||
@@ -105,11 +105,7 @@
|
||||
for (int i = 0; i < aitemstack.length; ++i)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/network/PacketBuffer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/PacketBuffer.java
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
if (p_150788_1_.func_77973_b().func_77645_m() || p_150788_1_.func_77973_b().func_77651_p())
|
||||
{
|
||||
- nbttagcompound = p_150788_1_.func_77978_p();
|
||||
+ nbttagcompound = p_150788_1_.func_77973_b().getNBTShareTag(p_150788_1_);
|
||||
}
|
||||
|
||||
this.func_150786_a(nbttagcompound);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/stats/StatList.java
|
||||
+++ ../src-work/minecraft/net/minecraft/stats/StatList.java
|
||||
@@ -162,7 +162,7 @@
|
||||
@@ -162,12 +162,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,13 @@
|
||||
}
|
||||
|
||||
private static void func_151181_c()
|
||||
@@ -184,7 +184,7 @@
|
||||
{
|
||||
- for (Block block : Block.field_149771_c)
|
||||
+ for (Block block : net.minecraftforge.fml.common.registry.GameData.getBlockRegistry().typeSafeIterable())
|
||||
{
|
||||
Item item = Item.func_150898_a(block);
|
||||
|
||||
@@ -184,12 +184,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +24,13 @@
|
||||
}
|
||||
|
||||
private static void func_75925_c()
|
||||
@@ -208,7 +208,7 @@
|
||||
{
|
||||
- for (Item item : Item.field_150901_e)
|
||||
+ for (Item item : net.minecraftforge.fml.common.registry.GameData.getItemRegistry().typeSafeIterable())
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
@@ -208,12 +208,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +39,13 @@
|
||||
}
|
||||
|
||||
private static void func_151179_e()
|
||||
@@ -227,7 +227,7 @@
|
||||
{
|
||||
- for (Item item : Item.field_150901_e)
|
||||
+ for (Item item : net.minecraftforge.fml.common.registry.GameData.getItemRegistry().typeSafeIterable())
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
@@ -227,12 +227,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +54,12 @@
|
||||
}
|
||||
|
||||
private static void func_188054_f()
|
||||
{
|
||||
- for (Item item : Item.field_150901_e)
|
||||
+ for (Item item : net.minecraftforge.fml.common.registry.GameData.getItemRegistry().typeSafeIterable())
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
@@ -247,7 +247,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_)
|
||||
{
|
||||
double d0 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_;
|
||||
@@ -305,6 +315,198 @@
|
||||
@@ -305,6 +315,202 @@
|
||||
{
|
||||
}
|
||||
|
||||
@@ -151,12 +151,16 @@
|
||||
+ {
|
||||
+ bb = new net.minecraft.util.math.AxisAlignedBB(pos.func_177982_a(-1, 0, -1), pos.func_177982_a(2, 2, 2));
|
||||
+ }
|
||||
+ else if (type == Blocks.field_185779_df)
|
||||
+ {
|
||||
+ bb = INFINITE_EXTENT_AABB;
|
||||
+ }
|
||||
+ else if (type != null && type != Blocks.field_150461_bJ)
|
||||
+ {
|
||||
+ net.minecraft.util.math.AxisAlignedBB cbb = null;
|
||||
+ try
|
||||
+ {
|
||||
+ cbb = field_145850_b.func_180495_p(func_174877_v()).func_185890_d(field_145850_b, pos).func_72321_a(pos.func_177958_n(), pos.func_177956_o(), pos.func_177952_p());
|
||||
+ cbb = field_145850_b.func_180495_p(func_174877_v()).func_185890_d(field_145850_b, pos).func_186670_a(pos);
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java
|
||||
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java
|
||||
@@ -130,7 +130,7 @@
|
||||
@@ -130,17 +130,23 @@
|
||||
{
|
||||
if (iblockstate.func_177230_c() != Blocks.field_150397_co)
|
||||
{
|
||||
@@ -9,7 +9,23 @@
|
||||
{
|
||||
this.field_146015_k = false;
|
||||
this.field_174909_f.clear();
|
||||
@@ -181,7 +181,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
+ float[] customColor = iblockstate.func_177230_c().getBeaconColorMultiplier(iblockstate, this.field_145850_b, blockpos$mutableblockpos, func_174877_v());
|
||||
+ if (customColor != null)
|
||||
+ afloat = customColor;
|
||||
+ else {
|
||||
tileentitybeacon$beamsegment.func_177262_a();
|
||||
continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ else
|
||||
afloat = EntitySheep.func_175513_a((EnumDyeColor)iblockstate.func_177229_b(BlockStainedGlassPane.field_176245_a));
|
||||
}
|
||||
|
||||
@@ -181,7 +187,7 @@
|
||||
{
|
||||
Block block = this.field_145850_b.func_180495_p(new BlockPos(j1, i2, k1)).func_177230_c();
|
||||
|
||||
@@ -18,7 +34,7 @@
|
||||
{
|
||||
flag1 = false;
|
||||
break;
|
||||
@@ -382,7 +382,7 @@
|
||||
@@ -382,7 +388,7 @@
|
||||
|
||||
public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{
|
||||
this.field_145850_b.func_180501_a(this.field_174879_c, this.field_174932_a, 3);
|
||||
- this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c());
|
||||
+ if(!net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(field_145850_b, field_174879_c, field_145850_b.func_180495_p(field_174879_c), java.util.EnumSet.noneOf(EnumFacing.class)).isCanceled())
|
||||
+ if(!net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(field_145850_b, field_174879_c, field_145850_b.func_180495_p(field_174879_c), java.util.EnumSet.of(this.field_174931_f.func_176734_d())).isCanceled())
|
||||
+ this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c());
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
{
|
||||
this.field_145850_b.func_180501_a(this.field_174879_c, this.field_174932_a, 3);
|
||||
- this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c());
|
||||
+ if(!net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(field_145850_b, field_174879_c, field_145850_b.func_180495_p(field_174879_c), java.util.EnumSet.noneOf(EnumFacing.class)).isCanceled())
|
||||
+ if(!net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(field_145850_b, field_174879_c, field_145850_b.func_180495_p(field_174879_c), java.util.EnumSet.of(this.field_174931_f.func_176734_d())).isCanceled())
|
||||
+ this.field_145850_b.func_180496_d(this.field_174879_c, this.field_174932_a.func_177230_c());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/World.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/World.java
|
||||
@@ -61,6 +61,13 @@
|
||||
@@ -59,8 +59,15 @@
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class World implements IBlockAccess
|
||||
-public abstract class World implements IBlockAccess
|
||||
+public abstract class World implements IBlockAccess, net.minecraftforge.common.capabilities.ICapabilityProvider
|
||||
{
|
||||
+ /**
|
||||
+ * Used in the getEntitiesWithinAABB functions to expand the search area for entities.
|
||||
@@ -14,18 +17,20 @@
|
||||
private int field_181546_a = 63;
|
||||
protected boolean field_72999_e;
|
||||
public final List<Entity> field_72996_f = Lists.<Entity>newArrayList();
|
||||
@@ -102,6 +109,10 @@
|
||||
@@ -102,6 +109,12 @@
|
||||
private final WorldBorder field_175728_M;
|
||||
int[] field_72994_J;
|
||||
|
||||
+ public boolean restoringBlockSnapshots = false;
|
||||
+ public boolean captureBlockSnapshots = false;
|
||||
+ public java.util.ArrayList<net.minecraftforge.common.util.BlockSnapshot> capturedBlockSnapshots = new java.util.ArrayList<net.minecraftforge.common.util.BlockSnapshot>();
|
||||
+ private net.minecraftforge.common.capabilities.CapabilityDispatcher capabilities;
|
||||
+ private net.minecraftforge.common.util.WorldCapabilityData capabilityData;
|
||||
+
|
||||
protected World(ISaveHandler p_i45749_1_, WorldInfo p_i45749_2_, WorldProvider p_i45749_3_, Profiler p_i45749_4_, boolean p_i45749_5_)
|
||||
{
|
||||
this.field_73021_x = Lists.newArrayList(new IWorldEventListener[] {this.field_184152_t});
|
||||
@@ -116,6 +127,7 @@
|
||||
@@ -116,6 +129,7 @@
|
||||
this.field_73011_w = p_i45749_3_;
|
||||
this.field_72995_K = p_i45749_5_;
|
||||
this.field_175728_M = p_i45749_3_.func_177501_r();
|
||||
@@ -33,7 +38,7 @@
|
||||
}
|
||||
|
||||
public World func_175643_b()
|
||||
@@ -125,6 +137,11 @@
|
||||
@@ -125,6 +139,11 @@
|
||||
|
||||
public Biome func_180494_b(final BlockPos p_180494_1_)
|
||||
{
|
||||
@@ -45,7 +50,7 @@
|
||||
if (this.func_175667_e(p_180494_1_))
|
||||
{
|
||||
Chunk chunk = this.func_175726_f(p_180494_1_);
|
||||
@@ -201,7 +218,7 @@
|
||||
@@ -201,7 +220,7 @@
|
||||
|
||||
public boolean func_175623_d(BlockPos p_175623_1_)
|
||||
{
|
||||
@@ -54,7 +59,7 @@
|
||||
}
|
||||
|
||||
public boolean func_175667_e(BlockPos p_175667_1_)
|
||||
@@ -298,23 +315,49 @@
|
||||
@@ -298,23 +317,49 @@
|
||||
{
|
||||
Chunk chunk = this.func_175726_f(p_180501_1_);
|
||||
Block block = p_180501_2_.func_177230_c();
|
||||
@@ -106,7 +111,7 @@
|
||||
this.func_184138_a(p_180501_1_, iblockstate, p_180501_2_, p_180501_3_);
|
||||
}
|
||||
|
||||
@@ -324,11 +367,9 @@
|
||||
@@ -324,11 +369,9 @@
|
||||
|
||||
if (p_180501_2_.func_185912_n())
|
||||
{
|
||||
@@ -119,7 +124,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,7 +384,7 @@
|
||||
@@ -343,7 +386,7 @@
|
||||
IBlockState iblockstate = this.func_180495_p(p_175655_1_);
|
||||
Block block = iblockstate.func_177230_c();
|
||||
|
||||
@@ -128,7 +133,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -416,6 +457,9 @@
|
||||
@@ -416,6 +459,9 @@
|
||||
|
||||
public void func_175685_c(BlockPos p_175685_1_, Block p_175685_2_)
|
||||
{
|
||||
@@ -138,7 +143,7 @@
|
||||
this.func_180496_d(p_175685_1_.func_177976_e(), p_175685_2_);
|
||||
this.func_180496_d(p_175685_1_.func_177974_f(), p_175685_2_);
|
||||
this.func_180496_d(p_175685_1_.func_177977_b(), p_175685_2_);
|
||||
@@ -426,6 +470,11 @@
|
||||
@@ -426,6 +472,11 @@
|
||||
|
||||
public void func_175695_a(BlockPos p_175695_1_, Block p_175695_2_, EnumFacing p_175695_3_)
|
||||
{
|
||||
@@ -150,7 +155,7 @@
|
||||
if (p_175695_3_ != EnumFacing.WEST)
|
||||
{
|
||||
this.func_180496_d(p_175695_1_.func_177976_e(), p_175695_2_);
|
||||
@@ -521,7 +570,7 @@
|
||||
@@ -521,7 +572,7 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(blockpos);
|
||||
|
||||
@@ -159,7 +164,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -795,7 +844,7 @@
|
||||
@@ -795,7 +846,7 @@
|
||||
|
||||
public boolean func_72935_r()
|
||||
{
|
||||
@@ -168,7 +173,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -998,6 +1047,13 @@
|
||||
@@ -998,6 +1049,13 @@
|
||||
|
||||
public void func_184148_a(@Nullable EntityPlayer p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_)
|
||||
{
|
||||
@@ -182,7 +187,7 @@
|
||||
for (int i = 0; i < this.field_73021_x.size(); ++i)
|
||||
{
|
||||
((IWorldEventListener)this.field_73021_x.get(i)).func_184375_a(p_184148_1_, p_184148_8_, p_184148_9_, p_184148_2_, p_184148_4_, p_184148_6_, p_184148_10_, p_184148_11_);
|
||||
@@ -1043,6 +1099,9 @@
|
||||
@@ -1043,6 +1101,9 @@
|
||||
|
||||
public boolean func_72838_d(Entity p_72838_1_)
|
||||
{
|
||||
@@ -192,7 +197,7 @@
|
||||
int i = MathHelper.func_76128_c(p_72838_1_.field_70165_t / 16.0D);
|
||||
int j = MathHelper.func_76128_c(p_72838_1_.field_70161_v / 16.0D);
|
||||
boolean flag = p_72838_1_.field_98038_p;
|
||||
@@ -1065,6 +1124,8 @@
|
||||
@@ -1065,6 +1126,8 @@
|
||||
this.func_72854_c();
|
||||
}
|
||||
|
||||
@@ -201,7 +206,16 @@
|
||||
this.func_72964_e(i, j).func_76612_a(p_72838_1_);
|
||||
this.field_72996_f.add(p_72838_1_);
|
||||
this.func_72923_a(p_72838_1_);
|
||||
@@ -1296,7 +1357,6 @@
|
||||
@@ -1221,7 +1284,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.GetCollisionBoxesEvent(this, p_184144_1_, p_184144_2_, list));
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -1296,7 +1359,6 @@
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -209,7 +223,7 @@
|
||||
public void func_72848_b(IWorldEventListener p_72848_1_)
|
||||
{
|
||||
this.field_73021_x.remove(p_72848_1_);
|
||||
@@ -1359,19 +1419,38 @@
|
||||
@@ -1359,19 +1421,38 @@
|
||||
|
||||
public int func_72967_a(float p_72967_1_)
|
||||
{
|
||||
@@ -250,7 +264,7 @@
|
||||
float f = this.func_72826_c(p_72971_1_);
|
||||
float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.2F);
|
||||
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
|
||||
@@ -1384,6 +1463,12 @@
|
||||
@@ -1384,6 +1465,12 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3d func_72833_a(Entity p_72833_1_, float p_72833_2_)
|
||||
{
|
||||
@@ -263,7 +277,7 @@
|
||||
float f = this.func_72826_c(p_72833_2_);
|
||||
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);
|
||||
@@ -1391,9 +1476,7 @@
|
||||
@@ -1391,9 +1478,7 @@
|
||||
int j = MathHelper.func_76128_c(p_72833_1_.field_70163_u);
|
||||
int k = MathHelper.func_76128_c(p_72833_1_.field_70161_v);
|
||||
BlockPos blockpos = new BlockPos(i, j, k);
|
||||
@@ -274,7 +288,7 @@
|
||||
float f3 = (float)(l >> 16 & 255) / 255.0F;
|
||||
float f4 = (float)(l >> 8 & 255) / 255.0F;
|
||||
float f5 = (float)(l & 255) / 255.0F;
|
||||
@@ -1453,6 +1536,11 @@
|
||||
@@ -1453,6 +1538,11 @@
|
||||
|
||||
public float func_130001_d()
|
||||
{
|
||||
@@ -286,7 +300,7 @@
|
||||
return WorldProvider.field_111203_a[this.field_73011_w.func_76559_b(this.field_72986_A.func_76073_f())];
|
||||
}
|
||||
|
||||
@@ -1465,6 +1553,12 @@
|
||||
@@ -1465,6 +1555,12 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Vec3d func_72824_f(float p_72824_1_)
|
||||
{
|
||||
@@ -299,7 +313,7 @@
|
||||
float f = this.func_72826_c(p_72824_1_);
|
||||
float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F;
|
||||
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
|
||||
@@ -1520,9 +1614,9 @@
|
||||
@@ -1520,9 +1616,9 @@
|
||||
for (blockpos = new BlockPos(p_175672_1_.func_177958_n(), chunk.func_76625_h() + 16, p_175672_1_.func_177952_p()); blockpos.func_177956_o() >= 0; blockpos = blockpos1)
|
||||
{
|
||||
blockpos1 = blockpos.func_177977_b();
|
||||
@@ -311,7 +325,7 @@
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -1534,6 +1628,12 @@
|
||||
@@ -1534,6 +1630,12 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float func_72880_h(float p_72880_1_)
|
||||
{
|
||||
@@ -324,7 +338,7 @@
|
||||
float f = this.func_72826_c(p_72880_1_);
|
||||
float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.25F);
|
||||
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
|
||||
@@ -1585,6 +1685,12 @@
|
||||
@@ -1585,6 +1687,12 @@
|
||||
entity.func_85029_a(crashreportcategory);
|
||||
}
|
||||
|
||||
@@ -337,7 +351,7 @@
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -1646,6 +1752,12 @@
|
||||
@@ -1646,6 +1754,12 @@
|
||||
CrashReport crashreport1 = CrashReport.func_85055_a(throwable1, "Ticking entity");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Entity being ticked");
|
||||
entity2.func_85029_a(crashreportcategory1);
|
||||
@@ -350,7 +364,7 @@
|
||||
throw new ReportedException(crashreport1);
|
||||
}
|
||||
}
|
||||
@@ -1682,7 +1794,7 @@
|
||||
@@ -1682,11 +1796,11 @@
|
||||
{
|
||||
BlockPos blockpos = tileentity.func_174877_v();
|
||||
|
||||
@@ -359,7 +373,12 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1695,6 +1807,13 @@
|
||||
- this.field_72984_F.func_76320_a(tileentity.getClass().getSimpleName());
|
||||
+ this.field_72984_F.func_76320_a(this.field_72984_F.field_76327_a ? tileentity.getClass().getSimpleName() : ""); // Fix for MC-117087
|
||||
((ITickable)tileentity).func_73660_a();
|
||||
this.field_72984_F.func_76319_b();
|
||||
}
|
||||
@@ -1695,6 +1809,13 @@
|
||||
CrashReport crashreport2 = CrashReport.func_85055_a(throwable, "Ticking block entity");
|
||||
CrashReportCategory crashreportcategory2 = crashreport2.func_85058_a("Block entity being ticked");
|
||||
tileentity.func_145828_a(crashreportcategory2);
|
||||
@@ -373,7 +392,7 @@
|
||||
throw new ReportedException(crashreport2);
|
||||
}
|
||||
}
|
||||
@@ -1707,20 +1826,28 @@
|
||||
@@ -1707,20 +1828,31 @@
|
||||
|
||||
if (this.func_175667_e(tileentity.func_174877_v()))
|
||||
{
|
||||
@@ -390,13 +409,18 @@
|
||||
-
|
||||
if (!this.field_147483_b.isEmpty())
|
||||
{
|
||||
- this.field_175730_i.removeAll(this.field_147483_b);
|
||||
- this.field_147482_g.removeAll(this.field_147483_b);
|
||||
+ for (Object tile : field_147483_b)
|
||||
+ {
|
||||
+ ((TileEntity)tile).onChunkUnload();
|
||||
+ }
|
||||
+
|
||||
this.field_175730_i.removeAll(this.field_147483_b);
|
||||
this.field_147482_g.removeAll(this.field_147483_b);
|
||||
+ // forge: faster "contains" makes this removal much more efficient (MC-117075)
|
||||
+ java.util.Set<TileEntity> remove = java.util.Collections.newSetFromMap(new java.util.IdentityHashMap<TileEntity, Boolean>());
|
||||
+ remove.addAll(field_147483_b);
|
||||
+ this.field_175730_i.removeAll(remove);
|
||||
+ this.field_147482_g.removeAll(remove);
|
||||
this.field_147483_b.clear();
|
||||
}
|
||||
|
||||
@@ -405,7 +429,7 @@
|
||||
this.field_72984_F.func_76318_c("pendingBlockEntities");
|
||||
|
||||
if (!this.field_147484_a.isEmpty())
|
||||
@@ -1759,8 +1886,12 @@
|
||||
@@ -1759,8 +1891,12 @@
|
||||
|
||||
public boolean func_175700_a(TileEntity p_175700_1_)
|
||||
{
|
||||
@@ -419,7 +443,7 @@
|
||||
if (flag && p_175700_1_ instanceof ITickable)
|
||||
{
|
||||
this.field_175730_i.add(p_175700_1_);
|
||||
@@ -1780,6 +1911,11 @@
|
||||
@@ -1780,6 +1916,11 @@
|
||||
{
|
||||
if (this.field_147481_N)
|
||||
{
|
||||
@@ -431,7 +455,7 @@
|
||||
this.field_147484_a.addAll(p_147448_1_);
|
||||
}
|
||||
else
|
||||
@@ -1800,9 +1936,12 @@
|
||||
@@ -1800,9 +1941,12 @@
|
||||
{
|
||||
int i = MathHelper.func_76128_c(p_72866_1_.field_70165_t);
|
||||
int j = MathHelper.func_76128_c(p_72866_1_.field_70161_v);
|
||||
@@ -446,7 +470,7 @@
|
||||
{
|
||||
p_72866_1_.field_70142_S = p_72866_1_.field_70165_t;
|
||||
p_72866_1_.field_70137_T = p_72866_1_.field_70163_u;
|
||||
@@ -2001,6 +2140,10 @@
|
||||
@@ -2001,6 +2145,10 @@
|
||||
blockpos$pooledmutableblockpos.func_185344_t();
|
||||
return true;
|
||||
}
|
||||
@@ -457,7 +481,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2040,6 +2183,16 @@
|
||||
@@ -2040,6 +2188,16 @@
|
||||
IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos);
|
||||
Block block = iblockstate.func_177230_c();
|
||||
|
||||
@@ -474,7 +498,7 @@
|
||||
if (iblockstate.func_185904_a() == p_72918_2_)
|
||||
{
|
||||
double d0 = (double)((float)(l1 + 1) - BlockLiquid.func_149801_b(((Integer)iblockstate.func_177229_b(BlockLiquid.field_176367_b)).intValue()));
|
||||
@@ -2116,6 +2269,9 @@
|
||||
@@ -2116,6 +2274,9 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2));
|
||||
|
||||
@@ -484,7 +508,7 @@
|
||||
if (iblockstate.func_185904_a() == p_72830_2_)
|
||||
{
|
||||
int j2 = ((Integer)iblockstate.func_177229_b(BlockLiquid.field_176367_b)).intValue();
|
||||
@@ -2148,6 +2304,7 @@
|
||||
@@ -2148,6 +2309,7 @@
|
||||
public Explosion func_72885_a(@Nullable Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_)
|
||||
{
|
||||
Explosion explosion = new Explosion(this, p_72885_1_, p_72885_2_, p_72885_4_, p_72885_6_, p_72885_8_, p_72885_9_, p_72885_10_);
|
||||
@@ -492,7 +516,7 @@
|
||||
explosion.func_77278_a();
|
||||
explosion.func_77279_a(true);
|
||||
return explosion;
|
||||
@@ -2270,6 +2427,7 @@
|
||||
@@ -2270,6 +2432,7 @@
|
||||
|
||||
public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_)
|
||||
{
|
||||
@@ -500,7 +524,7 @@
|
||||
if (!this.func_189509_E(p_175690_1_))
|
||||
{
|
||||
if (p_175690_2_ != null && !p_175690_2_.func_145837_r())
|
||||
@@ -2277,6 +2435,8 @@
|
||||
@@ -2277,6 +2440,8 @@
|
||||
if (this.field_147481_N)
|
||||
{
|
||||
p_175690_2_.func_174878_a(p_175690_1_);
|
||||
@@ -509,7 +533,7 @@
|
||||
Iterator<TileEntity> iterator = this.field_147484_a.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -2295,8 +2455,10 @@
|
||||
@@ -2295,8 +2460,10 @@
|
||||
else
|
||||
{
|
||||
this.func_175700_a(p_175690_2_);
|
||||
@@ -521,7 +545,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2309,6 +2471,8 @@
|
||||
@@ -2309,6 +2476,8 @@
|
||||
{
|
||||
tileentity.func_145843_s();
|
||||
this.field_147484_a.remove(tileentity);
|
||||
@@ -530,7 +554,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2321,6 +2485,7 @@
|
||||
@@ -2321,6 +2490,7 @@
|
||||
|
||||
this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_);
|
||||
}
|
||||
@@ -538,7 +562,7 @@
|
||||
}
|
||||
|
||||
public void func_147457_a(TileEntity p_147457_1_)
|
||||
@@ -2347,7 +2512,7 @@
|
||||
@@ -2347,7 +2517,7 @@
|
||||
if (chunk != null && !chunk.func_76621_g())
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175677_1_);
|
||||
@@ -547,7 +571,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2370,6 +2535,7 @@
|
||||
@@ -2370,6 +2540,7 @@
|
||||
{
|
||||
this.field_72985_G = p_72891_1_;
|
||||
this.field_72992_H = p_72891_2_;
|
||||
@@ -555,7 +579,7 @@
|
||||
}
|
||||
|
||||
public void func_72835_b()
|
||||
@@ -2379,6 +2545,11 @@
|
||||
@@ -2379,6 +2550,11 @@
|
||||
|
||||
protected void func_72947_a()
|
||||
{
|
||||
@@ -567,7 +591,7 @@
|
||||
if (this.field_72986_A.func_76059_o())
|
||||
{
|
||||
this.field_73004_o = 1.0F;
|
||||
@@ -2392,6 +2563,11 @@
|
||||
@@ -2392,6 +2568,11 @@
|
||||
|
||||
protected void func_72979_l()
|
||||
{
|
||||
@@ -579,7 +603,7 @@
|
||||
if (!this.field_73011_w.func_177495_o())
|
||||
{
|
||||
if (!this.field_72995_K)
|
||||
@@ -2511,6 +2687,11 @@
|
||||
@@ -2511,6 +2692,11 @@
|
||||
|
||||
public boolean func_175670_e(BlockPos p_175670_1_, boolean p_175670_2_)
|
||||
{
|
||||
@@ -591,7 +615,7 @@
|
||||
Biome biome = this.func_180494_b(p_175670_1_);
|
||||
float f = biome.func_180626_a(p_175670_1_);
|
||||
|
||||
@@ -2552,6 +2733,11 @@
|
||||
@@ -2552,6 +2738,11 @@
|
||||
|
||||
public boolean func_175708_f(BlockPos p_175708_1_, boolean p_175708_2_)
|
||||
{
|
||||
@@ -603,7 +627,7 @@
|
||||
Biome biome = this.func_180494_b(p_175708_1_);
|
||||
float f = biome.func_180626_a(p_175708_1_);
|
||||
|
||||
@@ -2569,7 +2755,7 @@
|
||||
@@ -2569,7 +2760,7 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175708_1_);
|
||||
|
||||
@@ -612,7 +636,7 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -2601,10 +2787,11 @@
|
||||
@@ -2601,10 +2792,11 @@
|
||||
else
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175638_1_);
|
||||
@@ -627,7 +651,15 @@
|
||||
{
|
||||
j = 1;
|
||||
}
|
||||
@@ -2703,7 +2890,7 @@
|
||||
@@ -2638,6 +2830,7 @@
|
||||
|
||||
if (i >= 14)
|
||||
{
|
||||
+ blockpos$pooledmutableblockpos.func_185344_t();
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -2703,7 +2896,7 @@
|
||||
int j4 = j2 + enumfacing.func_96559_d();
|
||||
int k4 = k2 + enumfacing.func_82599_e();
|
||||
blockpos$pooledmutableblockpos.func_181079_c(i4, j4, k4);
|
||||
@@ -636,7 +668,7 @@
|
||||
i3 = this.func_175642_b(p_180500_1_, blockpos$pooledmutableblockpos);
|
||||
|
||||
if (i3 == l2 - l4 && j < this.field_72994_J.length)
|
||||
@@ -2811,10 +2998,10 @@
|
||||
@@ -2811,10 +3004,10 @@
|
||||
public List<Entity> func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate <? super Entity > p_175674_3_)
|
||||
{
|
||||
List<Entity> list = Lists.<Entity>newArrayList();
|
||||
@@ -651,7 +683,7 @@
|
||||
|
||||
for (int i1 = i; i1 <= j; ++i1)
|
||||
{
|
||||
@@ -2867,10 +3054,10 @@
|
||||
@@ -2867,10 +3060,10 @@
|
||||
|
||||
public <T extends Entity> List<T> func_175647_a(Class <? extends T > p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable Predicate <? super T > p_175647_3_)
|
||||
{
|
||||
@@ -666,7 +698,7 @@
|
||||
List<T> list = Lists.<T>newArrayList();
|
||||
|
||||
for (int i1 = i; i1 < j; ++i1)
|
||||
@@ -2950,11 +3137,13 @@
|
||||
@@ -2950,11 +3143,13 @@
|
||||
|
||||
public void func_175650_b(Collection<Entity> p_175650_1_)
|
||||
{
|
||||
@@ -683,7 +715,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2967,7 +3156,7 @@
|
||||
@@ -2967,7 +3162,7 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175716_2_);
|
||||
AxisAlignedBB axisalignedbb = p_175716_3_ ? null : p_175716_1_.func_176223_P().func_185890_d(this, p_175716_2_);
|
||||
@@ -692,7 +724,7 @@
|
||||
}
|
||||
|
||||
public int func_181545_F()
|
||||
@@ -3050,7 +3239,7 @@
|
||||
@@ -3050,7 +3245,7 @@
|
||||
public int func_175651_c(BlockPos p_175651_1_, EnumFacing p_175651_2_)
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175651_1_);
|
||||
@@ -701,7 +733,16 @@
|
||||
}
|
||||
|
||||
public boolean func_175640_z(BlockPos p_175640_1_)
|
||||
@@ -3247,7 +3436,7 @@
|
||||
@@ -3185,7 +3380,7 @@
|
||||
{
|
||||
d2 *= ((Double)Objects.firstNonNull(p_184150_11_.apply(entityplayer1), Double.valueOf(1.0D))).doubleValue();
|
||||
}
|
||||
-
|
||||
+ d2 = net.minecraftforge.common.ForgeHooks.getPlayerVisibilityDistance(entityplayer1, d2, p_184150_7_);
|
||||
if ((p_184150_9_ < 0.0D || Math.abs(entityplayer1.field_70163_u - p_184150_3_) < p_184150_9_ * p_184150_9_) && (p_184150_7_ < 0.0D || d1 < d2 * d2) && (d0 == -1.0D || d1 < d0))
|
||||
{
|
||||
d0 = d1;
|
||||
@@ -3247,7 +3442,7 @@
|
||||
|
||||
public long func_72905_C()
|
||||
{
|
||||
@@ -710,7 +751,7 @@
|
||||
}
|
||||
|
||||
public long func_82737_E()
|
||||
@@ -3257,17 +3446,17 @@
|
||||
@@ -3257,17 +3452,17 @@
|
||||
|
||||
public long func_72820_D()
|
||||
{
|
||||
@@ -731,7 +772,7 @@
|
||||
|
||||
if (!this.func_175723_af().func_177746_a(blockpos))
|
||||
{
|
||||
@@ -3279,7 +3468,7 @@
|
||||
@@ -3279,7 +3474,7 @@
|
||||
|
||||
public void func_175652_B(BlockPos p_175652_1_)
|
||||
{
|
||||
@@ -740,7 +781,7 @@
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -3299,12 +3488,18 @@
|
||||
@@ -3299,12 +3494,18 @@
|
||||
|
||||
if (!this.field_72996_f.contains(p_72897_1_))
|
||||
{
|
||||
@@ -759,7 +800,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3398,8 +3593,7 @@
|
||||
@@ -3398,8 +3599,7 @@
|
||||
|
||||
public boolean func_180502_D(BlockPos p_180502_1_)
|
||||
{
|
||||
@@ -769,7 +810,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -3460,12 +3654,12 @@
|
||||
@@ -3460,12 +3660,12 @@
|
||||
|
||||
public int func_72800_K()
|
||||
{
|
||||
@@ -784,7 +825,7 @@
|
||||
}
|
||||
|
||||
public Random func_72843_D(int p_72843_1_, int p_72843_2_, int p_72843_3_)
|
||||
@@ -3509,7 +3703,7 @@
|
||||
@@ -3509,7 +3709,7 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double func_72919_O()
|
||||
{
|
||||
@@ -793,7 +834,7 @@
|
||||
}
|
||||
|
||||
public void func_175715_c(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_)
|
||||
@@ -3543,7 +3737,7 @@
|
||||
@@ -3543,7 +3743,7 @@
|
||||
|
||||
public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_)
|
||||
{
|
||||
@@ -802,7 +843,7 @@
|
||||
{
|
||||
BlockPos blockpos = p_175666_1_.func_177972_a(enumfacing);
|
||||
|
||||
@@ -3551,18 +3745,14 @@
|
||||
@@ -3551,18 +3751,14 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(blockpos);
|
||||
|
||||
@@ -825,7 +866,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3628,6 +3818,87 @@
|
||||
@@ -3628,6 +3824,112 @@
|
||||
return i >= -128 && i <= 128 && j >= -128 && j <= 128;
|
||||
}
|
||||
|
||||
@@ -904,6 +945,31 @@
|
||||
+ return count;
|
||||
+ }
|
||||
+
|
||||
+ protected void initCapabilities()
|
||||
+ {
|
||||
+ net.minecraftforge.common.capabilities.ICapabilityProvider parent = field_73011_w.initCapabilities();
|
||||
+ capabilities = net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(this, parent);
|
||||
+ net.minecraftforge.common.util.WorldCapabilityData data = (net.minecraftforge.common.util.WorldCapabilityData)perWorldStorage.func_75742_a(net.minecraftforge.common.util.WorldCapabilityData.class, net.minecraftforge.common.util.WorldCapabilityData.ID);
|
||||
+ if (data == null)
|
||||
+ {
|
||||
+ capabilityData = new net.minecraftforge.common.util.WorldCapabilityData(capabilities);
|
||||
+ perWorldStorage.func_75745_a(capabilityData.field_76190_i, capabilityData);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ capabilityData = data;
|
||||
+ capabilityData.setCapabilities(field_73011_w, capabilities);
|
||||
+ }
|
||||
+ }
|
||||
+ public boolean hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability, EnumFacing facing)
|
||||
+ {
|
||||
+ return capabilities == null ? false : capabilities.hasCapability(capability, facing);
|
||||
+ }
|
||||
+ public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, EnumFacing facing)
|
||||
+ {
|
||||
+ return capabilities == null ? null : capabilities.getCapability(capability, facing);
|
||||
+ }
|
||||
+
|
||||
+ protected MapStorage perWorldStorage; //Moved to a getter to simulate final without being final so we can load in subclasses.
|
||||
+ public MapStorage getPerWorldStorage()
|
||||
+ {
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
{
|
||||
BlockPos blockpos = func_180621_a(p_77192_1_, chunkpos1.field_77276_a, chunkpos1.field_77275_b);
|
||||
int k1 = blockpos.func_177958_n();
|
||||
@@ -135,7 +137,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
- entityliving = (EntityLiving)biome$spawnlistentry.field_76300_b.getConstructor(new Class[] {World.class}).newInstance(new Object[] {p_77192_1_});
|
||||
+ entityliving = (EntityLiving)biome$spawnlistentry.newInstance(p_77192_1_);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -145,8 +147,10 @@
|
||||
|
||||
entityliving.func_70012_b((double)f, (double)i3, (double)f1, p_77192_1_.field_73012_v.nextFloat() * 360.0F, 0.0F);
|
||||
@@ -37,7 +46,7 @@
|
||||
}
|
||||
|
||||
- if (j2 >= entityliving.func_70641_bl())
|
||||
+ if (i2 >= net.minecraftforge.event.ForgeEventFactory.getMaxSpawnPackSize(entityliving))
|
||||
+ if (j2 >= net.minecraftforge.event.ForgeEventFactory.getMaxSpawnPackSize(entityliving))
|
||||
{
|
||||
continue label411;
|
||||
}
|
||||
@@ -52,3 +61,12 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -257,7 +262,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
- entityliving = (EntityLiving)biome$spawnlistentry.field_76300_b.getConstructor(new Class[] {World.class}).newInstance(new Object[] {p_77191_0_});
|
||||
+ entityliving = (EntityLiving)biome$spawnlistentry.newInstance(p_77191_0_);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -214,6 +200,327 @@
|
||||
@@ -214,6 +200,339 @@
|
||||
return new WorldBorder();
|
||||
}
|
||||
|
||||
@@ -220,6 +220,18 @@
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called from {@link World#initCapabilities()}, to gather capabilities for this world.
|
||||
+ * It's safe to access world here since this is called after world is registered.
|
||||
+ *
|
||||
+ * On server, called directly after mapStorage and world data such as Scoreboard and VillageCollection are initialized.
|
||||
+ * On client, called when world is constructed, just before world load event is called.
|
||||
+ * Note that this method is always called before the world load event.
|
||||
+ * @return initial holder for capabilities on the world
|
||||
+ */
|
||||
+ public net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities() {
|
||||
+ return null;
|
||||
+ }
|
||||
+ /*======================================= Start Moved From World =========================================*/
|
||||
+
|
||||
+ public Biome getBiomeForCoords(BlockPos pos)
|
||||
|
||||
@@ -43,7 +43,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,6 +224,10 @@
|
||||
@@ -156,6 +165,7 @@
|
||||
this.func_175723_af().func_177750_a(this.field_72986_A.func_176137_E());
|
||||
}
|
||||
|
||||
+ this.initCapabilities();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -215,6 +225,10 @@
|
||||
this.field_175740_d.func_75528_a();
|
||||
this.field_72984_F.func_76318_c("portalForcer");
|
||||
this.field_85177_Q.func_85189_a(this.func_82737_E());
|
||||
@@ -54,7 +62,7 @@
|
||||
this.field_72984_F.func_76319_b();
|
||||
this.func_147488_Z();
|
||||
}
|
||||
@@ -223,12 +236,14 @@
|
||||
@@ -223,12 +237,14 @@
|
||||
public Biome.SpawnListEntry func_175734_a(EnumCreatureType p_175734_1_, BlockPos p_175734_2_)
|
||||
{
|
||||
List<Biome.SpawnListEntry> list = this.func_72863_F().func_177458_a(p_175734_1_, p_175734_2_);
|
||||
@@ -69,7 +77,7 @@
|
||||
return list != null && !list.isEmpty() ? list.contains(p_175732_2_) : false;
|
||||
}
|
||||
|
||||
@@ -274,10 +289,7 @@
|
||||
@@ -274,10 +290,7 @@
|
||||
|
||||
private void func_73051_P()
|
||||
{
|
||||
@@ -81,7 +89,7 @@
|
||||
}
|
||||
|
||||
public boolean func_73056_e()
|
||||
@@ -370,7 +382,7 @@
|
||||
@@ -370,7 +383,7 @@
|
||||
boolean flag1 = this.func_72911_I();
|
||||
this.field_72984_F.func_76320_a("pollingChunks");
|
||||
|
||||
@@ -90,7 +98,7 @@
|
||||
{
|
||||
this.field_72984_F.func_76320_a("getChunk");
|
||||
Chunk chunk = (Chunk)iterator.next();
|
||||
@@ -382,7 +394,7 @@
|
||||
@@ -382,7 +395,7 @@
|
||||
chunk.func_150804_b(false);
|
||||
this.field_72984_F.func_76318_c("thunder");
|
||||
|
||||
@@ -99,7 +107,7 @@
|
||||
{
|
||||
this.field_73005_l = this.field_73005_l * 3 + 1013904223;
|
||||
int l = this.field_73005_l >> 2;
|
||||
@@ -411,7 +423,7 @@
|
||||
@@ -411,7 +424,7 @@
|
||||
|
||||
this.field_72984_F.func_76318_c("iceandsnow");
|
||||
|
||||
@@ -108,7 +116,7 @@
|
||||
{
|
||||
this.field_73005_l = this.field_73005_l * 3 + 1013904223;
|
||||
int j2 = this.field_73005_l >> 2;
|
||||
@@ -527,7 +539,10 @@
|
||||
@@ -527,7 +540,10 @@
|
||||
{
|
||||
if (p_175654_2_.func_149698_L())
|
||||
{
|
||||
@@ -120,7 +128,15 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175654_1_);
|
||||
|
||||
@@ -587,7 +602,7 @@
|
||||
@@ -563,6 +579,7 @@
|
||||
|
||||
public void func_180497_b(BlockPos p_180497_1_, Block p_180497_2_, int p_180497_3_, int p_180497_4_)
|
||||
{
|
||||
+ if (p_180497_2_ == null) return; //Forge: Prevent null blocks from ticking, can happen if blocks are removed in old worlds. TODO: Fix real issue causing block to be null.
|
||||
if (p_180497_1_ instanceof BlockPos.MutableBlockPos || p_180497_1_ instanceof BlockPos.PooledMutableBlockPos)
|
||||
{
|
||||
p_180497_1_ = new BlockPos(p_180497_1_);
|
||||
@@ -587,7 +604,7 @@
|
||||
|
||||
public void func_72939_s()
|
||||
{
|
||||
@@ -129,7 +145,7 @@
|
||||
{
|
||||
if (this.field_80004_Q++ >= 300)
|
||||
{
|
||||
@@ -711,6 +726,9 @@
|
||||
@@ -711,6 +728,9 @@
|
||||
{
|
||||
NextTickListEntry nextticklistentry1 = (NextTickListEntry)iterator.next();
|
||||
iterator.remove();
|
||||
@@ -139,7 +155,7 @@
|
||||
int k = 0;
|
||||
|
||||
if (this.func_175707_a(nextticklistentry1.field_180282_a.func_177982_a(0, 0, 0), nextticklistentry1.field_180282_a.func_177982_a(0, 0, 0)))
|
||||
@@ -837,6 +855,10 @@
|
||||
@@ -837,6 +857,10 @@
|
||||
|
||||
public boolean func_175660_a(EntityPlayer p_175660_1_, BlockPos p_175660_2_)
|
||||
{
|
||||
@@ -150,7 +166,7 @@
|
||||
return !this.field_73061_a.func_175579_a(this, p_175660_2_, p_175660_1_) && this.func_175723_af().func_177746_a(p_175660_2_);
|
||||
}
|
||||
|
||||
@@ -902,6 +924,7 @@
|
||||
@@ -902,6 +926,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -158,7 +174,7 @@
|
||||
this.field_72987_B = true;
|
||||
BiomeProvider biomeprovider = this.field_73011_w.func_177499_m();
|
||||
List<Biome> list = biomeprovider.func_76932_a();
|
||||
@@ -986,6 +1009,7 @@
|
||||
@@ -986,6 +1011,7 @@
|
||||
}
|
||||
|
||||
chunkproviderserver.func_186027_a(p_73044_1_);
|
||||
@@ -166,7 +182,7 @@
|
||||
|
||||
for (Chunk chunk : Lists.newArrayList(chunkproviderserver.func_189548_a()))
|
||||
{
|
||||
@@ -1030,6 +1054,7 @@
|
||||
@@ -1030,6 +1056,7 @@
|
||||
this.field_72986_A.func_176135_e(this.func_175723_af().func_177732_i());
|
||||
this.field_73019_z.func_75755_a(this.field_72986_A, this.field_73061_a.func_184103_al().func_72378_q());
|
||||
this.field_72988_C.func_75744_a();
|
||||
@@ -174,7 +190,7 @@
|
||||
}
|
||||
|
||||
public boolean func_72838_d(Entity p_72838_1_)
|
||||
@@ -1041,7 +1066,7 @@
|
||||
@@ -1041,7 +1068,7 @@
|
||||
{
|
||||
for (Entity entity : Lists.newArrayList(p_175650_1_))
|
||||
{
|
||||
@@ -183,7 +199,7 @@
|
||||
{
|
||||
this.field_72996_f.add(entity);
|
||||
this.func_72923_a(entity);
|
||||
@@ -1122,7 +1147,7 @@
|
||||
@@ -1122,7 +1149,7 @@
|
||||
{
|
||||
if (super.func_72942_c(p_72942_1_))
|
||||
{
|
||||
@@ -192,7 +208,7 @@
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -1144,6 +1169,7 @@
|
||||
@@ -1144,6 +1171,7 @@
|
||||
public Explosion func_72885_a(@Nullable Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_)
|
||||
{
|
||||
Explosion explosion = new Explosion(this, p_72885_1_, p_72885_2_, p_72885_4_, p_72885_6_, p_72885_8_, p_72885_9_, p_72885_10_);
|
||||
@@ -200,7 +216,7 @@
|
||||
explosion.func_77278_a();
|
||||
explosion.func_77279_a(false);
|
||||
|
||||
@@ -1189,7 +1215,7 @@
|
||||
@@ -1189,7 +1217,7 @@
|
||||
{
|
||||
if (this.func_147485_a(blockeventdata))
|
||||
{
|
||||
@@ -209,7 +225,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1215,27 +1241,31 @@
|
||||
@@ -1215,27 +1243,31 @@
|
||||
|
||||
if (this.field_73003_n != this.field_73004_o)
|
||||
{
|
||||
@@ -247,7 +263,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1314,6 +1344,11 @@
|
||||
@@ -1314,6 +1346,11 @@
|
||||
return this.field_73061_a.func_152345_ab();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -75,6 +78,14 @@
|
||||
@@ -72,9 +75,18 @@
|
||||
this.field_72982_D.func_82566_a(this);
|
||||
}
|
||||
|
||||
+ this.initCapabilities();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,3 +134,40 @@
|
||||
public static void func_185358_q()
|
||||
{
|
||||
func_185354_a(0, "ocean", new BiomeOcean((new Biome.BiomeProperties("Ocean")).func_185398_c(-1.0F).func_185400_d(0.1F)));
|
||||
@@ -547,6 +625,7 @@
|
||||
public Class <? extends EntityLiving > field_76300_b;
|
||||
public int field_76301_c;
|
||||
public int field_76299_d;
|
||||
+ private final java.lang.reflect.Constructor<?> ctr;
|
||||
|
||||
public SpawnListEntry(Class <? extends EntityLiving > p_i1970_1_, int p_i1970_2_, int p_i1970_3_, int p_i1970_4_)
|
||||
{
|
||||
@@ -554,12 +633,28 @@
|
||||
this.field_76300_b = p_i1970_1_;
|
||||
this.field_76301_c = p_i1970_3_;
|
||||
this.field_76299_d = p_i1970_4_;
|
||||
+
|
||||
+ java.lang.reflect.Constructor<?> tmp = null;
|
||||
+ try
|
||||
+ {
|
||||
+ tmp = p_i1970_1_.getConstructor(World.class);
|
||||
+ }
|
||||
+ catch (NoSuchMethodException e)
|
||||
+ {
|
||||
+ com.google.common.base.Throwables.propagate(e);
|
||||
+ }
|
||||
+ ctr = tmp;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return this.field_76300_b.getSimpleName() + "*(" + this.field_76301_c + "-" + this.field_76299_d + "):" + this.field_76292_a;
|
||||
}
|
||||
+
|
||||
+ public EntityLiving newInstance(World world) throws Exception
|
||||
+ {
|
||||
+ return (EntityLiving)ctr.newInstance(world);
|
||||
+ }
|
||||
}
|
||||
|
||||
public static enum TempCategory
|
||||
@@ -0,0 +1,18 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeDesert.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeDesert.java
|
||||
@@ -28,6 +28,7 @@
|
||||
{
|
||||
super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.DESERT_WELL))
|
||||
if (p_180624_2_.nextInt(1000) == 0)
|
||||
{
|
||||
int i = p_180624_2_.nextInt(16) + 8;
|
||||
@@ -36,6 +37,7 @@
|
||||
(new WorldGenDesertWells()).func_180709_b(p_180624_1_, p_180624_2_, blockpos);
|
||||
}
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FOSSIL))
|
||||
if (p_180624_2_.nextInt(64) == 0)
|
||||
{
|
||||
(new WorldGenFossils()).func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
@@ -1,6 +1,44 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeForest.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeForest.java
|
||||
@@ -147,6 +147,22 @@
|
||||
@@ -74,6 +74,8 @@
|
||||
this.func_185379_b(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
}
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS))
|
||||
+ { // no tab for patch
|
||||
int i = p_180624_2_.nextInt(5) - 3;
|
||||
|
||||
if (this.field_150632_aF == BiomeForest.Type.FLOWER)
|
||||
@@ -82,11 +84,13 @@
|
||||
}
|
||||
|
||||
this.func_185378_a(p_180624_1_, p_180624_2_, p_180624_3_, i);
|
||||
+ }
|
||||
super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
}
|
||||
|
||||
public void func_185379_b(World p_185379_1_, Random p_185379_2_, BlockPos p_185379_3_)
|
||||
{
|
||||
+
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
for (int j = 0; j < 4; ++j)
|
||||
@@ -95,12 +99,12 @@
|
||||
int l = j * 4 + 1 + 8 + p_185379_2_.nextInt(3);
|
||||
BlockPos blockpos = p_185379_1_.func_175645_m(p_185379_3_.func_177982_a(k, 0, l));
|
||||
|
||||
- if (p_185379_2_.nextInt(20) == 0)
|
||||
+ if (p_185379_2_.nextInt(20) == 0 && net.minecraftforge.event.terraingen.TerrainGen.decorate(p_185379_1_, p_185379_2_, blockpos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.BIG_SHROOM))
|
||||
{
|
||||
WorldGenBigMushroom worldgenbigmushroom = new WorldGenBigMushroom();
|
||||
worldgenbigmushroom.func_180709_b(p_185379_1_, p_185379_2_, blockpos);
|
||||
}
|
||||
- else
|
||||
+ else if (net.minecraftforge.event.terraingen.TerrainGen.decorate(p_185379_1_, p_185379_2_, blockpos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.TREE))
|
||||
{
|
||||
WorldGenAbstractTree worldgenabstracttree = this.func_150567_a(p_185379_2_);
|
||||
worldgenabstracttree.func_175904_e();
|
||||
@@ -147,6 +151,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeJungle.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeJungle.java
|
||||
@@ -68,7 +68,9 @@
|
||||
@@ -68,10 +68,14 @@
|
||||
super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
int i = p_180624_2_.nextInt(16) + 8;
|
||||
int j = p_180624_2_.nextInt(16) + 8;
|
||||
@@ -8,6 +8,11 @@
|
||||
+ int height = p_180624_1_.func_175645_m(p_180624_3_.func_177982_a(i, 0, j)).func_177956_o() * 2; // could == 0, which crashes nextInt
|
||||
+ if (height < 1) height = 1;
|
||||
+ int k = p_180624_2_.nextInt(height);
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.PUMPKIN))
|
||||
(new WorldGenMelon()).func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_.func_177982_a(i, k, j));
|
||||
WorldGenVines worldgenvines = new WorldGenVines();
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
|
||||
for (j = 0; j < 50; ++j)
|
||||
{
|
||||
k = p_180624_2_.nextInt(16) + 8;
|
||||
@@ -1,6 +1,23 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomePlains.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomePlains.java
|
||||
@@ -95,6 +95,21 @@
|
||||
@@ -70,6 +70,7 @@
|
||||
this.field_76760_I.field_76803_B = 10;
|
||||
field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.GRASS);
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
int j = p_180624_2_.nextInt(16) + 8;
|
||||
@@ -79,7 +80,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.field_150628_aC)
|
||||
+ if (this.field_150628_aC && net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS))
|
||||
{
|
||||
field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.SUNFLOWER);
|
||||
|
||||
@@ -95,6 +96,21 @@
|
||||
super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeSavanna.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeSavanna.java
|
||||
@@ -30,6 +30,7 @@
|
||||
{
|
||||
field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.GRASS);
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
int j = p_180624_2_.nextInt(16) + 8;
|
||||
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeSnow.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeSnow.java
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
public void func_180624_a(World p_180624_1_, Random p_180624_2_, BlockPos p_180624_3_)
|
||||
{
|
||||
- if (this.field_150615_aC)
|
||||
+ if (this.field_150615_aC && net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.ICE))
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
@@ -1,6 +1,14 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeSwamp.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeSwamp.java
|
||||
@@ -97,4 +97,10 @@
|
||||
@@ -79,6 +79,7 @@
|
||||
{
|
||||
super.func_180624_a(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FOSSIL))
|
||||
if (p_180624_2_.nextInt(64) == 0)
|
||||
{
|
||||
(new WorldGenFossils()).func_180709_b(p_180624_1_, p_180624_2_, p_180624_3_);
|
||||
@@ -97,4 +98,10 @@
|
||||
{
|
||||
return 6975545;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/biome/BiomeTaiga.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/biome/BiomeTaiga.java
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
public void func_180624_a(World p_180624_1_, Random p_180624_2_, BlockPos p_180624_3_)
|
||||
{
|
||||
- if (this.field_150644_aH == BiomeTaiga.Type.MEGA || this.field_150644_aH == BiomeTaiga.Type.MEGA_SPRUCE)
|
||||
+ if ((this.field_150644_aH == BiomeTaiga.Type.MEGA || this.field_150644_aH == BiomeTaiga.Type.MEGA_SPRUCE) && net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.ROCK))
|
||||
{
|
||||
int i = p_180624_2_.nextInt(3);
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
|
||||
field_180280_ag.func_180710_a(BlockDoublePlant.EnumPlantType.FERN);
|
||||
|
||||
+ if(net.minecraftforge.event.terraingen.TerrainGen.decorate(p_180624_1_, p_180624_2_, p_180624_3_, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.FLOWERS))
|
||||
for (int i1 = 0; i1 < 7; ++i1)
|
||||
{
|
||||
int j1 = p_180624_2_.nextInt(16) + 8;
|
||||
@@ -0,0 +1,39 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/chunk/BlockStateContainer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/chunk/BlockStateContainer.java
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
private void func_186012_b(int p_186012_1_)
|
||||
{
|
||||
+ setBits(p_186012_1_, false);
|
||||
+ }
|
||||
+ private void setBits(int p_186012_1_, boolean forceBits)
|
||||
+ {
|
||||
if (p_186012_1_ != this.field_186024_e)
|
||||
{
|
||||
this.field_186024_e = p_186012_1_;
|
||||
@@ -47,6 +51,8 @@
|
||||
{
|
||||
this.field_186022_c = field_186023_d;
|
||||
this.field_186024_e = MathHelper.func_151241_e(Block.field_176229_d.func_186804_a());
|
||||
+ if (forceBits)
|
||||
+ this.field_186024_e = p_186012_1_;
|
||||
}
|
||||
|
||||
this.field_186022_c.func_186041_a(field_186020_a);
|
||||
@@ -102,11 +108,15 @@
|
||||
|
||||
if (this.field_186024_e != i)
|
||||
{
|
||||
- this.func_186012_b(i);
|
||||
+ this.setBits(i, true); //Forge, Force bit density to fix network issues, resize below if needed.
|
||||
}
|
||||
|
||||
this.field_186022_c.func_186038_a(p_186010_1_);
|
||||
p_186010_1_.func_186873_b(this.field_186021_b.func_188143_a());
|
||||
+
|
||||
+ int regSize = MathHelper.func_151241_e(Block.field_176229_d.func_186804_a());
|
||||
+ if (this.field_186022_c == field_186023_d && this.field_186024_e != regSize) // Resize bits to fit registry.
|
||||
+ this.func_186008_a(regSize, field_186020_a);
|
||||
}
|
||||
|
||||
public void func_186009_b(PacketBuffer p_186009_1_)
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public ChunkProviderServer(WorldServer p_i46838_1_, IChunkLoader p_i46838_2_, IChunkGenerator p_i46838_3_)
|
||||
{
|
||||
@@ -82,20 +83,50 @@
|
||||
@@ -82,20 +83,47 @@
|
||||
@Nullable
|
||||
public Chunk func_186028_c(int p_186028_1_, int p_186028_2_)
|
||||
{
|
||||
@@ -44,16 +44,13 @@
|
||||
+ else
|
||||
+ {
|
||||
+ net.minecraft.world.chunk.storage.AnvilChunkLoader loader = (net.minecraft.world.chunk.storage.AnvilChunkLoader) this.field_73247_e;
|
||||
+
|
||||
+ // We can only use the queue for already generated chunks
|
||||
+ if (loader.chunkExists(this.field_73251_h, p_186028_1_, p_186028_2_))
|
||||
+ if (runnable == null)
|
||||
+ chunk = net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(this.field_73251_h, loader, this, p_186028_1_, p_186028_2_);
|
||||
+ else if (loader.chunkExists(this.field_73251_h, p_186028_1_, p_186028_2_))
|
||||
+ {
|
||||
+ if (runnable != null)
|
||||
+ {
|
||||
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.queueChunkLoad(this.field_73251_h, loader, this, p_186028_1_, p_186028_2_, runnable);
|
||||
+ return null;
|
||||
+ }
|
||||
+ else chunk = net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(this.field_73251_h, loader, this, p_186028_1_, p_186028_2_);
|
||||
+ // We can only use the async queue for already generated chunks
|
||||
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.queueChunkLoad(this.field_73251_h, loader, this, p_186028_1_, p_186028_2_, runnable);
|
||||
+ return null;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
@@ -63,7 +60,7 @@
|
||||
return chunk;
|
||||
}
|
||||
|
||||
@@ -221,6 +252,11 @@
|
||||
@@ -221,6 +249,11 @@
|
||||
{
|
||||
if (!this.field_73248_b.isEmpty())
|
||||
{
|
||||
@@ -75,7 +72,7 @@
|
||||
Iterator<Long> iterator = this.field_73248_b.iterator();
|
||||
|
||||
for (int i = 0; i < 100 && iterator.hasNext(); iterator.remove())
|
||||
@@ -235,6 +271,11 @@
|
||||
@@ -235,6 +268,11 @@
|
||||
this.func_73243_a(chunk);
|
||||
this.field_73244_f.remove(olong);
|
||||
++i;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/storage/loot/LootContext.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/loot/LootContext.java
|
||||
@@ -89,6 +89,11 @@
|
||||
@@ -89,6 +89,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
+ {
|
||||
+ return field_186499_b;
|
||||
+ }
|
||||
+
|
||||
+ public int getLootingModifier()
|
||||
+ {
|
||||
+ return net.minecraftforge.common.ForgeHooks.getLootingLevel(func_186493_a(), func_186492_c(), field_186503_f);
|
||||
+ }
|
||||
+
|
||||
public static class Builder
|
||||
{
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/storage/loot/conditions/RandomChanceWithLooting.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/loot/conditions/RandomChanceWithLooting.java
|
||||
@@ -23,13 +23,8 @@
|
||||
|
||||
public boolean func_186618_a(Random p_186618_1_, LootContext p_186618_2_)
|
||||
{
|
||||
- int i = 0;
|
||||
+ int i = p_186618_2_.getLootingModifier();
|
||||
|
||||
- if (p_186618_2_.func_186492_c() instanceof EntityLivingBase)
|
||||
- {
|
||||
- i = EnchantmentHelper.func_185283_h((EntityLivingBase)p_186618_2_.func_186492_c());
|
||||
- }
|
||||
-
|
||||
return p_186618_1_.nextFloat() < this.field_186627_a + (float)i * this.field_186628_b;
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/storage/loot/functions/LootingEnchantBonus.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/loot/functions/LootingEnchantBonus.java
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
- int i = EnchantmentHelper.func_185283_h((EntityLivingBase)entity);
|
||||
+ int i = p_186553_3_.getLootingModifier();
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@@ -32,6 +32,7 @@ import java.nio.FloatBuffer;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.vecmath.Matrix3f;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector3f;
|
||||
@@ -79,6 +80,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
@@ -97,6 +99,7 @@ import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.MouseEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderHandEvent;
|
||||
import net.minecraftforge.client.event.RenderSpecificHandEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.ScreenshotEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
@@ -168,6 +171,11 @@ public class ForgeHooksClient
|
||||
return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
|
||||
}
|
||||
|
||||
public static boolean renderSpecificFirstPersonHand(EnumHand hand, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
|
||||
{
|
||||
return MinecraftForge.EVENT_BUS.post(new RenderSpecificHandEvent(hand, partialTicks, interpPitch, swingProgress, equipProgress, stack));
|
||||
}
|
||||
|
||||
public static void onTextureStitchedPre(TextureMap map)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Pre(map));
|
||||
@@ -268,7 +276,7 @@ public class ForgeHooksClient
|
||||
for (int z = -distance; z <= distance; ++z)
|
||||
{
|
||||
BlockPos pos = center.add(x, 0, z);
|
||||
Biome biome = world.getBiomeGenForCoords(pos);
|
||||
Biome biome = world.getBiome(pos);
|
||||
int colour = biome.getSkyColorByTemp(biome.getFloatTemperature(pos));
|
||||
r += (colour & 0xFF0000) >> 16;
|
||||
g += (colour & 0x00FF00) >> 8;
|
||||
@@ -280,7 +288,7 @@ public class ForgeHooksClient
|
||||
int multiplier = (r / divider & 255) << 16 | (g / divider & 255) << 8 | b / divider & 255;
|
||||
|
||||
skyX = center.getX();
|
||||
skyZ = center.getY();
|
||||
skyZ = center.getZ();
|
||||
skyRGBMultiplier = multiplier;
|
||||
return skyRGBMultiplier;
|
||||
}
|
||||
@@ -656,8 +664,7 @@ public class ForgeHooksClient
|
||||
|
||||
public static IBakedModel getDamageModel(IBakedModel ibakedmodel, TextureAtlasSprite texture, IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
// TODO custom damage models
|
||||
// state = state.block.getExtendedState(state, world, pos);
|
||||
state = state.getBlock().getExtendedState(state, world, pos);
|
||||
return (new SimpleBakedModel.Builder(state, ibakedmodel, texture, pos)).makeBakedModel();
|
||||
}
|
||||
|
||||
@@ -677,6 +684,11 @@ public class ForgeHooksClient
|
||||
return from.getItem().shouldCauseReequipAnimation(from, to, changed);
|
||||
}
|
||||
|
||||
public static boolean shouldCauseBlockBreakReset(@Nonnull ItemStack from, @Nonnull ItemStack to)
|
||||
{
|
||||
return from.getItem().shouldCauseBlockBreakReset(from, to);
|
||||
}
|
||||
|
||||
public static BlockFaceUV applyUVLock(BlockFaceUV blockFaceUV, EnumFacing originalSide, ITransformation rotation)
|
||||
{
|
||||
TRSRTransformation global = new TRSRTransformation(rotation.getMatrix());
|
||||
|
||||
Loaded 100 of 259 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user