Update to 1.15

Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled.

Co-authored-by: David Quintana <gigaherz@gmail.com>
Co-authored-by: tterrag <tterrag1098@gmail.com>
Co-authored-by: Unnoen <theunnoen@gmail.com>
This commit is contained in:
LexManos 2019-12-11 03:27:07 +01:00 committed by David Quintana
parent 9e5ecaaf75
commit 1933d05e36
565 changed files with 11114 additions and 13142 deletions

View File

@ -7,8 +7,8 @@ buildscript {
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+' classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
classpath 'org.ow2.asm:asm:7.1' classpath 'org.ow2.asm:asm:7.2'
classpath 'org.ow2.asm:asm-tree:7.1' classpath 'org.ow2.asm:asm-tree:7.2'
} }
} }
import groovy.json.JsonSlurper import groovy.json.JsonSlurper
@ -59,8 +59,8 @@ ext {
} }
MAPPING_CHANNEL = 'snapshot' MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20190719-1.14.3' MAPPING_VERSION = '20190719-1.14.3'
MC_VERSION = '1.14.4' MC_VERSION = '1.15'
MCP_VERSION = '20190829.143755' MCP_VERSION = '20191212.203412'
} }
project(':mcp') { project(':mcp') {
@ -82,7 +82,7 @@ project(':clean') {
} }
dependencies { dependencies {
implementation 'net.minecraftforge:forgespi:1.1.+' implementation 'net.minecraftforge:forgespi:2.0.+'
} }
patcher { patcher {
parent = project(':mcp') parent = project(':mcp')
@ -185,7 +185,7 @@ project(':forge') {
} }
ext { ext {
SPEC_VERSION = '28.1' // This is overwritten by git tag, but here so dev time doesnt explode SPEC_VERSION = '29.0' // This is overwritten by git tag, but here so dev time doesnt explode
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB> // The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
// ForgeMC is a unique identifier for every MC version we have supported. // ForgeMC is a unique identifier for every MC version we have supported.
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique. // Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
@ -402,21 +402,21 @@ project(':forge') {
fmllauncherImplementation.extendsFrom(installer) fmllauncherImplementation.extendsFrom(installer)
} }
dependencies { dependencies {
installer 'org.ow2.asm:asm:6.2' installer 'org.ow2.asm:asm:7.2'
installer 'org.ow2.asm:asm-commons:6.2' installer 'org.ow2.asm:asm-commons:7.2'
installer 'org.ow2.asm:asm-tree:6.2' installer 'org.ow2.asm:asm-tree:7.2'
installer 'cpw.mods:modlauncher:4.1.+' installer 'cpw.mods:modlauncher:5.0.+'
installer 'cpw.mods:grossjava9hacks:1.1.+' installer 'cpw.mods:grossjava9hacks:1.1.+'
installer 'net.minecraftforge:accesstransformers:1.0.+:shadowed' installer 'net.minecraftforge:accesstransformers:2.0.+:shadowed'
installer 'net.minecraftforge:eventbus:1.0.+:service' installer 'net.minecraftforge:eventbus:2.0.+:service'
installer 'net.minecraftforge:forgespi:1.5.+' installer 'net.minecraftforge:forgespi:2.0.+'
installer 'net.minecraftforge:coremods:1.0.+' installer 'net.minecraftforge:coremods:2.0.+'
installer 'net.minecraftforge:unsafe:0.2.+' installer 'net.minecraftforge:unsafe:0.2.+'
installer 'com.electronwill.night-config:core:3.6.0' installer 'com.electronwill.night-config:core:3.6.2'
installer 'com.electronwill.night-config:toml:3.6.0' installer 'com.electronwill.night-config:toml:3.6.2'
installer 'org.jline:jline:3.12.+' installer 'org.jline:jline:3.12.+'
installer 'org.apache.maven:maven-artifact:3.6.0' installer 'org.apache.maven:maven-artifact:3.6.0'
installer 'net.jodah:typetools:0.6.0' installer 'net.jodah:typetools:0.6.1'
installer 'java3d:vecmath:1.5.2' installer 'java3d:vecmath:1.5.2'
installer 'org.apache.logging.log4j:log4j-api:2.11.2' installer 'org.apache.logging.log4j:log4j-api:2.11.2'
installer 'org.apache.logging.log4j:log4j-core:2.11.2' installer 'org.apache.logging.log4j:log4j-core:2.11.2'

View File

@ -1,24 +0,0 @@
--- a/com/mojang/blaze3d/platform/GLX.java
+++ b/com/mojang/blaze3d/platform/GLX.java
@@ -115,6 +115,10 @@
p_212906_0_.put(1286, "Operation on incomplete framebuffer");
});
+ /* Stores the last values sent into glMultiTexCoord2f */
+ public static float lastBrightnessX = 0.0f;
+ public static float lastBrightnessY = 0.0f;
+
public static void populateSnooperWithOpenGL(IDataHolder p_populateSnooperWithOpenGL_0_) {
p_populateSnooperWithOpenGL_0_.setFixedData("opengl_version", GlStateManager.getString(7938));
p_populateSnooperWithOpenGL_0_.setFixedData("opengl_vendor", GlStateManager.getString(7936));
@@ -913,6 +917,10 @@
GL13.glMultiTexCoord2f(p_glMultiTexCoord2f_0_, p_glMultiTexCoord2f_1_, p_glMultiTexCoord2f_2_);
}
+ if (p_glMultiTexCoord2f_0_ == GL_TEXTURE1) {
+ lastBrightnessX = p_glMultiTexCoord2f_1_;
+ lastBrightnessY = p_glMultiTexCoord2f_2_;
+ }
}
public static void glBlendFuncSeparate(int p_glBlendFuncSeparate_0_, int p_glBlendFuncSeparate_1_, int p_glBlendFuncSeparate_2_, int p_glBlendFuncSeparate_3_) {

View File

@ -0,0 +1,20 @@
--- a/com/mojang/blaze3d/platform/GlStateManager.java
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
@@ -578,10 +578,17 @@
GL13.glClientActiveTexture(p_227747_0_);
}
+ /* Stores the last values sent into glMultiTexCoord2f */
+ public static float lastBrightnessX = 0.0f;
+ public static float lastBrightnessY = 0.0f;
@Deprecated
public static void func_227640_a_(int p_227640_0_, float p_227640_1_, float p_227640_2_) {
RenderSystem.assertThread(RenderSystem::isOnRenderThread);
GL13.glMultiTexCoord2f(p_227640_0_, p_227640_1_, p_227640_2_);
+ if (p_227640_0_ == GL13.GL_TEXTURE1) {
+ lastBrightnessX = p_227640_1_;
+ lastBrightnessY = p_227640_2_;
+ }
}
public static void func_227706_d_(int p_227706_0_, int p_227706_1_, int p_227706_2_, int p_227706_3_) {

View File

@ -0,0 +1,11 @@
--- a/com/mojang/blaze3d/vertex/IVertexBuilder.java
+++ b/com/mojang/blaze3d/vertex/IVertexBuilder.java
@@ -17,7 +17,7 @@
import org.lwjgl.system.MemoryStack;
@OnlyIn(Dist.CLIENT)
-public interface IVertexBuilder {
+public interface IVertexBuilder extends net.minecraftforge.client.extensions.IForgeVertexBuilder {
Logger field_227884_f_ = LogManager.getLogger();
IVertexBuilder func_225582_a_(double p_225582_1_, double p_225582_3_, double p_225582_5_);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/advancements/criterion/ItemPredicate.java --- a/net/minecraft/advancements/criterion/ItemPredicate.java
+++ b/net/minecraft/advancements/criterion/ItemPredicate.java +++ b/net/minecraft/advancements/criterion/ItemPredicate.java
@@ -25,6 +25,8 @@ @@ -26,6 +26,8 @@
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
public class ItemPredicate { public class ItemPredicate {
@ -9,7 +9,7 @@
public static final ItemPredicate field_192495_a = new ItemPredicate(); public static final ItemPredicate field_192495_a = new ItemPredicate();
@Nullable @Nullable
private final Tag<Item> field_200018_b; private final Tag<Item> field_200018_b;
@@ -93,6 +95,11 @@ @@ -105,6 +107,11 @@
public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) { public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) {
if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) { if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) {
JsonObject jsonobject = JSONUtils.func_151210_l(p_192492_0_, "item"); JsonObject jsonobject = JSONUtils.func_151210_l(p_192492_0_, "item");
@ -21,7 +21,7 @@
MinMaxBounds.IntBound minmaxbounds$intbound = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("count")); MinMaxBounds.IntBound minmaxbounds$intbound = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("count"));
MinMaxBounds.IntBound minmaxbounds$intbound1 = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("durability")); MinMaxBounds.IntBound minmaxbounds$intbound1 = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("durability"));
if (jsonobject.has("data")) { if (jsonobject.has("data")) {
@@ -181,6 +188,14 @@ @@ -204,6 +211,14 @@
} }
} }
@ -35,4 +35,4 @@
+ +
public static class Builder { public static class Builder {
private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList(); private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
@Nullable private final List<EnchantmentPredicate> field_226657_b_ = Lists.newArrayList();

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/AbstractRailBlock.java --- a/net/minecraft/block/AbstractRailBlock.java
+++ b/net/minecraft/block/AbstractRailBlock.java +++ b/net/minecraft/block/AbstractRailBlock.java
@@ -35,7 +35,7 @@ @@ -36,7 +36,7 @@
} }
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
@ -9,7 +9,7 @@
return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a; return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a;
} }
@@ -57,7 +57,7 @@ @@ -56,7 +56,7 @@
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) { public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
if (!p_220069_2_.field_72995_K) { if (!p_220069_2_.field_72995_K) {
@ -27,8 +27,8 @@
p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this); p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this);
} }
@@ -127,5 +127,66 @@ @@ -134,5 +134,66 @@
} return blockstate.func_206870_a(this.func_176560_l(), flag ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH);
} }
+ //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability + //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability

View File

@ -1,13 +1,13 @@
--- a/net/minecraft/block/BedBlock.java --- a/net/minecraft/block/BedBlock.java
+++ b/net/minecraft/block/BedBlock.java +++ b/net/minecraft/block/BedBlock.java
@@ -85,7 +85,9 @@ @@ -88,7 +88,9 @@
} }
} }
- if (p_220051_2_.field_73011_w.func_76567_e() && p_220051_2_.func_180494_b(p_220051_3_) != Biomes.field_76778_j) { - if (p_225533_2_.field_73011_w.func_76567_e() && p_225533_2_.func_226691_t_(p_225533_3_) != Biomes.field_76778_j) {
+ net.minecraftforge.common.extensions.IForgeDimension.SleepResult sleepResult = p_220051_2_.field_73011_w.canSleepAt(p_220051_4_, p_220051_3_); + net.minecraftforge.common.extensions.IForgeDimension.SleepResult sleepResult = p_225533_2_.field_73011_w.canSleepAt(p_225533_4_, p_225533_3_);
+ if (sleepResult != net.minecraftforge.common.extensions.IForgeDimension.SleepResult.BED_EXPLODES) { + if (sleepResult != net.minecraftforge.common.extensions.IForgeDimension.SleepResult.BED_EXPLODES) {
+ if (sleepResult == net.minecraftforge.common.extensions.IForgeDimension.SleepResult.DENY) return true; + if (sleepResult == net.minecraftforge.common.extensions.IForgeDimension.SleepResult.DENY) return ActionResultType.SUCCESS;
if (p_220051_1_.func_177229_b(field_176471_b)) { if (p_225533_1_.func_177229_b(field_176471_b)) {
p_220051_4_.func_146105_b(new TranslationTextComponent("block.minecraft.bed.occupied"), true); if (!this.func_226861_a_(p_225533_2_, p_225533_3_)) {
return true; p_225533_4_.func_146105_b(new TranslationTextComponent("block.minecraft.bed.occupied"), true);

View File

@ -14,17 +14,17 @@
private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() { private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() {
public Boolean load(VoxelShape p_load_1_) { public Boolean load(VoxelShape p_load_1_) {
@@ -246,6 +247,10 @@ @@ -246,6 +247,10 @@
this.field_149765_K = p_i48440_1_.field_200961_i; this.field_149781_w = p_i48440_1_.field_200958_f;
this.field_208621_p = p_i48440_1_.field_208772_j; this.field_149782_v = p_i48440_1_.field_200959_g;
this.field_220085_g = p_i48440_1_.field_222381_j; this.field_149789_z = p_i48440_1_.field_200960_h;
+ this.harvestLevel = p_i48440_1_.harvestLevel; + this.harvestLevel = p_i48440_1_.harvestLevel;
+ this.harvestTool = p_i48440_1_.harvestTool; + this.harvestTool = p_i48440_1_.harvestTool;
+ final ResourceLocation lootTableCache = p_i48440_1_.field_222381_j; + final ResourceLocation lootTableCache = p_i48440_1_.field_222381_j;
+ this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i48440_1_.lootTableSupplier != null ? p_i48440_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a()); + this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i48440_1_.lootTableSupplier != null ? p_i48440_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a());
this.field_176227_L = builder.func_206893_a(BlockState::new); this.field_149765_K = p_i48440_1_.field_200961_i;
this.func_180632_j(this.field_176227_L.func_177621_b()); this.field_226886_f_ = p_i48440_1_.field_226893_j_;
} this.field_226887_g_ = p_i48440_1_.field_226894_k_;
@@ -291,7 +296,7 @@ @@ -297,7 +302,7 @@
@Deprecated @Deprecated
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) { public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
@ -33,7 +33,7 @@
} }
@Deprecated @Deprecated
@@ -303,8 +308,9 @@ @@ -314,8 +319,9 @@
return this.field_149789_z; return this.field_149789_z;
} }
@ -44,16 +44,7 @@
} }
@Deprecated @Deprecated
@@ -315,7 +321,7 @@ @@ -471,10 +477,9 @@
@Deprecated
@OnlyIn(Dist.CLIENT)
public int func_220058_a(BlockState p_220058_1_, IEnviromentBlockReader p_220058_2_, BlockPos p_220058_3_) {
- return p_220058_2_.func_217338_b(p_220058_3_, p_220058_1_.func_185906_d());
+ return p_220058_2_.func_217338_b(p_220058_3_, p_220058_1_.getLightValue(p_220058_2_, p_220058_3_));
}
@OnlyIn(Dist.CLIENT)
@@ -460,10 +466,9 @@
@Deprecated @Deprecated
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) { public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
@ -65,7 +56,7 @@
} }
@Deprecated @Deprecated
@@ -472,8 +477,8 @@ @@ -483,8 +488,8 @@
if (f == -1.0F) { if (f == -1.0F) {
return 0.0F; return 0.0F;
} else { } else {
@ -76,7 +67,7 @@
} }
} }
@@ -483,8 +488,7 @@ @@ -494,8 +499,7 @@
public ResourceLocation func_220068_i() { public ResourceLocation func_220068_i() {
if (this.field_220085_g == null) { if (this.field_220085_g == null) {
@ -86,7 +77,7 @@
} }
return this.field_220085_g; return this.field_220085_g;
@@ -553,7 +557,7 @@ @@ -555,7 +559,7 @@
} }
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) { public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
@ -95,7 +86,7 @@
float f = 0.5F; float f = 0.5F;
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
@@ -565,7 +569,7 @@ @@ -567,7 +571,7 @@
} }
public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) { public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
@ -104,7 +95,7 @@
while(p_180637_3_ > 0) { while(p_180637_3_ > 0) {
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_); int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
p_180637_3_ -= i; p_180637_3_ -= i;
@@ -575,6 +579,7 @@ @@ -577,6 +581,7 @@
} }
@ -112,7 +103,7 @@
public float func_149638_a() { public float func_149638_a() {
return this.field_149781_w; return this.field_149781_w;
} }
@@ -677,6 +682,7 @@ @@ -675,6 +680,7 @@
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D)); p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
} }
@ -120,7 +111,7 @@
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) { public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
return new ItemStack(this); return new ItemStack(this);
} }
@@ -690,6 +696,7 @@ @@ -688,6 +694,7 @@
return Fluids.field_204541_a.func_207188_f(); return Fluids.field_204541_a.func_207188_f();
} }
@ -128,7 +119,7 @@
public float func_208618_m() { public float func_208618_m() {
return this.field_149765_K; return this.field_149765_K;
} }
@@ -710,6 +717,7 @@ @@ -716,6 +723,7 @@
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) { public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
} }
@ -136,7 +127,7 @@
public boolean func_149659_a(Explosion p_149659_1_) { public boolean func_149659_a(Explosion p_149659_1_) {
return true; return true;
} }
@@ -754,6 +762,7 @@ @@ -760,6 +768,7 @@
} }
} }
@ -144,7 +135,7 @@
public SoundType func_220072_p(BlockState p_220072_1_) { public SoundType func_220072_p(BlockState p_220072_1_) {
return this.field_149762_H; return this.field_149762_H;
} }
@@ -763,7 +772,7 @@ @@ -769,7 +778,7 @@
this.field_220086_i = Item.func_150898_a(this); this.field_220086_i = Item.func_150898_a(this);
} }
@ -153,7 +144,7 @@
} }
public boolean func_208619_r() { public boolean func_208619_r() {
@@ -771,7 +780,7 @@ @@ -777,13 +786,81 @@
} }
public String toString() { public String toString() {
@ -162,17 +153,7 @@
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@@ -779,13 +788,81 @@ public void func_190948_a(ItemStack p_190948_1_, @Nullable IBlockReader p_190948_2_, List<ITextComponent> p_190948_3_, ITooltipFlag p_190948_4_) {
}
public static boolean func_196252_e(Block p_196252_0_) {
- return p_196252_0_ == Blocks.field_150348_b || p_196252_0_ == Blocks.field_196650_c || p_196252_0_ == Blocks.field_196654_e || p_196252_0_ == Blocks.field_196656_g;
+ return net.minecraftforge.common.Tags.Blocks.STONE.func_199685_a_(p_196252_0_);
}
public static boolean func_196245_f(Block p_196245_0_) {
- return p_196245_0_ == Blocks.field_150346_d || p_196245_0_ == Blocks.field_196660_k || p_196245_0_ == Blocks.field_196661_l;
+ return net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(p_196245_0_);
} }
+ /* ======================================== FORGE START =====================================*/ + /* ======================================== FORGE START =====================================*/
@ -217,10 +198,10 @@
+ case Nether: return this.getBlock() == Blocks.field_150425_aM; + case Nether: return this.getBlock() == Blocks.field_150425_aM;
+ case Crop: return this.getBlock() == Blocks.field_150458_ak; + case Crop: return this.getBlock() == Blocks.field_150458_ak;
+ case Cave: return Block.func_220056_d(state, world, pos, Direction.UP); + case Cave: return Block.func_220056_d(state, world, pos, Direction.UP);
+ case Plains: return this.getBlock() == Blocks.field_196658_i || Block.func_196245_f(this) || this.getBlock() == Blocks.field_150458_ak; + case Plains: return this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(this) || this.getBlock() == Blocks.field_150458_ak;
+ case Water: return state.func_185904_a() == Material.field_151586_h; //&& state.getValue(BlockLiquidWrapper) + case Water: return state.func_185904_a() == Material.field_151586_h; //&& state.getValue(BlockLiquidWrapper)
+ case Beach: + case Beach:
+ boolean isBeach = this.getBlock() == Blocks.field_196658_i || Block.func_196245_f(this) || this.getBlock() == Blocks.field_150354_m; + boolean isBeach = this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(this) || this.getBlock() == Blocks.field_150354_m;
+ boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_185904_a() == Material.field_151586_h || + boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_185904_a() == Material.field_151586_h ||
+ world.func_180495_p(pos.func_177976_e()).func_185904_a() == Material.field_151586_h || + world.func_180495_p(pos.func_177976_e()).func_185904_a() == Material.field_151586_h ||
+ world.func_180495_p(pos.func_177978_c()).func_185904_a() == Material.field_151586_h || + world.func_180495_p(pos.func_177978_c()).func_185904_a() == Material.field_151586_h ||
@ -246,9 +227,9 @@
public static enum OffsetType { public static enum OffsetType {
NONE, NONE,
XZ, XZ,
@@ -804,6 +881,9 @@ @@ -805,6 +882,9 @@
private float field_200961_i = 0.6F;
private ResourceLocation field_222381_j; private ResourceLocation field_222381_j;
private boolean field_226895_m_ = true;
private boolean field_208772_j; private boolean field_208772_j;
+ private int harvestLevel = -1; + private int harvestLevel = -1;
+ private net.minecraftforge.common.ToolType harvestTool; + private net.minecraftforge.common.ToolType harvestTool;
@ -256,16 +237,16 @@
private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) { private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
this.field_200953_a = p_i48616_1_; this.field_200953_a = p_i48616_1_;
@@ -834,6 +914,8 @@ @@ -837,6 +917,8 @@
block$properties.field_200956_d = p_200950_0_.field_149762_H; block$properties.field_226893_j_ = p_200950_0_.func_226891_m_();
block$properties.field_200961_i = p_200950_0_.func_208618_m();
block$properties.field_208772_j = p_200950_0_.field_208621_p; block$properties.field_208772_j = p_200950_0_.field_208621_p;
block$properties.field_226895_m_ = p_200950_0_.field_226888_j_;
+ block$properties.harvestLevel = p_200950_0_.harvestLevel; + block$properties.harvestLevel = p_200950_0_.harvestLevel;
+ block$properties.harvestTool = p_200950_0_.harvestTool; + block$properties.harvestTool = p_200950_0_.harvestTool;
return block$properties; return block$properties;
} }
@@ -882,13 +964,23 @@ @@ -901,13 +983,23 @@
return this; return this;
} }

View File

@ -1,23 +1,23 @@
--- a/net/minecraft/block/Blocks.java --- a/net/minecraft/block/Blocks.java
+++ b/net/minecraft/block/Blocks.java +++ b/net/minecraft/block/Blocks.java
@@ -13,6 +13,7 @@ @@ -14,6 +14,7 @@
import net.minecraft.potion.Effects; import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
+@net.minecraftforge.registries.ObjectHolder("minecraft") +@net.minecraftforge.registries.ObjectHolder("minecraft")
public class Blocks { public class Blocks {
public static final Block field_150350_a = func_222382_a("air", new AirBlock(Block.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e())); public static final Block field_150350_a = func_222382_a("air", new AirBlock(Block.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e()));
public static final Block field_150348_b = func_222382_a("stone", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_200948_a(1.5F, 6.0F))); public static final Block field_150348_b = func_222382_a("stone", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_200948_a(1.5F, 6.0F)));
@@ -104,7 +105,7 @@ @@ -105,7 +106,7 @@
public static final Block field_196601_az = func_222382_a("green_bed", new BedBlock(DyeColor.GREEN, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F))); public static final Block field_196601_az = func_222382_a("green_bed", new BedBlock(DyeColor.GREEN, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
public static final Block field_196550_aA = func_222382_a("red_bed", new BedBlock(DyeColor.RED, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F))); public static final Block field_196550_aA = func_222382_a("red_bed", new BedBlock(DyeColor.RED, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
public static final Block field_196551_aB = func_222382_a("black_bed", new BedBlock(DyeColor.BLACK, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F))); public static final Block field_196551_aB = func_222382_a("black_bed", new BedBlock(DyeColor.BLACK, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
- public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e))); - public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
+ public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true)); + public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true));
public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e))); public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
public static final Block field_150320_F = func_222382_a("sticky_piston", new PistonBlock(true, Block.Properties.func_200945_a(Material.field_76233_E).func_200943_b(0.5F))); public static final Block field_150320_F = func_222382_a("sticky_piston", new PistonBlock(true, Block.Properties.func_200945_a(Material.field_76233_E).func_200943_b(0.5F)));
public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(Block.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_200943_b(4.0F))); public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(Block.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_200943_b(4.0F)));
@@ -694,16 +695,4 @@ @@ -701,16 +702,4 @@
private static Block func_222382_a(String p_222382_0_, Block p_222382_1_) { private static Block func_222382_a(String p_222382_0_, Block p_222382_1_) {
return Registry.func_218325_a(Registry.field_212618_g, p_222382_0_, p_222382_1_); return Registry.func_218325_a(Registry.field_212618_g, p_222382_0_, p_222382_1_);
} }

View File

@ -19,8 +19,8 @@
} }
@@ -33,4 +35,11 @@ @@ -33,4 +35,11 @@
public boolean func_200123_i(BlockState p_200123_1_, IBlockReader p_200123_2_, BlockPos p_200123_3_) { public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return true; return p_196266_4_ == PathType.AIR && !this.field_196274_w ? true : super.func_196266_a(p_196266_1_, p_196266_2_, p_196266_3_, p_196266_4_);
} }
+ +
+ @Override + @Override

View File

@ -1,8 +1,8 @@
--- a/net/minecraft/block/CactusBlock.java --- a/net/minecraft/block/CactusBlock.java
+++ b/net/minecraft/block/CactusBlock.java +++ b/net/minecraft/block/CactusBlock.java
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
-public class CactusBlock extends Block { -public class CactusBlock extends Block {
+public class CactusBlock extends Block implements net.minecraftforge.common.IPlantable { +public class CactusBlock extends Block implements net.minecraftforge.common.IPlantable {
@ -12,30 +12,30 @@
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
} }
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update
if (!p_196267_1_.func_196955_c(p_196267_2_, p_196267_3_)) { if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
p_196267_2_.func_175655_b(p_196267_3_, true); p_225534_2_.func_175655_b(p_225534_3_, true);
} else { } else {
@@ -42,6 +43,7 @@ @@ -42,6 +43,7 @@
if (i < 3) { if (i < 3) {
int j = p_196267_1_.func_177229_b(field_176587_a); int j = p_225534_1_.func_177229_b(field_176587_a);
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) { + if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, true)) {
if (j == 15) { if (j == 15) {
p_196267_2_.func_175656_a(blockpos, this.func_176223_P()); p_225534_2_.func_175656_a(blockpos, this.func_176223_P());
BlockState blockstate = p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0)); BlockState blockstate = p_225534_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
@@ -50,7 +52,8 @@ @@ -50,7 +52,8 @@
} else { } else {
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4); p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
} }
- -
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
+ } + }
} }
} }
} }
@@ -85,8 +88,8 @@ @@ -81,8 +84,8 @@
} }
} }
@ -46,7 +46,7 @@
} }
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) { public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
@@ -104,4 +107,14 @@ @@ -96,4 +99,14 @@
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) { public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return false; return false;
} }

View File

@ -0,0 +1,11 @@
--- a/net/minecraft/block/CampfireBlock.java
+++ b/net/minecraft/block/CampfireBlock.java
@@ -187,7 +187,7 @@
boolean flag = p_220066_4_ instanceof AbstractFireballEntity || p_220066_4_ instanceof AbstractArrowEntity && p_220066_4_.func_70027_ad();
if (flag) {
Entity entity = this.func_226913_a_(p_220066_4_);
- boolean flag1 = entity == null || entity instanceof PlayerEntity || p_220066_1_.func_82736_K().func_223586_b(GameRules.field_223599_b);
+ boolean flag1 = entity == null || entity instanceof PlayerEntity || net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_220066_1_, entity);
if (flag1 && !p_220066_2_.func_177229_b(field_220101_b) && !p_220066_2_.func_177229_b(field_220103_d)) {
BlockPos blockpos = p_220066_3_.func_216350_a();
p_220066_1_.func_180501_a(blockpos, p_220066_2_.func_206870_a(BlockStateProperties.field_208190_q, Boolean.valueOf(true)), 11);

View File

@ -1,36 +1,36 @@
--- a/net/minecraft/block/ChorusFlowerBlock.java --- a/net/minecraft/block/ChorusFlowerBlock.java
+++ b/net/minecraft/block/ChorusFlowerBlock.java +++ b/net/minecraft/block/ChorusFlowerBlock.java
@@ -30,9 +30,9 @@ @@ -29,9 +29,9 @@
p_196267_2_.func_175655_b(p_196267_3_, true); p_225534_2_.func_175655_b(p_225534_3_, true);
} else { } else {
BlockPos blockpos = p_196267_3_.func_177984_a(); BlockPos blockpos = p_225534_3_.func_177984_a();
- if (p_196267_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) { - if (p_225534_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) {
+ if (p_196267_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < p_196267_2_.func_201675_m().getHeight()) { + if (p_225534_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < p_225534_2_.func_201675_m().getHeight()) {
int i = p_196267_1_.func_177229_b(field_185607_a); int i = p_225534_1_.func_177229_b(field_185607_a);
- if (i < 5) { - if (i < 5) {
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) { + if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, true)) {
boolean flag = false; boolean flag = false;
boolean flag1 = false; boolean flag1 = false;
BlockState blockstate = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()); BlockState blockstate = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
@@ -57,7 +57,7 @@ @@ -56,7 +56,7 @@
if (j < 2 || j <= p_196267_4_.nextInt(flag1 ? 5 : 4)) { if (j < 2 || j <= p_225534_4_.nextInt(flag1 ? 5 : 4)) {
flag = true; flag = true;
} }
- } else if (blockstate.func_196958_f()) { - } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(p_196267_2_, p_196267_3_.func_177977_b())) { + } else if (blockstate.isAir(p_225534_2_, p_225534_3_.func_177977_b())) {
flag = true; flag = true;
} }
@@ -89,7 +89,7 @@ @@ -88,7 +88,7 @@
} else { } else {
this.func_185605_c(p_196267_2_, p_196267_3_); this.func_185605_c(p_225534_2_, p_225534_3_);
} }
- -
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
} }
} }
} }
@@ -127,7 +127,7 @@ @@ -126,7 +126,7 @@
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()); BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
if (block != this.field_196405_b && block != Blocks.field_150377_bs) { if (block != this.field_196405_b && block != Blocks.field_150377_bs) {
@ -39,7 +39,7 @@
return false; return false;
} else { } else {
boolean flag = false; boolean flag = false;
@@ -140,7 +140,7 @@ @@ -139,7 +139,7 @@
} }
flag = true; flag = true;

View File

@ -3,14 +3,14 @@
@@ -30,10 +30,11 @@ @@ -30,10 +30,11 @@
} }
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
- if (p_196267_2_.field_73012_v.nextInt(5) == 0) { - if (p_225534_2_.field_73012_v.nextInt(5) == 0) {
+ if (true) { + if (true) {
int i = p_196267_1_.func_177229_b(field_176501_a); int i = p_225534_1_.func_177229_b(field_176501_a);
- if (i < 2) { - if (i < 2) {
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_2_.field_73012_v.nextInt(5) == 0)) { + if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_2_.field_73012_v.nextInt(5) == 0)) {
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2); p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
} }
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/ComparatorBlock.java --- a/net/minecraft/block/ComparatorBlock.java
+++ b/net/minecraft/block/ComparatorBlock.java +++ b/net/minecraft/block/ComparatorBlock.java
@@ -66,7 +66,7 @@ @@ -71,7 +71,7 @@
blockstate = p_176397_1_.func_180495_p(blockpos); blockstate = p_176397_1_.func_180495_p(blockpos);
if (blockstate.func_185912_n()) { if (blockstate.func_185912_n()) {
i = blockstate.func_185888_a(p_176397_1_, blockpos); i = blockstate.func_185888_a(p_176397_1_, blockpos);
@ -9,7 +9,7 @@
ItemFrameEntity itemframeentity = this.func_176461_a(p_176397_1_, direction, blockpos); ItemFrameEntity itemframeentity = this.func_176461_a(p_176397_1_, direction, blockpos);
if (itemframeentity != null) { if (itemframeentity != null) {
i = itemframeentity.func_174866_q(); i = itemframeentity.func_174866_q();
@@ -152,4 +152,16 @@ @@ -157,4 +157,16 @@
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) { protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c); p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c);
} }

View File

@ -1,22 +1,22 @@
--- a/net/minecraft/block/CropsBlock.java --- a/net/minecraft/block/CropsBlock.java
+++ b/net/minecraft/block/CropsBlock.java +++ b/net/minecraft/block/CropsBlock.java
@@ -57,12 +57,14 @@ @@ -58,12 +58,14 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
if (p_196267_2_.func_201669_a(p_196267_3_, 0) >= 9) { if (p_225534_2_.func_226659_b_(p_225534_3_, 0) >= 9) {
int i = this.func_185527_x(p_196267_1_); int i = this.func_185527_x(p_225534_1_);
if (i < this.func_185526_g()) { if (i < this.func_185526_g()) {
float f = func_180672_a(this, p_196267_2_, p_196267_3_); float f = func_180672_a(this, p_225534_2_, p_225534_3_);
- if (p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0) { - if (p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0) {
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) { + if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
p_196267_2_.func_180501_a(p_196267_3_, this.func_185528_e(i + 1), 2); p_225534_2_.func_180501_a(p_225534_3_, this.func_185528_e(i + 1), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
} }
} }
} }
@@ -91,9 +93,9 @@ @@ -92,9 +94,9 @@
for(int j = -1; j <= 1; ++j) { for(int j = -1; j <= 1; ++j) {
float f1 = 0.0F; float f1 = 0.0F;
BlockState blockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j)); BlockState blockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
@ -28,12 +28,12 @@
f1 = 3.0F; f1 = 3.0F;
} }
} }
@@ -129,7 +131,7 @@ @@ -130,7 +132,7 @@
} }
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) { public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
- if (p_196262_4_ instanceof RavagerEntity && p_196262_2_.func_82736_K().func_223586_b(GameRules.field_223599_b)) { - if (p_196262_4_ instanceof RavagerEntity && p_196262_2_.func_82736_K().func_223586_b(GameRules.field_223599_b)) {
+ if (p_196262_4_ instanceof RavagerEntity && net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_196262_2_, p_196262_4_)) { + if (p_196262_4_ instanceof RavagerEntity && net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_196262_2_, p_196262_4_)) {
p_196262_2_.func_175655_b(p_196262_3_, true); p_196262_2_.func_225521_a_(p_196262_3_, true, p_196262_4_);
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/DetectorRailBlock.java --- a/net/minecraft/block/DetectorRailBlock.java
+++ b/net/minecraft/block/DetectorRailBlock.java +++ b/net/minecraft/block/DetectorRailBlock.java
@@ -128,6 +128,8 @@ @@ -129,6 +129,8 @@
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) { public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) {
if (p_180641_1_.func_177229_b(field_176574_M)) { if (p_180641_1_.func_177229_b(field_176574_M)) {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/EnchantingTableBlock.java --- a/net/minecraft/block/EnchantingTableBlock.java
+++ b/net/minecraft/block/EnchantingTableBlock.java +++ b/net/minecraft/block/EnchantingTableBlock.java
@@ -53,7 +53,7 @@ @@ -54,7 +54,7 @@
if (p_180655_4_.nextInt(16) == 0) { if (p_180655_4_.nextInt(16) == 0) {
for(int k = 0; k <= 1; ++k) { for(int k = 0; k <= 1; ++k) {
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j); BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);

View File

@ -1,20 +1,20 @@
--- a/net/minecraft/block/FallingBlock.java --- a/net/minecraft/block/FallingBlock.java
+++ b/net/minecraft/block/FallingBlock.java +++ b/net/minecraft/block/FallingBlock.java
@@ -35,7 +35,7 @@ @@ -29,7 +29,7 @@
} }
private void func_176503_e(World p_176503_1_, BlockPos p_176503_2_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
- if (func_185759_i(p_176503_1_.func_180495_p(p_176503_2_.func_177977_b())) && p_176503_2_.func_177956_o() >= 0) { - if (func_185759_i(p_225534_2_.func_180495_p(p_225534_3_.func_177977_b())) && p_225534_3_.func_177956_o() >= 0) {
+ if (p_176503_1_.func_175623_d(p_176503_2_.func_177977_b()) || func_185759_i(p_176503_1_.func_180495_p(p_176503_2_.func_177977_b())) && p_176503_2_.func_177956_o() >= 0) { + if (p_225534_2_.func_175623_d(p_225534_3_.func_177977_b()) || func_185759_i(p_225534_2_.func_180495_p(p_225534_3_.func_177977_b())) && p_225534_3_.func_177956_o() >= 0) {
if (!p_176503_1_.field_72995_K) { FallingBlockEntity fallingblockentity = new FallingBlockEntity(p_225534_2_, (double)p_225534_3_.func_177958_n() + 0.5D, (double)p_225534_3_.func_177956_o(), (double)p_225534_3_.func_177952_p() + 0.5D, p_225534_2_.func_180495_p(p_225534_3_));
FallingBlockEntity fallingblockentity = new FallingBlockEntity(p_176503_1_, (double)p_176503_2_.func_177958_n() + 0.5D, (double)p_176503_2_.func_177956_o(), (double)p_176503_2_.func_177952_p() + 0.5D, p_176503_1_.func_180495_p(p_176503_2_)); this.func_149829_a(fallingblockentity);
this.func_149829_a(fallingblockentity); p_225534_2_.func_217376_c(fallingblockentity);
@@ -68,7 +68,7 @@ @@ -59,7 +59,7 @@
public void func_180655_c(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) { public void func_180655_c(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, Random p_180655_4_) {
if (p_180655_4_.nextInt(16) == 0) { if (p_180655_4_.nextInt(16) == 0) {
BlockPos blockpos = p_180655_3_.func_177977_b(); BlockPos blockpos = p_180655_3_.func_177977_b();
- if (func_185759_i(p_180655_2_.func_180495_p(blockpos))) { - if (func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
+ if (p_180655_2_.func_175623_d(blockpos) || func_185759_i(p_180655_2_.func_180495_p(blockpos))) { + if (p_180655_2_.func_175623_d(blockpos) || func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
double d0 = (double)((float)p_180655_3_.func_177958_n() + p_180655_4_.nextFloat()); double d0 = (double)p_180655_3_.func_177958_n() + (double)p_180655_4_.nextFloat();
double d1 = (double)p_180655_3_.func_177956_o() - 0.05D; double d1 = (double)p_180655_3_.func_177956_o() - 0.05D;
double d2 = (double)((float)p_180655_3_.func_177952_p() + p_180655_4_.nextFloat()); double d2 = (double)p_180655_3_.func_177952_p() + (double)p_180655_4_.nextFloat();

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/FarmlandBlock.java --- a/net/minecraft/block/FarmlandBlock.java
+++ b/net/minecraft/block/FarmlandBlock.java +++ b/net/minecraft/block/FarmlandBlock.java
@@ -73,7 +73,7 @@ @@ -76,7 +76,7 @@
} }
public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) { public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) {
@ -9,7 +9,7 @@
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_); func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
} }
@@ -84,9 +84,9 @@ @@ -87,9 +87,9 @@
p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_)); p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_));
} }
@ -22,7 +22,7 @@
} }
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) { private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
@@ -96,7 +96,7 @@ @@ -99,7 +99,7 @@
} }
} }

View File

@ -18,46 +18,46 @@
@@ -91,12 +91,14 @@ @@ -91,12 +91,14 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
if (p_196267_2_.func_82736_K().func_223586_b(GameRules.field_223598_a)) { if (p_225534_2_.func_82736_K().func_223586_b(GameRules.field_223598_a)) {
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire
if (!p_196267_1_.func_196955_c(p_196267_2_, p_196267_3_)) { if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
p_196267_2_.func_217377_a(p_196267_3_, false); p_225534_2_.func_217377_a(p_225534_3_, false);
} }
Block block = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()).func_177230_c(); Block block = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b()).func_177230_c();
- boolean flag = p_196267_2_.field_73011_w instanceof EndDimension && block == Blocks.field_150357_h || block == Blocks.field_150424_aL || block == Blocks.field_196814_hQ; - boolean flag = p_225534_2_.field_73011_w instanceof EndDimension && block == Blocks.field_150357_h || block == Blocks.field_150424_aL || block == Blocks.field_196814_hQ;
+ BlockState other = p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()); + BlockState other = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
+ boolean flag = other.isFireSource(p_196267_2_, p_196267_3_.func_177977_b(), Direction.UP); + boolean flag = other.isFireSource(p_225534_2_, p_225534_3_.func_177977_b(), Direction.UP);
int i = p_196267_1_.func_177229_b(field_176543_a); int i = p_225534_1_.func_177229_b(field_176543_a);
if (!flag && p_196267_2_.func_72896_J() && this.func_176537_d(p_196267_2_, p_196267_3_) && p_196267_4_.nextFloat() < 0.2F + (float)i * 0.03F) { if (!flag && p_225534_2_.func_72896_J() && this.func_176537_d(p_225534_2_, p_225534_3_) && p_225534_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
p_196267_2_.func_217377_a(p_196267_3_, false); p_225534_2_.func_217377_a(p_225534_3_, false);
@@ -118,7 +120,7 @@ @@ -118,7 +120,7 @@
return; return;
} }
- if (i == 15 && p_196267_4_.nextInt(4) == 0 && !this.func_196446_i(p_196267_2_.func_180495_p(p_196267_3_.func_177977_b()))) { - if (i == 15 && p_225534_4_.nextInt(4) == 0 && !this.func_196446_i(p_225534_2_.func_180495_p(p_225534_3_.func_177977_b()))) {
+ if (i == 15 && p_196267_4_.nextInt(4) == 0 && !this.canCatchFire(p_196267_2_, p_196267_3_.func_177977_b(), Direction.UP)) { + if (i == 15 && p_225534_4_.nextInt(4) == 0 && !this.canCatchFire(p_225534_2_, p_225534_3_.func_177977_b(), Direction.UP)) {
p_196267_2_.func_217377_a(p_196267_3_, false); p_225534_2_.func_217377_a(p_225534_3_, false);
return; return;
} }
@@ -126,12 +128,12 @@ @@ -126,12 +128,12 @@
boolean flag1 = p_196267_2_.func_180502_D(p_196267_3_); boolean flag1 = p_225534_2_.func_180502_D(p_225534_3_);
int k = flag1 ? -50 : 0; int k = flag1 ? -50 : 0;
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177974_f(), 300 + k, p_196267_4_, i); - this.func_176536_a(p_225534_2_, p_225534_3_.func_177974_f(), 300 + k, p_225534_4_, i);
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177976_e(), 300 + k, p_196267_4_, i); - this.func_176536_a(p_225534_2_, p_225534_3_.func_177976_e(), 300 + k, p_225534_4_, i);
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177977_b(), 250 + k, p_196267_4_, i); - this.func_176536_a(p_225534_2_, p_225534_3_.func_177977_b(), 250 + k, p_225534_4_, i);
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177984_a(), 250 + k, p_196267_4_, i); - this.func_176536_a(p_225534_2_, p_225534_3_.func_177984_a(), 250 + k, p_225534_4_, i);
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177978_c(), 300 + k, p_196267_4_, i); - this.func_176536_a(p_225534_2_, p_225534_3_.func_177978_c(), 300 + k, p_225534_4_, i);
- this.func_176536_a(p_196267_2_, p_196267_3_.func_177968_d(), 300 + k, p_196267_4_, i); - this.func_176536_a(p_225534_2_, p_225534_3_.func_177968_d(), 300 + k, p_225534_4_, i);
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177974_f(), 300 + k, p_196267_4_, i, Direction.WEST); + this.tryCatchFire(p_225534_2_, p_225534_3_.func_177974_f(), 300 + k, p_225534_4_, i, Direction.WEST);
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177976_e(), 300 + k, p_196267_4_, i, Direction.EAST); + this.tryCatchFire(p_225534_2_, p_225534_3_.func_177976_e(), 300 + k, p_225534_4_, i, Direction.EAST);
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177977_b(), 250 + k, p_196267_4_, i, Direction.UP); + this.tryCatchFire(p_225534_2_, p_225534_3_.func_177977_b(), 250 + k, p_225534_4_, i, Direction.UP);
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177984_a(), 250 + k, p_196267_4_, i, Direction.DOWN); + this.tryCatchFire(p_225534_2_, p_225534_3_.func_177984_a(), 250 + k, p_225534_4_, i, Direction.DOWN);
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177978_c(), 300 + k, p_196267_4_, i, Direction.SOUTH); + this.tryCatchFire(p_225534_2_, p_225534_3_.func_177978_c(), 300 + k, p_225534_4_, i, Direction.SOUTH);
+ this.tryCatchFire(p_196267_2_, p_196267_3_.func_177968_d(), 300 + k, p_196267_4_, i, Direction.NORTH); + this.tryCatchFire(p_225534_2_, p_225534_3_.func_177968_d(), 300 + k, p_225534_4_, i, Direction.NORTH);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable();
for(int l = -1; l <= 1; ++l) { for(int l = -1; l <= 1; ++l) {
@@ -169,16 +171,18 @@ @@ -169,16 +171,18 @@
@ -167,7 +167,7 @@
for(int j1 = 0; j1 < 2; ++j1) { for(int j1 = 0; j1 < 2; ++j1) {
double d7 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); double d7 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d12 = (double)(p_180655_3_.func_177956_o() + 1) - p_180655_4_.nextDouble() * (double)0.1F; double d12 = (double)(p_180655_3_.func_177956_o() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
@@ -311,10 +312,23 @@ @@ -307,10 +308,23 @@
} }
public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) { public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) {

View File

@ -19,7 +19,7 @@
+ /** + /**
+ * For mod use, eliminates the need to extend this class, and prevents modded + * For mod use, eliminates the need to extend this class, and prevents modded
+ * flower pots from altering vanilla behavior. + * flower pots from altering vanilla behavior.
+ * + *
+ * @param emptyPot The empty pot for this pot, or null for self. + * @param emptyPot The empty pot for this pot, or null for self.
+ * @param p_i48395_1_ The flower block. + * @param p_i48395_1_ The flower block.
+ * @param p_i48395_2_ + * @param p_i48395_2_
@ -41,8 +41,8 @@
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
@@ -40,7 +67,7 @@ @@ -40,7 +67,7 @@
public boolean func_220051_a(BlockState p_220051_1_, World p_220051_2_, BlockPos p_220051_3_, PlayerEntity p_220051_4_, Hand p_220051_5_, BlockRayTraceResult p_220051_6_) { public ActionResultType func_225533_a_(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) {
ItemStack itemstack = p_220051_4_.func_184586_b(p_220051_5_); ItemStack itemstack = p_225533_4_.func_184586_b(p_225533_5_);
Item item = itemstack.func_77973_b(); Item item = itemstack.func_77973_b();
- Block block = item instanceof BlockItem ? field_196451_b.getOrDefault(((BlockItem)item).func_179223_d(), Blocks.field_150350_a) : Blocks.field_150350_a; - Block block = item instanceof BlockItem ? field_196451_b.getOrDefault(((BlockItem)item).func_179223_d(), Blocks.field_150350_a) : Blocks.field_150350_a;
+ Block block = item instanceof BlockItem ? getEmptyPot().fullPots.getOrDefault(((BlockItem)item).func_179223_d().getRegistryName(), Blocks.field_150350_a.delegate).get() : Blocks.field_150350_a; + Block block = item instanceof BlockItem ? getEmptyPot().fullPots.getOrDefault(((BlockItem)item).func_179223_d().getRegistryName(), Blocks.field_150350_a.delegate).get() : Blocks.field_150350_a;
@ -50,26 +50,26 @@
boolean flag1 = this.field_196452_c == Blocks.field_150350_a; boolean flag1 = this.field_196452_c == Blocks.field_150350_a;
if (flag != flag1) { if (flag != flag1) {
@@ -58,7 +85,7 @@ @@ -58,7 +85,7 @@
p_220051_4_.func_71019_a(itemstack1, false); p_225533_4_.func_71019_a(itemstack1, false);
} }
- p_220051_2_.func_180501_a(p_220051_3_, Blocks.field_150457_bL.func_176223_P(), 3); - p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150457_bL.func_176223_P(), 3);
+ p_220051_2_.func_180501_a(p_220051_3_, getEmptyPot().func_176223_P(), 3); + p_225533_2_.func_180501_a(p_225533_3_, getEmptyPot().func_176223_P(), 3);
} }
}
@@ -78,6 +105,17 @@ return ActionResultType.SUCCESS;
@@ -76,6 +103,17 @@
} }
public Block func_220276_d() { public Block func_220276_d() {
- return this.field_196452_c; - return this.field_196452_c;
+ return flowerDelegate.get(); + return flowerDelegate.get();
} }
+ +
+ public FlowerPotBlock getEmptyPot() { + public FlowerPotBlock getEmptyPot() {
+ return emptyPot == null ? this : emptyPot.get(); + return emptyPot == null ? this : emptyPot.get();
+ } + }
+ +
+ public void addPlant(net.minecraft.util.ResourceLocation flower, java.util.function.Supplier<? extends Block> fullPot) { + public void addPlant(net.minecraft.util.ResourceLocation flower, java.util.function.Supplier<? extends Block> fullPot) {
+ if (getEmptyPot() != this) { + if (getEmptyPot() != this) {
+ throw new IllegalArgumentException("Cannot add plant to non-empty pot: " + this); + throw new IllegalArgumentException("Cannot add plant to non-empty pot: " + this);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/FlowingFluidBlock.java --- a/net/minecraft/block/FlowingFluidBlock.java
+++ b/net/minecraft/block/FlowingFluidBlock.java +++ b/net/minecraft/block/FlowingFluidBlock.java
@@ -30,9 +30,11 @@ @@ -31,9 +31,11 @@
public class FlowingFluidBlock extends Block implements IBucketPickupHandler { public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag; public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
@ -13,7 +13,7 @@
protected FlowingFluidBlock(FlowingFluid p_i49014_1_, Block.Properties p_i49014_2_) { protected FlowingFluidBlock(FlowingFluid p_i49014_1_, Block.Properties p_i49014_2_) {
super(p_i49014_2_); super(p_i49014_2_);
this.field_204517_c = p_i49014_1_; this.field_204517_c = p_i49014_1_;
@@ -45,8 +47,21 @@ @@ -46,8 +48,21 @@
this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true)); this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true));
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0))); this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
@ -32,10 +32,10 @@
+ this.supplier = supplier; + this.supplier = supplier;
+ } + }
+ +
public void func_196265_a(BlockState p_196265_1_, World p_196265_2_, BlockPos p_196265_3_, Random p_196265_4_) { public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
p_196265_2_.func_204610_c(p_196265_3_).func_206891_b(p_196265_2_, p_196265_3_, p_196265_4_); p_225542_2_.func_204610_c(p_225542_3_).func_206891_b(p_225542_2_, p_225542_3_, p_225542_4_);
} }
@@ -61,6 +76,7 @@ @@ -62,6 +77,7 @@
public IFluidState func_204507_t(BlockState p_204507_1_) { public IFluidState func_204507_t(BlockState p_204507_1_) {
int i = p_204507_1_.func_177229_b(field_176367_b); int i = p_204507_1_.func_177229_b(field_176367_b);
@ -43,7 +43,7 @@
return this.field_212565_c.get(Math.min(i, 8)); return this.field_212565_c.get(Math.min(i, 8));
} }
@@ -121,13 +137,13 @@ @@ -122,13 +138,13 @@
if (flag) { if (flag) {
IFluidState ifluidstate = p_204515_1_.func_204610_c(p_204515_2_); IFluidState ifluidstate = p_204515_1_.func_204610_c(p_204515_2_);
if (ifluidstate.func_206889_d()) { if (ifluidstate.func_206889_d()) {
@ -59,7 +59,7 @@
this.func_180688_d(p_204515_1_, p_204515_2_); this.func_180688_d(p_204515_1_, p_204515_2_);
return false; return false;
} }
@@ -160,4 +176,27 @@ @@ -161,4 +177,23 @@
} }
} }
@ -72,17 +72,13 @@
+ +
+ private boolean fluidStateCacheInitialized = false; + private boolean fluidStateCacheInitialized = false;
+ protected synchronized void initFluidStateCache() { + protected synchronized void initFluidStateCache() {
+ if (fluidStateCacheInitialized == false) + if (fluidStateCacheInitialized == false) {
+ {
+ this.field_212565_c.add(getFluid().func_207204_a(false)); + this.field_212565_c.add(getFluid().func_207204_a(false));
+ +
+ for (int i = 1; i < 8; ++i) + for (int i = 1; i < 8; ++i)
+ {
+ this.field_212565_c.add(getFluid().func_207207_a(8 - i, false)); + this.field_212565_c.add(getFluid().func_207207_a(8 - i, false));
+ }
+ +
+ this.field_212565_c.add(getFluid().func_207207_a(8, true)); + this.field_212565_c.add(getFluid().func_207207_a(8, true));
+
+ fluidStateCacheInitialized = true; + fluidStateCacheInitialized = true;
+ } + }
+ } + }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/JigsawBlock.java --- a/net/minecraft/block/JigsawBlock.java
+++ b/net/minecraft/block/JigsawBlock.java +++ b/net/minecraft/block/JigsawBlock.java
@@ -29,6 +29,13 @@ @@ -30,6 +30,13 @@
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N))); return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
} }

View File

@ -1,13 +1,13 @@
--- a/net/minecraft/block/KelpTopBlock.java --- a/net/minecraft/block/KelpTopBlock.java
+++ b/net/minecraft/block/KelpTopBlock.java +++ b/net/minecraft/block/KelpTopBlock.java
@@ -57,8 +57,9 @@ @@ -52,8 +52,9 @@
} else { } else {
BlockPos blockpos = p_196267_3_.func_177984_a(); BlockPos blockpos = p_225534_3_.func_177984_a();
BlockState blockstate = p_196267_2_.func_180495_p(blockpos); BlockState blockstate = p_225534_2_.func_180495_p(blockpos);
- if (blockstate.func_177230_c() == Blocks.field_150355_j && p_196267_1_.func_177229_b(field_203163_a) < 25 && p_196267_4_.nextDouble() < 0.14D) { - if (blockstate.func_177230_c() == Blocks.field_150355_j && p_225534_1_.func_177229_b(field_203163_a) < 25 && p_225534_4_.nextDouble() < 0.14D) {
+ if (blockstate.func_177230_c() == Blocks.field_150355_j && p_196267_1_.func_177229_b(field_203163_a) < 25 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, p_196267_4_.nextDouble() < 0.14D)) { + if (blockstate.func_177230_c() == Blocks.field_150355_j && p_225534_1_.func_177229_b(field_203163_a) < 25 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, p_225534_4_.nextDouble() < 0.14D)) {
p_196267_2_.func_175656_a(blockpos, p_196267_1_.func_177231_a(field_203163_a)); p_225534_2_.func_175656_a(blockpos, p_225534_1_.func_177231_a(field_203163_a));
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, blockpos, p_225534_1_);
} }
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/LadderBlock.java --- a/net/minecraft/block/LadderBlock.java
+++ b/net/minecraft/block/LadderBlock.java +++ b/net/minecraft/block/LadderBlock.java
@@ -94,6 +94,11 @@ @@ -93,6 +93,11 @@
return null; return null;
} }
@ -9,6 +9,6 @@
+ return true; + return true;
+ } + }
+ +
public BlockRenderLayer func_180664_k() { public BlockState func_185499_a(BlockState p_185499_1_, Rotation p_185499_2_) {
return BlockRenderLayer.CUTOUT; return p_185499_1_.func_206870_a(field_176382_a, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176382_a)));
} }

View File

@ -8,4 +8,4 @@
+public class LeavesBlock extends Block implements net.minecraftforge.common.IShearable { +public class LeavesBlock extends Block implements net.minecraftforge.common.IShearable {
public static final IntegerProperty field_208494_a = BlockStateProperties.field_208514_aa; public static final IntegerProperty field_208494_a = BlockStateProperties.field_208514_aa;
public static final BooleanProperty field_208495_b = BlockStateProperties.field_208515_s; public static final BooleanProperty field_208495_b = BlockStateProperties.field_208515_s;
protected static boolean field_196478_c;

View File

@ -1,11 +1,11 @@
--- a/net/minecraft/block/MushroomBlock.java --- a/net/minecraft/block/MushroomBlock.java
+++ b/net/minecraft/block/MushroomBlock.java +++ b/net/minecraft/block/MushroomBlock.java
@@ -62,7 +62,7 @@ @@ -64,7 +64,7 @@
BlockState blockstate = p_196260_2_.func_180495_p(blockpos); BlockState blockstate = p_196260_2_.func_180495_p(blockpos);
Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
if (block != Blocks.field_150391_bh && block != Blocks.field_196661_l) { if (block != Blocks.field_150391_bh && block != Blocks.field_196661_l) {
- return p_196260_2_.func_201669_a(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos); - return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos);
+ return p_196260_2_.func_201669_a(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this); + return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this);
} else { } else {
return true; return true;
} }

View File

@ -2,13 +2,13 @@
+++ b/net/minecraft/block/NetherWartBlock.java +++ b/net/minecraft/block/NetherWartBlock.java
@@ -31,9 +31,10 @@ @@ -31,9 +31,10 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
int i = p_196267_1_.func_177229_b(field_176486_a); int i = p_225534_1_.func_177229_b(field_176486_a);
- if (i < 3 && p_196267_4_.nextInt(10) == 0) { - if (i < 3 && p_225534_4_.nextInt(10) == 0) {
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(10) == 0)) { + if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(10) == 0)) {
p_196267_1_ = p_196267_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1)); p_225534_1_ = p_225534_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2); p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_, 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
} }
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/NoteBlock.java --- a/net/minecraft/block/NoteBlock.java
+++ b/net/minecraft/block/NoteBlock.java +++ b/net/minecraft/block/NoteBlock.java
@@ -49,7 +49,7 @@ @@ -50,7 +50,7 @@
} }
private void func_196482_a(World p_196482_1_, BlockPos p_196482_2_) { private void func_196482_a(World p_196482_1_, BlockPos p_196482_2_) {
@ -9,18 +9,17 @@
p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0); p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0);
} }
@@ -59,7 +59,9 @@ @@ -60,6 +60,9 @@
if (p_220051_2_.field_72995_K) { if (p_225533_2_.field_72995_K) {
return true; return ActionResultType.SUCCESS;
} else { } else {
- p_220051_1_ = p_220051_1_.func_177231_a(field_196485_c); + int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_225533_2_, p_225533_3_, p_225533_1_, p_225533_1_.func_177229_b(field_196485_c), p_225533_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_220051_2_, p_220051_3_, p_220051_1_, p_220051_1_.func_177229_b(field_196485_c), p_220051_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c)); + if (_new == -1) return ActionResultType.FAIL;
+ if (_new == -1) return false; + p_225533_1_ = (BlockState)p_225533_1_.func_206870_a(field_196485_c, _new);
+ p_220051_1_ = (BlockState)p_220051_1_.func_206870_a(field_196485_c, _new); p_225533_1_ = p_225533_1_.func_177231_a(field_196485_c);
p_220051_2_.func_180501_a(p_220051_3_, p_220051_1_, 3); p_225533_2_.func_180501_a(p_225533_3_, p_225533_1_, 3);
this.func_196482_a(p_220051_2_, p_220051_3_); this.func_196482_a(p_225533_2_, p_225533_3_);
p_220051_4_.func_195066_a(Stats.field_188087_U); @@ -76,6 +79,9 @@
@@ -75,6 +77,9 @@
} }
public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) { public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) {

View File

@ -4,7 +4,7 @@
} }
if (p_189539_4_ == 0) { if (p_189539_4_ == 0) {
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, true)) return false; + if (net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, true)) return false;
if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) { if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) {
return false; return false;
} }
@ -12,7 +12,7 @@
p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67); p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67);
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F); p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F);
} else if (p_189539_4_ == 1 || p_189539_4_ == 2) { } else if (p_189539_4_ == 1 || p_189539_4_ == 2) {
+ if(net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, false)) return false; + if (net.minecraftforge.event.ForgeEventFactory.onPistonMovePre(p_189539_2_, p_189539_3_, direction, false)) return false;
TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction)); TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction));
if (tileentity1 instanceof PistonTileEntity) { if (tileentity1 instanceof PistonTileEntity) {
((PistonTileEntity)tileentity1).func_145866_f(); ((PistonTileEntity)tileentity1).func_145866_f();
@ -42,16 +42,16 @@
} else { } else {
return false; return false;
} }
@@ -274,7 +277,7 @@ @@ -276,7 +279,7 @@
for(int j = list2.size() - 1; j >= 0; --j) { for(int j = list2.size() - 1; j >= 0; --j) {
BlockPos blockpos2 = list2.get(j); BlockPos blockpos2 = list2.get(j);
BlockState blockstate = p_176319_1_.func_180495_p(blockpos2); BlockState blockstate1 = p_176319_1_.func_180495_p(blockpos2);
- TileEntity tileentity = blockstate.func_177230_c().func_149716_u() ? p_176319_1_.func_175625_s(blockpos2) : null; - TileEntity tileentity = blockstate1.func_177230_c().func_149716_u() ? p_176319_1_.func_175625_s(blockpos2) : null;
+ TileEntity tileentity = blockstate.hasTileEntity() ? p_176319_1_.func_175625_s(blockpos2) : null; + TileEntity tileentity = blockstate1.hasTileEntity() ? p_176319_1_.func_175625_s(blockpos2) : null;
func_220059_a(blockstate, p_176319_1_, blockpos2, tileentity); func_220059_a(blockstate1, p_176319_1_, blockpos2, tileentity);
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18); p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
--k; --k;
@@ -328,6 +331,10 @@ @@ -340,6 +343,10 @@
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N))); return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
} }

View File

@ -0,0 +1,81 @@
--- a/net/minecraft/block/PistonBlockStructureHelper.java
+++ b/net/minecraft/block/PistonBlockStructureHelper.java
@@ -48,7 +48,7 @@
} else {
for(int i = 0; i < this.field_177258_e.size(); ++i) {
BlockPos blockpos = this.field_177258_e.get(i);
- if (func_227029_a_(this.field_177261_a.func_180495_p(blockpos).func_177230_c()) && !this.func_177250_b(blockpos)) {
+ if (this.field_177261_a.func_180495_p(blockpos).isStickyBlock() && !this.func_177250_b(blockpos)) {
return false;
}
}
@@ -57,24 +57,9 @@
}
}
- private static boolean func_227029_a_(Block p_227029_0_) {
- return p_227029_0_ == Blocks.field_180399_cE || p_227029_0_ == Blocks.field_226907_mc_;
- }
-
- private static boolean func_227030_a_(Block p_227030_0_, Block p_227030_1_) {
- if (p_227030_0_ == Blocks.field_226907_mc_ && p_227030_1_ == Blocks.field_180399_cE) {
- return false;
- } else if (p_227030_0_ == Blocks.field_180399_cE && p_227030_1_ == Blocks.field_226907_mc_) {
- return false;
- } else {
- return func_227029_a_(p_227030_0_) || func_227029_a_(p_227030_1_);
- }
- }
-
private boolean func_177251_a(BlockPos p_177251_1_, Direction p_177251_2_) {
BlockState blockstate = this.field_177261_a.func_180495_p(p_177251_1_);
- Block block = blockstate.func_177230_c();
- if (blockstate.func_196958_f()) {
+ if (field_177261_a.func_175623_d(p_177251_1_)) {
return true;
} else if (!PistonBlock.func_185646_a(blockstate, this.field_177261_a, p_177251_1_, this.field_177257_d, false, p_177251_2_)) {
return true;
@@ -87,12 +72,12 @@
if (i + this.field_177258_e.size() > 12) {
return false;
} else {
- while(func_227029_a_(block)) {
+ BlockState oldState;
+ while(blockstate.isStickyBlock()) {
BlockPos blockpos = p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), i);
- Block block1 = block;
+ oldState = blockstate;
blockstate = this.field_177261_a.func_180495_p(blockpos);
- block = blockstate.func_177230_c();
- if (blockstate.func_196958_f() || !func_227030_a_(block1, block) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
+ if (blockstate.isAir(this.field_177261_a, blockpos) || !oldState.canStickTo(blockstate) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
break;
}
@@ -119,7 +104,7 @@
for(int k = 0; k <= j + l; ++k) {
BlockPos blockpos2 = this.field_177258_e.get(k);
- if (func_227029_a_(this.field_177261_a.func_180495_p(blockpos2).func_177230_c()) && !this.func_177250_b(blockpos2)) {
+ if (this.field_177261_a.func_180495_p(blockpos2).isStickyBlock() && !this.func_177250_b(blockpos2)) {
return false;
}
}
@@ -128,7 +113,7 @@
}
blockstate = this.field_177261_a.func_180495_p(blockpos1);
- if (blockstate.func_196958_f()) {
+ if (blockstate.isAir(field_177261_a, blockpos1)) {
return true;
}
@@ -173,7 +158,7 @@
if (direction.func_176740_k() != this.field_177257_d.func_176740_k()) {
BlockPos blockpos = p_177250_1_.func_177972_a(direction);
BlockState blockstate1 = this.field_177261_a.func_180495_p(blockpos);
- if (func_227030_a_(blockstate1.func_177230_c(), blockstate.func_177230_c()) && !this.func_177251_a(blockpos, direction)) {
+ if (blockstate1.canStickTo(blockstate) && !this.func_177251_a(blockpos, direction)) {
return false;
}
}

View File

@ -37,7 +37,7 @@
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos3.func_177984_a())) { if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos3.func_177984_a())) {
railshape = RailShape.ASCENDING_EAST; railshape = RailShape.ASCENDING_EAST;
} }
@@ -298,7 +300,7 @@ @@ -304,7 +306,7 @@
} }
} }
@ -46,7 +46,7 @@
if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) { if (AbstractRailBlock.func_208488_a(this.field_196920_a, blockpos.func_177984_a())) {
railshape = RailShape.ASCENDING_NORTH; railshape = RailShape.ASCENDING_NORTH;
} }
@@ -308,7 +310,7 @@ @@ -314,7 +316,7 @@
} }
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/RedstoneOreBlock.java --- a/net/minecraft/block/RedstoneOreBlock.java
+++ b/net/minecraft/block/RedstoneOreBlock.java +++ b/net/minecraft/block/RedstoneOreBlock.java
@@ -61,11 +61,11 @@ @@ -68,11 +68,11 @@
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) { public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_); super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/RedstoneWireBlock.java --- a/net/minecraft/block/RedstoneWireBlock.java
+++ b/net/minecraft/block/RedstoneWireBlock.java +++ b/net/minecraft/block/RedstoneWireBlock.java
@@ -124,7 +124,7 @@ @@ -123,7 +123,7 @@
BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1); BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1);
if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) { if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) {
boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ; boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ;
@ -9,7 +9,7 @@
if (blockstate.func_224756_o(p_208074_1_, blockpos)) { if (blockstate.func_224756_o(p_208074_1_, blockpos)) {
return RedstoneSide.UP; return RedstoneSide.UP;
} }
@@ -133,7 +133,7 @@ @@ -132,7 +132,7 @@
} }
} }
@ -18,7 +18,7 @@
} }
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) { public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
@@ -318,26 +318,18 @@ @@ -315,26 +315,18 @@
boolean flag = blockstate.func_215686_e(p_176339_1_, blockpos); boolean flag = blockstate.func_215686_e(p_176339_1_, blockpos);
BlockPos blockpos1 = p_176339_2_.func_177984_a(); BlockPos blockpos1 = p_176339_2_.func_177984_a();
boolean flag1 = p_176339_1_.func_180495_p(blockpos1).func_215686_e(p_176339_1_, blockpos1); boolean flag1 = p_176339_1_.func_180495_p(blockpos1).func_215686_e(p_176339_1_, blockpos1);
@ -49,7 +49,7 @@
Block block = p_176343_0_.func_177230_c(); Block block = p_176343_0_.func_177230_c();
if (block == Blocks.field_150488_af) { if (block == Blocks.field_150488_af) {
return true; return true;
@@ -347,7 +339,7 @@ @@ -344,7 +336,7 @@
} else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) { } else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) {
return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N); return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N);
} else { } else {

View File

@ -2,17 +2,17 @@
+++ b/net/minecraft/block/SaplingBlock.java +++ b/net/minecraft/block/SaplingBlock.java
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
if (p_196267_2_.func_201696_r(p_196267_3_.func_177984_a()) >= 9 && p_196267_4_.nextInt(7) == 0) { if (p_225534_2_.func_201696_r(p_225534_3_.func_177984_a()) >= 9 && p_225534_4_.nextInt(7) == 0) {
this.func_176478_d(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_); this.func_226942_a_(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_);
} }
@@ -39,6 +40,7 @@ @@ -39,6 +40,7 @@
if (p_176478_3_.func_177229_b(field_176479_b) == 0) { if (p_226942_3_.func_177229_b(field_176479_b) == 0) {
p_176478_1_.func_180501_a(p_176478_2_, p_176478_3_.func_177231_a(field_176479_b), 4); p_226942_1_.func_180501_a(p_226942_2_, p_226942_3_.func_177231_a(field_176479_b), 4);
} else { } else {
+ if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_176478_1_, p_176478_4_, p_176478_2_)) return; + if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_226942_1_, p_226942_4_, p_226942_2_)) return;
this.field_196387_c.func_196935_a(p_176478_1_, p_176478_2_, p_176478_3_, p_176478_4_); this.field_196387_c.func_225545_a_(p_226942_1_, p_226942_1_.func_72863_F().func_201711_g(), p_226942_2_, p_226942_3_, p_226942_4_);
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/ScaffoldingBlock.java --- a/net/minecraft/block/ScaffoldingBlock.java
+++ b/net/minecraft/block/ScaffoldingBlock.java +++ b/net/minecraft/block/ScaffoldingBlock.java
@@ -142,6 +142,8 @@ @@ -138,6 +138,8 @@
return i; return i;
} }

View File

@ -1,8 +1,8 @@
--- a/net/minecraft/block/SeaGrassBlock.java --- a/net/minecraft/block/SeaGrassBlock.java
+++ b/net/minecraft/block/SeaGrassBlock.java +++ b/net/minecraft/block/SeaGrassBlock.java
@@ -16,7 +16,7 @@ @@ -17,7 +17,7 @@
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
-public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer { -public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer {
+public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IShearable { +public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IShearable {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/SpawnerBlock.java --- a/net/minecraft/block/SpawnerBlock.java
+++ b/net/minecraft/block/SpawnerBlock.java +++ b/net/minecraft/block/SpawnerBlock.java
@@ -19,10 +19,13 @@ @@ -18,10 +18,13 @@
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) { public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_); super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);

View File

@ -2,9 +2,9 @@
+++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java +++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
if (!p_196267_2_.field_72995_K) { if (!func_220257_b(p_225534_1_, p_225534_2_, p_225534_3_)) {
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
if (!func_220257_b(p_196267_1_, p_196267_2_, p_196267_3_)) { p_225534_2_.func_175656_a(p_225534_3_, Blocks.field_150346_d.func_176223_P());
p_196267_2_.func_175656_a(p_196267_3_, Blocks.field_150346_d.func_176223_P()); } else {
} else { if (p_225534_2_.func_201696_r(p_225534_3_.func_177984_a()) >= 9) {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/StairsBlock.java --- a/net/minecraft/block/StairsBlock.java
+++ b/net/minecraft/block/StairsBlock.java +++ b/net/minecraft/block/StairsBlock.java
@@ -83,13 +83,24 @@ @@ -84,13 +84,24 @@
return voxelshape; return voxelshape;
} }
@ -25,7 +25,7 @@
public boolean func_220074_n(BlockState p_220074_1_) { public boolean func_220074_n(BlockState p_220074_1_) {
return true; return true;
} }
@@ -265,4 +276,12 @@ @@ -262,4 +273,12 @@
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) { public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return false; return false;
} }

View File

@ -1,40 +1,40 @@
--- a/net/minecraft/block/StemBlock.java --- a/net/minecraft/block/StemBlock.java
+++ b/net/minecraft/block/StemBlock.java +++ b/net/minecraft/block/StemBlock.java
@@ -39,22 +39,24 @@ @@ -40,22 +40,24 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
+ if (!p_196267_2_.isAreaLoaded(p_196267_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
if (p_196267_2_.func_201669_a(p_196267_3_, 0) >= 9) { if (p_225534_2_.func_226659_b_(p_225534_3_, 0) >= 9) {
float f = CropsBlock.func_180672_a(this, p_196267_2_, p_196267_3_); float f = CropsBlock.func_180672_a(this, p_225534_2_, p_225534_3_);
- if (p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0) { - if (p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0) {
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) { + if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
int i = p_196267_1_.func_177229_b(field_176484_a); int i = p_225534_1_.func_177229_b(field_176484_a);
if (i < 7) { if (i < 7) {
- p_196267_1_ = p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)); - p_225534_1_ = p_225534_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1));
- p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2); - p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_, 2);
+ p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2); + p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2);
} else { } else {
Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_196267_4_); Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_225534_4_);
BlockPos blockpos = p_196267_3_.func_177972_a(direction); BlockPos blockpos = p_225534_3_.func_177972_a(direction);
- Block block = p_196267_2_.func_180495_p(blockpos.func_177977_b()).func_177230_c(); - Block block = p_225534_2_.func_180495_p(blockpos.func_177977_b()).func_177230_c();
- if (p_196267_2_.func_180495_p(blockpos).func_196958_f() && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) { - if (p_225534_2_.func_180495_p(blockpos).func_196958_f() && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
+ BlockState soil = p_196267_2_.func_180495_p(blockpos.func_177977_b()); + BlockState soil = p_225534_2_.func_180495_p(blockpos.func_177977_b());
+ Block block = soil.func_177230_c(); + Block block = soil.func_177230_c();
+ if (p_196267_2_.func_180495_p(blockpos).isAir(p_196267_2_, blockpos) && (soil.canSustainPlant(p_196267_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) { + if (p_225534_2_.func_175623_d(blockpos) && (soil.canSustainPlant(p_225534_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
p_196267_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P()); p_225534_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P());
p_196267_2_.func_175656_a(p_196267_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction)); p_225534_2_.func_175656_a(p_225534_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction));
} }
} }
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
} }
} }
@@ -100,4 +102,10 @@ @@ -101,4 +103,10 @@
public StemGrownBlock func_208486_d() { public StemGrownBlock func_208486_d() {
return this.field_149877_a; return this.field_149877_a;
} }
+ +
+ //FORGE START + //FORGE START
+ @Override + @Override
+ public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) { + public net.minecraftforge.common.PlantType getPlantType(IBlockReader world, BlockPos pos) {

View File

@ -1,31 +1,31 @@
--- a/net/minecraft/block/SugarCaneBlock.java --- a/net/minecraft/block/SugarCaneBlock.java
+++ b/net/minecraft/block/SugarCaneBlock.java +++ b/net/minecraft/block/SugarCaneBlock.java
@@ -16,7 +16,7 @@ @@ -15,7 +15,7 @@
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld;
-public class SugarCaneBlock extends Block { -public class SugarCaneBlock extends Block {
+public class SugarCaneBlock extends Block implements net.minecraftforge.common.IPlantable { +public class SugarCaneBlock extends Block implements net.minecraftforge.common.IPlantable {
public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X; public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X;
protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D); protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D);
@@ -40,12 +40,15 @@ @@ -39,12 +39,15 @@
if (i < 3) { if (i < 3) {
int j = p_196267_1_.func_177229_b(field_176355_a); int j = p_225534_1_.func_177229_b(field_176355_a);
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, true)) { + if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, true)) {
if (j == 15) { if (j == 15) {
p_196267_2_.func_175656_a(p_196267_3_.func_177984_a(), this.func_176223_P()); p_225534_2_.func_175656_a(p_225534_3_.func_177984_a(), this.func_176223_P());
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4); p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4);
} else { } else {
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4); p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4);
} }
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
+ } + }
} }
} }
@@ -60,6 +63,8 @@ @@ -59,6 +62,8 @@
} }
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) { public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
@ -34,7 +34,7 @@
Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c(); Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c();
if (block == this) { if (block == this) {
return true; return true;
@@ -87,4 +92,14 @@ @@ -82,4 +87,14 @@
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) { protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
p_206840_1_.func_206894_a(field_176355_a); p_206840_1_.func_206894_a(field_176355_a);
} }

View File

@ -1,13 +1,13 @@
--- a/net/minecraft/block/SweetBerryBushBlock.java --- a/net/minecraft/block/SweetBerryBushBlock.java
+++ b/net/minecraft/block/SweetBerryBushBlock.java +++ b/net/minecraft/block/SweetBerryBushBlock.java
@@ -47,8 +47,9 @@ @@ -49,8 +49,9 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
int i = p_196267_1_.func_177229_b(field_220125_a); int i = p_225534_1_.func_177229_b(field_220125_a);
- if (i < 3 && p_196267_4_.nextInt(5) == 0 && p_196267_2_.func_201669_a(p_196267_3_.func_177984_a(), 0) >= 9) { - if (i < 3 && p_225534_4_.nextInt(5) == 0 && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9) {
+ if (i < 3 && p_196267_2_.func_201669_a(p_196267_3_.func_177984_a(), 0) >= 9 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(5) == 0)) { + if (i < 3 && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(5) == 0)) {
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_220125_a, Integer.valueOf(i + 1)), 2); p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_220125_a, Integer.valueOf(i + 1)), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
} }
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/TNTBlock.java --- a/net/minecraft/block/TNTBlock.java
+++ b/net/minecraft/block/TNTBlock.java +++ b/net/minecraft/block/TNTBlock.java
@@ -28,10 +28,14 @@ @@ -29,10 +29,14 @@
this.func_180632_j(this.func_176223_P().func_206870_a(field_212569_a, Boolean.valueOf(false))); this.func_180632_j(this.func_176223_P().func_206870_a(field_212569_a, Boolean.valueOf(false)));
} }
@ -16,7 +16,7 @@
p_220082_2_.func_217377_a(p_220082_3_, false); p_220082_2_.func_217377_a(p_220082_3_, false);
} }
@@ -40,7 +44,7 @@ @@ -41,7 +45,7 @@
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) { public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
if (p_220069_2_.func_175640_z(p_220069_3_)) { if (p_220069_2_.func_175640_z(p_220069_3_)) {
@ -25,7 +25,7 @@
p_220069_2_.func_217377_a(p_220069_3_, false); p_220069_2_.func_217377_a(p_220069_3_, false);
} }
@@ -48,7 +52,7 @@ @@ -49,7 +53,7 @@
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) { public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) {
if (!p_176208_1_.func_201670_d() && !p_176208_4_.func_184812_l_() && p_176208_3_.func_177229_b(field_212569_a)) { if (!p_176208_1_.func_201670_d() && !p_176208_4_.func_184812_l_() && p_176208_3_.func_177229_b(field_212569_a)) {
@ -34,7 +34,7 @@
} }
super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_); super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_);
@@ -62,10 +66,12 @@ @@ -63,10 +67,12 @@
} }
} }
@ -46,17 +46,17 @@
+ @Deprecated //Forge: Prefer using IForgeBlock#catchFire + @Deprecated //Forge: Prefer using IForgeBlock#catchFire
private static void func_196535_a(World p_196535_0_, BlockPos p_196535_1_, @Nullable LivingEntity p_196535_2_) { private static void func_196535_a(World p_196535_0_, BlockPos p_196535_1_, @Nullable LivingEntity p_196535_2_) {
if (!p_196535_0_.field_72995_K) { if (!p_196535_0_.field_72995_K) {
TNTEntity tntentity = new TNTEntity(p_196535_0_, (double)((float)p_196535_1_.func_177958_n() + 0.5F), (double)p_196535_1_.func_177956_o(), (double)((float)p_196535_1_.func_177952_p() + 0.5F), p_196535_2_); TNTEntity tntentity = new TNTEntity(p_196535_0_, (double)p_196535_1_.func_177958_n() + 0.5D, (double)p_196535_1_.func_177956_o(), (double)p_196535_1_.func_177952_p() + 0.5D, p_196535_2_);
@@ -80,7 +86,7 @@ @@ -81,7 +87,7 @@
if (item != Items.field_151033_d && item != Items.field_151059_bz) { if (item != Items.field_151033_d && item != Items.field_151059_bz) {
return super.func_220051_a(p_220051_1_, p_220051_2_, p_220051_3_, p_220051_4_, p_220051_5_, p_220051_6_); return super.func_225533_a_(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_4_, p_225533_5_, p_225533_6_);
} else { } else {
- func_196535_a(p_220051_2_, p_220051_3_, p_220051_4_); - func_196535_a(p_225533_2_, p_225533_3_, p_225533_4_);
+ catchFire(p_220051_1_, p_220051_2_, p_220051_3_, p_220051_6_.func_216354_b(), p_220051_4_); + catchFire(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_6_.func_216354_b(), p_225533_4_);
p_220051_2_.func_180501_a(p_220051_3_, Blocks.field_150350_a.func_176223_P(), 11); p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150350_a.func_176223_P(), 11);
if (item == Items.field_151033_d) { if (!p_225533_4_.func_184812_l_()) {
itemstack.func_222118_a(1, p_220051_4_, (p_220287_1_) -> { if (item == Items.field_151033_d) {
@@ -100,7 +106,7 @@ @@ -103,7 +109,7 @@
Entity entity = abstractarrowentity.func_212360_k(); Entity entity = abstractarrowentity.func_212360_k();
if (abstractarrowentity.func_70027_ad()) { if (abstractarrowentity.func_70027_ad()) {
BlockPos blockpos = p_220066_3_.func_216350_a(); BlockPos blockpos = p_220066_3_.func_216350_a();

View File

@ -1,8 +1,8 @@
--- a/net/minecraft/block/TallGrassBlock.java --- a/net/minecraft/block/TallGrassBlock.java
+++ b/net/minecraft/block/TallGrassBlock.java +++ b/net/minecraft/block/TallGrassBlock.java
@@ -7,7 +7,7 @@ @@ -8,7 +8,7 @@
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
-public class TallGrassBlock extends BushBlock implements IGrowable { -public class TallGrassBlock extends BushBlock implements IGrowable {
+public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IShearable { +public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IShearable {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/TrapDoorBlock.java --- a/net/minecraft/block/TrapDoorBlock.java
+++ b/net/minecraft/block/TrapDoorBlock.java +++ b/net/minecraft/block/TrapDoorBlock.java
@@ -153,6 +153,16 @@ @@ -149,6 +149,16 @@
return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/TurtleEggBlock.java --- a/net/minecraft/block/TurtleEggBlock.java
+++ b/net/minecraft/block/TurtleEggBlock.java +++ b/net/minecraft/block/TurtleEggBlock.java
@@ -146,7 +146,7 @@ @@ -141,7 +141,7 @@
if (p_212570_2_ instanceof TurtleEntity) { if (p_212570_2_ instanceof TurtleEntity) {
return false; return false;
} else { } else {

View File

@ -1,24 +1,43 @@
--- a/net/minecraft/block/VineBlock.java --- a/net/minecraft/block/VineBlock.java
+++ b/net/minecraft/block/VineBlock.java +++ b/net/minecraft/block/VineBlock.java
@@ -20,7 +20,7 @@ @@ -19,7 +19,7 @@
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld;
-public class VineBlock extends Block { -public class VineBlock extends Block {
+public class VineBlock extends Block implements net.minecraftforge.common.IShearable { +public class VineBlock extends Block implements net.minecraftforge.common.IShearable {
public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z; public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z;
public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a; public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a;
public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b; public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b;
@@ -154,7 +154,7 @@ @@ -152,14 +152,14 @@
p_196267_2_.func_217377_a(p_196267_3_, false); p_225534_2_.func_217377_a(p_225534_3_, false);
} }
- } else if (p_196267_2_.field_73012_v.nextInt(4) == 0) { - } else if (p_225534_2_.field_73012_v.nextInt(4) == 0) {
+ } else if (p_196267_2_.field_73012_v.nextInt(4) == 0 && p_196267_2_.isAreaLoaded(p_196267_3_, 4)) { // Forge: check area to prevent loading unloaded chunks + } else if (p_225534_2_.field_73012_v.nextInt(4) == 0 && p_225534_2_.isAreaLoaded(p_225534_3_, 4)) { // Forge: check area to prevent loading unloaded chunks
Direction direction = Direction.func_176741_a(p_196267_4_); Direction direction = Direction.func_176741_a(p_225534_4_);
BlockPos blockpos = p_196267_3_.func_177984_a(); BlockPos blockpos = p_225534_3_.func_177984_a();
if (direction.func_176740_k().func_176722_c() && !p_196267_1_.func_177229_b(func_176267_a(direction))) { if (direction.func_176740_k().func_176722_c() && !p_225534_1_.func_177229_b(func_176267_a(direction))) {
@@ -329,4 +329,6 @@ if (this.func_196539_a(p_225534_2_, p_225534_3_)) {
BlockPos blockpos4 = p_225534_3_.func_177972_a(direction);
BlockState blockstate5 = p_225534_2_.func_180495_p(blockpos4);
- if (blockstate5.func_196958_f()) {
+ if (blockstate5.isAir(p_225534_2_, blockpos4)) {
Direction direction3 = direction.func_176746_e();
Direction direction4 = direction.func_176735_f();
boolean flag = p_225534_1_.func_177229_b(func_176267_a(direction3));
@@ -216,8 +216,8 @@
if (p_225534_3_.func_177956_o() > 0) {
BlockPos blockpos1 = p_225534_3_.func_177977_b();
BlockState blockstate1 = p_225534_2_.func_180495_p(blockpos1);
- if (blockstate1.func_196958_f() || blockstate1.func_177230_c() == this) {
- BlockState blockstate2 = blockstate1.func_196958_f() ? this.func_176223_P() : blockstate1;
+ if (blockstate1.isAir(p_225534_2_, blockpos1) || blockstate1.func_177230_c() == this) {
+ BlockState blockstate2 = blockstate1.isAir(p_225534_2_, blockpos1) ? this.func_176223_P() : blockstate1;
BlockState blockstate3 = this.func_196544_a(p_225534_1_, blockstate2, p_225534_4_);
if (blockstate2 != blockstate3 && this.func_196540_x(blockstate3)) {
p_225534_2_.func_180501_a(blockpos1, blockstate3, 2);
@@ -322,4 +322,6 @@
public static BooleanProperty func_176267_a(Direction p_176267_0_) { public static BooleanProperty func_176267_a(Direction p_176267_0_) {
return field_196546_A.get(p_176267_0_); return field_196546_A.get(p_176267_0_);
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/WebBlock.java --- a/net/minecraft/block/WebBlock.java
+++ b/net/minecraft/block/WebBlock.java +++ b/net/minecraft/block/WebBlock.java
@@ -6,7 +6,7 @@ @@ -5,7 +5,7 @@
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World; import net.minecraft.world.World;

View File

@ -1,53 +0,0 @@
--- a/net/minecraft/block/state/PistonBlockStructureHelper.java
+++ b/net/minecraft/block/state/PistonBlockStructureHelper.java
@@ -52,7 +52,7 @@
} else {
for(int i = 0; i < this.field_177258_e.size(); ++i) {
BlockPos blockpos = this.field_177258_e.get(i);
- if (this.field_177261_a.func_180495_p(blockpos).func_177230_c() == Blocks.field_180399_cE && !this.func_177250_b(blockpos)) {
+ if (this.field_177261_a.func_180495_p(blockpos).isStickyBlock() && !this.func_177250_b(blockpos)) {
return false;
}
}
@@ -63,8 +63,7 @@
private boolean func_177251_a(BlockPos p_177251_1_, Direction p_177251_2_) {
BlockState blockstate = this.field_177261_a.func_180495_p(p_177251_1_);
- Block block = blockstate.func_177230_c();
- if (blockstate.func_196958_f()) {
+ if (field_177261_a.func_175623_d(p_177251_1_)) {
return true;
} else if (!PistonBlock.func_185646_a(blockstate, this.field_177261_a, p_177251_1_, this.field_177257_d, false, p_177251_2_)) {
return true;
@@ -77,11 +76,10 @@
if (i + this.field_177258_e.size() > 12) {
return false;
} else {
- while(block == Blocks.field_180399_cE) {
+ while(blockstate.isStickyBlock()) {
BlockPos blockpos = p_177251_1_.func_177967_a(this.field_177257_d.func_176734_d(), i);
blockstate = this.field_177261_a.func_180495_p(blockpos);
- block = blockstate.func_177230_c();
- if (blockstate.func_196958_f() || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
+ if (blockstate.isAir(this.field_177261_a, blockpos) || !PistonBlock.func_185646_a(blockstate, this.field_177261_a, blockpos, this.field_177257_d, false, this.field_177257_d.func_176734_d()) || blockpos.equals(this.field_177259_b)) {
break;
}
@@ -108,7 +106,7 @@
for(int l = 0; l <= k + i1; ++l) {
BlockPos blockpos2 = this.field_177258_e.get(l);
- if (this.field_177261_a.func_180495_p(blockpos2).func_177230_c() == Blocks.field_180399_cE && !this.func_177250_b(blockpos2)) {
+ if (this.field_177261_a.func_180495_p(blockpos2).isStickyBlock() && !this.func_177250_b(blockpos2)) {
return false;
}
}
@@ -117,7 +115,7 @@
}
blockstate = this.field_177261_a.func_180495_p(blockpos1);
- if (blockstate.func_196958_f()) {
+ if (blockstate.isAir(field_177261_a, blockpos1)) {
return true;
}

View File

@ -1,16 +1,11 @@
--- a/net/minecraft/block/trees/JungleTree.java --- a/net/minecraft/block/trees/JungleTree.java
+++ b/net/minecraft/block/trees/JungleTree.java +++ b/net/minecraft/block/trees/JungleTree.java
@@ -11,11 +11,11 @@ @@ -12,7 +12,7 @@
public class JungleTree extends BigTree { public class JungleTree extends BigTree {
@Nullable @Nullable
protected AbstractTreeFeature<NoFeatureConfig> func_196936_b(Random p_196936_1_) { protected ConfiguredFeature<TreeFeatureConfig, ?> func_225546_b_(Random p_225546_1_) {
- return new TreeFeature(NoFeatureConfig::func_214639_a, true, 4 + p_196936_1_.nextInt(7), Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P(), false); - return (new TreeFeature(TreeFeatureConfig::func_227338_a_)).func_225566_b_(DefaultBiomeFeatures.field_226808_c_);
+ return new TreeFeature(NoFeatureConfig::func_214639_a, true, 4 + p_196936_1_.nextInt(7), Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P(), false).setSapling((net.minecraft.block.SaplingBlock)Blocks.field_196678_w); + return (new TreeFeature(TreeFeatureConfig::deserializeJungle)).func_225566_b_(DefaultBiomeFeatures.field_226808_c_);
} }
@Nullable @Nullable
protected AbstractTreeFeature<NoFeatureConfig> func_196938_a(Random p_196938_1_) {
- return new MegaJungleFeature(NoFeatureConfig::func_214639_a, true, 10, 20, Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P());
+ return new MegaJungleFeature(NoFeatureConfig::func_214639_a, true, 10, 20, Blocks.field_196620_N.func_176223_P(), Blocks.field_196648_Z.func_176223_P()).setSapling((net.minecraft.block.SaplingBlock)Blocks.field_196678_w);
}
}

View File

@ -1,15 +1,6 @@
--- a/net/minecraft/client/GameSettings.java --- a/net/minecraft/client/GameSettings.java
+++ b/net/minecraft/client/GameSettings.java +++ b/net/minecraft/client/GameSettings.java
@@ -143,7 +143,7 @@ @@ -170,6 +170,7 @@
public final KeyBinding[] field_151456_ac = new KeyBinding[]{new KeyBinding("key.hotbar.1", 49, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 50, "key.categories.inventory"), new KeyBinding("key.hotbar.3", 51, "key.categories.inventory"), new KeyBinding("key.hotbar.4", 52, "key.categories.inventory"), new KeyBinding("key.hotbar.5", 53, "key.categories.inventory"), new KeyBinding("key.hotbar.6", 54, "key.categories.inventory"), new KeyBinding("key.hotbar.7", 55, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 56, "key.categories.inventory"), new KeyBinding("key.hotbar.9", 57, "key.categories.inventory")};
public final KeyBinding field_193629_ap = new KeyBinding("key.saveToolbarActivator", 67, "key.categories.creative");
public final KeyBinding field_193630_aq = new KeyBinding("key.loadToolbarActivator", 88, "key.categories.creative");
- public final KeyBinding[] field_74324_K = 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_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac);
+ public KeyBinding[] field_74324_K = 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_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac);
protected Minecraft field_74317_L;
private final File field_74354_ai;
public Difficulty field_74318_M = Difficulty.NORMAL;
@@ -162,6 +162,7 @@
public String field_74363_ab = "en_us"; public String field_74363_ab = "en_us";
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) { public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
@ -17,20 +8,20 @@
this.field_74317_L = p_i46326_1_; this.field_74317_L = p_i46326_1_;
this.field_74354_ai = new File(p_i46326_2_, "options.txt"); this.field_74354_ai = new File(p_i46326_2_, "options.txt");
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) { if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
@@ -467,7 +468,11 @@ @@ -485,7 +486,11 @@
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
if (s1.equals("key_" + keybinding.func_151464_g())) { if (s.equals("key_" + keybinding.func_151464_g())) {
- keybinding.func_197979_b(InputMappings.func_197955_a(s2)); - keybinding.func_197979_b(InputMappings.func_197955_a(s1));
+ if (s2.indexOf(':') != -1) { + if (s.indexOf(':') != -1) {
+ String[] pts = s2.split(":"); + String[] pts = s.split(":");
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(pts[1]), InputMappings.func_197955_a(pts[0])); + keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.valueFromString(pts[1]), InputMappings.func_197955_a(pts[0]));
+ } else + } else
+ keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s2)); + keybinding.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, InputMappings.func_197955_a(s));
} }
} }
@@ -515,6 +520,7 @@ @@ -533,6 +538,7 @@
} }
public void func_74303_b() { public void func_74303_b() {
@ -38,7 +29,7 @@
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) { try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion()); printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this)); printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
@@ -589,7 +595,7 @@ @@ -609,7 +615,7 @@
printwriter.println("glDebugVerbosity:" + this.field_209231_W); printwriter.println("glDebugVerbosity:" + this.field_209231_W);
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
@ -47,7 +38,7 @@
} }
for(SoundCategory soundcategory : SoundCategory.values()) { for(SoundCategory soundcategory : SoundCategory.values()) {
@@ -686,6 +692,25 @@ @@ -706,6 +712,25 @@
} }
} }
@ -62,7 +53,7 @@
+ field_74368_y.setKeyConflictContext(inGame); + field_74368_y.setKeyConflictContext(inGame);
+ field_74366_z.setKeyConflictContext(inGame); + field_74366_z.setKeyConflictContext(inGame);
+ field_74314_A.setKeyConflictContext(inGame); + field_74314_A.setKeyConflictContext(inGame);
+ field_74311_E.setKeyConflictContext(inGame); + field_228046_af_.setKeyConflictContext(inGame);
+ field_151444_V.setKeyConflictContext(inGame); + field_151444_V.setKeyConflictContext(inGame);
+ field_74312_F.setKeyConflictContext(inGame); + field_74312_F.setKeyConflictContext(inGame);
+ field_74310_D.setKeyConflictContext(inGame); + field_74310_D.setKeyConflictContext(inGame);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/KeyboardListener.java --- a/net/minecraft/client/KeyboardListener.java
+++ b/net/minecraft/client/KeyboardListener.java +++ b/net/minecraft/client/KeyboardListener.java
@@ -252,7 +252,9 @@ @@ -251,7 +251,9 @@
} }
INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r; INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r;
@ -9,9 +9,9 @@
+ if ((!(this.field_197972_a.field_71462_r instanceof ControlsScreen) || ((ControlsScreen)inestedguieventhandler).field_152177_g <= Util.func_211177_b() - 20L)) { + if ((!(this.field_197972_a.field_71462_r instanceof ControlsScreen) || ((ControlsScreen)inestedguieventhandler).field_152177_g <= Util.func_211177_b() - 20L)) {
+ if (p_197961_5_ == 1) { + if (p_197961_5_ == 1) {
if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) { if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) {
this.field_197972_a.field_195558_d.func_198077_g(); this.field_197972_a.func_228018_at_().func_198077_g();
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.field_195558_d.func_198113_j(); this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.func_228018_at_().func_198113_j();
@@ -271,6 +273,8 @@ @@ -270,6 +272,8 @@
}); });
return; return;
} }
@ -20,7 +20,7 @@
} }
boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.getFocused() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.getFocused()).func_212955_f(); boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.getFocused() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.getFocused()).func_212955_f();
@@ -290,10 +294,14 @@ @@ -289,10 +293,14 @@
Screen.wrapScreenError(() -> { Screen.wrapScreenError(() -> {
if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) { if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) {
if (p_197961_5_ == 0) { if (p_197961_5_ == 0) {
@ -37,7 +37,7 @@
} }
}, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName()); }, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName());
@@ -354,7 +362,7 @@ @@ -353,7 +361,7 @@
} }
} }
} }
@ -46,7 +46,7 @@
} }
} }
@@ -364,12 +372,16 @@ @@ -363,12 +371,16 @@
if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) { if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) {
if (Character.charCount(p_197963_3_) == 1) { if (Character.charCount(p_197963_3_) == 1) {
Screen.wrapScreenError(() -> { Screen.wrapScreenError(() -> {

View File

@ -1,23 +1,14 @@
--- a/net/minecraft/client/Minecraft.java --- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java
@@ -316,6 +316,7 @@ @@ -321,6 +321,7 @@
public Minecraft(GameConfiguration p_i45547_1_) {
super("Client"); super("Client");
this.field_195556_O = p_i45547_1_.field_178743_b;
field_71432_P = this; field_71432_P = this;
+ net.minecraftforge.client.ForgeHooksClient.invalidateLog4jThreadCache(); + net.minecraftforge.client.ForgeHooksClient.invalidateLog4jThreadCache();
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a; this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
this.field_110446_Y = p_i45547_1_.field_178744_c.field_178759_c; File file1 = p_i45547_1_.field_178744_c.field_178759_c;
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b; this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
@@ -333,7 +334,7 @@ @@ -335,7 +336,6 @@
supplier = p_213262_2_;
}
- return new ClientResourcePackInfo(p_213262_0_, p_213262_1_, supplier, p_213262_3_, p_213262_4_, p_213262_5_);
+ return new ClientResourcePackInfo(p_213262_0_, p_213262_1_, supplier, p_213262_3_, p_213262_4_, p_213262_5_, p_213262_3_.isHidden());
});
this.field_110448_aq.func_198982_a(this.field_195554_ax);
this.field_110448_aq.func_198982_a(new FolderPackFinder(this.field_130070_K));
@@ -341,7 +342,6 @@
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService(); this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a; this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a()); field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
@ -25,74 +16,79 @@
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a; this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
this.field_147129_ai = func_147122_X(); this.field_147129_ai = func_147122_X();
this.field_71437_Z = null; this.field_71437_Z = null;
@@ -423,6 +423,7 @@ @@ -367,6 +367,7 @@
screensize = new ScreenSize(this.field_71474_y.field_92118_B, this.field_71474_y.field_92119_C, screensize.field_216496_c, screensize.field_216497_d, screensize.field_216498_e); screensize = p_i45547_1_.field_178743_b;
} }
+ net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.join(); + net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.INSTANCE.join();
LongSupplier longsupplier = GLX.initGlfw(); Util.field_211180_a = RenderSystem.initBackendSystem();
if (longsupplier != null) { this.field_195557_T = new VirtualScreen(this);
Util.field_211180_a = longsupplier; this.field_195558_d = this.field_195557_T.func_217626_a(screensize, this.field_71474_y.field_198019_u, "Minecraft " + SharedConstants.func_215069_a().getName());
@@ -442,7 +443,6 @@ @@ -382,7 +383,6 @@
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i); this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
this.field_71417_B = new MouseHelper(this); this.field_71417_B = new MouseHelper(this);
- this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); - this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i());
this.field_195559_v = new KeyboardListener(this); this.field_195559_v = new KeyboardListener(this);
this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i()); this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i());
GLX.init(); RenderSystem.initRenderer(this.field_71474_y.field_209231_W, false);
@@ -451,6 +451,7 @@ @@ -390,6 +390,7 @@
this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F); this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F);
this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC); this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC);
this.field_71474_y.func_198017_a(this.field_110448_aq); this.field_71474_y.func_198017_a(this.field_110448_aq);
+ net.minecraftforge.fml.client.ClientModLoader.begin(this, this.field_110448_aq, this.field_110451_am, this.field_195554_ax); + net.minecraftforge.fml.client.ClientModLoader.begin(this, this.field_110448_aq, this.field_110451_am, this.field_195554_ax);
this.field_110448_aq.func_198983_a(); this.field_110448_aq.func_198983_a();
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList()); this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
this.field_110451_am.func_219534_a(this.field_135017_as);
@@ -433,12 +434,14 @@
this.func_193986_ar();
this.field_110451_am.func_219534_a(this.field_193995_ae);
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ParticleFactoryRegisterEvent());
this.field_110451_am.func_219534_a(this.field_71452_i);
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o);
this.field_110451_am.func_219534_a(this.field_213272_aL);
this.field_213273_aM = new PotionSpriteUploader(this.field_71446_o);
this.field_110451_am.func_219534_a(this.field_213273_aM);
- this.field_71456_v = new IngameGui(this);
+ this.field_71456_v = new net.minecraftforge.client.gui.ForgeIngameGui(this);
+ this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
this.field_184132_p = new DebugRenderer(this);
RenderSystem.setErrorCallback(this::func_195545_a);
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
@@ -450,12 +453,11 @@
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
this.field_195558_d.func_227801_c_();
this.func_213226_a();
- if (s != null) {
- this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, s, i));
- } else {
- this.func_147108_a(new MainMenuScreen(true));
- }
@@ -516,12 +517,14 @@ + //Final needed so we can move into lambda below.
this.field_110451_am.func_219534_a(this.field_193995_ae); + final String autoServerName = s;
GlStateManager.viewport(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l()); + final int autoServerPort = i;
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o); +
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ParticleFactoryRegisterEvent()); ResourceLoadProgressGui.func_212970_a(this);
this.field_110451_am.func_219534_a(this.field_71452_i); List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o); this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219537_a(Util.func_215072_e(), this, field_223714_G, list), (p_229990_2_) -> {
this.field_110451_am.func_219534_a(this.field_213272_aL); @@ -465,6 +467,14 @@
this.field_213273_aM = new PotionSpriteUploader(this.field_71446_o); this.func_213256_aB();
this.field_110451_am.func_219534_a(this.field_213273_aM); }
- this.field_71456_v = new IngameGui(this);
+ this.field_71456_v = new net.minecraftforge.client.ForgeIngameGui(this);
+ this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
this.field_184132_p = new DebugRenderer(this);
GLX.setGlfwErrorCallback(this::func_195545_a);
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
@@ -532,18 +535,20 @@
this.field_195558_d.func_216523_b(this.field_71474_y.field_74352_v);
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
this.field_195558_d.func_198112_b();
- if (this.field_71475_ae != null) {
- this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, this.field_71475_ae, this.field_71477_af));
- } else {
- this.func_147108_a(new MainMenuScreen(true));
- }
ResourceLoadProgressGui.func_212970_a(this); + if (net.minecraftforge.fml.client.ClientModLoader.completeModLoading()) return; // Do not overwrite the error screen
this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219535_a(Util.func_215072_e(), this, field_223714_G), () -> { + // FORGE: Move opening initial screen to after startup and events are enabled.
if (SharedConstants.field_206244_b) { + // Also Fixes MC-145102
this.func_213256_aB(); + if (autoServerName != null) {
} + this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, autoServerName, autoServerPort));
- + } else {
+ if (net.minecraftforge.fml.client.ClientModLoader.completeModLoading()) return; // Do not overwrite the error sceen + this.func_147108_a(new MainMenuScreen(true));
+ // FORGE: Move opening initial screen to after startup and events are enabled. + }
+ // Also Fixes MC-145102 });
+ if (this.field_71475_ae != null) { }, false));
+ this.func_147108_a(new ConnectingScreen(new MainMenuScreen(), this, this.field_71475_ae, this.field_71477_af)); }
+ } else { @@ -545,7 +555,7 @@
+ this.func_147108_a(new MainMenuScreen(true));
+ }
}, false));
}
@@ -558,7 +563,7 @@
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b())); return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
}); });
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> { SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
@ -101,16 +97,24 @@
}); });
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a(); NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
@@ -647,7 +652,7 @@ @@ -633,13 +643,13 @@
Bootstrap.func_179870_a(p_71377_1_.func_71502_e()); Bootstrap.func_179870_a(p_71377_0_.func_71502_e());
if (p_71377_1_.func_71497_f() != null) { if (p_71377_0_.func_71497_f() != null) {
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f()); Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f());
- System.exit(-1); - System.exit(-1);
+ net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-1); + net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-1);
} else if (p_71377_1_.func_147149_a(file2)) { } else if (p_71377_0_.func_147149_a(file2)) {
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath()); Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
System.exit(-1); - System.exit(-1);
@@ -662,6 +667,7 @@ + net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-1);
} else {
Bootstrap.func_179870_a("#@?@# Game crashed! Crash report could not be saved. #@?@#");
- System.exit(-2);
+ net.minecraftforge.fml.server.ServerLifecycleHooks.handleExit(-2);
}
}
@@ -648,6 +658,7 @@
return this.field_71474_y.field_211842_aO; return this.field_71474_y.field_211842_aO;
} }
@ -118,7 +122,7 @@
public CompletableFuture<Void> func_213237_g() { public CompletableFuture<Void> func_213237_g() {
if (this.field_213276_aV != null) { if (this.field_213276_aV != null) {
return this.field_213276_aV; return this.field_213276_aV;
@@ -741,16 +747,20 @@ @@ -726,10 +737,6 @@
} }
public void func_147108_a(@Nullable Screen p_147108_1_) { public void func_147108_a(@Nullable Screen p_147108_1_) {
@ -129,7 +133,8 @@
if (p_147108_1_ == null && this.field_71441_e == null) { if (p_147108_1_ == null && this.field_71441_e == null) {
p_147108_1_ = new MainMenuScreen(); p_147108_1_ = new MainMenuScreen();
} else if (p_147108_1_ == null && this.field_71439_g.func_110143_aJ() <= 0.0F) { } else if (p_147108_1_ == null && this.field_71439_g.func_110143_aJ() <= 0.0F) {
p_147108_1_ = new DeathScreen((ITextComponent)null, this.field_71441_e.func_72912_H().func_76093_s()); @@ -740,6 +747,14 @@
}
} }
+ Screen old = this.field_71462_r; + Screen old = this.field_71462_r;
@ -143,8 +148,8 @@
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) { if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
this.field_71474_y.field_74330_P = false; this.field_71474_y.field_74330_P = false;
this.field_71456_v.func_146158_b().func_146231_a(true); this.field_71456_v.func_146158_b().func_146231_a(true);
@@ -875,11 +885,13 @@ @@ -862,11 +877,13 @@
GlStateManager.enableTexture(); RenderSystem.enableTexture();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
if (!this.field_71454_w) { if (!this.field_71454_w) {
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b); + net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b);
@ -157,7 +162,7 @@
} }
this.field_71424_I.func_219897_b(); this.field_71424_I.func_219897_b();
@@ -1147,10 +1159,10 @@ @@ -1121,10 +1138,10 @@
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) { if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a(); BlockPos blockpos = blockraytraceresult.func_216350_a();
@ -170,16 +175,16 @@
this.field_71439_g.func_184609_a(Hand.MAIN_HAND); this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
} }
} }
@@ -1177,7 +1189,7 @@ @@ -1151,7 +1168,7 @@
case BLOCK: case BLOCK:
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a(); BlockPos blockpos = blockraytraceresult.func_216350_a();
- if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) { - if (!this.field_71441_e.func_180495_p(blockpos).func_196958_f()) {
+ if (!this.field_71441_e.func_180495_p(blockpos).isAir(field_71441_e, blockpos)) { + if (!this.field_71441_e.func_175623_d(blockpos)) {
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b()); this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
break; break;
} }
@@ -1187,6 +1199,7 @@ @@ -1161,6 +1178,7 @@
} }
this.field_71439_g.func_184821_cY(); this.field_71439_g.func_184821_cY();
@ -187,17 +192,17 @@
} }
this.field_71439_g.func_184609_a(Hand.MAIN_HAND); this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
@@ -1236,6 +1249,9 @@ @@ -1217,6 +1235,9 @@
} }
} }
+ if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.func_216346_c() == RayTraceResult.Type.MISS)) + if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.func_216346_c() == RayTraceResult.Type.MISS))
+ net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, hand); + net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, hand);
+ +
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand) == ActionResultType.SUCCESS) { if (!itemstack.func_190926_b()) {
this.field_71460_t.field_78516_c.func_187460_a(hand); ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand);
return; if (actionresulttype2.func_226246_a_()) {
@@ -1255,6 +1271,8 @@ @@ -1243,6 +1264,8 @@
--this.field_71467_ac; --this.field_71467_ac;
} }
@ -206,7 +211,7 @@
this.field_71424_I.func_76320_a("gui"); this.field_71424_I.func_76320_a("gui");
if (!this.field_71445_n) { if (!this.field_71445_n) {
this.field_71456_v.func_73831_a(); this.field_71456_v.func_73831_a();
@@ -1373,6 +1391,8 @@ @@ -1360,6 +1383,8 @@
this.field_71424_I.func_219895_b("keyboard"); this.field_71424_I.func_219895_b("keyboard");
this.field_195559_v.func_204870_b(); this.field_195559_v.func_204870_b();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
@ -215,7 +220,7 @@
} }
private void func_184117_aA() { private void func_184117_aA() {
@@ -1527,6 +1547,12 @@ @@ -1514,6 +1539,12 @@
this.func_147108_a(worldloadprogressscreen); this.func_147108_a(worldloadprogressscreen);
while(!this.field_71437_Z.func_71200_ad()) { while(!this.field_71437_Z.func_71200_ad()) {
@ -228,8 +233,8 @@
worldloadprogressscreen.tick(); worldloadprogressscreen.tick();
this.func_195542_b(false); this.func_195542_b(false);
@@ -1547,11 +1573,17 @@ @@ -1534,11 +1565,17 @@
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_213261_0_) -> { networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
})); }));
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN)); networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
- networkmanager.func_179290_a(new CLoginStartPacket(this.func_110432_I().func_148256_e())); - networkmanager.func_179290_a(new CLoginStartPacket(this.func_110432_I().func_148256_e()));
@ -247,7 +252,7 @@
WorkingScreen workingscreen = new WorkingScreen(); WorkingScreen workingscreen = new WorkingScreen();
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining")); workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
this.func_213241_c(workingscreen); this.func_213241_c(workingscreen);
@@ -1583,10 +1615,12 @@ @@ -1570,10 +1607,12 @@
IntegratedServer integratedserver = this.field_71437_Z; IntegratedServer integratedserver = this.field_71437_Z;
this.field_71437_Z = null; this.field_71437_Z = null;
this.field_71460_t.func_190564_k(); this.field_71460_t.func_190564_k();
@ -260,15 +265,15 @@
if (integratedserver != null) { if (integratedserver != null) {
while(!integratedserver.func_213201_w()) { while(!integratedserver.func_213201_w()) {
this.func_195542_b(false); this.func_195542_b(false);
@@ -1624,6 +1658,7 @@ @@ -1605,6 +1644,7 @@
} this.field_71438_f.func_72732_a(p_213257_1_);
this.field_71452_i.func_78870_a(p_213257_1_);
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_); TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
+ net.minecraftforge.client.MinecraftForgeClient.clearRenderCache(); + net.minecraftforge.client.MinecraftForgeClient.clearRenderCache();
} }
public final boolean func_71355_q() { public final boolean func_71355_q() {
@@ -1649,112 +1684,8 @@ @@ -1630,112 +1670,8 @@
private void func_147112_ai() { private void func_147112_ai() {
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) { if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
@ -383,15 +388,15 @@
} }
} }
@@ -1826,6 +1757,7 @@ @@ -1817,6 +1753,7 @@
return field_71432_P; return field_71432_P;
} }
+ @Deprecated // Forge: Use selective scheduleResourceRefresh method in FMLClientHandler + @Deprecated // Forge: Use selective scheduleResourceRefresh method in FMLClientHandler
public CompletableFuture<Void> func_213245_w() { public CompletableFuture<Void> func_213245_w() {
return this.func_213169_a(this::func_213237_g).thenCompose((p_213240_0_) -> { return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
return p_213240_0_; return p_229993_0_;
@@ -1972,6 +1904,8 @@ @@ -1944,6 +1881,8 @@
} }
public MusicTicker.MusicType func_147109_W() { public MusicTicker.MusicType func_147109_W() {
@ -400,9 +405,18 @@
if (this.field_71462_r instanceof WinGameScreen) { if (this.field_71462_r instanceof WinGameScreen) {
return MusicTicker.MusicType.CREDITS; return MusicTicker.MusicType.CREDITS;
} else if (this.field_71439_g == null) { } else if (this.field_71439_g == null) {
@@ -2128,4 +2062,12 @@ @@ -2120,7 +2059,7 @@
public LoadingGui func_213250_au() { supplier = func_228022_c_(supplier);
return this.field_213279_p; }
- return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_);
+ return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_3_.isHidden());
}
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
@@ -2138,4 +2077,12 @@
public void func_228020_b_(int p_228020_1_) {
this.field_175617_aL.func_229355_a_(p_228020_1_);
} }
+ +
+ public ItemColors getItemColors() { + public ItemColors getItemColors() {

View File

@ -1,27 +1,26 @@
--- a/net/minecraft/client/MouseHelper.java --- a/net/minecraft/client/MouseHelper.java
+++ b/net/minecraft/client/MouseHelper.java +++ b/net/minecraft/client/MouseHelper.java
@@ -71,17 +71,22 @@ @@ -72,16 +72,21 @@
if (!this.field_198051_p && flag) { if (!this.field_198051_p && flag) {
this.func_198034_i(); this.func_198034_i();
} }
+ if (net.minecraftforge.client.ForgeHooksClient.onRawMouseClicked(p_198023_3_, p_198023_4_, p_198023_5_)) return; + if (net.minecraftforge.client.ForgeHooksClient.onRawMouseClicked(p_198023_3_, p_198023_4_, p_198023_5_)) return;
} else { } else {
double d0 = this.field_198040_e * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m(); double d0 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
double d1 = this.field_198041_f * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n(); double d1 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
int p_198023_3_f = p_198023_3_;
if (flag) { if (flag) {
Screen.wrapScreenError(() -> { Screen.wrapScreenError(() -> {
- aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, p_198023_3_f); - aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, i);
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPre(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f); + aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPre(this.field_198036_a.field_71462_r, d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, p_198023_3_f); + if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPost(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f); + if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPost(this.field_198036_a.field_71462_r, d0, d1, i);
}, "mouseClicked event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName()); }, "mouseClicked event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
} else { } else {
Screen.wrapScreenError(() -> { Screen.wrapScreenError(() -> {
- aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, p_198023_3_f); - aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, i);
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPre(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f); + aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPre(this.field_198036_a.field_71462_r, d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, p_198023_3_f); + if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPost(this.field_198036_a.field_71462_r, d0, d1, p_198023_3_f); + if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPost(this.field_198036_a.field_71462_r, d0, d1, i);
}, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName()); }, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
} }
} }
@ -36,8 +35,8 @@
@@ -116,7 +121,9 @@ @@ -116,7 +121,9 @@
if (this.field_198036_a.field_71462_r != null) { if (this.field_198036_a.field_71462_r != null) {
double d1 = this.field_198040_e * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m(); double d1 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
double d2 = this.field_198041_f * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n(); double d2 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
- this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0); - this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0);
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPre(this, this.field_198036_a.field_71462_r, d0)) return; + if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPre(this, this.field_198036_a.field_71462_r, d0)) return;
+ if (this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0)) return; + if (this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0)) return;
@ -53,18 +52,18 @@
if (this.field_198036_a.field_71439_g.func_175149_v()) { if (this.field_198036_a.field_71439_g.func_175149_v()) {
if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) { if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) {
this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1)); this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1));
@@ -168,7 +176,9 @@ @@ -180,7 +188,9 @@
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.field_195558_d.func_198107_o() / (double)this.field_198036_a.field_195558_d.func_198105_m(); double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.field_195558_d.func_198087_p() / (double)this.field_198036_a.field_195558_d.func_198083_n(); double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
Screen.wrapScreenError(() -> { Screen.wrapScreenError(() -> {
- iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3); - iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3);
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPre(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3)) return; + if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPre(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3)) return;
+ if (iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3)) return; + if (iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3)) return;
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPost(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3); + net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPost(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3);
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName()); }, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
} }
} }
@@ -233,6 +243,10 @@ @@ -245,6 +255,10 @@
return this.field_198039_d; return this.field_198039_d;
} }
@ -75,7 +74,7 @@
public double func_198024_e() { public double func_198024_e() {
return this.field_198040_e; return this.field_198040_e;
} }
@@ -241,6 +255,14 @@ @@ -253,6 +267,14 @@
return this.field_198041_f; return this.field_198041_f;
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/audio/SoundEngine.java --- a/net/minecraft/client/audio/SoundEngine.java
+++ b/net/minecraft/client/audio/SoundEngine.java +++ b/net/minecraft/client/audio/SoundEngine.java
@@ -53,6 +53,7 @@ @@ -55,6 +55,7 @@
this.field_148622_c = p_i50892_1_; this.field_148622_c = p_i50892_1_;
this.field_148619_d = p_i50892_2_; this.field_148619_d = p_i50892_2_;
this.field_217939_i = new AudioStreamManager(p_i50892_3_); this.field_217939_i = new AudioStreamManager(p_i50892_3_);
@ -8,7 +8,7 @@
} }
public void func_148596_a() { public void func_148596_a() {
@@ -68,6 +69,7 @@ @@ -70,6 +71,7 @@
this.func_148613_b(); this.func_148613_b();
this.func_148608_i(); this.func_148608_i();
@ -16,7 +16,7 @@
} }
private synchronized void func_148608_i() { private synchronized void func_148608_i() {
@@ -246,6 +248,8 @@ @@ -251,6 +253,8 @@
public void func_148611_c(ISound p_148611_1_) { public void func_148611_c(ISound p_148611_1_) {
if (this.field_148617_f) { if (this.field_148617_f) {
@ -25,7 +25,7 @@
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c); SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
ResourceLocation resourcelocation = p_148611_1_.func_147650_b(); ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
if (soundeventaccessor == null) { if (soundeventaccessor == null) {
@@ -300,11 +304,13 @@ @@ -305,11 +309,13 @@
p_217930_7_.func_216420_a(vec3d); p_217930_7_.func_216420_a(vec3d);
p_217930_7_.func_216432_b(flag); p_217930_7_.func_216432_b(flag);
}); });
@ -39,7 +39,7 @@
}); });
}); });
} else { } else {
@@ -312,6 +318,7 @@ @@ -317,6 +323,7 @@
channelmanager$entry.func_217888_a((p_217935_1_) -> { channelmanager$entry.func_217888_a((p_217935_1_) -> {
p_217935_1_.func_216433_a(p_217928_1_); p_217935_1_.func_216433_a(p_217928_1_);
p_217935_1_.func_216438_c(); p_217935_1_.func_216438_c();

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/audio/SoundHandler.java --- a/net/minecraft/client/audio/SoundHandler.java
+++ b/net/minecraft/client/audio/SoundHandler.java +++ b/net/minecraft/client/audio/SoundHandler.java
@@ -210,6 +210,11 @@ @@ -214,6 +214,11 @@
this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_); this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_);
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java --- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
+++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java +++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
@@ -116,7 +116,7 @@ @@ -115,7 +115,7 @@
f = 1.0F; f = 1.0F;
} }
@ -9,7 +9,7 @@
int i = this.func_184612_cw(); int i = this.func_184612_cw();
float f1 = (float)i / 20.0F; float f1 = (float)i / 20.0F;
if (f1 > 1.0F) { if (f1 > 1.0F) {
@@ -128,6 +128,6 @@ @@ -127,6 +127,6 @@
f *= 1.0F - f1 * 0.15F; f *= 1.0F - f1 * 0.15F;
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/entity/player/ClientPlayerEntity.java --- a/net/minecraft/client/entity/player/ClientPlayerEntity.java
+++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java +++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java
@@ -130,6 +130,7 @@ @@ -134,6 +134,7 @@
} }
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
@ -8,7 +8,7 @@
return false; return false;
} }
@@ -449,6 +450,11 @@ @@ -458,6 +459,11 @@
} }
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) { public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) {
@ -17,33 +17,36 @@
+ p_184185_1_ = event.getSound(); + p_184185_1_ = event.getSound();
+ p_184185_2_ = event.getVolume(); + p_184185_2_ = event.getVolume();
+ p_184185_3_ = event.getPitch(); + p_184185_3_ = event.getPitch();
this.field_70170_p.func_184134_a(this.field_70165_t, this.field_70163_u, this.field_70161_v, p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false); this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
} }
@@ -591,6 +597,7 @@ @@ -599,6 +605,7 @@
boolean flag1 = this.field_71158_b.field_228350_h_;
boolean flag2 = this.func_223110_ee(); boolean flag2 = this.func_223110_ee();
boolean flag3 = this.func_213287_bg() || this.func_213300_bk(); this.field_71158_b.func_225607_a_(this.func_228354_I_());
this.field_71158_b.func_217607_a(flag3, this.func_175149_v());
+ net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.field_71158_b); + net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.field_71158_b);
this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b); this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b);
if (this.func_184587_cr() && !this.func_184218_aH()) { if (this.func_184587_cr() && !this.func_184218_aH()) {
this.field_71158_b.field_78902_a *= 0.2F; this.field_71158_b.field_78902_a *= 0.2F;
@@ -607,10 +614,14 @@ @@ -613,11 +620,12 @@
this.field_71158_b.field_78901_c = true;
if (!this.field_70145_X) {
AxisAlignedBB axisalignedbb = this.func_174813_aQ();
+ net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent event = new net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent(this, axisalignedbb);
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
+ axisalignedbb = event.getEntityBoundingBox();
this.func_213282_i(this.field_70165_t - (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v + (double)this.func_213311_cf() * 0.35D);
this.func_213282_i(this.field_70165_t - (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v - (double)this.func_213311_cf() * 0.35D);
this.func_213282_i(this.field_70165_t + (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v - (double)this.func_213311_cf() * 0.35D);
this.func_213282_i(this.field_70165_t + (double)this.func_213311_cf() * 0.35D, axisalignedbb.field_72338_b + 0.5D, this.field_70161_v + (double)this.func_213311_cf() * 0.35D);
+ }
} }
boolean flag7 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c; - if (!this.field_70145_X) {
@@ -950,4 +961,16 @@ - this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
- this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
- this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
- this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, this.func_226278_cu_() + 0.5D, this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
+ net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent event = new net.minecraftforge.client.event.PlayerSPPushOutOfBlocksEvent(this);
+ if (!this.field_70145_X && !net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
+ this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
+ this.func_213282_i(this.func_226277_ct_() - (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() - (double)this.func_213311_cf() * 0.35D);
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
}
boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c;
@@ -961,4 +969,16 @@
return this.field_204230_bP; return this.field_204230_bP;
} }
} }
@ -55,7 +58,7 @@
+ this.field_175164_bL = old.field_175164_bL; + this.field_175164_bL = old.field_175164_bL;
+ this.field_175165_bM = old.field_175165_bM; + this.field_175165_bM = old.field_175165_bM;
+ this.field_184841_cd = old.field_184841_cd; + this.field_184841_cd = old.field_184841_cd;
+ this.field_175170_bN = old.field_175170_bN; + this.field_228351_cj_ = old.field_228351_cj_;
+ this.field_175171_bO = old.field_175171_bO; + this.field_175171_bO = old.field_175171_bO;
+ this.field_175168_bP = old.field_175168_bP; + this.field_175168_bP = old.field_175168_bP;
+ } + }

View File

@ -8,12 +8,12 @@
this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2; this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2;
this.field_147045_u = true; this.field_147045_u = true;
} }
@@ -59,7 +60,7 @@ @@ -58,7 +59,7 @@
j = 132 / (collection.size() - 1); j = 132 / (collection.size() - 1);
} }
- Iterable<EffectInstance> iterable = Ordering.<EffectInstance>natural().sortedCopy(collection); - Iterable<EffectInstance> iterable = Ordering.<EffectInstance>natural().sortedCopy(collection);
+ Iterable<EffectInstance> iterable = collection.stream().filter( effectInstance -> effectInstance.func_188419_a().shouldRender(effectInstance)).sorted().collect(java.util.stream.Collectors.toList()); + Iterable<EffectInstance> iterable = collection.stream().filter( effectInstance -> effectInstance.shouldRender()).sorted().collect(java.util.stream.Collectors.toList());
this.func_214079_a(i, j, iterable); this.func_214079_a(i, j, iterable);
this.func_214077_b(i, j, iterable); this.func_214077_b(i, j, iterable);
this.func_214078_c(i, j, iterable); this.func_214078_c(i, j, iterable);
@ -21,8 +21,8 @@
int i = this.field_147009_r; int i = this.field_147009_r;
for(EffectInstance effectinstance : p_214078_3_) { for(EffectInstance effectinstance : p_214078_3_) {
+ effectinstance.func_188419_a().renderInventoryEffect(effectinstance, this, p_214078_1_, i, this.blitOffset); + effectinstance.renderInventoryEffect(this, p_214078_1_, i, this.getBlitOffset());
+ if (!effectinstance.func_188419_a().shouldRenderInvText(effectinstance)) { i += p_214078_2_; continue; } + if (!effectinstance.shouldRenderInvText()) { i += p_214078_2_; continue; }
String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a()); String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a());
if (effectinstance.func_76458_c() >= 1 && effectinstance.func_76458_c() <= 9) { if (effectinstance.func_76458_c() >= 1 && effectinstance.func_76458_c() <= 9) {
s = s + ' ' + I18n.func_135052_a("enchantment.level." + (effectinstance.func_76458_c() + 1)); s = s + ' ' + I18n.func_135052_a("enchantment.level." + (effectinstance.func_76458_c() + 1));

View File

@ -1,40 +1,34 @@
--- a/net/minecraft/client/gui/IngameGui.java --- a/net/minecraft/client/gui/IngameGui.java
+++ b/net/minecraft/client/gui/IngameGui.java +++ b/net/minecraft/client/gui/IngameGui.java
@@ -408,6 +408,9 @@ @@ -406,6 +406,9 @@
for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) { for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
Effect effect = effectinstance.func_188419_a(); Effect effect = effectinstance.func_188419_a();
+ if (!effect.shouldRenderHUD(effectinstance)) continue; + if (!effectinstance.shouldRenderHUD()) continue;
+ // Rebind in case previous renderHUDEffect changed texture + // Rebind in case previous renderHUDEffect changed texture
+ this.field_73839_d.func_110434_K().func_110577_a(ContainerScreen.field_147001_a); + this.field_73839_d.func_110434_K().func_110577_a(ContainerScreen.field_147001_a);
if (effectinstance.func_205348_f()) { if (effectinstance.func_205348_f()) {
int k = this.field_194811_H; int k = this.field_194811_H;
int l = 1; int l = 1;
@@ -439,11 +442,13 @@ @@ -443,6 +446,7 @@
float f_f = f; RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
int k_f = k; blit(j1 + 3, k1 + 3, this.getBlitOffset(), 18, 18, textureatlassprite);
int l_f = l;
+
TextureAtlasSprite textureatlassprite = potionspriteuploader.func_215288_a(effect);
list.add(() -> {
GlStateManager.color4f(1.0F, 1.0F, 1.0F, f_f);
blit(k_f + 3, l_f + 3, this.blitOffset, 18, 18, textureatlassprite);
}); });
+ effect.renderHUDEffect(effectinstance, this, k, l, this.blitOffset, f); + effectinstance.renderHUDEffect(this, k, l, this.getBlitOffset(), f);
} }
} }
@@ -572,6 +577,7 @@ @@ -568,6 +572,7 @@
} }
String s = itextcomponent.func_150254_d(); String s = itextcomponent.func_150254_d();
+ s = this.field_92016_l.func_77973_b().getHighlightTip(this.field_92016_l, s); + s = this.field_92016_l.getHighlightTip(s);
int i = (this.field_194811_H - this.func_175179_f().func_78256_a(s)) / 2; int i = (this.field_194811_H - this.func_175179_f().func_78256_a(s)) / 2;
int j = this.field_194812_I - 59; int j = this.field_194812_I - 59;
if (!this.field_73839_d.field_71442_b.func_78755_b()) { if (!this.field_73839_d.field_71442_b.func_78755_b()) {
@@ -588,7 +594,13 @@ @@ -584,7 +589,13 @@
GlStateManager.enableBlend(); RenderSystem.enableBlend();
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); RenderSystem.defaultBlendFunc();
fill(i - 2, j - 2, i + this.func_175179_f().func_78256_a(s) + 2, j + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0)); fill(i - 2, j - 2, i + this.func_175179_f().func_78256_a(s) + 2, j + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
+ FontRenderer font = field_92016_l.func_77973_b().getFontRenderer(field_92016_l); + FontRenderer font = field_92016_l.func_77973_b().getFontRenderer(field_92016_l);
+ if (font == null) { + if (font == null) {
@ -43,6 +37,6 @@
+ i = (this.field_194811_H - font.func_78256_a(s)) / 2; + i = (this.field_194811_H - font.func_78256_a(s)) / 2;
+ font.func_175063_a(s, (float)i, (float)j, 16777215 + (k << 24)); + font.func_175063_a(s, (float)i, (float)j, 16777215 + (k << 24));
+ } + }
GlStateManager.disableBlend(); RenderSystem.disableBlend();
GlStateManager.popMatrix(); RenderSystem.popMatrix();
} }

View File

@ -1,10 +1,10 @@
--- a/net/minecraft/client/gui/MapItemRenderer.java --- a/net/minecraft/client/gui/MapItemRenderer.java
+++ b/net/minecraft/client/gui/MapItemRenderer.java +++ b/net/minecraft/client/gui/MapItemRenderer.java
@@ -118,6 +118,7 @@ @@ -114,6 +114,7 @@
for(MapDecoration mapdecoration : this.field_148242_b.field_76203_h.values()) { for(MapDecoration mapdecoration : this.field_148242_b.field_76203_h.values()) {
if (!p_148237_1_ || mapdecoration.func_191180_f()) { if (!p_228089_3_ || mapdecoration.func_191180_f()) {
+ if (mapdecoration.render(k)) { k++; continue; } + if (mapdecoration.render(k)) { k++; continue; }
MapItemRenderer.this.field_148251_b.func_110577_a(MapItemRenderer.field_148253_a); p_228089_1_.func_227860_a_();
GlStateManager.pushMatrix(); p_228089_1_.func_227861_a_((double)(0.0F + (float)mapdecoration.func_176112_b() / 2.0F + 64.0F), (double)(0.0F + (float)mapdecoration.func_176113_c() / 2.0F + 64.0F), (double)-0.02F);
GlStateManager.translatef(0.0F + (float)mapdecoration.func_176112_b() / 2.0F + 64.0F, 0.0F + (float)mapdecoration.func_176113_c() / 2.0F + 64.0F, -0.02F); p_228089_1_.func_227863_a_(Vector3f.field_229183_f_.func_229187_a_((float)(mapdecoration.func_176111_d() * 360) / 16.0F));

View File

@ -1,10 +1,10 @@
--- a/net/minecraft/client/gui/ResourceLoadProgressGui.java --- a/net/minecraft/client/gui/ResourceLoadProgressGui.java
+++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java +++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java
@@ -79,6 +79,7 @@ @@ -81,6 +81,7 @@
this.blit(k1, i1, 0, 0, 256, 256); this.blit(k1, i1, 0, 0, 256, 256);
float f3 = this.field_212975_c.func_219555_b(); float f3 = this.field_212975_c.func_219555_b();
this.field_212978_f = this.field_212978_f * 0.95F + f3 * 0.050000012F; this.field_212978_f = MathHelper.func_76131_a(this.field_212978_f * 0.95F + f3 * 0.050000012F, 0.0F, 1.0F);
+ net.minecraftforge.fml.client.ClientModLoader.renderProgressText(); + net.minecraftforge.fml.client.ClientModLoader.renderProgressText();
if (f < 1.0F) { if (f < 1.0F) {
this.func_212972_a(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, this.field_212978_f, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F)); this.func_228181_a_(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
} }

View File

@ -1,24 +1,24 @@
--- a/net/minecraft/client/gui/SlotGui.java --- a/net/minecraft/client/gui/SlotGui.java
+++ b/net/minecraft/client/gui/SlotGui.java +++ b/net/minecraft/client/gui/SlotGui.java
@@ -154,15 +154,8 @@ @@ -153,15 +153,8 @@
GlStateManager.disableFog(); this.capYPosition();
Tessellator tessellator = Tessellator.func_178181_a(); Tessellator tessellator = Tessellator.func_178181_a();
BufferBuilder bufferbuilder = tessellator.func_178180_c(); BufferBuilder bufferbuilder = tessellator.func_178180_c();
- this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION); - this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION);
- GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
- float f = 32.0F; - float f = 32.0F;
- bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i); - bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i);
- bufferbuilder.func_181662_b((double)this.x0, (double)this.y1, 0.0D).func_187315_a((double)((float)this.x0 / 32.0F), (double)((float)(this.y1 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); - bufferbuilder.func_225582_a_((double)this.x0, (double)this.y1, 0.0D).func_225583_a_((float)this.x0 / 32.0F, (float)(this.y1 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- bufferbuilder.func_181662_b((double)this.x1, (double)this.y1, 0.0D).func_187315_a((double)((float)this.x1 / 32.0F), (double)((float)(this.y1 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); - bufferbuilder.func_225582_a_((double)this.x1, (double)this.y1, 0.0D).func_225583_a_((float)this.x1 / 32.0F, (float)(this.y1 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- bufferbuilder.func_181662_b((double)this.x1, (double)this.y0, 0.0D).func_187315_a((double)((float)this.x1 / 32.0F), (double)((float)(this.y0 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); - bufferbuilder.func_225582_a_((double)this.x1, (double)this.y0, 0.0D).func_225583_a_((float)this.x1 / 32.0F, (float)(this.y0 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- bufferbuilder.func_181662_b((double)this.x0, (double)this.y0, 0.0D).func_187315_a((double)((float)this.x0 / 32.0F), (double)((float)(this.y0 + (int)this.yo) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d(); - bufferbuilder.func_225582_a_((double)this.x0, (double)this.y0, 0.0D).func_225583_a_((float)this.x0 / 32.0F, (float)(this.y0 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- tessellator.func_78381_a(); - tessellator.func_78381_a();
+ // Forge: background rendering moved into separate method. + // Forge: background rendering moved into separate method.
+ this.drawContainerBackground(tessellator); + this.drawContainerBackground(tessellator);
int k = this.x0 + this.width / 2 - this.getRowWidth() / 2 + 2; int k = this.x0 + this.width / 2 - this.getRowWidth() / 2 + 2;
int l = this.y0 + 4 - (int)this.yo; int l = this.y0 + 4 - (int)this.yo;
if (this.renderHeader) { if (this.renderHeader) {
@@ -402,4 +395,17 @@ @@ -401,4 +394,17 @@
public int getItemHeight() { public int getItemHeight() {
return this.itemHeight; return this.itemHeight;
} }
@ -26,13 +26,13 @@
+ protected void drawContainerBackground(Tessellator tessellator) { + protected void drawContainerBackground(Tessellator tessellator) {
+ BufferBuilder buffer = tessellator.func_178180_c(); + BufferBuilder buffer = tessellator.func_178180_c();
+ this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION); + this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION);
+ GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float scale = 32.0F; + float scale = 32.0F;
+ buffer.func_181668_a(7, DefaultVertexFormats.field_181709_i); + buffer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
+ buffer.func_181662_b((double)this.x0, (double)this.y1, 0.0D).func_187315_a(this.x0 / scale, (this.y1 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d(); + buffer.func_225582_a_((double)this.x0, (double)this.y1, 0.0D).func_225583_a_(this.x0 / scale, (this.y1 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ buffer.func_181662_b((double)this.x1, (double)this.y1, 0.0D).func_187315_a(this.x1 / scale, (this.y1 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d(); + buffer.func_225582_a_((double)this.x1, (double)this.y1, 0.0D).func_225583_a_(this.x1 / scale, (this.y1 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ buffer.func_181662_b((double)this.x1, (double)this.y0, 0.0D).func_187315_a(this.x1 / scale, (this.y0 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d(); + buffer.func_225582_a_((double)this.x1, (double)this.y0, 0.0D).func_225583_a_(this.x1 / scale, (this.y0 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ buffer.func_181662_b((double)this.x0, (double)this.y0, 0.0D).func_187315_a(this.x0 / scale, (this.y0 + (int)this.yo) / scale).func_181669_b(32, 32, 32, 255).func_181675_d(); + buffer.func_225582_a_((double)this.x0, (double)this.y0, 0.0D).func_225583_a_(this.x0 / scale, (this.y0 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ tessellator.func_78381_a(); + tessellator.func_78381_a();
+ } + }
} }

View File

@ -24,7 +24,7 @@
public Advancement func_193935_c() { public Advancement func_193935_c() {
return this.field_191805_h; return this.field_191805_h;
} }
@@ -136,8 +146,8 @@ @@ -150,8 +160,8 @@
return null; return null;
} else { } else {
for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) { for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/advancements/AdvancementsScreen.java --- a/net/minecraft/client/gui/advancements/AdvancementsScreen.java
+++ b/net/minecraft/client/gui/advancements/AdvancementsScreen.java +++ b/net/minecraft/client/gui/advancements/AdvancementsScreen.java
@@ -25,6 +25,7 @@ @@ -24,6 +24,7 @@
private final Map<Advancement, AdvancementTabGui> field_191947_i = Maps.newLinkedHashMap(); private final Map<Advancement, AdvancementTabGui> field_191947_i = Maps.newLinkedHashMap();
private AdvancementTabGui field_191940_s; private AdvancementTabGui field_191940_s;
private boolean field_191944_v; private boolean field_191944_v;
@ -8,7 +8,7 @@
public AdvancementsScreen(ClientAdvancementManager p_i47383_1_) { public AdvancementsScreen(ClientAdvancementManager p_i47383_1_) {
super(NarratorChatListener.field_216868_a); super(NarratorChatListener.field_216868_a);
@@ -40,7 +41,13 @@ @@ -39,7 +40,13 @@
} else { } else {
this.field_191946_h.func_194230_a(this.field_191940_s == null ? null : this.field_191940_s.func_193935_c(), true); this.field_191946_h.func_194230_a(this.field_191940_s == null ? null : this.field_191940_s.func_193935_c(), true);
} }
@ -23,7 +23,7 @@
} }
public void removed() { public void removed() {
@@ -58,7 +65,7 @@ @@ -57,7 +64,7 @@
int j = (this.height - 140) / 2; int j = (this.height - 140) / 2;
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
@ -32,20 +32,20 @@
this.field_191946_h.func_194230_a(advancementtabgui.func_193935_c(), true); this.field_191946_h.func_194230_a(advancementtabgui.func_193935_c(), true);
break; break;
} }
@@ -83,6 +90,12 @@ @@ -82,6 +89,12 @@
int j = (this.height - 140) / 2; int j = (this.height - 140) / 2;
this.renderBackground(); this.renderBackground();
this.func_191936_c(p_render_1_, p_render_2_, i, j); this.func_191936_c(p_render_1_, p_render_2_, i, j);
+ if (maxPages != 0) { + if (maxPages != 0) {
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1); + String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
+ int width = this.font.func_78256_a(page); + int width = this.font.func_78256_a(page);
+ GlStateManager.disableLighting(); + RenderSystem.disableLighting();
+ this.font.func_175063_a(page, i + (252 / 2) - (width / 2), j - 44, -1); + this.font.func_175063_a(page, i + (252 / 2) - (width / 2), j - 44, -1);
+ } + }
this.func_191934_b(i, j); this.func_191934_b(i, j);
this.func_191937_d(p_render_1_, p_render_2_, i, j); this.func_191937_d(p_render_1_, p_render_2_, i, j);
} }
@@ -131,6 +144,7 @@ @@ -128,6 +141,7 @@
this.minecraft.func_110434_K().func_110577_a(field_191945_g); this.minecraft.func_110434_K().func_110577_a(field_191945_g);
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
@ -53,15 +53,15 @@
advancementtabgui.func_191798_a(p_191934_1_, p_191934_2_, advancementtabgui == this.field_191940_s); advancementtabgui.func_191798_a(p_191934_1_, p_191934_2_, advancementtabgui == this.field_191940_s);
} }
@@ -139,6 +153,7 @@ @@ -135,6 +149,7 @@
RenderHelper.func_74520_c(); RenderSystem.defaultBlendFunc();
for(AdvancementTabGui advancementtabgui1 : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui1 : this.field_191947_i.values()) {
+ if (advancementtabgui1.getPage() == tabPage) + if (advancementtabgui1.getPage() == tabPage)
advancementtabgui1.func_191796_a(p_191934_1_, p_191934_2_, this.itemRenderer); advancementtabgui1.func_191796_a(p_191934_1_, p_191934_2_, this.itemRenderer);
} }
@@ -161,7 +176,7 @@ @@ -157,7 +172,7 @@
if (this.field_191947_i.size() > 1) { if (this.field_191947_i.size() > 1) {
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {

View File

@ -5,9 +5,9 @@
for(ClientBossInfo clientbossinfo : this.field_184060_g.values()) { for(ClientBossInfo clientbossinfo : this.field_184060_g.values()) {
int k = i / 2 - 91; int k = i / 2 - 91;
+ net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo event = + net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo event =
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(this.field_184059_f.field_195558_d, clientbossinfo, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b); + net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(this.field_184059_f.func_228018_at_(), clientbossinfo, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b);
+ if (!event.isCanceled()) { + if (!event.isCanceled()) {
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.field_184059_f.func_110434_K().func_110577_a(field_184058_a); this.field_184059_f.func_110434_K().func_110577_a(field_184058_a);
this.func_184052_a(k, j, clientbossinfo); this.func_184052_a(k, j, clientbossinfo);
@@ -38,7 +41,9 @@ @@ -38,7 +41,9 @@
@ -17,7 +17,7 @@
- j += 10 + 9; - j += 10 + 9;
+ } + }
+ j += event.getIncrement(); + j += event.getIncrement();
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPost(this.field_184059_f.field_195558_d); + net.minecraftforge.client.ForgeHooksClient.bossBarRenderPost(this.field_184059_f.func_228018_at_());
if (j >= this.field_184059_f.field_195558_d.func_198087_p() / 3) { if (j >= this.field_184059_f.func_228018_at_().func_198087_p() / 3) {
break; break;
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/overlay/DebugOverlayGui.java --- a/net/minecraft/client/gui/overlay/DebugOverlayGui.java
+++ b/net/minecraft/client/gui/overlay/DebugOverlayGui.java +++ b/net/minecraft/client/gui/overlay/DebugOverlayGui.java
@@ -342,7 +342,7 @@ @@ -357,7 +357,7 @@
list.add(this.func_211534_a(entry)); list.add(this.func_211534_a(entry));
} }
@ -9,7 +9,7 @@
list.add("#" + resourcelocation); list.add("#" + resourcelocation);
} }
} }
@@ -358,7 +358,7 @@ @@ -373,7 +373,7 @@
list.add(this.func_211534_a(entry1)); list.add(this.func_211534_a(entry1));
} }
@ -18,7 +18,7 @@
list.add("#" + resourcelocation1); list.add("#" + resourcelocation1);
} }
} }
@@ -368,6 +368,7 @@ @@ -383,6 +383,7 @@
list.add(""); list.add("");
list.add(TextFormatting.UNDERLINE + "Targeted Entity"); list.add(TextFormatting.UNDERLINE + "Targeted Entity");
list.add(String.valueOf((Object)Registry.field_212629_r.func_177774_c(entity.func_200600_R()))); list.add(String.valueOf((Object)Registry.field_212629_r.func_177774_c(entity.func_200600_R())));

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java --- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java +++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
@@ -89,7 +89,7 @@ @@ -88,7 +88,7 @@
this.func_205702_a(); this.func_205702_a();
this.field_193018_j.clear(); this.field_193018_j.clear();
@ -9,7 +9,7 @@
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories)); this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
} }
@@ -421,7 +421,7 @@ @@ -417,7 +417,7 @@
languagemanager.func_135045_a(language); languagemanager.func_135045_a(language);
this.field_191888_F.field_71474_y.field_74363_ab = language.getCode(); this.field_191888_F.field_71474_y.field_74363_ab = language.getCode();

View File

@ -1,23 +1,23 @@
--- a/net/minecraft/client/gui/screen/ControlsScreen.java --- a/net/minecraft/client/gui/screen/ControlsScreen.java
+++ b/net/minecraft/client/gui/screen/ControlsScreen.java +++ b/net/minecraft/client/gui/screen/ControlsScreen.java
@@ -37,7 +37,7 @@ @@ -32,7 +32,7 @@
this.children.add(this.field_146494_r); this.children.add(this.field_146494_r);
this.field_146493_s = this.addButton(new Button(this.width / 2 - 155, this.height - 29, 150, 20, I18n.func_135052_a("controls.resetAll"), (p_213125_1_) -> { this.field_146493_s = this.addButton(new Button(this.width / 2 - 155, this.height - 29, 150, 20, I18n.func_135052_a("controls.resetAll"), (p_213125_1_) -> {
for(KeyBinding keybinding : this.minecraft.field_71474_y.field_74324_K) { for(KeyBinding keybinding : this.field_228183_b_.field_74324_K) {
- keybinding.func_197979_b(keybinding.func_197977_i()); - keybinding.func_197979_b(keybinding.func_197977_i());
+ keybinding.setToDefault(); + keybinding.setToDefault();
} }
KeyBinding.func_74508_b(); KeyBinding.func_74508_b();
@@ -61,11 +61,14 @@ @@ -56,11 +56,14 @@
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) { public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) {
if (this.field_146491_f != null) { if (this.field_146491_f != null) {
if (p_keyPressed_1_ == 256) { if (p_keyPressed_1_ == 256) {
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.field_197958_a); + this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.field_197958_a);
this.field_146497_i.func_198014_a(this.field_146491_f, InputMappings.field_197958_a); this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.field_197958_a);
} else { } else {
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_)); + this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
this.field_146497_i.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_)); this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
} }
+ if (!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.field_146491_f.getKey())) + if (!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.field_146491_f.getKey()))

View File

@ -1,7 +1,7 @@
--- a/net/minecraft/client/gui/screen/CreateWorldScreen.java --- a/net/minecraft/client/gui/screen/CreateWorldScreen.java
+++ b/net/minecraft/client/gui/screen/CreateWorldScreen.java +++ b/net/minecraft/client/gui/screen/CreateWorldScreen.java
@@ -137,14 +137,7 @@ @@ -145,14 +145,7 @@
})); });
this.field_146320_D.visible = false; this.field_146320_D.visible = false;
this.field_146322_F = this.addButton(new Button(this.width / 2 + 5, 120, 150, 20, I18n.func_135052_a("selectWorld.customizeType"), (p_214314_1_) -> { this.field_146322_F = this.addButton(new Button(this.width / 2 + 5, 120, 150, 20, I18n.func_135052_a("selectWorld.customizeType"), (p_214314_1_) -> {
- if (WorldType.field_77139_a[this.field_146331_K] == WorldType.field_77138_c) { - if (WorldType.field_77139_a[this.field_146331_K] == WorldType.field_77138_c) {
@ -16,11 +16,12 @@
})); }));
this.field_146322_F.visible = false; this.field_146322_F.visible = false;
this.field_146321_E = this.addButton(new Button(this.width / 2 - 155, 151, 150, 20, I18n.func_135052_a("selectWorld.allowCommands"), (p_214315_1_) -> { this.field_146321_E = this.addButton(new Button(this.width / 2 - 155, 151, 150, 20, I18n.func_135052_a("selectWorld.allowCommands"), (p_214315_1_) -> {
@@ -223,6 +216,7 @@ @@ -240,6 +233,8 @@
i = (long)s.hashCode();
} }
} }
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
WorldSettings worldsettings = new WorldSettings(i, GameType.func_77142_a(this.field_146342_r), this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]); + WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
+
WorldSettings worldsettings = new WorldSettings(i, this.field_228197_f_.field_228218_f_, this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]);
worldsettings.func_205390_a(Dynamic.convert(NBTDynamicOps.field_210820_a, JsonOps.INSTANCE, this.field_146334_a)); worldsettings.func_205390_a(Dynamic.convert(NBTDynamicOps.field_210820_a, JsonOps.INSTANCE, this.field_146334_a));
if (this.field_146338_v && !this.field_146337_w) {

View File

@ -1,10 +1,10 @@
--- a/net/minecraft/client/gui/screen/DeathScreen.java --- a/net/minecraft/client/gui/screen/DeathScreen.java
+++ b/net/minecraft/client/gui/screen/DeathScreen.java +++ b/net/minecraft/client/gui/screen/DeathScreen.java
@@ -44,6 +44,7 @@ @@ -34,6 +34,7 @@
})); }));
Button button = this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 96, 200, 20, s1, (p_213020_1_) -> { Button button = this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 96, 200, 20, I18n.func_135052_a("deathScreen.titleScreen"), (p_213020_1_) -> {
if (this.field_213023_c) { if (this.field_213023_c) {
+ func_213022_a(true); + func_213022_a(true);
this.minecraft.func_147108_a(new MainMenuScreen()); this.func_228177_a_();
} else { } else {
ConfirmScreen confirmscreen = new ConfirmScreen(this::func_213022_a, new TranslationTextComponent("deathScreen.quit.confirm"), new StringTextComponent(""), I18n.func_135052_a("deathScreen.titleScreen"), I18n.func_135052_a("deathScreen.respawn")); ConfirmScreen confirmscreen = new ConfirmScreen(this::func_213022_a, new TranslationTextComponent("deathScreen.quit.confirm"), new StringTextComponent(""), I18n.func_135052_a("deathScreen.titleScreen"), I18n.func_135052_a("deathScreen.respawn"));

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/EnchantmentScreen.java --- a/net/minecraft/client/gui/screen/EnchantmentScreen.java
+++ b/net/minecraft/client/gui/screen/EnchantmentScreen.java +++ b/net/minecraft/client/gui/screen/EnchantmentScreen.java
@@ -146,7 +146,7 @@ @@ -155,7 +155,7 @@
String s1 = EnchantmentNameParts.func_178176_a().func_148334_a(this.font, i2); String s1 = EnchantmentNameParts.func_178176_a().func_148334_a(this.font, i2);
FontRenderer fontrenderer = this.minecraft.func_211500_ak().func_211504_a(Minecraft.field_71464_q); FontRenderer fontrenderer = this.minecraft.func_211500_ak().func_211504_a(Minecraft.field_71464_q);
int j2 = 6839882; int j2 = 6839882;
@ -9,7 +9,7 @@
this.blit(j1, j + 14 + 19 * i1, 0, 185, 108, 19); this.blit(j1, j + 14 + 19 * i1, 0, 185, 108, 19);
this.blit(j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16); this.blit(j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16);
fontrenderer.func_78279_b(s1, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1); fontrenderer.func_78279_b(s1, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1);
@@ -186,10 +186,12 @@ @@ -195,10 +195,12 @@
Enchantment enchantment = Enchantment.func_185262_c((this.field_147002_h).field_185001_h[j]); Enchantment enchantment = Enchantment.func_185262_c((this.field_147002_h).field_185001_h[j]);
int l = (this.field_147002_h).field_185002_i[j]; int l = (this.field_147002_h).field_185002_i[j];
int i1 = j + 1; int i1 = j + 1;

View File

@ -1,11 +1,11 @@
--- a/net/minecraft/client/gui/screen/LanguageScreen.java --- a/net/minecraft/client/gui/screen/LanguageScreen.java
+++ b/net/minecraft/client/gui/screen/LanguageScreen.java +++ b/net/minecraft/client/gui/screen/LanguageScreen.java
@@ -45,7 +45,7 @@ @@ -41,7 +41,7 @@
if (languagescreen$list$languageentry != null && !languagescreen$list$languageentry.field_214398_b.getCode().equals(this.field_146454_h.func_135041_c().getCode())) { if (languagescreen$list$languageentry != null && !languagescreen$list$languageentry.field_214398_b.getCode().equals(this.field_146454_h.func_135041_c().getCode())) {
this.field_146454_h.func_135045_a(languagescreen$list$languageentry.field_214398_b); this.field_146454_h.func_135045_a(languagescreen$list$languageentry.field_214398_b);
this.field_146451_g.field_74363_ab = languagescreen$list$languageentry.field_214398_b.getCode(); this.field_228183_b_.field_74363_ab = languagescreen$list$languageentry.field_214398_b.getCode();
- this.minecraft.func_213237_g(); - this.minecraft.func_213237_g();
+ net.minecraftforge.client.ForgeHooksClient.refreshResources(this.minecraft, net.minecraftforge.resource.VanillaResourceType.LANGUAGES); + net.minecraftforge.client.ForgeHooksClient.refreshResources(this.minecraft, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);
this.font.func_78275_b(this.field_146454_h.func_135044_b()); this.font.func_78275_b(this.field_146454_h.func_135044_b());
this.field_146452_r.setMessage(I18n.func_135052_a("gui.done")); this.field_146452_r.setMessage(I18n.func_135052_a("gui.done"));
this.field_211832_i.setMessage(AbstractOption.field_216684_H.func_216743_c(this.field_146451_g)); this.field_211832_i.setMessage(AbstractOption.field_216684_H.func_216743_c(this.field_228183_b_));

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/MainMenuScreen.java --- a/net/minecraft/client/gui/screen/MainMenuScreen.java
+++ b/net/minecraft/client/gui/screen/MainMenuScreen.java +++ b/net/minecraft/client/gui/screen/MainMenuScreen.java
@@ -51,6 +51,7 @@ @@ -45,6 +45,7 @@
private final RenderSkybox field_209101_K = new RenderSkybox(field_213098_a); private final RenderSkybox field_209101_K = new RenderSkybox(field_213098_a);
private final boolean field_213102_y; private final boolean field_213102_y;
private long field_213103_z; private long field_213103_z;
@ -8,7 +8,7 @@
public MainMenuScreen() { public MainMenuScreen() {
this(false); this(false);
@@ -98,10 +99,14 @@ @@ -88,10 +89,14 @@
this.field_193979_N = this.width - this.field_193978_M - 2; this.field_193979_N = this.width - this.field_193978_M - 2;
int i = 24; int i = 24;
int j = this.height / 4 + 48; int j = this.height / 4 + 48;
@ -23,7 +23,7 @@
} }
this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, Button.WIDGETS_LOCATION, 256, 256, (p_213090_1_) -> { this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, Button.WIDGETS_LOCATION, 256, 256, (p_213090_1_) -> {
@@ -130,6 +135,7 @@ @@ -116,6 +121,7 @@
if (this.func_183501_a()) { if (this.func_183501_a()) {
this.field_183503_M.init(this.minecraft, this.width, this.height); this.field_183503_M.init(this.minecraft, this.width, this.height);
} }
@ -31,7 +31,7 @@
} }
@@ -140,7 +146,7 @@ @@ -126,7 +132,7 @@
this.addButton(new Button(this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, 200, 20, I18n.func_135052_a("menu.multiplayer"), (p_213086_1_) -> { this.addButton(new Button(this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, 200, 20, I18n.func_135052_a("menu.multiplayer"), (p_213086_1_) -> {
this.minecraft.func_147108_a(new MultiplayerScreen(this)); this.minecraft.func_147108_a(new MultiplayerScreen(this));
})); }));
@ -40,15 +40,15 @@
this.func_140005_i(); this.func_140005_i();
})); }));
} }
@@ -204,6 +210,7 @@ @@ -190,6 +196,7 @@
this.minecraft.func_110434_K().func_110577_a(field_194400_H); this.minecraft.func_110434_K().func_110577_a(field_194400_H);
blit(j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16); blit(j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.font, this.width, this.height); + net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.font, this.width, this.height);
if (this.field_73975_c != null) { if (this.field_73975_c != null) {
GlStateManager.pushMatrix(); RenderSystem.pushMatrix();
GlStateManager.translatef((float)(this.width / 2 + 90), 70.0F, 0.0F); RenderSystem.translatef((float)(this.width / 2 + 90), 70.0F, 0.0F);
@@ -222,7 +229,13 @@ @@ -208,7 +215,13 @@
s = s + ("release".equalsIgnoreCase(this.minecraft.func_184123_d()) ? "" : "/" + this.minecraft.func_184123_d()); s = s + ("release".equalsIgnoreCase(this.minecraft.func_184123_d()) ? "" : "/" + this.minecraft.func_184123_d());
} }
@ -63,7 +63,7 @@
this.drawString(this.font, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.height - 10, 16777215 | l); this.drawString(this.font, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.height - 10, 16777215 | l);
if (p_render_1_ > this.field_193979_N && p_render_1_ < this.field_193979_N + this.field_193978_M && p_render_2_ > this.height - 10 && p_render_2_ < this.height) { if (p_render_1_ > this.field_193979_N && p_render_1_ < this.field_193979_N + this.field_193978_M && p_render_2_ > this.height - 10 && p_render_2_ < this.height) {
fill(this.field_193979_N, this.height - 1, this.field_193979_N + this.field_193978_M, this.height, 16777215 | l); fill(this.field_193979_N, this.height - 1, this.field_193979_N + this.field_193978_M, this.height, 16777215 | l);
@@ -240,6 +253,7 @@ @@ -222,6 +235,7 @@
if (this.func_183501_a() && f1 >= 1.0F) { if (this.func_183501_a() && f1 >= 1.0F) {
this.field_183503_M.render(p_render_1_, p_render_2_, p_render_3_); this.field_183503_M.render(p_render_1_, p_render_2_, p_render_3_);
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/ResourcePacksScreen.java --- a/net/minecraft/client/gui/screen/ResourcePacksScreen.java
+++ b/net/minecraft/client/gui/screen/ResourcePacksScreen.java +++ b/net/minecraft/client/gui/screen/ResourcePacksScreen.java
@@ -84,11 +84,14 @@ @@ -86,11 +86,14 @@
resourcepacklist.func_198983_a(); resourcepacklist.func_198983_a();
List<ClientResourcePackInfo> list = Lists.newArrayList(resourcepacklist.func_198978_b()); List<ClientResourcePackInfo> list = Lists.newArrayList(resourcepacklist.func_198978_b());
list.removeAll(resourcepacklist.func_198980_d()); list.removeAll(resourcepacklist.func_198980_d());

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/Screen.java --- a/net/minecraft/client/gui/screen/Screen.java
+++ b/net/minecraft/client/gui/screen/Screen.java +++ b/net/minecraft/client/gui/screen/Screen.java
@@ -109,7 +109,10 @@ @@ -111,7 +111,10 @@
} }
protected void renderTooltip(ItemStack p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) { protected void renderTooltip(ItemStack p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) {
@ -12,7 +12,7 @@
} }
public List<String> getTooltipFromItem(ItemStack p_getTooltipFromItem_1_) { public List<String> getTooltipFromItem(ItemStack p_getTooltipFromItem_1_) {
@@ -128,7 +131,11 @@ @@ -130,7 +133,11 @@
} }
public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) { public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) {
@ -22,10 +22,10 @@
+ public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_, FontRenderer font) { + public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_, FontRenderer font) {
+ net.minecraftforge.fml.client.config.GuiUtils.drawHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, width, height, -1, font); + net.minecraftforge.fml.client.config.GuiUtils.drawHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, width, height, -1, font);
+ if (false && !p_renderTooltip_1_.isEmpty()) { + if (false && !p_renderTooltip_1_.isEmpty()) {
GlStateManager.disableRescaleNormal(); RenderSystem.disableRescaleNormal();
RenderHelper.func_74518_a(); RenderSystem.disableDepthTest();
GlStateManager.disableLighting(); int i = 0;
@@ -301,9 +308,12 @@ @@ -308,9 +315,12 @@
} }
public void sendMessage(String p_sendMessage_1_, boolean p_sendMessage_2_) { public void sendMessage(String p_sendMessage_1_, boolean p_sendMessage_2_) {
@ -38,7 +38,7 @@
this.minecraft.field_71439_g.func_71165_d(p_sendMessage_1_); this.minecraft.field_71439_g.func_71165_d(p_sendMessage_1_);
} }
@@ -314,10 +324,14 @@ @@ -321,10 +331,14 @@
this.font = p_init_1_.field_71466_p; this.font = p_init_1_.field_71466_p;
this.width = p_init_2_; this.width = p_init_2_;
this.height = p_init_3_; this.height = p_init_3_;
@ -53,7 +53,7 @@
} }
public void setSize(int p_setSize_1_, int p_setSize_2_) { public void setSize(int p_setSize_1_, int p_setSize_2_) {
@@ -345,6 +359,7 @@ @@ -352,6 +366,7 @@
public void renderBackground(int p_renderBackground_1_) { public void renderBackground(int p_renderBackground_1_) {
if (this.minecraft.field_71441_e != null) { if (this.minecraft.field_71441_e != null) {
this.fillGradient(0, 0, this.width, this.height, -1072689136, -804253680); this.fillGradient(0, 0, this.width, this.height, -1072689136, -804253680);
@ -61,15 +61,15 @@
} else { } else {
this.renderDirtBackground(p_renderBackground_1_); this.renderDirtBackground(p_renderBackground_1_);
} }
@@ -365,6 +380,7 @@ @@ -370,6 +385,7 @@
bufferbuilder.func_181662_b((double)this.width, 0.0D, 0.0D).func_187315_a((double)((float)this.width / 32.0F), (double)p_renderDirtBackground_1_).func_181669_b(64, 64, 64, 255).func_181675_d(); bufferbuilder.func_225582_a_((double)this.width, 0.0D, 0.0D).func_225583_a_((float)this.width / 32.0F, (float)p_renderDirtBackground_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
bufferbuilder.func_181662_b(0.0D, 0.0D, 0.0D).func_187315_a(0.0D, (double)p_renderDirtBackground_1_).func_181669_b(64, 64, 64, 255).func_181675_d(); bufferbuilder.func_225582_a_(0.0D, 0.0D, 0.0D).func_225583_a_(0.0F, (float)p_renderDirtBackground_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
tessellator.func_78381_a(); tessellator.func_78381_a();
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
} }
public boolean isPauseScreen() { public boolean isPauseScreen() {
@@ -448,4 +464,8 @@ @@ -453,4 +469,8 @@
public boolean isMouseOver(double p_isMouseOver_1_, double p_isMouseOver_3_) { public boolean isMouseOver(double p_isMouseOver_1_, double p_isMouseOver_3_) {
return true; return true;
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/ServerSelectionList.java --- a/net/minecraft/client/gui/screen/ServerSelectionList.java
+++ b/net/minecraft/client/gui/screen/ServerSelectionList.java +++ b/net/minecraft/client/gui/screen/ServerSelectionList.java
@@ -292,6 +292,8 @@ @@ -294,6 +294,8 @@
this.field_148303_c.func_146793_a(s); this.field_148303_c.func_146793_a(s);
} }

View File

@ -1,59 +1,43 @@
--- a/net/minecraft/client/gui/screen/inventory/ContainerScreen.java --- a/net/minecraft/client/gui/screen/inventory/ContainerScreen.java
+++ b/net/minecraft/client/gui/screen/inventory/ContainerScreen.java +++ b/net/minecraft/client/gui/screen/inventory/ContainerScreen.java
@@ -73,6 +73,7 @@ @@ -71,6 +71,7 @@
int i = this.field_147003_i; int i = this.field_147003_i;
int j = this.field_147009_r; int j = this.field_147009_r;
this.func_146976_a(p_render_3_, p_render_1_, p_render_2_); this.func_146976_a(p_render_3_, p_render_1_, p_render_2_);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawBackground(this, p_render_1_, p_render_2_)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawBackground(this, p_render_1_, p_render_2_));
GlStateManager.disableRescaleNormal(); RenderSystem.disableRescaleNormal();
RenderHelper.func_74518_a(); RenderSystem.disableDepthTest();
GlStateManager.disableLighting(); super.render(p_render_1_, p_render_2_, p_render_3_);
@@ -102,7 +103,8 @@ @@ -96,13 +97,15 @@
int j1 = slot.field_75223_e; int j1 = slot.field_75223_e;
int k1 = slot.field_75221_f; int k1 = slot.field_75221_f;
GlStateManager.colorMask(true, true, true, false); RenderSystem.colorMask(true, true, true, false);
- this.fillGradient(j1, k1, j1 + 16, k1 + 16, -2130706433, -2130706433); - this.fillGradient(j1, k1, j1 + 16, k1 + 16, -2130706433, -2130706433);
+ int slotColor = this.getSlotColor(i1); + int slotColor = this.getSlotColor(i1);
+ this.fillGradient(j1, k1, j1 + 16, k1 + 16, slotColor, slotColor); + this.fillGradient(j1, k1, j1 + 16, k1 + 16, slotColor, slotColor);
GlStateManager.colorMask(true, true, true, true); RenderSystem.colorMask(true, true, true, true);
GlStateManager.enableLighting(); RenderSystem.enableDepthTest();
GlStateManager.enableDepthTest(); }
@@ -112,6 +114,7 @@ }
RenderHelper.func_74518_a();
this.func_146979_b(p_render_1_, p_render_2_); this.func_146979_b(p_render_1_, p_render_2_);
RenderHelper.func_74520_c();
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawForeground(this, p_render_1_, p_render_2_)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawForeground(this, p_render_1_, p_render_2_));
PlayerInventory playerinventory = this.minecraft.field_71439_g.field_71071_by; PlayerInventory playerinventory = this.minecraft.field_71439_g.field_71071_by;
ItemStack itemstack = this.field_147012_x.func_190926_b() ? playerinventory.func_70445_o() : this.field_147012_x; ItemStack itemstack = this.field_147012_x.func_190926_b() ? playerinventory.func_70445_o() : this.field_147012_x;
if (!itemstack.func_190926_b()) { if (!itemstack.func_190926_b()) {
@@ -163,8 +166,10 @@ @@ -152,8 +155,10 @@
GlStateManager.translatef(0.0F, 0.0F, 32.0F); RenderSystem.translatef(0.0F, 0.0F, 32.0F);
this.blitOffset = 200; this.setBlitOffset(200);
this.itemRenderer.field_77023_b = 200.0F; this.itemRenderer.field_77023_b = 200.0F;
+ net.minecraft.client.gui.FontRenderer font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_); + net.minecraft.client.gui.FontRenderer font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_);
+ if (font == null) font = this.font; + if (font == null) font = this.font;
this.itemRenderer.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_); this.itemRenderer.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_);
- this.itemRenderer.func_180453_a(this.font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_); - this.itemRenderer.func_180453_a(this.font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_);
+ this.itemRenderer.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_); + this.itemRenderer.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_);
this.blitOffset = 0; this.setBlitOffset(0);
this.itemRenderer.field_77023_b = 0.0F; this.itemRenderer.field_77023_b = 0.0F;
} }
@@ -208,11 +213,10 @@ @@ -260,7 +265,8 @@
this.blitOffset = 100;
this.itemRenderer.field_77023_b = 100.0F;
if (itemstack.func_190926_b() && p_146977_1_.func_111238_b()) {
- String s1 = p_146977_1_.func_178171_c();
- if (s1 != null) {
- TextureAtlasSprite textureatlassprite = this.minecraft.func_147117_R().func_110572_b(s1);
+ TextureAtlasSprite textureatlassprite = p_146977_1_.getBackgroundSprite();
+ if (textureatlassprite != null) {
GlStateManager.disableLighting();
- this.minecraft.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
+ this.minecraft.func_110434_K().func_110577_a(p_146977_1_.getBackgroundLocation());
blit(i, j, this.blitOffset, 16, 16, textureatlassprite);
GlStateManager.enableLighting();
flag1 = true;
@@ -273,7 +277,8 @@
if (super.mouseClicked(p_mouseClicked_1_, p_mouseClicked_3_, p_mouseClicked_5_)) { if (super.mouseClicked(p_mouseClicked_1_, p_mouseClicked_3_, p_mouseClicked_5_)) {
return true; return true;
} else { } else {
@ -63,7 +47,7 @@
Slot slot = this.func_195360_a(p_mouseClicked_1_, p_mouseClicked_3_); Slot slot = this.func_195360_a(p_mouseClicked_1_, p_mouseClicked_3_);
long i = Util.func_211177_b(); long i = Util.func_211177_b();
this.field_146993_M = this.field_146998_K == slot && i - this.field_146997_J < 250L && this.field_146992_L == p_mouseClicked_5_; this.field_146993_M = this.field_146998_K == slot && i - this.field_146997_J < 250L && this.field_146992_L == p_mouseClicked_5_;
@@ -282,6 +287,7 @@ @@ -269,6 +275,7 @@
int j = this.field_147003_i; int j = this.field_147003_i;
int k = this.field_147009_r; int k = this.field_147009_r;
boolean flag1 = this.func_195361_a(p_mouseClicked_1_, p_mouseClicked_3_, j, k, p_mouseClicked_5_); boolean flag1 = this.func_195361_a(p_mouseClicked_1_, p_mouseClicked_3_, j, k, p_mouseClicked_5_);
@ -71,7 +55,7 @@
int l = -1; int l = -1;
if (slot != null) { if (slot != null) {
l = slot.field_75222_d; l = slot.field_75222_d;
@@ -307,7 +313,7 @@ @@ -294,7 +301,7 @@
} }
} else if (!this.field_147007_t) { } else if (!this.field_147007_t) {
if (this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { if (this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
@ -79,8 +63,8 @@
+ if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) { + if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
this.func_184098_a(slot, l, p_mouseClicked_5_, ClickType.CLONE); this.func_184098_a(slot, l, p_mouseClicked_5_, ClickType.CLONE);
} else { } else {
boolean flag2 = l != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().field_195558_d.func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().field_195558_d.func_198092_i(), 344)); boolean flag2 = l != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344));
@@ -331,7 +337,7 @@ @@ -318,7 +325,7 @@
this.field_146987_F = 0; this.field_146987_F = 0;
} else if (p_mouseClicked_5_ == 1) { } else if (p_mouseClicked_5_ == 1) {
this.field_146987_F = 1; this.field_146987_F = 1;
@ -89,7 +73,7 @@
this.field_146987_F = 2; this.field_146987_F = 2;
} }
} }
@@ -384,10 +390,13 @@ @@ -371,10 +378,13 @@
} }
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) { public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) {
@ -103,7 +87,7 @@
int k = -1; int k = -1;
if (slot != null) { if (slot != null) {
k = slot.field_75222_d; k = slot.field_75222_d;
@@ -401,7 +410,7 @@ @@ -388,7 +398,7 @@
if (hasShiftDown()) { if (hasShiftDown()) {
if (!this.field_146994_N.func_190926_b()) { if (!this.field_146994_N.func_190926_b()) {
for(Slot slot2 : this.field_147002_h.field_75151_b) { for(Slot slot2 : this.field_147002_h.field_75151_b) {
@ -112,7 +96,7 @@
this.func_184098_a(slot2, slot2.field_75222_d, p_mouseReleased_5_, ClickType.QUICK_MOVE); this.func_184098_a(slot2, slot2.field_75222_d, p_mouseReleased_5_, ClickType.QUICK_MOVE);
} }
} }
@@ -465,7 +474,7 @@ @@ -452,7 +462,7 @@
this.func_184098_a((Slot)null, -999, Container.func_94534_d(2, this.field_146987_F), ClickType.QUICK_CRAFT); this.func_184098_a((Slot)null, -999, Container.func_94534_d(2, this.field_146987_F), ClickType.QUICK_CRAFT);
} else if (!this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { } else if (!this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
@ -120,8 +104,8 @@
+ if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) { + if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
this.func_184098_a(slot, k, p_mouseReleased_5_, ClickType.CLONE); this.func_184098_a(slot, k, p_mouseReleased_5_, ClickType.CLONE);
} else { } else {
boolean flag1 = k != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().field_195558_d.func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().field_195558_d.func_198092_i(), 344)); boolean flag1 = k != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344));
@@ -514,27 +523,32 @@ @@ -501,27 +511,34 @@
if (super.keyPressed(p_keyPressed_1_, p_keyPressed_2_, p_keyPressed_3_)) { if (super.keyPressed(p_keyPressed_1_, p_keyPressed_2_, p_keyPressed_3_)) {
return true; return true;
} else { } else {
@ -145,6 +129,8 @@
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, hasControlDown() ? 1 : 0, ClickType.THROW); this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, hasControlDown() ? 1 : 0, ClickType.THROW);
+ return true; // Forge MC-146650: Needs to return true when the key is handled. + return true; // Forge MC-146650: Needs to return true when the key is handled.
} }
+ } else if (this.minecraft.field_71474_y.field_74316_C.isActiveAndMatches(mouseKey)) {
+ return true; // Forge MC-146650: Emulate MC bug, so we don't drop from hotbar when pressing drop without hovering over a item.
} }
- return true; - return true;
@ -160,7 +146,7 @@
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP); this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP);
return true; return true;
} }
@@ -565,4 +579,16 @@ @@ -552,4 +569,16 @@
public T func_212873_a_() { public T func_212873_a_() {
return this.field_147002_h; return this.field_147002_h;
} }

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/inventory/CreativeScreen.java --- a/net/minecraft/client/gui/screen/inventory/CreativeScreen.java
+++ b/net/minecraft/client/gui/screen/inventory/CreativeScreen.java +++ b/net/minecraft/client/gui/screen/inventory/CreativeScreen.java
@@ -63,6 +63,8 @@ @@ -65,6 +65,8 @@
private boolean field_195377_F; private boolean field_195377_F;
private boolean field_199506_G; private boolean field_199506_G;
private final Map<ResourceLocation, Tag<Item>> field_214085_w = Maps.newTreeMap(); private final Map<ResourceLocation, Tag<Item>> field_214085_w = Maps.newTreeMap();
@ -9,7 +9,7 @@
public CreativeScreen(PlayerEntity p_i1088_1_) { public CreativeScreen(PlayerEntity p_i1088_1_) {
super(new CreativeScreen.CreativeContainer(p_i1088_1_), p_i1088_1_.field_71071_by, new StringTextComponent("")); super(new CreativeScreen.CreativeContainer(p_i1088_1_), p_i1088_1_.field_71071_by, new StringTextComponent(""));
@@ -231,6 +233,12 @@ @@ -233,6 +235,12 @@
if (this.minecraft.field_71442_b.func_78758_h()) { if (this.minecraft.field_71442_b.func_78758_h()) {
super.init(); super.init();
this.minecraft.field_195559_v.func_197967_a(true); this.minecraft.field_195559_v.func_197967_a(true);
@ -22,7 +22,7 @@
this.field_147062_A = new TextFieldWidget(this.font, this.field_147003_i + 82, this.field_147009_r + 6, 80, 9, I18n.func_135052_a("itemGroup.search")); this.field_147062_A = new TextFieldWidget(this.font, this.field_147003_i + 82, this.field_147009_r + 6, 80, 9, I18n.func_135052_a("itemGroup.search"));
this.field_147062_A.func_146203_f(50); this.field_147062_A.func_146203_f(50);
this.field_147062_A.func_146185_a(false); this.field_147062_A.func_146185_a(false);
@@ -271,7 +279,7 @@ @@ -273,7 +281,7 @@
public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_) { public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_) {
if (this.field_195377_F) { if (this.field_195377_F) {
return false; return false;
@ -31,7 +31,7 @@
return false; return false;
} else { } else {
String s = this.field_147062_A.func_146179_b(); String s = this.field_147062_A.func_146179_b();
@@ -289,7 +297,7 @@ @@ -291,7 +299,7 @@
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) { public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) {
this.field_195377_F = false; this.field_195377_F = false;
@ -40,7 +40,7 @@
if (this.minecraft.field_71474_y.field_74310_D.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) { if (this.minecraft.field_71474_y.field_74310_D.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) {
this.field_195377_F = true; this.field_195377_F = true;
this.func_147050_b(ItemGroup.field_78027_g); this.func_147050_b(ItemGroup.field_78027_g);
@@ -325,6 +333,32 @@ @@ -327,6 +335,32 @@
private void func_147053_i() { private void func_147053_i() {
(this.field_147002_h).field_148330_a.clear(); (this.field_147002_h).field_148330_a.clear();
this.field_214085_w.clear(); this.field_214085_w.clear();
@ -73,19 +73,19 @@
String s = this.field_147062_A.func_146179_b(); String s = this.field_147062_A.func_146179_b();
if (s.isEmpty()) { if (s.isEmpty()) {
for(Item item : Registry.field_212630_s) { for(Item item : Registry.field_212630_s) {
@@ -370,9 +404,9 @@ @@ -372,9 +406,9 @@
protected void func_146979_b(int p_146979_1_, int p_146979_2_) { protected void func_146979_b(int p_146979_1_, int p_146979_2_) {
ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w]; ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w];
- if (itemgroup.func_78019_g()) { - if (itemgroup.func_78019_g()) {
+ if (itemgroup != null && itemgroup.func_78019_g()) { + if (itemgroup != null && itemgroup.func_78019_g()) {
GlStateManager.disableBlend(); RenderSystem.disableBlend();
- this.font.func_211126_b(I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, 4210752); - this.font.func_211126_b(I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, 4210752);
+ this.font.func_211126_b(I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, itemgroup.getLabelColor()); + this.font.func_211126_b(I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, itemgroup.getLabelColor());
} }
} }
@@ -383,7 +417,7 @@ @@ -385,7 +419,7 @@
double d1 = p_mouseClicked_3_ - (double)this.field_147009_r; double d1 = p_mouseClicked_3_ - (double)this.field_147009_r;
for(ItemGroup itemgroup : ItemGroup.field_78032_a) { for(ItemGroup itemgroup : ItemGroup.field_78032_a) {
@ -94,7 +94,7 @@
return true; return true;
} }
} }
@@ -404,7 +438,7 @@ @@ -406,7 +440,7 @@
this.field_147066_y = false; this.field_147066_y = false;
for(ItemGroup itemgroup : ItemGroup.field_78032_a) { for(ItemGroup itemgroup : ItemGroup.field_78032_a) {
@ -103,7 +103,7 @@
this.func_147050_b(itemgroup); this.func_147050_b(itemgroup);
return true; return true;
} }
@@ -415,12 +449,15 @@ @@ -417,12 +451,15 @@
} }
private boolean func_147055_p() { private boolean func_147055_p() {
@ -119,7 +119,7 @@
this.field_147008_s.clear(); this.field_147008_s.clear();
(this.field_147002_h).field_148330_a.clear(); (this.field_147002_h).field_148330_a.clear();
if (p_147050_1_ == ItemGroup.field_192395_m) { if (p_147050_1_ == ItemGroup.field_192395_m) {
@@ -494,13 +531,15 @@ @@ -499,13 +536,15 @@
} }
if (this.field_147062_A != null) { if (this.field_147062_A != null) {
@ -136,7 +136,7 @@
this.func_147053_i(); this.func_147053_i();
} else { } else {
@@ -560,16 +599,35 @@ @@ -565,16 +604,35 @@
this.renderBackground(); this.renderBackground();
super.render(p_render_1_, p_render_2_, p_render_3_); super.render(p_render_1_, p_render_2_, p_render_3_);
@ -163,23 +163,22 @@
+ if (maxPages != 0) { + if (maxPages != 0) {
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1); + String page = String.format("%d / %d", tabPage + 1, maxPages + 1);
+ GlStateManager.disableLighting(); + RenderSystem.disableLighting();
+ this.blitOffset = 300; + this.setBlitOffset(300);
+ this.itemRenderer.field_77023_b = 300.0F; + this.itemRenderer.field_77023_b = 300.0F;
+ font.func_211126_b(page, field_147003_i + (field_146999_f / 2) - (font.func_78256_a(page) / 2), field_147009_r - 44, -1); + font.func_211126_b(page, field_147003_i + (field_146999_f / 2) - (font.func_78256_a(page) / 2), field_147009_r - 44, -1);
+ this.blitOffset = 0; + this.setBlitOffset(0);
+ this.itemRenderer.field_77023_b = 0.0F; + this.itemRenderer.field_77023_b = 0.0F;
+ } + }
+ +
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableLighting();
this.func_191948_b(p_render_1_, p_render_2_); this.func_191948_b(p_render_1_, p_render_2_);
@@ -618,7 +676,11 @@ }
@@ -622,7 +680,10 @@
} }
} }
- this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_); - this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_);
+
+ net.minecraft.client.gui.FontRenderer font = p_renderTooltip_1_.func_77973_b().getFontRenderer(p_renderTooltip_1_); + net.minecraft.client.gui.FontRenderer font = p_renderTooltip_1_.func_77973_b().getFontRenderer(p_renderTooltip_1_);
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_renderTooltip_1_); + net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_renderTooltip_1_);
+ this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_, (font == null ? this.font : font)); + this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_, (font == null ? this.font : font));
@ -187,8 +186,8 @@
} else { } else {
super.renderTooltip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_); super.renderTooltip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_);
} }
@@ -630,25 +692,44 @@ @@ -633,25 +694,44 @@
RenderHelper.func_74520_c(); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w]; ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w];
- for(ItemGroup itemgroup1 : ItemGroup.field_78032_a) { - for(ItemGroup itemgroup1 : ItemGroup.field_78032_a) {
@ -221,7 +220,7 @@
+ this.minecraft.func_110434_K().func_110577_a(itemgroup.getBackgroundImage()); + this.minecraft.func_110434_K().func_110577_a(itemgroup.getBackgroundImage());
this.blit(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g); this.blit(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g);
this.field_147062_A.render(p_146976_2_, p_146976_3_, p_146976_1_); this.field_147062_A.render(p_146976_2_, p_146976_3_, p_146976_1_);
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
int i = this.field_147003_i + 175; int i = this.field_147003_i + 175;
int j = this.field_147009_r + 18; int j = this.field_147009_r + 18;
int k = j + 112; int k = j + 112;
@ -236,8 +235,8 @@
+ +
this.func_147051_a(itemgroup); this.func_147051_a(itemgroup);
if (itemgroup == ItemGroup.field_78036_m) { if (itemgroup == ItemGroup.field_78036_m) {
InventoryScreen.func_147046_a(this.field_147003_i + 88, this.field_147009_r + 45, 20, (float)(this.field_147003_i + 88 - p_146976_2_), (float)(this.field_147009_r + 45 - 30 - p_146976_3_), this.minecraft.field_71439_g); InventoryScreen.func_228187_a_(this.field_147003_i + 88, this.field_147009_r + 45, 20, (float)(this.field_147003_i + 88 - p_146976_2_), (float)(this.field_147009_r + 45 - 30 - p_146976_3_), this.minecraft.field_71439_g);
@@ -657,6 +738,7 @@ @@ -660,6 +740,7 @@
} }
protected boolean func_195375_a(ItemGroup p_195375_1_, double p_195375_2_, double p_195375_4_) { protected boolean func_195375_a(ItemGroup p_195375_1_, double p_195375_2_, double p_195375_4_) {
@ -245,43 +244,34 @@
int i = p_195375_1_.func_78020_k(); int i = p_195375_1_.func_78020_k();
int j = 28 * i; int j = 28 * i;
int k = 0; int k = 0;
@@ -726,6 +808,8 @@ @@ -728,6 +809,8 @@
i1 = i1 + (this.field_147000_g - 4);
} }
GlStateManager.disableLighting(); + RenderSystem.color3f(1F, 1F, 1F); //Forge: Reset color in case Items change it.
+ GlStateManager.color3f(1F, 1F, 1F); //Forge: Reset color in case Items change it. + RenderSystem.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border.
+ GlStateManager.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border.
this.blit(l, i1, j, k, 28, 32); this.blit(l, i1, j, k, 28, 32);
this.blitOffset = 100; this.setBlitOffset(100);
this.itemRenderer.field_77023_b = 100.0F; this.itemRenderer.field_77023_b = 100.0F;
@@ -897,6 +981,31 @@ @@ -896,6 +979,22 @@
public boolean func_82869_a(PlayerEntity p_82869_1_) { public boolean func_82869_a(PlayerEntity p_82869_1_) {
return this.field_148332_b.func_82869_a(p_82869_1_); return this.field_148332_b.func_82869_a(p_82869_1_);
} }
+ +
+ public ResourceLocation getBackgroundLocation() { + @Override
+ return this.field_148332_b.getBackgroundLocation();
+ }
+
+ public void setBackgroundLocation(ResourceLocation texture) {
+ this.field_148332_b.setBackgroundLocation(texture);
+ }
+
+ public void setBackgroundName(@Nullable String name) {
+ this.field_148332_b.setBackgroundName(name);
+ }
+
+ @Nullable
+ public net.minecraft.client.renderer.texture.TextureAtlasSprite getBackgroundSprite() {
+ return this.field_148332_b.getBackgroundSprite();
+ }
+
+ public int getSlotIndex() { + public int getSlotIndex() {
+ return this.field_148332_b.getSlotIndex(); + return this.field_148332_b.getSlotIndex();
+ } + }
+ +
+ @Override
+ public boolean isSameInventory(Slot other) { + public boolean isSameInventory(Slot other) {
+ return this.field_148332_b.isSameInventory(other); + return this.field_148332_b.isSameInventory(other);
+ }
+
+ @Override
+ public Slot setBackground(ResourceLocation atlas, ResourceLocation sprite) {
+ this.field_148332_b.setBackground(atlas, sprite);
+ return this;
+ } + }
} }

View File

@ -1,11 +1,11 @@
--- a/net/minecraft/client/gui/toasts/RecipeToast.java --- a/net/minecraft/client/gui/toasts/RecipeToast.java
+++ b/net/minecraft/client/gui/toasts/RecipeToast.java +++ b/net/minecraft/client/gui/toasts/RecipeToast.java
@@ -36,7 +36,7 @@ @@ -34,7 +34,7 @@
p_193653_1_.blit(0, 0, 0, 32, 160, 32);
p_193653_1_.func_192989_b().field_71466_p.func_211126_b(I18n.func_135052_a("recipe.toast.title"), 30.0F, 7.0F, -11534256); p_193653_1_.func_192989_b().field_71466_p.func_211126_b(I18n.func_135052_a("recipe.toast.title"), 30.0F, 7.0F, -11534256);
p_193653_1_.func_192989_b().field_71466_p.func_211126_b(I18n.func_135052_a("recipe.toast.description"), 30.0F, 18.0F, -16777216); p_193653_1_.func_192989_b().field_71466_p.func_211126_b(I18n.func_135052_a("recipe.toast.description"), 30.0F, 18.0F, -16777216);
RenderHelper.func_74520_c();
- IRecipe<?> irecipe = this.field_202906_c.get((int)(p_193653_2_ / (5000L / (long)this.field_202906_c.size()) % (long)this.field_202906_c.size())); - IRecipe<?> irecipe = this.field_202906_c.get((int)(p_193653_2_ / (5000L / (long)this.field_202906_c.size()) % (long)this.field_202906_c.size()));
+ IRecipe<?> irecipe = this.field_202906_c.get((int)((p_193653_2_ * (long)this.field_202906_c.size() / 5000L) % (long)this.field_202906_c.size())); //Forge: fix math so that it doesn't divide by 0 when there are more than 5000 recipes + IRecipe<?> irecipe = this.field_202906_c.get((int)((p_193653_2_ * (long)this.field_202906_c.size() / 5000L) % (long)this.field_202906_c.size())); //Forge: fix math so that it doesn't divide by 0 when there are more than 5000 recipes
ItemStack itemstack = irecipe.func_222128_h(); ItemStack itemstack = irecipe.func_222128_h();
GlStateManager.pushMatrix(); RenderSystem.pushMatrix();
GlStateManager.scalef(0.6F, 0.6F, 1.0F); RenderSystem.scalef(0.6F, 0.6F, 1.0F);

View File

@ -1,20 +1,15 @@
--- a/net/minecraft/client/gui/widget/Widget.java --- a/net/minecraft/client/gui/widget/Widget.java
+++ b/net/minecraft/client/gui/widget/Widget.java +++ b/net/minecraft/client/gui/widget/Widget.java
@@ -110,12 +110,7 @@ @@ -111,7 +111,7 @@
this.blit(this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); this.blit(this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height);
this.blit(this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); this.blit(this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height);
this.renderBg(minecraft, p_renderButton_1_, p_renderButton_2_); this.renderBg(minecraft, p_renderButton_1_, p_renderButton_2_);
- int j = 14737632; - int j = this.active ? 16777215 : 10526880;
- if (!this.active) {
- j = 10526880;
- } else if (this.isHovered()) {
- j = 16777120;
- }
+ int j = getFGColor(); + int j = getFGColor();
this.drawCenteredString(fontrenderer, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.func_76123_f(this.alpha * 255.0F) << 24);
this.drawCenteredString(fontrenderer, this.message, this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.func_76123_f(this.alpha * 255.0F) << 24);
} }
@@ -211,6 +206,14 @@
@@ -206,6 +206,14 @@
this.width = p_setWidth_1_; this.width = p_setWidth_1_;
} }
@ -29,7 +24,7 @@
public void setAlpha(float p_setAlpha_1_) { public void setAlpha(float p_setAlpha_1_) {
this.alpha = p_setAlpha_1_; this.alpha = p_setAlpha_1_;
} }
@@ -234,4 +237,18 @@ @@ -233,4 +241,13 @@
protected void setFocused(boolean p_setFocused_1_) { protected void setFocused(boolean p_setFocused_1_) {
this.focused = p_setFocused_1_; this.focused = p_setFocused_1_;
} }
@ -37,12 +32,7 @@
+ protected int packedFGColor = 0; + protected int packedFGColor = 0;
+ public int getFGColor() { + public int getFGColor() {
+ if (packedFGColor != 0) return packedFGColor; + if (packedFGColor != 0) return packedFGColor;
+ int ret = 14737632; + return this.active ? 16777215 : 10526880;
+ if (!this.active)
+ ret = 10526880;
+ else if (this.isHovered())
+ ret = 16777120;
+ return ret;
+ } + }
+ public void setFGColor(int color) { + public void setFGColor(int color) {
+ this.packedFGColor = color; + this.packedFGColor = color;

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/widget/list/AbstractList.java --- a/net/minecraft/client/gui/widget/list/AbstractList.java
+++ b/net/minecraft/client/gui/widget/list/AbstractList.java +++ b/net/minecraft/client/gui/widget/list/AbstractList.java
@@ -451,6 +451,13 @@ @@ -450,6 +450,13 @@
return flag; return flag;
} }
@ -8,8 +8,8 @@
+ public int getHeight() { return this.height; } + public int getHeight() { return this.height; }
+ public int getTop() { return this.y0; } + public int getTop() { return this.y0; }
+ public int getBottom() { return this.y1; } + public int getBottom() { return this.y1; }
+ public int getLeft() { return this.x1; } + public int getLeft() { return this.x0; }
+ public int getRight() { return this.x0; } + public int getRight() { return this.x1; }
+ +
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public abstract static class AbstractListEntry<E extends AbstractList.AbstractListEntry<E>> implements IGuiEventListener { public abstract static class AbstractListEntry<E extends AbstractList.AbstractListEntry<E>> implements IGuiEventListener {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/multiplayer/ClientChunkProvider.java --- a/net/minecraft/client/multiplayer/ClientChunkProvider.java
+++ b/net/minecraft/client/multiplayer/ClientChunkProvider.java +++ b/net/minecraft/client/multiplayer/ClientChunkProvider.java
@@ -61,6 +61,7 @@ @@ -59,6 +59,7 @@
int i = this.field_217256_d.func_217191_a(p_73234_1_, p_73234_2_); int i = this.field_217256_d.func_217191_a(p_73234_1_, p_73234_2_);
Chunk chunk = this.field_217256_d.func_217192_a(i); Chunk chunk = this.field_217256_d.func_217192_a(i);
if (func_217249_a(chunk, p_73234_1_, p_73234_2_)) { if (func_217249_a(chunk, p_73234_1_, p_73234_2_)) {
@ -8,10 +8,10 @@
this.field_217256_d.func_217190_a(i, chunk, (Chunk)null); this.field_217256_d.func_217190_a(i, chunk, (Chunk)null);
} }
@@ -113,6 +114,7 @@ @@ -112,6 +113,7 @@
worldlightmanager.func_215566_a(SectionPos.func_218154_a(p_217250_2_, j, p_217250_3_), ChunkSection.func_222628_a(chunksection));
} }
this.field_73235_d.func_228323_e_(p_228313_1_, p_228313_2_);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk));
return chunk; return chunk;
} }

View File

@ -1,17 +1,23 @@
--- a/net/minecraft/client/multiplayer/PlayerController.java --- a/net/minecraft/client/multiplayer/PlayerController.java
+++ b/net/minecraft/client/multiplayer/PlayerController.java +++ b/net/minecraft/client/multiplayer/PlayerController.java
@@ -103,7 +103,9 @@ @@ -92,6 +92,7 @@
}
public boolean func_187103_a(BlockPos p_187103_1_) {
+ if (field_78776_a.field_71439_g.func_184614_ca().onBlockStartBreak(p_187103_1_, field_78776_a.field_71439_g)) return false;
if (this.field_78776_a.field_71439_g.func_223729_a(this.field_78776_a.field_71441_e, p_187103_1_, this.field_78779_k)) {
return false;
} else {
@@ -103,7 +104,7 @@
Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) { if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
return false; return false;
- } else if (blockstate.func_196958_f()) { - } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(world, p_187103_1_)) { + } else if (blockstate.isAir(world, p_187103_1_)) {
+ if (field_78776_a.field_71439_g.func_184614_ca().onBlockStartBreak(p_187103_1_, field_78776_a.field_71439_g)) return false;
+
return false; return false;
} else { } else {
block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g); block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
@@ -129,21 +131,25 @@ @@ -129,21 +130,25 @@
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_); BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_);
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate, 1.0F); this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate, 1.0F);
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_); this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
@ -27,7 +33,8 @@
BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_); BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_);
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate1, 0.0F); this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate1, 0.0F);
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_); this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
boolean flag = !blockstate1.func_196958_f(); - boolean flag = !blockstate1.func_196958_f();
+ boolean flag = !blockstate1.isAir(this.field_78776_a.field_71441_e, p_180511_1_);
if (flag && this.field_78770_f == 0.0F) { if (flag && this.field_78770_f == 0.0F) {
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY) + if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY)
blockstate1.func_196942_a(this.field_78776_a.field_71441_e, p_180511_1_, this.field_78776_a.field_71439_g); blockstate1.func_196942_a(this.field_78776_a.field_71441_e, p_180511_1_, this.field_78776_a.field_71439_g);
@ -37,7 +44,7 @@
if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) { if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) {
this.func_187103_a(p_180511_1_); this.func_187103_a(p_180511_1_);
} else { } else {
@@ -183,22 +189,24 @@ @@ -183,22 +188,24 @@
BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_); BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, blockstate1, 1.0F); this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, blockstate1, 1.0F);
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180512_1_, p_180512_2_); this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
@ -55,7 +62,7 @@
if (this.field_78780_h % 4.0F == 0.0F) { if (this.field_78780_h % 4.0F == 0.0F) {
- SoundType soundtype = blockstate.func_215695_r(); - SoundType soundtype = blockstate.func_215695_r();
+ SoundType soundtype = blockstate.getSoundType(this.field_78776_a.field_71441_e, p_180512_1_, this.field_78776_a.field_71439_g); + SoundType soundtype = blockstate.getSoundType(this.field_78776_a.field_71441_e, p_180512_1_, this.field_78776_a.field_71439_g);
this.field_78776_a.func_147118_V().func_147682_a(new SimpleSound(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_)); this.field_78776_a.func_147118_V().func_147682_a(new SimpleSound(soundtype.func_185846_f(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_));
} }
++this.field_78780_h; ++this.field_78780_h;
@ -64,7 +71,7 @@
if (this.field_78770_f >= 1.0F) { if (this.field_78770_f >= 1.0F) {
this.field_78778_j = false; this.field_78778_j = false;
this.func_225324_a(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, p_180512_1_, p_180512_2_); this.func_225324_a(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
@@ -217,7 +225,8 @@ @@ -217,7 +224,8 @@
} }
public float func_78757_d() { public float func_78757_d() {
@ -74,7 +81,7 @@
} }
public void func_78765_e() { public void func_78765_e() {
@@ -234,7 +243,7 @@ @@ -234,7 +242,7 @@
ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca(); ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca();
boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b(); boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b();
if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) { if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) {
@ -83,7 +90,7 @@
} }
return p_178893_1_.equals(this.field_178895_c) && flag; return p_178893_1_.equals(this.field_178895_c) && flag;
@@ -257,17 +266,24 @@ @@ -256,13 +264,19 @@
return ActionResultType.FAIL; return ActionResultType.FAIL;
} else { } else {
ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_); ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_);
@ -97,20 +104,23 @@
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_)); this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
return ActionResultType.SUCCESS; return ActionResultType.SUCCESS;
} else { } else {
boolean flag = !p_217292_1_.func_184614_ca().func_190926_b() || !p_217292_1_.func_184592_cb().func_190926_b(); - boolean flag = !p_217292_1_.func_184614_ca().func_190926_b() || !p_217292_1_.func_184592_cb().func_190926_b();
- boolean flag1 = p_217292_1_.func_70093_af() && flag; + boolean flag = !p_217292_1_.func_184614_ca().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_) || !p_217292_1_.func_184592_cb().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_);
- if (!flag1 && p_217292_2_.func_180495_p(blockpos).func_215687_a(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_)) { boolean flag1 = p_217292_1_.func_226563_dT_() && flag;
+ boolean flag1 = !(p_217292_1_.func_70093_af() && flag) || (p_217292_1_.func_184614_ca().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_) && p_217292_1_.func_184592_cb().doesSneakBypassUse(p_217292_2_,blockpos,p_217292_1_)); - if (!flag1) {
+ if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY && flag1 && p_217292_2_.func_180495_p(blockpos).func_215687_a(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_)) { + if (event.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY && !flag1) {
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_)); ActionResultType actionresulttype = p_217292_2_.func_180495_p(blockpos).func_227031_a_(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_);
return ActionResultType.SUCCESS; if (actionresulttype.func_226246_a_()) {
} else { this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_)); @@ -271,6 +285,7 @@
+ if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return ActionResultType.PASS; }
if (!itemstack.func_190926_b() && !p_217292_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
ItemUseContext itemusecontext = new ItemUseContext(p_217292_1_, p_217292_3_, p_217292_4_); this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
ActionResultType actionresulttype; + if (event.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY) return ActionResultType.PASS;
@@ -298,11 +314,14 @@ if (!itemstack.func_190926_b() && !p_217292_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
ItemUseContext itemusecontext = new ItemUseContext(p_217292_1_, p_217292_3_, p_217292_4_);
ActionResultType actionresulttype1;
@@ -300,11 +315,14 @@
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) { if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
return ActionResultType.PASS; return ActionResultType.PASS;
} else { } else {
@ -125,7 +135,7 @@
} }
return actionresult.func_188397_a(); return actionresult.func_188397_a();
@@ -327,6 +346,9 @@ @@ -329,6 +347,9 @@
public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) { public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) {
this.func_78750_j(); this.func_78750_j();
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_)); this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_));
@ -135,9 +145,9 @@
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_); return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
} }
@@ -334,6 +356,9 @@ @@ -336,6 +357,9 @@
this.func_78750_j(); this.func_78750_j();
Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.field_70165_t, p_187102_2_.field_70163_u, p_187102_2_.field_70161_v); Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.func_226277_ct_(), p_187102_2_.func_226278_cu_(), p_187102_2_.func_226281_cx_());
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d)); this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d));
+ if (this.field_78779_k == GameType.SPECTATOR) return ActionResultType.PASS; // don't fire for spectators to match non-specific EntityInteract + if (this.field_78779_k == GameType.SPECTATOR) return ActionResultType.PASS; // don't fire for spectators to match non-specific EntityInteract
+ ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_187102_1_, p_187102_2_, p_187102_3_, p_187102_4_); + ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_187102_1_, p_187102_2_, p_187102_3_, p_187102_4_);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java --- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java +++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
@@ -356,6 +356,7 @@ @@ -361,6 +361,7 @@
this.field_147299_f.field_184132_p.func_217737_a(); this.field_147299_f.field_184132_p.func_217737_a();
this.field_147299_f.field_71439_g.func_70065_x(); this.field_147299_f.field_71439_g.func_70065_x();
@ -8,15 +8,15 @@
int i = p_147282_1_.func_149197_c(); int i = p_147282_1_.func_149197_c();
this.field_147300_g.func_217408_a(i, this.field_147299_f.field_71439_g); this.field_147300_g.func_217408_a(i, this.field_147299_f.field_71439_g);
this.field_147299_f.field_71439_g.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y); this.field_147299_f.field_71439_g.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
@@ -366,6 +367,7 @@ @@ -372,6 +373,7 @@
this.field_147299_f.field_71439_g.func_145769_d(i);
this.field_147299_f.field_71439_g.func_175150_k(p_147282_1_.func_179744_h()); this.field_147299_f.field_71439_g.func_175150_k(p_147282_1_.func_179744_h());
this.field_147299_f.field_71439_g.func_228355_a_(p_147282_1_.func_229743_k_());
this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e()); this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e());
+ net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(field_147302_e, "PLAY_TO_SERVER"); + net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(field_147302_e, "PLAY_TO_SERVER");
this.field_147299_f.field_71474_y.func_82879_c(); this.field_147299_f.field_71474_y.func_82879_c();
this.field_147302_e.func_179290_a(new CCustomPayloadPacket(CCustomPayloadPacket.field_210344_a, (new PacketBuffer(Unpooled.buffer())).func_180714_a(ClientBrandRetriever.getClientModName()))); this.field_147302_e.func_179290_a(new CCustomPayloadPacket(CCustomPayloadPacket.field_210344_a, (new PacketBuffer(Unpooled.buffer())).func_180714_a(ClientBrandRetriever.getClientModName())));
this.field_147299_f.func_213229_ar().func_216814_a(); this.field_147299_f.func_213229_ar().func_216814_a();
@@ -714,7 +716,7 @@ @@ -727,7 +729,7 @@
BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z")); BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z"));
TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos); TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos);
if (tileentity != null) { if (tileentity != null) {
@ -25,7 +25,7 @@
} }
} }
@@ -790,7 +792,9 @@ @@ -803,7 +805,9 @@
public void func_147251_a(SChatPacket p_147251_1_) { public void func_147251_a(SChatPacket p_147251_1_) {
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f); PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
@ -36,10 +36,10 @@
} }
public void func_147279_a(SAnimateHandPacket p_147279_1_) { public void func_147279_a(SAnimateHandPacket p_147279_1_) {
@@ -962,8 +966,10 @@ @@ -983,8 +987,10 @@
this.field_147299_f.field_71439_g = clientplayerentity1;
this.field_147299_f.field_175622_Z = clientplayerentity1; this.field_147299_f.field_175622_Z = clientplayerentity1;
clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c()); clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c());
clientplayerentity1.func_110140_aT().func_226303_a_(clientplayerentity.func_110140_aT());
+ clientplayerentity1.updateSyncFields(clientplayerentity); // Forge: fix MC-10657 + clientplayerentity1.updateSyncFields(clientplayerentity); // Forge: fix MC-10657
clientplayerentity1.func_70065_x(); clientplayerentity1.func_70065_x();
clientplayerentity1.func_175158_f(s); clientplayerentity1.func_175158_f(s);
@ -47,9 +47,9 @@
this.field_147300_g.func_217408_a(i, clientplayerentity1); this.field_147300_g.func_217408_a(i, clientplayerentity1);
clientplayerentity1.field_70177_z = -180.0F; clientplayerentity1.field_70177_z = -180.0F;
clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y); clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
@@ -1084,6 +1090,12 @@ @@ -1105,6 +1111,12 @@
boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity; boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity;
if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity) { if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity || i == 14 && tileentity instanceof BeehiveTileEntity) {
tileentity.func_145839_a(p_147273_1_.func_148857_g()); tileentity.func_145839_a(p_147273_1_.func_148857_g());
+ } else { + } else {
+ if(tileentity == null) { + if(tileentity == null) {
@ -60,7 +60,7 @@
} }
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) { if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
@@ -1253,6 +1265,7 @@ @@ -1276,6 +1288,7 @@
clientrecipebook.func_199644_c(); clientrecipebook.func_199644_c();
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a); clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
imutablesearchtree.func_194040_a(); imutablesearchtree.func_194040_a();
@ -68,7 +68,7 @@
} }
public void func_200232_a(SPlayerLookPacket p_200232_1_) { public void func_200232_a(SPlayerLookPacket p_200232_1_) {
@@ -1333,7 +1346,7 @@ @@ -1356,7 +1369,7 @@
PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f); PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f);
Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d()); Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d());
if (entity instanceof LivingEntity) { if (entity instanceof LivingEntity) {
@ -77,7 +77,7 @@
if (effect != null) { if (effect != null) {
EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h()); EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h());
effectinstance.func_100012_b(p_147260_1_.func_149429_c()); effectinstance.func_100012_b(p_147260_1_.func_149429_c());
@@ -1353,6 +1366,7 @@ @@ -1376,6 +1389,7 @@
} }
this.field_147299_f.func_213253_a(SearchTreeManager.field_215360_b).func_194040_a(); this.field_147299_f.func_213253_a(SearchTreeManager.field_215360_b).func_194040_a();
@ -85,9 +85,9 @@
} }
public void func_175098_a(SCombatPacket p_175098_1_) { public void func_175098_a(SCombatPacket p_175098_1_) {
@@ -1766,10 +1780,12 @@ @@ -1851,10 +1865,12 @@
int l5 = packetbuffer.readInt();
this.field_147299_f.field_184132_p.field_217741_m.func_217692_a(pointofinterestdebugrenderer$braininfo); this.field_147299_f.field_184132_p.field_229018_q_.func_229022_a_(blockpos7, l3, s10, l5);
} else { } else {
- field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation); - field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
+ if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_147240_1_, this.field_147302_e)) + if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_147240_1_, this.field_147302_e))
@ -99,7 +99,7 @@
packetbuffer.release(); packetbuffer.release();
} }
@@ -1909,7 +1925,7 @@ @@ -1994,7 +2010,7 @@
for(SEntityPropertiesPacket.Snapshot sentitypropertiespacket$snapshot : p_147290_1_.func_149441_d()) { for(SEntityPropertiesPacket.Snapshot sentitypropertiespacket$snapshot : p_147290_1_.func_149441_d()) {
IAttributeInstance iattributeinstance = abstractattributemap.func_111152_a(sentitypropertiespacket$snapshot.func_151409_a()); IAttributeInstance iattributeinstance = abstractattributemap.func_111152_a(sentitypropertiespacket$snapshot.func_151409_a());
if (iattributeinstance == null) { if (iattributeinstance == null) {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/particle/DiggingParticle.java --- a/net/minecraft/client/particle/DiggingParticle.java
+++ b/net/minecraft/client/particle/DiggingParticle.java +++ b/net/minecraft/client/particle/DiggingParticle.java
@@ -36,6 +36,7 @@ @@ -37,6 +37,7 @@
} }
public DiggingParticle func_174846_a(BlockPos p_174846_1_) { public DiggingParticle func_174846_a(BlockPos p_174846_1_) {
@ -8,7 +8,7 @@
this.field_181019_az = p_174846_1_; this.field_181019_az = p_174846_1_;
if (this.field_174847_a.func_177230_c() == Blocks.field_196658_i) { if (this.field_174847_a.func_177230_c() == Blocks.field_196658_i) {
return this; return this;
@@ -93,7 +94,13 @@ @@ -94,7 +95,13 @@
public static class Factory implements IParticleFactory<BlockParticleData> { public static class Factory implements IParticleFactory<BlockParticleData> {
public Particle func_199234_a(BlockParticleData p_199234_1_, World p_199234_2_, double p_199234_3_, double p_199234_5_, double p_199234_7_, double p_199234_9_, double p_199234_11_, double p_199234_13_) { public Particle func_199234_a(BlockParticleData p_199234_1_, World p_199234_2_, double p_199234_3_, double p_199234_5_, double p_199234_7_, double p_199234_9_, double p_199234_11_, double p_199234_13_) {
BlockState blockstate = p_199234_1_.func_197584_c(); BlockState blockstate = p_199234_1_.func_197584_c();

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/client/particle/ParticleManager.java --- a/net/minecraft/client/particle/ParticleManager.java
+++ b/net/minecraft/client/particle/ParticleManager.java +++ b/net/minecraft/client/particle/ParticleManager.java
@@ -63,7 +63,7 @@ @@ -65,7 +65,7 @@
private final Queue<EmitterParticle> field_178933_d = Queues.newArrayDeque(); private final Queue<EmitterParticle> field_178933_d = Queues.newArrayDeque();
private final TextureManager field_78877_c; private final TextureManager field_78877_c;
private final Random field_78875_d = new Random(); private final Random field_78875_d = new Random();
@ -8,8 +8,8 @@
+ private final Map<ResourceLocation, IParticleFactory<?>> field_178932_g = new java.util.HashMap<>(); + private final Map<ResourceLocation, IParticleFactory<?>> field_178932_g = new java.util.HashMap<>();
private final Queue<Particle> field_187241_h = Queues.newArrayDeque(); private final Queue<Particle> field_187241_h = Queues.newArrayDeque();
private final Map<ResourceLocation, ParticleManager.AnimatedSpriteImpl> field_215242_i = Maps.newHashMap(); private final Map<ResourceLocation, ParticleManager.AnimatedSpriteImpl> field_215242_i = Maps.newHashMap();
private final AtlasTexture field_215243_j = new AtlasTexture("textures/particle"); private final AtlasTexture field_215243_j = new AtlasTexture(AtlasTexture.field_215262_g);
@@ -137,13 +137,13 @@ @@ -143,13 +143,13 @@
} }
public <T extends IParticleData> void func_199283_a(ParticleType<T> p_199283_1_, IParticleFactory<T> p_199283_2_) { public <T extends IParticleData> void func_199283_a(ParticleType<T> p_199283_1_, IParticleFactory<T> p_199283_2_) {
@ -25,7 +25,7 @@
} }
public CompletableFuture<Void> func_215226_a(IFutureReloadListener.IStage p_215226_1_, IResourceManager p_215226_2_, IProfiler p_215226_3_, IProfiler p_215226_4_, Executor p_215226_5_, Executor p_215226_6_) { public CompletableFuture<Void> func_215226_a(IFutureReloadListener.IStage p_215226_1_, IResourceManager p_215226_2_, IProfiler p_215226_3_, IProfiler p_215226_4_, Executor p_215226_5_, Executor p_215226_6_) {
@@ -230,11 +230,12 @@ @@ -238,11 +238,12 @@
@Nullable @Nullable
private <T extends IParticleData> Particle func_199927_b(T p_199927_1_, double p_199927_2_, double p_199927_4_, double p_199927_6_, double p_199927_8_, double p_199927_10_, double p_199927_12_) { private <T extends IParticleData> Particle func_199927_b(T p_199927_1_, double p_199927_2_, double p_199927_4_, double p_199927_6_, double p_199927_8_, double p_199927_10_, double p_199927_12_) {
@ -39,17 +39,17 @@
this.field_187241_h.add(p_78873_1_); this.field_187241_h.add(p_78873_1_);
} }
@@ -306,7 +307,8 @@ @@ -312,7 +313,8 @@
Particle.field_70554_ao = p_215233_1_.func_216785_c().field_72448_b; RenderSystem.pushMatrix();
Particle.field_70555_ap = p_215233_1_.func_216785_c().field_72449_c; RenderSystem.multMatrix(p_228345_1_.func_227866_c_().func_227870_a_());
- for(IParticleRenderType iparticlerendertype : field_215241_b) { - for(IParticleRenderType iparticlerendertype : field_215241_b) {
+ for(IParticleRenderType iparticlerendertype : this.field_78876_b.keySet()) { // Forge: allow custom IParticleRenderType's + for(IParticleRenderType iparticlerendertype : this.field_78876_b.keySet()) { // Forge: allow custom IParticleRenderType's
+ if(iparticlerendertype == IParticleRenderType.field_217606_f) continue; + if (iparticlerendertype == IParticleRenderType.field_217606_f) continue;
Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype); Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype);
if (iterable != null) { if (iterable != null) {
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -342,7 +344,7 @@ @@ -351,7 +353,7 @@
} }
public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) { public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) {
@ -57,8 +57,8 @@
+ if (!p_180533_2_.isAir(this.field_78878_a, p_180533_1_) && !p_180533_2_.addDestroyEffects(this.field_78878_a, p_180533_1_, this)) { + if (!p_180533_2_.isAir(this.field_78878_a, p_180533_1_) && !p_180533_2_.addDestroyEffects(this.field_78878_a, p_180533_1_, this)) {
VoxelShape voxelshape = p_180533_2_.func_196954_c(this.field_78878_a, p_180533_1_); VoxelShape voxelshape = p_180533_2_.func_196954_c(this.field_78878_a, p_180533_1_);
double d0 = 0.25D; double d0 = 0.25D;
voxelshape.func_197755_b((p_199284_3_, p_199284_5_, p_199284_7_, p_199284_9_, p_199284_11_, p_199284_13_) -> { voxelshape.func_197755_b((p_228348_3_, p_228348_5_, p_228348_7_, p_228348_9_, p_228348_11_, p_228348_13_) -> {
@@ -414,6 +416,12 @@ @@ -423,6 +425,12 @@
return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum()); return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum());
} }

View File

@ -1,21 +1,15 @@
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java --- a/net/minecraft/client/renderer/ActiveRenderInfo.java
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java +++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
@@ -53,6 +53,10 @@ @@ -168,4 +168,16 @@
this.func_216776_a(direction != null ? direction.func_185119_l() - 180.0F : 0.0F, 0.0F);
this.func_216782_a(0.0D, 0.3D, 0.0D);
}
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup cameraSetup = net.minecraftforge.client.ForgeHooksClient.onCameraSetup(net.minecraft.client.Minecraft.func_71410_x().field_71460_t, this, p_216772_5_, this.field_216798_j, this.field_216797_i, 0f);
+ this.field_216797_i = cameraSetup.getPitch();
+ this.field_216798_j = cameraSetup.getYaw();
+ GlStateManager.rotatef(cameraSetup.getRoll(), 0, 0, 1);
GlStateManager.rotatef(this.field_216797_i, 1.0F, 0.0F, 0.0F);
GlStateManager.rotatef(this.field_216798_j + 180.0F, 0.0F, 1.0F, 0.0F);
@@ -172,4 +176,11 @@
this.field_216791_c = null; this.field_216791_c = null;
this.field_216789_a = false; this.field_216789_a = false;
} }
+ +
+ public void setAnglesInternal(float yaw, float pitch) {
+ this.field_216798_j = yaw;
+ this.field_216797_i = pitch;
+ }
+
+ public net.minecraft.block.BlockState getBlockAtCamera() { + public net.minecraft.block.BlockState getBlockAtCamera() {
+ if (!this.field_216789_a) + if (!this.field_216789_a)
+ return net.minecraft.block.Blocks.field_150350_a.func_176223_P(); + return net.minecraft.block.Blocks.field_150350_a.func_176223_P();

View File

@ -1,119 +1,93 @@
--- a/net/minecraft/client/renderer/BlockModelRenderer.java --- a/net/minecraft/client/renderer/BlockModelRenderer.java
+++ b/net/minecraft/client/renderer/BlockModelRenderer.java +++ b/net/minecraft/client/renderer/BlockModelRenderer.java
@@ -37,11 +37,17 @@ @@ -37,13 +37,18 @@
this.field_187499_a = p_i46575_1_; this.field_187499_a = p_i46575_1_;
} }
+ @Deprecated //Forge: Model data argument + @Deprecated //Forge: Model data argument
public boolean func_217631_a(IEnviromentBlockReader p_217631_1_, IBakedModel p_217631_2_, BlockState p_217631_3_, BlockPos p_217631_4_, BufferBuilder p_217631_5_, boolean p_217631_6_, Random p_217631_7_, long p_217631_8_) { public boolean func_228802_a_(ILightReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_) {
- boolean flag = Minecraft.func_71379_u() && p_217631_3_.func_185906_d() == 0 && p_217631_2_.func_177555_b(); + return renderModel(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ return renderModel(p_217631_1_, p_217631_2_, p_217631_3_, p_217631_4_, p_217631_5_, p_217631_6_, p_217631_7_, p_217631_8_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ public boolean renderModel(ILightReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_, net.minecraftforge.client.model.data.IModelData modelData) {
boolean flag = Minecraft.func_71379_u() && p_228802_3_.func_185906_d() == 0 && p_228802_2_.func_177555_b();
Vec3d vec3d = p_228802_3_.func_191059_e(p_228802_1_, p_228802_4_);
p_228802_5_.func_227861_a_(vec3d.field_72450_a, vec3d.field_72448_b, vec3d.field_72449_c);
+ modelData = p_228802_2_.getModelData(p_228802_1_, p_228802_4_, p_228802_3_, modelData);
+ public boolean renderModel(IEnviromentBlockReader p_217631_1_, IBakedModel p_217631_2_, BlockState p_217631_3_, BlockPos p_217631_4_, BufferBuilder p_217631_5_, boolean p_217631_6_, Random p_217631_7_, long p_217631_8_, net.minecraftforge.client.model.data.IModelData modelData) {
+ boolean flag = Minecraft.func_71379_u() && p_217631_3_.getLightValue(p_217631_1_, p_217631_4_) == 0 && p_217631_2_.func_177555_b();
+ modelData = p_217631_2_.getModelData(p_217631_1_, p_217631_4_, p_217631_3_, modelData);
+
try { try {
- return flag ? this.func_217634_b(p_217631_1_, p_217631_2_, p_217631_3_, p_217631_4_, p_217631_5_, p_217631_6_, p_217631_7_, p_217631_8_) : this.func_217635_c(p_217631_1_, p_217631_2_, p_217631_3_, p_217631_4_, p_217631_5_, p_217631_6_, p_217631_7_, p_217631_8_); - return flag ? this.func_228805_b_(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_) : this.func_228806_c_(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_);
+ return flag ? this.renderModelSmooth(p_217631_1_, p_217631_2_, p_217631_3_, p_217631_4_, p_217631_5_, p_217631_6_, p_217631_7_, p_217631_8_, modelData) : this.renderModelFlat(p_217631_1_, p_217631_2_, p_217631_3_, p_217631_4_, p_217631_5_, p_217631_6_, p_217631_7_, p_217631_8_, modelData); + return flag ? this.renderModelSmooth(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, modelData) : this.renderModelFlat(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, modelData);
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block model"); CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block model");
CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block model being tesselated"); CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block model being tesselated");
@@ -51,7 +57,12 @@ @@ -53,7 +58,11 @@
} }
} }
+ @Deprecated //Forge: Model data argument + @Deprecated //Forge: Model data argument
public boolean func_217634_b(IEnviromentBlockReader p_217634_1_, IBakedModel p_217634_2_, BlockState p_217634_3_, BlockPos p_217634_4_, BufferBuilder p_217634_5_, boolean p_217634_6_, Random p_217634_7_, long p_217634_8_) { public boolean func_228805_b_(ILightReader p_228805_1_, IBakedModel p_228805_2_, BlockState p_228805_3_, BlockPos p_228805_4_, MatrixStack p_228805_5_, IVertexBuilder p_228805_6_, boolean p_228805_7_, Random p_228805_8_, long p_228805_9_, int p_228805_11_) {
+ return renderModelSmooth(p_217634_1_, p_217634_2_, p_217634_3_, p_217634_4_, p_217634_5_, p_217634_6_, p_217634_7_, p_217634_8_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModelSmooth(p_228805_1_, p_228805_2_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, p_228805_7_, p_228805_8_, p_228805_9_, p_228805_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ + public boolean renderModelSmooth(ILightReader p_228805_1_, IBakedModel p_228805_2_, BlockState p_228805_3_, BlockPos p_228805_4_, MatrixStack p_228805_5_, IVertexBuilder p_228805_6_, boolean p_228805_7_, Random p_228805_8_, long p_228805_9_, int p_228805_11_, net.minecraftforge.client.model.data.IModelData modelData) {
+ public boolean renderModelSmooth(IEnviromentBlockReader p_217634_1_, IBakedModel p_217634_2_, BlockState p_217634_3_, BlockPos p_217634_4_, BufferBuilder p_217634_5_, boolean p_217634_6_, Random p_217634_7_, long p_217634_8_, net.minecraftforge.client.model.data.IModelData modelData) {
boolean flag = false; boolean flag = false;
float[] afloat = new float[Direction.values().length * 2]; float[] afloat = new float[Direction.values().length * 2];
BitSet bitset = new BitSet(3); BitSet bitset = new BitSet(3);
@@ -59,7 +70,7 @@ @@ -61,7 +70,7 @@
for(Direction direction : Direction.values()) { for(Direction direction : Direction.values()) {
p_217634_7_.setSeed(p_217634_8_); p_228805_8_.setSeed(p_228805_9_);
- List<BakedQuad> list = p_217634_2_.func_200117_a(p_217634_3_, direction, p_217634_7_); - List<BakedQuad> list = p_228805_2_.func_200117_a(p_228805_3_, direction, p_228805_8_);
+ List<BakedQuad> list = p_217634_2_.getQuads(p_217634_3_, direction, p_217634_7_, modelData); + List<BakedQuad> list = p_228805_2_.getQuads(p_228805_3_, direction, p_228805_8_, modelData);
if (!list.isEmpty() && (!p_217634_6_ || Block.func_176225_a(p_217634_3_, p_217634_1_, p_217634_4_, direction))) { if (!list.isEmpty() && (!p_228805_7_ || Block.func_176225_a(p_228805_3_, p_228805_1_, p_228805_4_, direction))) {
this.func_217630_a(p_217634_1_, p_217634_3_, p_217634_4_, p_217634_5_, list, afloat, bitset, blockmodelrenderer$ambientocclusionface); this.func_228799_a_(p_228805_1_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, list, afloat, bitset, blockmodelrenderer$ambientocclusionface, p_228805_11_);
flag = true; flag = true;
@@ -67,7 +78,7 @@ @@ -69,7 +78,7 @@
} }
p_217634_7_.setSeed(p_217634_8_); p_228805_8_.setSeed(p_228805_9_);
- List<BakedQuad> list1 = p_217634_2_.func_200117_a(p_217634_3_, (Direction)null, p_217634_7_); - List<BakedQuad> list1 = p_228805_2_.func_200117_a(p_228805_3_, (Direction)null, p_228805_8_);
+ List<BakedQuad> list1 = p_217634_2_.getQuads(p_217634_3_, (Direction)null, p_217634_7_, modelData); + List<BakedQuad> list1 = p_228805_2_.getQuads(p_228805_3_, (Direction)null, p_228805_8_, modelData);
if (!list1.isEmpty()) { if (!list1.isEmpty()) {
this.func_217630_a(p_217634_1_, p_217634_3_, p_217634_4_, p_217634_5_, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface); this.func_228799_a_(p_228805_1_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface, p_228805_11_);
flag = true; flag = true;
@@ -76,13 +87,18 @@ @@ -78,13 +87,18 @@
return flag; return flag;
} }
+ @Deprecated //Forge: Model data Argument + @Deprecated //Forge: Model data argument
public boolean func_217635_c(IEnviromentBlockReader p_217635_1_, IBakedModel p_217635_2_, BlockState p_217635_3_, BlockPos p_217635_4_, BufferBuilder p_217635_5_, boolean p_217635_6_, Random p_217635_7_, long p_217635_8_) { public boolean func_228806_c_(ILightReader p_228806_1_, IBakedModel p_228806_2_, BlockState p_228806_3_, BlockPos p_228806_4_, MatrixStack p_228806_5_, IVertexBuilder p_228806_6_, boolean p_228806_7_, Random p_228806_8_, long p_228806_9_, int p_228806_11_) {
+ return renderModelFlat(p_217635_1_, p_217635_2_, p_217635_3_, p_217635_4_, p_217635_5_, p_217635_6_, p_217635_7_, p_217635_8_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModelFlat(p_228806_1_, p_228806_2_, p_228806_3_, p_228806_4_, p_228806_5_, p_228806_6_, p_228806_7_, p_228806_8_, p_228806_9_, p_228806_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ +
+ public boolean renderModelFlat(IEnviromentBlockReader p_217635_1_, IBakedModel p_217635_2_, BlockState p_217635_3_, BlockPos p_217635_4_, BufferBuilder p_217635_5_, boolean p_217635_6_, Random p_217635_7_, long p_217635_8_, net.minecraftforge.client.model.data.IModelData modelData) { + public boolean renderModelFlat(ILightReader p_228806_1_, IBakedModel p_228806_2_, BlockState p_228806_3_, BlockPos p_228806_4_, MatrixStack p_228806_5_, IVertexBuilder p_228806_6_, boolean p_228806_7_, Random p_228806_8_, long p_228806_9_, int p_228806_11_, net.minecraftforge.client.model.data.IModelData modelData) {
boolean flag = false; boolean flag = false;
BitSet bitset = new BitSet(3); BitSet bitset = new BitSet(3);
for(Direction direction : Direction.values()) { for(Direction direction : Direction.values()) {
p_217635_7_.setSeed(p_217635_8_); p_228806_8_.setSeed(p_228806_9_);
- List<BakedQuad> list = p_217635_2_.func_200117_a(p_217635_3_, direction, p_217635_7_); - List<BakedQuad> list = p_228806_2_.func_200117_a(p_228806_3_, direction, p_228806_8_);
+ List<BakedQuad> list = p_217635_2_.getQuads(p_217635_3_, direction, p_217635_7_, modelData); + List<BakedQuad> list = p_228806_2_.getQuads(p_228806_3_, direction, p_228806_8_, modelData);
if (!list.isEmpty() && (!p_217635_6_ || Block.func_176225_a(p_217635_3_, p_217635_1_, p_217635_4_, direction))) { if (!list.isEmpty() && (!p_228806_7_ || Block.func_176225_a(p_228806_3_, p_228806_1_, p_228806_4_, direction))) {
int i = p_217635_3_.func_215684_a(p_217635_1_, p_217635_4_.func_177972_a(direction)); int i = WorldRenderer.func_228420_a_(p_228806_1_, p_228806_3_, p_228806_4_.func_177972_a(direction));
this.func_217636_a(p_217635_1_, p_217635_3_, p_217635_4_, i, false, p_217635_5_, list, bitset); this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, i, p_228806_11_, false, p_228806_5_, p_228806_6_, list, bitset);
@@ -91,7 +107,7 @@ @@ -93,7 +107,7 @@
} }
p_217635_7_.setSeed(p_217635_8_); p_228806_8_.setSeed(p_228806_9_);
- List<BakedQuad> list1 = p_217635_2_.func_200117_a(p_217635_3_, (Direction)null, p_217635_7_); - List<BakedQuad> list1 = p_228806_2_.func_200117_a(p_228806_3_, (Direction)null, p_228806_8_);
+ List<BakedQuad> list1 = p_217635_2_.getQuads(p_217635_3_, (Direction)null, p_217635_7_, modelData); + List<BakedQuad> list1 = p_228806_2_.getQuads(p_228806_3_, (Direction)null, p_228806_8_, modelData);
if (!list1.isEmpty()) { if (!list1.isEmpty()) {
this.func_217636_a(p_217635_1_, p_217635_3_, p_217635_4_, -1, true, p_217635_5_, list1, bitset); this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, -1, p_228806_11_, true, p_228806_5_, p_228806_6_, list1, bitset);
flag = true; flag = true;
@@ -113,6 +129,13 @@ @@ -208,7 +222,11 @@
p_217630_8_.func_217629_a(p_217630_1_, p_217630_2_, p_217630_3_, bakedquad.func_178210_d(), p_217630_6_, p_217630_7_);
p_217630_4_.func_178981_a(bakedquad.func_178209_a()); }
p_217630_4_.func_178962_a(p_217630_8_.field_178207_c[0], p_217630_8_.field_178207_c[1], p_217630_8_.field_178207_c[2], p_217630_8_.field_178207_c[3]);
+ if(bakedquad.shouldApplyDiffuseLighting()) { + @Deprecated //Forge: Model data argument
+ float diffuse = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(bakedquad.func_178210_d()); public void func_228804_a_(MatrixStack.Entry p_228804_1_, IVertexBuilder p_228804_2_, @Nullable BlockState p_228804_3_, IBakedModel p_228804_4_, float p_228804_5_, float p_228804_6_, float p_228804_7_, int p_228804_8_, int p_228804_9_) {
+ p_217630_8_.field_178206_b[0] *= diffuse; + renderModel(p_228804_1_, p_228804_2_, p_228804_3_, p_228804_4_, p_228804_5_, p_228804_6_, p_228804_7_, p_228804_8_, p_228804_9_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ p_217630_8_.field_178206_b[1] *= diffuse; + }
+ p_217630_8_.field_178206_b[2] *= diffuse; + public void renderModel(MatrixStack.Entry p_228804_1_, IVertexBuilder p_228804_2_, @Nullable BlockState p_228804_3_, IBakedModel p_228804_4_, float p_228804_5_, float p_228804_6_, float p_228804_7_, int p_228804_8_, int p_228804_9_, net.minecraftforge.client.model.data.IModelData modelData) {
+ p_217630_8_.field_178206_b[3] *= diffuse; Random random = new Random();
+ } long i = 42L;
if (bakedquad.func_178212_b()) {
int k = this.field_187499_a.func_216860_a(p_217630_2_, p_217630_1_, p_217630_3_, bakedquad.func_178211_c());
float f = (float)(k >> 16 & 255) / 255.0F;
@@ -222,10 +245,22 @@
float f = (float)(k >> 16 & 255) / 255.0F;
float f1 = (float)(k >> 8 & 255) / 255.0F;
float f2 = (float)(k & 255) / 255.0F;
+ if(bakedquad.shouldApplyDiffuseLighting()) {
+ float diffuse = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(bakedquad.func_178210_d());
+ f *= diffuse;
+ f1 *= diffuse;
+ f2 *= diffuse;
+ }
p_217636_6_.func_178978_a(f, f1, f2, 4);
p_217636_6_.func_178978_a(f, f1, f2, 3);
p_217636_6_.func_178978_a(f, f1, f2, 2);
p_217636_6_.func_178978_a(f, f1, f2, 1);
+ } else if(bakedquad.shouldApplyDiffuseLighting()) {
+ float diffuse = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(bakedquad.func_178210_d());
+ p_217636_6_.func_178978_a(diffuse, diffuse, diffuse, 4);
+ p_217636_6_.func_178978_a(diffuse, diffuse, diffuse, 3);
+ p_217636_6_.func_178978_a(diffuse, diffuse, diffuse, 2);
+ p_217636_6_.func_178978_a(diffuse, diffuse, diffuse, 1);
}
p_217636_6_.func_178987_a(d0, d1, d2);

View File

@ -6,7 +6,8 @@
+ @Deprecated + @Deprecated
public TextureAtlasSprite func_178122_a(BlockState p_178122_1_) { public TextureAtlasSprite func_178122_a(BlockState p_178122_1_) {
return this.func_178125_b(p_178122_1_).func_177554_e(); - return this.func_178125_b(p_178122_1_).func_177554_e();
+ return this.func_178125_b(p_178122_1_).getParticleTexture(net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
} }
+ public TextureAtlasSprite getTexture(BlockState state, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) { + public TextureAtlasSprite getTexture(BlockState state, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) {

View File

@ -1,42 +1,56 @@
--- a/net/minecraft/client/renderer/BlockRendererDispatcher.java --- a/net/minecraft/client/renderer/BlockRendererDispatcher.java
+++ b/net/minecraft/client/renderer/BlockRendererDispatcher.java +++ b/net/minecraft/client/renderer/BlockRendererDispatcher.java
@@ -28,7 +28,7 @@ @@ -40,18 +40,26 @@
return this.field_175028_a;
public BlockRendererDispatcher(BlockModelShapes p_i46577_1_, BlockColors p_i46577_2_) {
this.field_175028_a = p_i46577_1_;
- this.field_175027_c = new BlockModelRenderer(p_i46577_2_);
+ this.field_175027_c = new net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer(p_i46577_2_);
this.field_175025_e = new FluidBlockRenderer();
} }
@@ -40,12 +40,16 @@ + @Deprecated //Forge: Model parameter
if (p_215329_1_.func_185901_i() == BlockRenderType.MODEL) { public void func_228792_a_(BlockState p_228792_1_, BlockPos p_228792_2_, ILightReader p_228792_3_, MatrixStack p_228792_4_, IVertexBuilder p_228792_5_) {
IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_215329_1_); + renderModel(p_228792_1_, p_228792_2_, p_228792_3_, p_228792_4_, p_228792_5_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
long i = p_215329_1_.func_209533_a(p_215329_2_); + }
- IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(p_215329_1_, ibakedmodel, p_215329_3_, this.field_195476_e, i)).func_177645_b(); + public void renderModel(BlockState p_228792_1_, BlockPos p_228792_2_, ILightReader p_228792_3_, MatrixStack p_228792_4_, IVertexBuilder p_228792_5_, net.minecraftforge.client.model.data.IModelData modelData) {
+ IBakedModel ibakedmodel1 = net.minecraftforge.client.ForgeHooksClient.getDamageModel(ibakedmodel, p_215329_3_, p_215329_1_, p_215329_4_, p_215329_2_, i); if (p_228792_1_.func_185901_i() == BlockRenderType.MODEL) {
this.field_175027_c.func_217631_a(p_215329_4_, ibakedmodel1, p_215329_1_, p_215329_2_, Tessellator.func_178181_a().func_178180_c(), true, this.field_195476_e, i); IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_228792_1_);
long i = p_228792_1_.func_209533_a(p_228792_2_);
- this.field_175027_c.func_228802_a_(p_228792_3_, ibakedmodel, p_228792_1_, p_228792_2_, p_228792_4_, p_228792_5_, true, this.field_195476_e, i, OverlayTexture.field_229196_a_);
+ this.field_175027_c.renderModel(p_228792_3_, ibakedmodel, p_228792_1_, p_228792_2_, p_228792_4_, p_228792_5_, true, this.field_195476_e, i, OverlayTexture.field_229196_a_, modelData);
} }
} }
+ @Deprecated //Forge: Model parameter + @Deprecated //Forge: Model parameter
public boolean func_215330_a(BlockState p_215330_1_, BlockPos p_215330_2_, IEnviromentBlockReader p_215330_3_, BufferBuilder p_215330_4_, Random p_215330_5_) { public boolean func_228793_a_(BlockState p_228793_1_, BlockPos p_228793_2_, ILightReader p_228793_3_, MatrixStack p_228793_4_, IVertexBuilder p_228793_5_, boolean p_228793_6_, Random p_228793_7_) {
+ return renderBlock(p_215330_1_, p_215330_2_, p_215330_3_, p_215330_4_, p_215330_5_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModel(p_228793_1_, p_228793_2_, p_228793_3_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ public boolean renderBlock(BlockState p_215330_1_, BlockPos p_215330_2_, IEnviromentBlockReader p_215330_3_, BufferBuilder p_215330_4_, Random p_215330_5_, net.minecraftforge.client.model.data.IModelData modelData) { + public boolean renderModel(BlockState p_228793_1_, BlockPos p_228793_2_, ILightReader p_228793_3_, MatrixStack p_228793_4_, IVertexBuilder p_228793_5_, boolean p_228793_6_, Random p_228793_7_, net.minecraftforge.client.model.data.IModelData modelData) {
try { try {
BlockRenderType blockrendertype = p_215330_1_.func_185901_i(); BlockRenderType blockrendertype = p_228793_1_.func_185901_i();
if (blockrendertype == BlockRenderType.INVISIBLE) { - return blockrendertype != BlockRenderType.MODEL ? false : this.field_175027_c.func_228802_a_(p_228793_3_, this.func_184389_a(p_228793_1_), p_228793_1_, p_228793_2_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, p_228793_1_.func_209533_a(p_228793_2_), OverlayTexture.field_229196_a_);
@@ -53,7 +57,7 @@ + return blockrendertype != BlockRenderType.MODEL ? false : this.field_175027_c.renderModel(p_228793_3_, this.func_184389_a(p_228793_1_), p_228793_1_, p_228793_2_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, p_228793_1_.func_209533_a(p_228793_2_), OverlayTexture.field_229196_a_, modelData);
} else { } catch (Throwable throwable) {
switch(blockrendertype) { CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block in world");
case MODEL: CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block being tesselated");
- return this.field_175027_c.func_217631_a(p_215330_3_, this.func_184389_a(p_215330_1_), p_215330_1_, p_215330_2_, p_215330_4_, true, p_215330_5_, p_215330_1_.func_209533_a(p_215330_2_)); @@ -79,7 +87,11 @@
+ return this.field_175027_c.renderModel(p_215330_3_, this.func_184389_a(p_215330_1_), p_215330_1_, p_215330_2_, p_215330_4_, true, p_215330_5_, p_215330_1_.func_209533_a(p_215330_2_), modelData); return this.field_175028_a.func_178125_b(p_184389_1_);
case ENTITYBLOCK_ANIMATED: }
return false;
default: + @Deprecated //Forge: Model parameter
@@ -105,4 +109,9 @@ public void func_228791_a_(BlockState p_228791_1_, MatrixStack p_228791_2_, IRenderTypeBuffer p_228791_3_, int p_228791_4_, int p_228791_5_) {
+ renderBlock(p_228791_1_, p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ }
+ public void renderBlock(BlockState p_228791_1_, MatrixStack p_228791_2_, IRenderTypeBuffer p_228791_3_, int p_228791_4_, int p_228791_5_, net.minecraftforge.client.model.data.IModelData modelData) {
BlockRenderType blockrendertype = p_228791_1_.func_185901_i();
if (blockrendertype != BlockRenderType.INVISIBLE) {
switch(blockrendertype) {
@@ -89,7 +101,7 @@
float f = (float)(i >> 16 & 255) / 255.0F;
float f1 = (float)(i >> 8 & 255) / 255.0F;
float f2 = (float)(i & 255) / 255.0F;
- this.field_175027_c.func_228804_a_(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_228394_b_(p_228791_1_)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_);
+ this.field_175027_c.renderModel(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_228394_b_(p_228791_1_)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_, modelData);
break;
case ENTITYBLOCK_ANIMATED:
ItemStackTileEntityRenderer.field_147719_a.func_228364_a_(new ItemStack(p_228791_1_.func_177230_c()), p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_);
@@ -101,4 +113,9 @@
public void func_195410_a(IResourceManager p_195410_1_) { public void func_195410_a(IResourceManager p_195410_1_) {
this.field_175025_e.func_178268_a(); this.field_175025_e.func_178268_a();
} }

View File

@ -1,58 +1,25 @@
--- a/net/minecraft/client/renderer/BufferBuilder.java --- a/net/minecraft/client/renderer/BufferBuilder.java
+++ b/net/minecraft/client/renderer/BufferBuilder.java +++ b/net/minecraft/client/renderer/BufferBuilder.java
@@ -120,7 +120,8 @@ @@ -121,7 +121,6 @@
bitset.set(i1); bitset.set(l);
} }
- -
+ this.field_178999_b.limit(this.field_178999_b.capacity());
+ this.field_178999_b.position(this.func_181664_j());
} }
public BufferBuilder.State func_181672_a() { private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) {
@@ -459,15 +460,15 @@ @@ -364,4 +363,14 @@
break; this.field_179018_e = p_i225907_2_;
case USHORT:
case SHORT:
- this.field_179001_a.putShort(i, (short)((int)p_181663_1_ * 32767 & '\uffff'));
- this.field_179001_a.putShort(i + 2, (short)((int)p_181663_2_ * 32767 & '\uffff'));
- this.field_179001_a.putShort(i + 4, (short)((int)p_181663_3_ * 32767 & '\uffff'));
+ this.field_179001_a.putShort(i, (short)((int)(p_181663_1_ * Short.MAX_VALUE) & 0xFFFF));
+ this.field_179001_a.putShort(i + 2, (short)((int)(p_181663_2_ * Short.MAX_VALUE) & 0xFFFF));
+ this.field_179001_a.putShort(i + 4, (short)((int)(p_181663_3_ * Short.MAX_VALUE) & 0xFFFF));
break;
case UBYTE:
case BYTE:
- this.field_179001_a.put(i, (byte)((int)p_181663_1_ * 127 & 255));
- this.field_179001_a.put(i + 1, (byte)((int)p_181663_2_ * 127 & 255));
- this.field_179001_a.put(i + 2, (byte)((int)p_181663_3_ * 127 & 255));
+ this.field_179001_a.put(i, (byte)((int)(p_181663_1_ * Byte.MAX_VALUE) & 0xFF));
+ this.field_179001_a.put(i + 1, (byte)((int)(p_181663_2_ * Byte.MAX_VALUE) & 0xFF));
+ this.field_179001_a.put(i + 2, (byte)((int)(p_181663_3_ * Byte.MAX_VALUE) & 0xFF));
}
this.func_181667_k();
@@ -542,4 +543,23 @@
return this.field_179018_e;
} }
} }
+ +
+ //For some unknown reason Mojang changed the vanilla function to hardcode alpha as 255.... So lets re-add the parameter -.-
+ public void putColorRGBA(int index, int red, int green, int blue, int alpha) {
+ if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN)
+ this.field_178999_b.put(index, alpha << 24 | blue << 16 | green << 8 | red);
+ else
+ this.field_178999_b.put(index, red << 24 | green << 16 | blue << 8 | alpha);
+ }
+
+ public boolean isColorDisabled() {
+ return field_78939_q;
+ }
+
+ public void putBulkData(ByteBuffer buffer) { + public void putBulkData(ByteBuffer buffer) {
+ func_181670_b(buffer.limit() + this.field_179011_q.func_177338_f()); + func_181670_b(buffer.limit() + this.field_179011_q.func_177338_f());
+ this.field_179001_a.position(this.field_178997_d * this.field_179011_q.func_177338_f()); + this.field_179001_a.position(this.field_178997_d * this.field_179011_q.func_177338_f());
+ this.field_179001_a.put(buffer); + this.field_179001_a.put(buffer);
+ this.field_178997_d += buffer.limit() / this.field_179011_q.func_177338_f(); + this.field_178997_d += buffer.limit() / this.field_179011_q.func_177338_f();
+ } + }
+
+ // Forge start
+ public VertexFormat getVertexFormat() { return this.field_179011_q; }
} }

View File

@ -1,11 +0,0 @@
--- a/net/minecraft/client/renderer/ChestRenderer.java
+++ b/net/minecraft/client/renderer/ChestRenderer.java
@@ -12,6 +12,7 @@
public void func_178175_a(Block p_178175_1_, float p_178175_2_) {
GlStateManager.color4f(p_178175_2_, p_178175_2_, p_178175_2_, 1.0F);
GlStateManager.rotatef(90.0F, 0.0F, 1.0F, 0.0F);
- ItemStackTileEntityRenderer.field_147719_a.func_179022_a(new ItemStack(p_178175_1_));
+ ItemStack stack = new ItemStack(p_178175_1_);
+ stack.func_77973_b().getTileEntityItemStackRenderer().func_179022_a(stack);
}
}

View File

@ -1,119 +1,90 @@
--- a/net/minecraft/client/renderer/FirstPersonRenderer.java --- a/net/minecraft/client/renderer/FirstPersonRenderer.java
+++ b/net/minecraft/client/renderer/FirstPersonRenderer.java +++ b/net/minecraft/client/renderer/FirstPersonRenderer.java
@@ -276,7 +276,7 @@ @@ -208,7 +208,7 @@
boolean flag1 = true; boolean flag1 = true;
if (abstractclientplayerentity.func_184587_cr()) { if (p_228396_4_.func_184587_cr()) {
ItemStack itemstack = abstractclientplayerentity.func_184607_cu(); ItemStack itemstack = p_228396_4_.func_184607_cu();
- if (itemstack.func_77973_b() == Items.field_151031_f || itemstack.func_77973_b() == Items.field_222114_py) { - if (itemstack.func_77973_b() == Items.field_151031_f || itemstack.func_77973_b() == Items.field_222114_py) {
+ if (itemstack.func_77973_b() instanceof net.minecraft.item.ShootableItem) { + if (itemstack.func_77973_b() instanceof net.minecraft.item.ShootableItem) {
flag = abstractclientplayerentity.func_184600_cs() == Hand.MAIN_HAND; flag = p_228396_4_.func_184600_cs() == Hand.MAIN_HAND;
flag1 = !flag; flag1 = !flag;
} }
@@ -284,18 +284,18 @@ @@ -216,18 +216,18 @@
Hand hand1 = abstractclientplayerentity.func_184600_cs(); Hand hand1 = p_228396_4_.func_184600_cs();
if (hand1 == Hand.MAIN_HAND) { if (hand1 == Hand.MAIN_HAND) {
ItemStack itemstack1 = abstractclientplayerentity.func_184592_cb(); ItemStack itemstack1 = p_228396_4_.func_184592_cb();
- if (itemstack1.func_77973_b() == Items.field_222114_py && CrossbowItem.func_220012_d(itemstack1)) { - if (itemstack1.func_77973_b() == Items.field_222114_py && CrossbowItem.func_220012_d(itemstack1)) {
+ if (itemstack1.func_77973_b() instanceof net.minecraft.item.CrossbowItem && CrossbowItem.func_220012_d(itemstack1)) { + if (itemstack1.func_77973_b() instanceof CrossbowItem && CrossbowItem.func_220012_d(itemstack1)) {
flag1 = false; flag1 = false;
} }
} }
} else { } else {
ItemStack itemstack2 = abstractclientplayerentity.func_184614_ca(); ItemStack itemstack2 = p_228396_4_.func_184614_ca();
ItemStack itemstack3 = abstractclientplayerentity.func_184592_cb(); ItemStack itemstack3 = p_228396_4_.func_184592_cb();
- if (itemstack2.func_77973_b() == Items.field_222114_py && CrossbowItem.func_220012_d(itemstack2)) { - if (itemstack2.func_77973_b() == Items.field_222114_py && CrossbowItem.func_220012_d(itemstack2)) {
+ if (itemstack2.func_77973_b() instanceof net.minecraft.item.CrossbowItem && CrossbowItem.func_220012_d(itemstack2)) { + if (itemstack2.func_77973_b() instanceof CrossbowItem && CrossbowItem.func_220012_d(itemstack2)) {
flag1 = !flag; flag1 = !flag;
} }
- if (itemstack3.func_77973_b() == Items.field_222114_py && CrossbowItem.func_220012_d(itemstack3)) { - if (itemstack3.func_77973_b() == Items.field_222114_py && CrossbowItem.func_220012_d(itemstack3)) {
+ if (itemstack3.func_77973_b() instanceof net.minecraft.item.CrossbowItem && CrossbowItem.func_220012_d(itemstack3)) { + if (itemstack3.func_77973_b() instanceof CrossbowItem && CrossbowItem.func_220012_d(itemstack3)) {
flag = !itemstack2.func_190926_b(); flag = !itemstack2.func_190926_b();
flag1 = !flag; flag1 = !flag;
} }
@@ -308,12 +308,14 @@ @@ -240,12 +240,14 @@
if (flag) { if (flag) {
float f3 = hand == Hand.MAIN_HAND ? f : 0.0F; float f5 = hand == Hand.MAIN_HAND ? f : 0.0F;
float f5 = 1.0F - MathHelper.func_219799_g(p_78440_1_, this.field_187470_g, this.field_187469_f); float f2 = 1.0F - MathHelper.func_219799_g(p_228396_1_, this.field_187470_g, this.field_187469_f);
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.MAIN_HAND, p_78440_1_, f1, f3, f5, this.field_187467_d)) + if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.MAIN_HAND, p_228396_2_, p_228396_1_, f1, f3, f5, this.field_187467_d))
this.func_187457_a(abstractclientplayerentity, p_78440_1_, f1, Hand.MAIN_HAND, f3, this.field_187467_d, f5); this.func_228405_a_(p_228396_4_, p_228396_1_, f1, Hand.MAIN_HAND, f5, this.field_187467_d, f2, p_228396_2_, p_228396_3_, p_228396_5_);
} }
if (flag1) { if (flag1) {
float f4 = hand == Hand.OFF_HAND ? f : 0.0F; float f6 = hand == Hand.OFF_HAND ? f : 0.0F;
float f6 = 1.0F - MathHelper.func_219799_g(p_78440_1_, this.field_187472_i, this.field_187471_h); float f7 = 1.0F - MathHelper.func_219799_g(p_228396_1_, this.field_187472_i, this.field_187471_h);
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e)) + if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(Hand.OFF_HAND, p_228396_2_, p_228396_1_, f1, f4, f6, this.field_187468_e))
this.func_187457_a(abstractclientplayerentity, p_78440_1_, f1, Hand.OFF_HAND, f4, this.field_187468_e, f6); this.func_228405_a_(p_228396_4_, p_228396_1_, f1, Hand.OFF_HAND, f6, this.field_187468_e, f7, p_228396_2_, p_228396_3_, p_228396_5_);
} }
@@ -329,7 +331,7 @@ @@ -260,13 +262,13 @@
if (flag && !p_187457_1_.func_82150_aj()) { if (flag && !p_228405_1_.func_82150_aj()) {
this.func_187456_a(p_187457_7_, p_187457_5_, handside); this.func_228401_a_(p_228405_8_, p_228405_9_, p_228405_10_, p_228405_7_, p_228405_5_, handside);
} }
- } else if (p_187457_6_.func_77973_b() == Items.field_151098_aY) { - } else if (p_228405_6_.func_77973_b() == Items.field_151098_aY) {
+ } else if (p_187457_6_.func_77973_b() instanceof net.minecraft.item.FilledMapItem) { + } else if (p_228405_6_.func_77973_b() instanceof FilledMapItem) {
if (flag && this.field_187468_e.func_190926_b()) { if (flag && this.field_187468_e.func_190926_b()) {
this.func_187463_a(p_187457_3_, p_187457_7_, p_187457_5_); this.func_228400_a_(p_228405_8_, p_228405_9_, p_228405_10_, p_228405_3_, p_228405_7_, p_228405_5_);
} else { } else {
@@ -465,6 +467,7 @@ this.func_228402_a_(p_228405_8_, p_228405_9_, p_228405_10_, p_228405_7_, handside, p_228405_5_, p_228405_6_);
if (this.field_78455_a.field_71439_g.func_70094_T()) {
BlockState blockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g));
PlayerEntity playerentity = this.field_78455_a.field_71439_g;
+ BlockPos overlayPos = new BlockPos(this.field_78455_a.field_71439_g);
for(int i = 0; i < 8; ++i) {
double d0 = playerentity.field_70165_t + (double)(((float)((i >> 0) % 2) - 0.5F) * playerentity.func_213311_cf() * 0.8F);
@@ -474,20 +477,24 @@
BlockState blockstate1 = this.field_78455_a.field_71441_e.func_180495_p(blockpos);
if (blockstate1.func_215696_m(this.field_78455_a.field_71441_e, blockpos)) {
blockstate = blockstate1;
+ overlayPos = blockpos;
}
} }
- } else if (p_228405_6_.func_77973_b() == Items.field_222114_py) {
if (blockstate.func_185901_i() != BlockRenderType.INVISIBLE) { + } else if (p_228405_6_.func_77973_b() instanceof CrossbowItem) {
- this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(blockstate)); boolean flag1 = CrossbowItem.func_220012_d(p_228405_6_);
+ if (!net.minecraftforge.event.ForgeEventFactory.renderBlockOverlay(field_78455_a.field_71439_g, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, blockstate, overlayPos)) boolean flag2 = handside == HandSide.RIGHT;
+ this.func_178108_a(this.field_78455_a.func_175602_ab().func_175023_a().getTexture(blockstate, field_78455_a.field_71441_e, overlayPos)); int i = flag2 ? 1 : -1;
} @@ -402,8 +404,16 @@
}
if (!this.field_78455_a.field_71439_g.func_175149_v()) {
if (this.field_78455_a.field_71439_g.func_208600_a(FluidTags.field_206959_a)) {
+ if (!net.minecraftforge.event.ForgeEventFactory.renderWaterOverlay(field_78455_a.field_71439_g, p_78447_1_))
this.func_78448_c(p_78447_1_);
}
if (this.field_78455_a.field_71439_g.func_70027_ad()) {
+ if (!net.minecraftforge.event.ForgeEventFactory.renderFireOverlay(field_78455_a.field_71439_g, p_78447_1_))
this.func_78442_d();
}
}
@@ -544,6 +551,7 @@
bufferbuilder.func_181662_b(1.0D, 1.0D, -0.5D).func_187315_a((double)(0.0F + f7), (double)(0.0F + f8)).func_181675_d();
bufferbuilder.func_181662_b(-1.0D, 1.0D, -0.5D).func_187315_a((double)(4.0F + f7), (double)(0.0F + f8)).func_181675_d();
tessellator.func_78381_a();
+
GlStateManager.popMatrix();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
@@ -600,8 +608,17 @@
this.field_187471_h = MathHelper.func_76131_a(this.field_187471_h - 0.4F, 0.0F, 1.0F); this.field_187471_h = MathHelper.func_76131_a(this.field_187471_h - 0.4F, 0.0F, 1.0F);
} else { } else {
float f = clientplayerentity.func_184825_o(1.0F); float f = clientplayerentity.func_184825_o(1.0F);
- this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); - this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); - this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
+
+ boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, clientplayerentity.field_71071_by.field_70461_c); + boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, clientplayerentity.field_71071_by.field_70461_c);
+ boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1); + boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1);
+ +
+ if (!requipM && !Objects.equals(this.field_187467_d, itemstack)) + if (!requipM && !Objects.equals(this.field_187467_d, itemstack))
+ this.field_187467_d = itemstack; + this.field_187467_d = itemstack;
+ if (!requipO && !Objects.equals(this.field_187468_e, itemstack1)) + if (!requipO && !Objects.equals(this.field_187468_e, itemstack1))
+ this.field_187468_e = itemstack1; + this.field_187468_e = itemstack1;
+ +
+ this.field_187469_f += MathHelper.func_76131_a((!requipM ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); + this.field_187469_f += MathHelper.func_76131_a((!requipM ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
+ this.field_187471_h += MathHelper.func_76131_a((float)(!requipO ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); + this.field_187471_h += MathHelper.func_76131_a((float)(!requipO ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
} }
if (this.field_187469_f < 0.1F) { if (this.field_187469_f < 0.1F) {
@@ -422,6 +432,5 @@
} else {
this.field_187471_h = 0.0F;
}
-
}
}

View File

@ -1,77 +1,94 @@
--- a/net/minecraft/client/renderer/FluidBlockRenderer.java --- a/net/minecraft/client/renderer/FluidBlockRenderer.java
+++ b/net/minecraft/client/renderer/FluidBlockRenderer.java +++ b/net/minecraft/client/renderer/FluidBlockRenderer.java
@@ -58,8 +58,9 @@ @@ -57,8 +57,9 @@
public boolean func_217638_a(IEnviromentBlockReader p_217638_1_, BlockPos p_217638_2_, BufferBuilder p_217638_3_, IFluidState p_217638_4_) { public boolean func_228796_a_(ILightReader p_228796_1_, BlockPos p_228796_2_, IVertexBuilder p_228796_3_, IFluidState p_228796_4_) {
boolean flag = p_217638_4_.func_206884_a(FluidTags.field_206960_b); boolean flag = p_228796_4_.func_206884_a(FluidTags.field_206960_b);
- TextureAtlasSprite[] atextureatlassprite = flag ? this.field_178272_a : this.field_178271_b; - TextureAtlasSprite[] atextureatlassprite = flag ? this.field_178272_a : this.field_178271_b;
- int i = flag ? 16777215 : BiomeColors.func_217612_c(p_217638_1_, p_217638_2_); - int i = flag ? 16777215 : BiomeColors.func_228363_c_(p_228796_1_, p_228796_2_);
+ TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_217638_1_, p_217638_2_, p_217638_4_); + TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_228796_1_, p_228796_2_, p_228796_4_);
+ int i = p_217638_4_.func_206886_c().getAttributes().getColor(p_217638_1_, p_217638_2_); + int i = p_228796_4_.func_206886_c().getAttributes().getColor(p_228796_1_, p_228796_2_);
+ float alpha = (float)(i >> 24 & 255) / 255.0F; + float alpha = (float)(i >> 24 & 255) / 255.0F;
float f = (float)(i >> 16 & 255) / 255.0F; float f = (float)(i >> 16 & 255) / 255.0F;
float f1 = (float)(i >> 8 & 255) / 255.0F; float f1 = (float)(i >> 8 & 255) / 255.0F;
float f2 = (float)(i & 255) / 255.0F; float f2 = (float)(i & 255) / 255.0F;
@@ -145,15 +146,15 @@ @@ -143,15 +144,15 @@
float f24 = 1.0F * f; float f25 = 1.0F * f;
float f25 = 1.0F * f1; float f26 = 1.0F * f1;
float f26 = 1.0F * f2; float f27 = 1.0F * f2;
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j);
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, f16, f20, j);
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
if (p_217638_4_.func_205586_a(p_217638_1_, p_217638_2_.func_177984_a())) { if (p_228796_4_.func_205586_a(p_228796_1_, p_228796_2_.func_177984_a())) {
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j);
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, f16, f20, j);
- p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
- p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, 1.0F).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f7, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f12, (double)f16).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, alpha, f13, f17, j);
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f10, d2 + 0.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f15, (double)f19).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f10, d2 + 0.0D, f25, f26, f27, alpha, f16, f20, j);
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1 + (double)f9, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f14, (double)f18).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, alpha, f15, f19, j);
+ p_217638_3_.func_181662_b(d0 + 0.0D, d1 + (double)f8, d2 + 1.0D).func_181666_a(f24, f25, f26, alpha).func_187315_a((double)f13, (double)f17).func_187314_a(k, l).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, alpha, f14, f18, j);
} }
} }
@@ -168,10 +169,10 @@ @@ -164,10 +165,10 @@
float f37 = 0.5F * f; float f40 = 0.5F * f;
float f38 = 0.5F * f1; float f41 = 0.5F * f1;
float f40 = 0.5F * f2; float f42 = 0.5F * f2;
- p_217638_3_.func_181662_b(d0, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f31, (double)f36).func_187314_a(j2, k2).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, f34, f39, i1);
- p_217638_3_.func_181662_b(d0, d1, d2).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f31, (double)f34).func_187314_a(j2, k2).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, f34, f37, i1);
- p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f32, (double)f34).func_187314_a(j2, k2).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, f35, f37, i1);
- p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, 1.0F).func_187315_a((double)f32, (double)f36).func_187314_a(j2, k2).func_181675_d(); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, f35, f39, i1);
+ p_217638_3_.func_181662_b(d0, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f31, (double)f36).func_187314_a(j2, k2).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, alpha, f34, f39, i1);
+ p_217638_3_.func_181662_b(d0, d1, d2).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f31, (double)f34).func_187314_a(j2, k2).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, alpha, f34, f37, i1);
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f32, (double)f34).func_187314_a(j2, k2).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, alpha, f35, f37, i1);
+ p_217638_3_.func_181662_b(d0 + 1.0D, d1, d2 + 1.0D).func_181666_a(f37, f38, f40, alpha).func_187315_a((double)f32, (double)f36).func_187314_a(j2, k2).func_181675_d(); + this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, alpha, f35, f39, i1);
flag7 = true; flag7 = true;
} }
@@ -245,15 +246,15 @@ @@ -239,15 +240,15 @@
float f28 = 1.0F * f27 * f; float f31 = 1.0F * f30 * f;
float f29 = 1.0F * f27 * f1; float f32 = 1.0F * f30 * f1;
float f30 = 1.0F * f27 * f2; float f33 = 1.0F * f30 * f2;
- p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, f48, f50, k);
- p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, f49, f28, k);
- p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, f49, f29, k);
- p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, f48, f29, k);
+ p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, alpha, f48, f50, k);
+ p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, alpha, f49, f28, k);
+ p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, alpha, f49, f29, k);
+ p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, alpha, f48, f29, k);
if (textureatlassprite2 != this.field_187501_d) { if (textureatlassprite2 != this.field_187501_d) {
- p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, f48, f29, k);
- p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, f49, f29, k);
- p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, f49, f28, k);
- p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, 1.0F).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d(); - this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, f48, f50, k);
+ p_217638_3_.func_181662_b(d3, d1 + 0.0D, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f49).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d3, d1 + (double)f12, d4, f31, f32, f33, alpha, f48, f29, k);
+ p_217638_3_.func_181662_b(d5, d1 + 0.0D, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f49).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, alpha, f49, f29, k);
+ p_217638_3_.func_181662_b(d5, d1 + (double)f35, d6).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f46, (double)f48).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, alpha, f49, f28, k);
+ p_217638_3_.func_181662_b(d3, d1 + (double)f33, d4).func_181666_a(f28, f29, f30, alpha).func_187315_a((double)f45, (double)f47).func_187314_a(j1, k1).func_181675_d(); + this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, alpha, f48, f50, k);
} }
} }
} }
@@ -256,10 +257,15 @@
}
}
+ @Deprecated
private void func_228797_a_(IVertexBuilder p_228797_1_, double p_228797_2_, double p_228797_4_, double p_228797_6_, float p_228797_8_, float p_228797_9_, float p_228797_10_, float p_228797_11_, float p_228797_12_, int p_228797_13_) {
- p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, 1.0F).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d();
+ func_228797_a_(p_228797_1_, p_228797_2_, p_228797_4_, p_228797_6_, p_228797_8_, p_228797_9_, p_228797_10_, 1.0F, p_228797_11_, p_228797_12_, p_228797_13_);
}
+ private void func_228797_a_(IVertexBuilder p_228797_1_, double p_228797_2_, double p_228797_4_, double p_228797_6_, float p_228797_8_, float p_228797_9_, float p_228797_10_, float alpha, float p_228797_11_, float p_228797_12_, int p_228797_13_) {
+ p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, alpha).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d();
+ }
+
private int func_228795_a_(ILightReader p_228795_1_, BlockPos p_228795_2_) {
int i = WorldRenderer.func_228421_a_(p_228795_1_, p_228795_2_);
int j = WorldRenderer.func_228421_a_(p_228795_1_, p_228795_2_.func_177984_a());

View File

@ -1,62 +1,60 @@
--- a/net/minecraft/client/renderer/FogRenderer.java --- a/net/minecraft/client/renderer/FogRenderer.java
+++ b/net/minecraft/client/renderer/FogRenderer.java +++ b/net/minecraft/client/renderer/FogRenderer.java
@@ -101,6 +101,9 @@ @@ -150,17 +150,28 @@
f3 = 1.0F / this.field_205095_e;
} }
float f9 = Math.min(1.0F / field_205093_c, Math.min(1.0F / field_205094_d, 1.0F / field_205095_e));
+ // Forge: fix MC-4647 and MC-10480 + // Forge: fix MC-4647 and MC-10480
+ if (Float.isInfinite(f3)) f3 = Math.nextAfter(f3, 0.0); + if (Float.isInfinite(f9)) f9 = Math.nextAfter(f9, 0.0);
+ field_205093_c = field_205093_c * (1.0F - f6) + field_205093_c * f9 * f6;
this.field_205093_c = this.field_205093_c * (1.0F - f1) + this.field_205093_c * f3 * f1; field_205094_d = field_205094_d * (1.0F - f6) + field_205094_d * f9 * f6;
this.field_205094_d = this.field_205094_d * (1.0F - f1) + this.field_205094_d * f3 * f1; field_205095_e = field_205095_e * (1.0F - f6) + field_205095_e * f9 * f6;
this.field_205095_e = this.field_205095_e * (1.0F - f1) + this.field_205095_e * f3 * f1; } else if (p_228371_0_.func_216773_g() instanceof LivingEntity && ((LivingEntity)p_228371_0_.func_216773_g()).func_70644_a(Effects.field_76439_r)) {
@@ -115,11 +118,21 @@ float f7 = GameRenderer.func_180438_a((LivingEntity)p_228371_0_.func_216773_g(), p_228371_1_);
f4 = 1.0F / this.field_205095_e; float f10 = Math.min(1.0F / field_205093_c, Math.min(1.0F / field_205094_d, 1.0F / field_205095_e));
}
+ // Forge: fix MC-4647 and MC-10480 + // Forge: fix MC-4647 and MC-10480
+ if (Float.isInfinite(f4)) f4 = Math.nextAfter(f4, 0.0); + if (Float.isInfinite(f10)) f10 = Math.nextAfter(f10, 0.0);
+ field_205093_c = field_205093_c * (1.0F - f7) + field_205093_c * f10 * f7;
this.field_205093_c = this.field_205093_c * (1.0F - f2) + this.field_205093_c * f4 * f2; field_205094_d = field_205094_d * (1.0F - f7) + field_205094_d * f10 * f7;
this.field_205094_d = this.field_205094_d * (1.0F - f2) + this.field_205094_d * f4 * f2; field_205095_e = field_205095_e * (1.0F - f7) + field_205095_e * f10 * f7;
this.field_205095_e = this.field_205095_e * (1.0F - f2) + this.field_205095_e * f4 * f2;
} }
+ net.minecraftforge.client.event.EntityViewRenderEvent.FogColors event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogColors(this, this.field_205104_n, p_217619_1_, p_217619_2_, this.field_205093_c, this.field_205094_d, this.field_205095_e); + net.minecraftforge.client.event.EntityViewRenderEvent.FogColors event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogColors(p_228371_0_, p_228371_1_, field_205093_c, field_205094_d, field_205095_e);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
+ +
+ this.field_205093_c = event.getRed(); + field_205093_c = event.getRed();
+ this.field_205094_d = event.getGreen(); + field_205094_d = event.getGreen();
+ this.field_205095_e = event.getBlue(); + field_205095_e = event.getBlue();
+ +
GlStateManager.clearColor(this.field_205093_c, this.field_205094_d, this.field_205095_e, 0.0F); RenderSystem.clearColor(field_205093_c, field_205094_d, field_205095_e, 0.0F);
} }
@@ -205,11 +218,19 @@ @@ -169,10 +180,18 @@
RenderSystem.fogMode(GlStateManager.FogMode.EXP2);
} }
+ @Deprecated //Forge: pass in partial ticks to setupFog + @Deprecated // FORGE: Pass in partialTicks
public void func_217618_a(ActiveRenderInfo p_217618_1_, int p_217618_2_) { public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) {
+ setupFog(p_217618_1_, p_217618_2_, 0F); + setupFog(p_228372_0_, p_228372_1_, p_228372_2_, p_228372_3_, 0);
+ } + }
+ +
+ public void setupFog(ActiveRenderInfo p_217618_1_, int p_217618_2_, float partialTicks) { + public static void setupFog(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_, float partialTicks) {
this.func_205090_a(false); IFluidState ifluidstate = p_228372_0_.func_216771_k();
GlStateManager.normal3f(0.0F, -1.0F, 0.0F); Entity entity = p_228372_0_.func_216773_g();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); boolean flag = ifluidstate.func_206886_c() != Fluids.field_204541_a;
IFluidState ifluidstate = p_217618_1_.func_216771_k(); + float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(p_228372_1_, p_228372_0_, partialTicks, 0.1F);
+ float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(this, this.field_205104_n, p_217618_1_, partialTicks, 0.1F); + if (hook >= 0) RenderSystem.fogDensity(hook);
+ if (hook >= 0) GlStateManager.fogDensity(hook);
+ else + else
if (p_217618_1_.func_216773_g() instanceof LivingEntity && ((LivingEntity)p_217618_1_.func_216773_g()).func_70644_a(Effects.field_76440_q)) { if (flag) {
float f2 = 5.0F; float f = 1.0F;
int i = ((LivingEntity)p_217618_1_.func_216773_g()).func_70660_b(Effects.field_76440_q).func_76459_b(); if (ifluidstate.func_206884_a(FluidTags.field_206959_a)) {
@@ -264,6 +285,7 @@ @@ -219,8 +238,8 @@
GlStateManager.fogStart(f1 * 0.05F); RenderSystem.fogEnd(f3);
GlStateManager.fogEnd(Math.min(f1, 192.0F) * 0.5F); RenderSystem.fogMode(GlStateManager.FogMode.LINEAR);
} RenderSystem.setupNvFogDistance();
+ net.minecraftforge.client.ForgeHooksClient.onFogRender(this, this.field_205104_n, p_217618_1_, partialTicks, p_217618_2_, f1); + net.minecraftforge.client.ForgeHooksClient.onFogRender(p_228372_1_, p_228372_0_, partialTicks, f3);
} }
-
}
GlStateManager.enableColorMaterial(); public static void func_228373_b_() {

View File

@ -1,15 +1,15 @@
--- a/net/minecraft/client/renderer/GameRenderer.java --- a/net/minecraft/client/renderer/GameRenderer.java
+++ b/net/minecraft/client/renderer/GameRenderer.java +++ b/net/minecraft/client/renderer/GameRenderer.java
@@ -170,6 +170,8 @@ @@ -131,6 +131,8 @@
this.func_175069_a(new ResourceLocation("shaders/post/spider.json")); this.func_175069_a(new ResourceLocation("shaders/post/spider.json"));
} else if (p_175066_1_ instanceof EndermanEntity) { } else if (p_175066_1_ instanceof EndermanEntity) {
this.func_175069_a(new ResourceLocation("shaders/post/invert.json")); this.func_175069_a(new ResourceLocation("shaders/post/invert.json"));
+ } else { + } else {
+ net.minecraftforge.client.ForgeHooksClient.loadEntityShader(p_175066_1_, this); + net.minecraftforge.client.ForgeHooksClient.loadEntityShader(p_175066_1_, this);
}
} }
@@ -351,7 +353,7 @@
}
@@ -306,7 +308,7 @@
d0 = d0 * 60.0D / 70.0D; d0 = d0 * 60.0D / 70.0D;
} }
@ -18,130 +18,43 @@
} }
} }
@@ -437,6 +439,7 @@ @@ -358,6 +360,7 @@
} }
boolean flag = this.field_78531_r.func_175606_aa() instanceof LivingEntity && ((LivingEntity)this.field_78531_r.func_175606_aa()).func_70608_bn(); boolean flag = this.field_78531_r.func_175606_aa() instanceof LivingEntity && ((LivingEntity)this.field_78531_r.func_175606_aa()).func_70608_bn();
+ if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(field_78531_r.field_71438_f, p_215308_2_)) + if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(field_78531_r.field_71438_f, p_228381_1_, p_228381_3_))
if (this.field_78531_r.field_71474_y.field_74320_O == 0 && !flag && !this.field_78531_r.field_71474_y.field_74319_N && this.field_78531_r.field_71442_b.func_178889_l() != GameType.SPECTATOR) { if (this.field_78531_r.field_71474_y.field_74320_O == 0 && !flag && !this.field_78531_r.field_71474_y.field_74319_N && this.field_78531_r.field_71442_b.func_178889_l() != GameType.SPECTATOR) {
this.func_180436_i(); this.field_78513_d.func_205109_c();
this.field_78516_c.func_78440_a(p_215308_2_); this.field_78516_c.func_228396_a_(p_228381_3_, p_228381_1_, this.field_228374_i_.func_228487_b_(), this.field_78531_r.field_71439_g, this.field_78531_r.func_175598_ae().func_229085_a_(this.field_78531_r.field_71439_g, p_228381_3_));
@@ -525,6 +528,10 @@ @@ -475,7 +478,7 @@
GlStateManager.matrixMode(5888); }
GlStateManager.loadIdentity(); } else if (this.field_78531_r.field_71462_r != null) {
this.field_78531_r.field_195558_d.func_216522_a(Minecraft.field_142025_a);
+ // Forge: Fix MC-112292
+ net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.field_147556_a.field_147553_e = this.field_78531_r.func_110434_K();
+ // Forge: also fix rendering text before entering world (not part of MC-112292, but the same reason)
+ net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.field_147556_a.field_147557_n = this.field_78531_r.field_71466_p;
}
if (this.field_78531_r.field_213279_p != null) {
@@ -544,7 +551,7 @@
GlStateManager.clear(256, Minecraft.field_142025_a);
try { try {
- this.field_78531_r.field_71462_r.render(i, j, this.field_78531_r.func_193989_ak()); - this.field_78531_r.field_71462_r.render(i, j, this.field_78531_r.func_193989_ak());
+ net.minecraftforge.client.ForgeHooksClient.drawScreen(this.field_78531_r.field_71462_r, i, j, this.field_78531_r.func_193989_ak()); + net.minecraftforge.client.ForgeHooksClient.drawScreen(this.field_78531_r.field_71462_r, i, j, this.field_78531_r.func_193989_ak());
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen"); CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details"); CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
@@ -656,7 +663,7 @@ @@ -588,9 +591,16 @@
double d2 = activerenderinfo.func_216785_c().field_72449_c; Matrix4f matrix4f = matrixstack.func_227866_c_().func_227870_a_();
icamera.func_78547_a(d0, d1, d2); this.func_228379_a_(matrix4f);
if (this.field_78531_r.field_71474_y.field_151451_c >= 4) { activerenderinfo.func_216772_a(this.field_78531_r.field_71441_e, (Entity)(this.field_78531_r.func_175606_aa() == null ? this.field_78531_r.field_71439_g : this.field_78531_r.func_175606_aa()), this.field_78531_r.field_71474_y.field_74320_O > 0, this.field_78531_r.field_71474_y.field_74320_O == 2, p_228378_1_);
- this.field_205003_A.func_217618_a(activerenderinfo, -1);
+ this.field_205003_A.setupFog(activerenderinfo, -1, p_181560_1_);
this.field_78531_r.func_213239_aq().func_219895_b("sky");
GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity();
@@ -669,14 +676,14 @@
GlStateManager.matrixMode(5888);
}
- this.field_205003_A.func_217618_a(activerenderinfo, 0);
+ this.field_205003_A.setupFog(activerenderinfo, 0, p_181560_1_);
GlStateManager.shadeModel(7425);
if (activerenderinfo.func_216785_c().field_72448_b < 128.0D) {
this.func_215313_a(activerenderinfo, worldrenderer, p_181560_1_, d0, d1, d2);
}
this.field_78531_r.func_213239_aq().func_219895_b("prepareterrain");
- this.field_205003_A.func_217618_a(activerenderinfo, 0);
+ this.field_205003_A.setupFog(activerenderinfo, 0, p_181560_1_);
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
RenderHelper.func_74518_a();
this.field_78531_r.func_213239_aq().func_219895_b("terrain_setup");
@@ -690,7 +697,9 @@
GlStateManager.disableAlphaTest();
worldrenderer.func_215323_a(BlockRenderLayer.SOLID, activerenderinfo);
GlStateManager.enableAlphaTest();
+ this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174936_b(false, this.field_78531_r.field_71474_y.field_151442_I > 0); // FORGE: fix flickering leaves when mods mess up the blurMipmap settings
worldrenderer.func_215323_a(BlockRenderLayer.CUTOUT_MIPPED, activerenderinfo);
+ this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174936_b(false, false);
worldrenderer.func_215323_a(BlockRenderLayer.CUTOUT, activerenderinfo);
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
@@ -709,6 +718,7 @@
if (flag && this.field_78531_r.field_71476_x != null) {
GlStateManager.disableAlphaTest();
this.field_78531_r.func_213239_aq().func_219895_b("outline");
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(worldrenderer, activerenderinfo, field_78531_r.field_71476_x, 0, p_181560_1_))
worldrenderer.func_215325_a(activerenderinfo, this.field_78531_r.field_71476_x, 0);
GlStateManager.enableAlphaTest();
}
@@ -725,7 +735,7 @@
this.field_78531_r.func_110434_K().func_110581_b(AtlasTexture.field_110575_b).func_174935_a();
GlStateManager.disableBlend();
this.func_180436_i();
- this.field_205003_A.func_217618_a(activerenderinfo, 0);
+ this.field_205003_A.setupFog(activerenderinfo, 0, p_181560_1_);
this.field_78531_r.func_213239_aq().func_219895_b("particles");
particlemanager.func_215233_a(activerenderinfo, p_181560_1_);
this.func_175072_h();
@@ -739,7 +749,7 @@
GlStateManager.enableCull();
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.alphaFunc(516, 0.1F);
- this.field_205003_A.func_217618_a(activerenderinfo, 0);
+ this.field_205003_A.setupFog(activerenderinfo, 0, p_181560_1_);
GlStateManager.enableBlend();
GlStateManager.depthMask(false);
this.field_78531_r.func_110434_K().func_110577_a(AtlasTexture.field_110575_b);
@@ -756,6 +766,9 @@
this.func_215313_a(activerenderinfo, worldrenderer, p_181560_1_, d0, d1, d2);
}
+ this.field_78531_r.func_213239_aq().func_219895_b("forge_render_last");
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(worldrenderer, p_181560_1_);
+ +
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup cameraSetup = net.minecraftforge.client.ForgeHooksClient.onCameraSetup(this, activerenderinfo, p_228378_1_);
+ activerenderinfo.setAnglesInternal(cameraSetup.getYaw(), cameraSetup.getPitch());
+ p_228378_4_.func_227863_a_(Vector3f.field_229183_f_.func_229187_a_(cameraSetup.getRoll()));
+
p_228378_4_.func_227863_a_(Vector3f.field_229179_b_.func_229187_a_(activerenderinfo.func_216777_e()));
p_228378_4_.func_227863_a_(Vector3f.field_229181_d_.func_229187_a_(activerenderinfo.func_216778_f() + 180.0F));
this.field_78531_r.field_71438_f.func_228426_a_(p_228378_4_, p_228378_1_, p_228378_2_, flag, activerenderinfo, this, this.field_78513_d, matrix4f);
+ this.field_78531_r.func_213239_aq().func_219895_b("forge_render_last");
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(this.field_78531_r.field_71438_f, p_228378_4_, p_228378_2_);
this.field_78531_r.func_213239_aq().func_219895_b("hand"); this.field_78531_r.func_213239_aq().func_219895_b("hand");
if (this.field_175074_C) { if (this.field_175074_C) {
GlStateManager.clear(256, Minecraft.field_142025_a); RenderSystem.clear(256, Minecraft.field_142025_a);
@@ -772,7 +785,7 @@ @@ -670,4 +680,9 @@
GlStateManager.multMatrix(Matrix4f.func_195876_a(this.func_215311_a(p_215313_1_, p_215313_3_, true), (float)this.field_78531_r.field_195558_d.func_198109_k() / (float)this.field_78531_r.field_195558_d.func_198091_l(), 0.05F, this.field_78530_s * 4.0F)); public OverlayTexture func_228385_m_() {
GlStateManager.matrixMode(5888); return this.field_228375_t_;
GlStateManager.pushMatrix();
- this.field_205003_A.func_217618_a(p_215313_1_, 0);
+ this.field_205003_A.setupFog(p_215313_1_, 0, p_215313_3_);
p_215313_2_.func_195466_a(p_215313_3_, p_215313_4_, p_215313_6_, p_215313_8_);
GlStateManager.disableFog();
GlStateManager.popMatrix();
@@ -858,6 +871,11 @@
}
protected void func_78474_d(float p_78474_1_) {
+ net.minecraftforge.client.IRenderHandler renderer = this.field_78531_r.field_71441_e.func_201675_m().getWeatherRenderer();
+ if (renderer != null) {
+ renderer.render(this.field_78529_t, p_78474_1_, this.field_78531_r.field_71441_e, this.field_78531_r);
+ return;
+ }
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
if (!(f <= 0.0F)) {
this.func_180436_i();
@@ -1090,4 +1108,9 @@
public ActiveRenderInfo func_215316_n() {
return this.field_215317_L;
} }
+ +
+ @Override + @Override

View File

@ -4,9 +4,9 @@
public TextureAtlasSprite func_199309_a(ItemStack p_199309_1_) { public TextureAtlasSprite func_199309_a(ItemStack p_199309_1_) {
IBakedModel ibakedmodel = this.func_178089_a(p_199309_1_); IBakedModel ibakedmodel = this.func_178089_a(p_199309_1_);
- return (ibakedmodel == this.field_178090_d.func_174951_a() || ibakedmodel.func_188618_c()) && p_199309_1_.func_77973_b() instanceof BlockItem ? this.field_178090_d.func_174954_c().func_178122_a(((BlockItem)p_199309_1_.func_77973_b()).func_179223_d().func_176223_P()) : ibakedmodel.func_177554_e(); - return ibakedmodel == this.field_178090_d.func_174951_a() && p_199309_1_.func_77973_b() instanceof BlockItem ? this.field_178090_d.func_174954_c().func_178122_a(((BlockItem)p_199309_1_.func_77973_b()).func_179223_d().func_176223_P()) : ibakedmodel.func_177554_e();
+ // FORGE: Make sure to call the item overrides + // FORGE: Make sure to call the item overrides
+ return (ibakedmodel == this.field_178090_d.func_174951_a() || ibakedmodel.func_188618_c()) && p_199309_1_.func_77973_b() instanceof BlockItem ? this.field_178090_d.func_174954_c().func_178122_a(((BlockItem)p_199309_1_.func_77973_b()).func_179223_d().func_176223_P()) : ibakedmodel.func_188617_f().func_209581_a(ibakedmodel, p_199309_1_, null, null).func_177554_e(); + return ibakedmodel == this.field_178090_d.func_174951_a() && p_199309_1_.func_77973_b() instanceof BlockItem ? this.field_178090_d.func_174954_c().func_178122_a(((BlockItem)p_199309_1_.func_77973_b()).func_179223_d().func_176223_P()) : ibakedmodel.func_188617_f().func_209581_a(ibakedmodel, p_199309_1_, null, null).getParticleTexture(net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
} }
public IBakedModel func_178089_a(ItemStack p_178089_1_) { public IBakedModel func_178089_a(ItemStack p_178089_1_) {

Some files were not shown because too many files have changed in this diff Show More