Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped.

DimensionType is not unique per Dimension. See DimensionManager for more details.
Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted.
This commit is contained in:
LexManos 2019-02-14 15:08:53 -08:00
parent 9a1688599a
commit ca72710937
361 changed files with 3166 additions and 3547 deletions

View file

@ -1,6 +1,6 @@
buildscript { buildscript {
repositories { repositories {
//mavenLocal() mavenLocal()
maven { url = 'https://files.minecraftforge.net/maven' } maven { url = 'https://files.minecraftforge.net/maven' }
jcenter() jcenter()
mavenCentral() mavenCentral()
@ -45,8 +45,8 @@ ext {
} }
MAPPING_CHANNEL = 'snapshot' MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20180921-1.13' MAPPING_VERSION = '20180921-1.13'
MC_VERSION = '1.13' MC_VERSION = '1.13.2'
MCP_VERSION = '2018.09.12.04.11.00' MCP_VERSION = '20190213.203750'
} }
project(':mcp') { project(':mcp') {
@ -75,7 +75,7 @@ project(':clean') {
mkdir 'runclient' mkdir 'runclient'
} }
classpath sourceSets.main.runtimeClasspath classpath sourceSets.main.runtimeClasspath
args = ['--accessToken', '0', '--version', '1.13'] args = ['--accessToken', '0', '--version', MC_VERSION]
main 'net.minecraft.client.main.Main' main 'net.minecraft.client.main.Main'
workingDir 'runclient' workingDir 'runclient'
} }
@ -140,7 +140,7 @@ project(':forge') {
} }
ext { ext {
SPEC_VERSION = '24.0' // This is overwritten by git tag, but here so dev time doesnt explode SPEC_VERSION = '25.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.

View file

@ -11,7 +11,7 @@
boolean flag1 = advancementprogress.func_192105_a(); boolean flag1 = advancementprogress.func_192105_a();
@@ -186,6 +188,7 @@ @@ -186,6 +188,7 @@
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_82766_b("announceAdvancements")) { if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_82766_b("announceAdvancements")) {
this.field_192756_d.func_184103_al().func_148539_a(new TextComponentTranslation("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), new Object[]{this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()})); this.field_192756_d.func_184103_al().func_148539_a(new TextComponentTranslation("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()));
} }
+ net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_); + net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_);
} }

View file

@ -1,7 +1,7 @@
--- 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
@@ -23,6 +23,8 @@ @@ -24,6 +24,8 @@
import net.minecraft.util.ResourceLocation; import net.minecraft.util.registry.IRegistry;
public class ItemPredicate { public class ItemPredicate {
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> custom_predicates = new java.util.HashMap<>(); + private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> custom_predicates = new java.util.HashMap<>();
@ -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;
@@ -89,6 +91,11 @@ @@ -90,6 +92,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")) {
@@ -180,6 +187,14 @@ @@ -181,6 +188,14 @@
} }
} }
@ -34,5 +34,5 @@
+ } + }
+ +
public static class Builder { public static class Builder {
private final List<EnchantmentPredicate> field_200312_a = Lists.<EnchantmentPredicate>newArrayList(); private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
@Nullable @Nullable

View file

@ -1,23 +1,19 @@
--- a/net/minecraft/block/Block.java --- a/net/minecraft/block/Block.java
+++ b/net/minecraft/block/Block.java +++ b/net/minecraft/block/Block.java
@@ -74,11 +74,13 @@ @@ -75,9 +75,10 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
-public class Block implements IItemProvider { -public class Block implements IItemProvider {
+public class Block extends net.minecraftforge.registries.ForgeRegistryEntry<Block> implements IItemProvider, net.minecraftforge.common.extensions.IForgeBlock { +public class Block extends net.minecraftforge.registries.ForgeRegistryEntry<Block> implements IItemProvider, net.minecraftforge.common.extensions.IForgeBlock {
protected static final Logger field_196273_d = LogManager.getLogger(); protected static final Logger field_196273_d = LogManager.getLogger();
private static final ResourceLocation field_176230_a = new ResourceLocation("air"); - public static final ObjectIntIdentityMap<IBlockState> field_176229_d = new ObjectIntIdentityMap<>();
- public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> field_149771_c = new RegistryNamespacedDefaultedByKey<ResourceLocation, Block>(field_176230_a);
- public static final ObjectIntIdentityMap<IBlockState> field_176229_d = new ObjectIntIdentityMap<IBlockState>();
+ @Deprecated //Forge: Do not use, use ForgeRegistries
+ public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> field_149771_c = net.minecraftforge.registries.GameData.getWrapperDefaulted(Block.class);
+ @Deprecated //Forge: Do not use, use GameRegistry + @Deprecated //Forge: Do not use, use GameRegistry
+ public static final ObjectIntIdentityMap<IBlockState> field_176229_d = net.minecraftforge.registries.GameData.getBlockStateIDMap(); + public static final ObjectIntIdentityMap<IBlockState> field_176229_d = net.minecraftforge.registries.GameData.getBlockStateIDMap();
private static final EnumFacing[] field_212556_a = new EnumFacing[]{EnumFacing.WEST, EnumFacing.EAST, EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.DOWN, EnumFacing.UP};
protected final int field_149784_t; protected final int field_149784_t;
protected final float field_149782_v; protected final float field_149782_v;
protected final float field_149781_w; @@ -298,7 +299,7 @@
@@ -316,7 +318,7 @@
@Deprecated @Deprecated
public boolean func_196253_a(IBlockState p_196253_1_, BlockItemUseContext p_196253_2_) { public boolean func_196253_a(IBlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
@ -26,7 +22,7 @@
} }
@Deprecated @Deprecated
@@ -328,8 +330,9 @@ @@ -310,8 +311,9 @@
return this.field_149789_z; return this.field_149789_z;
} }
@ -37,7 +33,7 @@
} }
@Deprecated @Deprecated
@@ -340,11 +343,11 @@ @@ -322,11 +324,11 @@
@Deprecated @Deprecated
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public int func_185484_c(IBlockState p_185484_1_, IWorldReader p_185484_2_, BlockPos p_185484_3_) { public int func_185484_c(IBlockState p_185484_1_, IWorldReader p_185484_2_, BlockPos p_185484_3_) {
@ -51,7 +47,7 @@
} else { } else {
return i; return i;
} }
@@ -486,8 +489,12 @@ @@ -468,8 +470,12 @@
@Deprecated @Deprecated
public void func_196243_a(IBlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, IBlockState p_196243_4_, boolean p_196243_5_) { public void func_196243_a(IBlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, IBlockState p_196243_4_, boolean p_196243_5_) {
@ -64,7 +60,7 @@
public int func_196264_a(IBlockState p_196264_1_, Random p_196264_2_) { public int func_196264_a(IBlockState p_196264_1_, Random p_196264_2_) {
return 1; return 1;
} }
@@ -502,30 +509,30 @@ @@ -484,30 +490,30 @@
if (f == -1.0F) { if (f == -1.0F) {
return 0.0F; return 0.0F;
} else { } else {
@ -109,7 +105,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;
@@ -547,6 +554,7 @@ @@ -529,6 +535,7 @@
} }
@ -117,7 +113,7 @@
public float func_149638_a() { public float func_149638_a() {
return this.field_149781_w; return this.field_149781_w;
} }
@@ -561,7 +569,7 @@ @@ -543,7 +550,7 @@
} }
} }
@ -126,7 +122,7 @@
} }
public void func_180652_a(World p_180652_1_, BlockPos p_180652_2_, Explosion p_180652_3_) { public void func_180652_a(World p_180652_1_, BlockPos p_180652_2_, Explosion p_180652_3_) {
@@ -615,16 +623,22 @@ @@ -597,16 +604,22 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
p_180657_2_.func_71029_a(StatList.field_188065_ae.func_199076_b(this)); p_180657_2_.func_71029_a(StatList.field_188065_ae.func_199076_b(this));
p_180657_2_.func_71020_j(0.005F); p_180657_2_.func_71020_j(0.005F);
@ -151,7 +147,7 @@
protected boolean func_149700_E() { protected boolean func_149700_E() {
return this.func_176223_P().func_185917_h() && !this.func_149716_u(); return this.func_176223_P().func_185917_h() && !this.func_149716_u();
} }
@@ -681,6 +695,7 @@ @@ -663,6 +676,7 @@
p_176216_2_.field_70181_x = 0.0D; p_176216_2_.field_70181_x = 0.0D;
} }
@ -159,7 +155,7 @@
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) { public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) {
return new ItemStack(this); return new ItemStack(this);
} }
@@ -755,6 +770,7 @@ @@ -737,6 +751,7 @@
} }
} }
@ -167,7 +163,7 @@
public SoundType func_185467_w() { public SoundType func_185467_w() {
return this.field_149762_H; return this.field_149762_H;
} }
@@ -776,11 +792,11 @@ @@ -758,11 +773,11 @@
} }
public static boolean func_196252_e(Block p_196252_0_) { public static boolean func_196252_e(Block p_196252_0_) {
@ -181,24 +177,24 @@
} }
public static void func_149671_p() { public static void func_149671_p() {
@@ -1147,7 +1163,7 @@ @@ -1129,7 +1144,7 @@
func_196254_a("chiseled_quartz_block", new Block(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_151677_p).func_200943_b(0.8F))); func_196254_a("chiseled_quartz_block", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151677_p).func_200943_b(0.8F)));
func_196254_a("quartz_pillar", new BlockRotatedPillar(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_151677_p).func_200943_b(0.8F))); func_196254_a("quartz_pillar", new BlockRotatedPillar(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151677_p).func_200943_b(0.8F)));
func_196254_a("quartz_stairs", new BlockStairs(block42.func_176223_P(), Block.Builder.func_200950_a(block42))); func_196254_a("quartz_stairs", new BlockStairs(block42.func_176223_P(), Block.Properties.func_200950_a(block42)));
- func_196254_a("activator_rail", new BlockRailPowered(Block.Builder.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e))); - func_196254_a("activator_rail", new BlockRailPowered(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
+ func_196254_a("activator_rail", new BlockRailPowered(Block.Builder.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true)); + func_196254_a("activator_rail", new BlockRailPowered(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));
func_196254_a("dropper", new BlockDropper(Block.Builder.func_200945_a(Material.field_151576_e).func_200943_b(3.5F))); func_196254_a("dropper", new BlockDropper(Block.Properties.func_200945_a(Material.field_151576_e).func_200943_b(3.5F)));
func_196254_a("white_terracotta", new Block(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_193561_M).func_200948_a(1.25F, 4.2F))); func_196254_a("white_terracotta", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_193561_M).func_200948_a(1.25F, 4.2F)));
func_196254_a("orange_terracotta", new Block(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_193562_N).func_200948_a(1.25F, 4.2F))); func_196254_a("orange_terracotta", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_193562_N).func_200948_a(1.25F, 4.2F)));
@@ -1464,6 +1480,7 @@ @@ -1455,6 +1470,7 @@
func_196254_a("structure_block", new BlockStructure(Block.Builder.func_200949_a(Material.field_151573_f, MapColor.field_197656_x).func_200948_a(-1.0F, 3600000.0F))); func_196254_a("bubble_column", new BlockBubbleColumn(Block.Properties.func_200945_a(Material.field_203244_i).func_200942_a()));
field_149771_c.func_177776_a(); func_196254_a("structure_block", new BlockStructure(Block.Properties.func_200949_a(Material.field_151573_f, MaterialColor.field_197656_x).func_200948_a(-1.0F, 3600000.0F)));
+ if(false) // Processed in GameData.BlockCallbacks#onBake + if(false) // Processed in GameData.BlockCallbacks#onBake
for(Block block80 : field_149771_c) { for(Block block85 : IRegistry.field_212618_g) {
for(IBlockState iblockstate : block80.func_176194_O().func_177619_a()) { for(IBlockState iblockstate : block85.func_176194_O().func_177619_a()) {
field_176229_d.func_195867_b(iblockstate); field_176229_d.func_195867_b(iblockstate);
@@ -1604,4 +1621,83 @@ @@ -1594,4 +1610,83 @@
return Objects.hash(this.field_212164_a, this.field_212165_b, this.field_212166_c); return Objects.hash(this.field_212164_a, this.field_212165_b, this.field_212166_c);
} }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/BlockAbstractBanner.java --- a/net/minecraft/block/BlockAbstractBanner.java
+++ b/net/minecraft/block/BlockAbstractBanner.java +++ b/net/minecraft/block/BlockAbstractBanner.java
@@ -50,7 +50,7 @@ @@ -51,7 +51,7 @@
} }
public void func_196255_a(IBlockState p_196255_1_, World p_196255_2_, BlockPos p_196255_3_, float p_196255_4_, int p_196255_5_) { public void func_196255_a(IBlockState p_196255_1_, World p_196255_2_, BlockPos p_196255_3_, float p_196255_4_, int p_196255_5_) {
@ -9,7 +9,7 @@
} }
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
@@ -73,4 +73,10 @@ @@ -75,4 +75,10 @@
public EnumDyeColor func_196285_M_() { public EnumDyeColor func_196285_M_() {
return this.field_196286_a; return this.field_196286_a;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/BlockBed.java --- a/net/minecraft/block/BlockBed.java
+++ b/net/minecraft/block/BlockBed.java +++ b/net/minecraft/block/BlockBed.java
@@ -66,7 +66,9 @@ @@ -67,7 +67,9 @@
} }
} }

View file

@ -6,7 +6,7 @@
-public class BlockBush extends Block { -public class BlockBush extends Block {
+public class BlockBush extends Block implements net.minecraftforge.common.IPlantable { +public class BlockBush extends Block implements net.minecraftforge.common.IPlantable {
protected BlockBush(Block.Builder p_i48437_1_) { protected BlockBush(Block.Properties p_i48437_1_) {
super(p_i48437_1_); super(p_i48437_1_);
} }
@@ -26,6 +26,8 @@ @@ -26,6 +26,8 @@

View file

@ -24,10 +24,10 @@
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) { + if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
if (j == 15) { if (j == 15) {
p_196267_2_.func_175656_a(blockpos, this.func_176223_P()); p_196267_2_.func_175656_a(blockpos, this.func_176223_P());
IBlockState iblockstate = (IBlockState)p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0)); IBlockState iblockstate = p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
@@ -52,7 +54,8 @@ @@ -52,7 +54,8 @@
} else { } else {
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4); p_196267_2_.func_180501_a(p_196267_3_, p_196267_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_196267_2_, p_196267_3_, p_196267_1_);

View file

@ -9,7 +9,7 @@
int i = p_196267_1_.func_177229_b(field_176501_a); int i = p_196267_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_196267_2_, p_196267_3_, p_196267_1_, p_196267_2_.field_73012_v.nextInt(5) == 0)) {
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2); p_196267_2_.func_180501_a(p_196267_3_, p_196267_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_196267_2_, p_196267_3_, p_196267_1_);
} }
} }

View file

@ -8,7 +8,7 @@
+public class BlockDeadBush extends BlockBush implements net.minecraftforge.common.IShearable { +public class BlockDeadBush extends BlockBush implements net.minecraftforge.common.IShearable {
protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D); protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
protected BlockDeadBush(Block.Builder p_i48418_1_) { protected BlockDeadBush(Block.Properties p_i48418_1_) {
@@ -46,4 +46,10 @@ @@ -46,4 +46,10 @@
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, flag ? Blocks.field_150350_a.func_176223_P() : p_180657_4_, p_180657_5_, p_180657_6_); super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, flag ? Blocks.field_150350_a.func_176223_P() : p_180657_4_, p_180657_5_, p_180657_6_);

View file

@ -6,6 +6,6 @@
ItemStack itemstack = tileentitydispenser.func_70301_a(i); ItemStack itemstack = tileentitydispenser.func_70301_a(i);
- if (!itemstack.func_190926_b()) { - if (!itemstack.func_190926_b()) {
+ if (!itemstack.func_190926_b() && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack)) { + if (!itemstack.func_190926_b() && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack)) {
EnumFacing enumfacing = (EnumFacing)p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a); EnumFacing enumfacing = p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a);
IInventory iinventory = TileEntityHopper.func_195484_a(p_176439_1_, p_176439_2_.func_177972_a(enumfacing)); IInventory iinventory = TileEntityHopper.func_195484_a(p_176439_1_, p_176439_2_.func_177972_a(enumfacing));
ItemStack itemstack1; ItemStack itemstack1;

View file

@ -12,13 +12,13 @@
- IBlockState iblockstate1 = iblockreader.func_180495_p(blockpos2); - IBlockState iblockstate1 = iblockreader.func_180495_p(blockpos2);
- IBlockState iblockstate2 = iblockreader.func_180495_p(blockpos3); - IBlockState iblockstate2 = iblockreader.func_180495_p(blockpos3);
- IBlockState iblockstate3 = iblockreader.func_180495_p(blockpos4); - IBlockState iblockstate3 = iblockreader.func_180495_p(blockpos4);
- return (IBlockState)((IBlockState)((IBlockState)((IBlockState)((IBlockState)super.func_196258_a(p_196258_1_).func_206870_a(field_196409_a, Boolean.valueOf(this.func_196416_a(iblockstate, iblockstate.func_193401_d(iblockreader, blockpos1, EnumFacing.SOUTH))))).func_206870_a(field_196411_b, Boolean.valueOf(this.func_196416_a(iblockstate1, iblockstate1.func_193401_d(iblockreader, blockpos2, EnumFacing.WEST))))).func_206870_a(field_196413_c, Boolean.valueOf(this.func_196416_a(iblockstate2, iblockstate2.func_193401_d(iblockreader, blockpos3, EnumFacing.NORTH))))).func_206870_a(field_196414_y, Boolean.valueOf(this.func_196416_a(iblockstate3, iblockstate3.func_193401_d(iblockreader, blockpos4, EnumFacing.EAST))))).func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a)); - return super.func_196258_a(p_196258_1_).func_206870_a(field_196409_a, Boolean.valueOf(this.func_196416_a(iblockstate, iblockstate.func_193401_d(iblockreader, blockpos1, EnumFacing.SOUTH)))).func_206870_a(field_196411_b, Boolean.valueOf(this.func_196416_a(iblockstate1, iblockstate1.func_193401_d(iblockreader, blockpos2, EnumFacing.WEST)))).func_206870_a(field_196413_c, Boolean.valueOf(this.func_196416_a(iblockstate2, iblockstate2.func_193401_d(iblockreader, blockpos3, EnumFacing.NORTH)))).func_206870_a(field_196414_y, Boolean.valueOf(this.func_196416_a(iblockstate3, iblockstate3.func_193401_d(iblockreader, blockpos4, EnumFacing.EAST)))).func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a));
+ return super.func_196258_a(p_196258_1_) + return super.func_196258_a(p_196258_1_)
+ .func_206870_a(field_196409_a, canFenceConnectTo(iblockreader, blockpos, EnumFacing.NORTH)) + .func_206870_a(field_196409_a, canFenceConnectTo(iblockreader, blockpos, EnumFacing.NORTH))
+ .func_206870_a(field_196411_b, canFenceConnectTo(iblockreader, blockpos, EnumFacing.EAST)) + .func_206870_a(field_196411_b, canFenceConnectTo(iblockreader, blockpos, EnumFacing.EAST))
+ .func_206870_a(field_196413_c, canFenceConnectTo(iblockreader, blockpos, EnumFacing.SOUTH)) + .func_206870_a(field_196413_c, canFenceConnectTo(iblockreader, blockpos, EnumFacing.SOUTH))
+ .func_206870_a(field_196414_y, canFenceConnectTo(iblockreader, blockpos, EnumFacing.WEST)) + .func_206870_a(field_196414_y, canFenceConnectTo(iblockreader, blockpos, EnumFacing.WEST))
+ .func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a)); + .func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a));
} }
public IBlockState func_196271_a(IBlockState p_196271_1_, EnumFacing p_196271_2_, IBlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_) { public IBlockState func_196271_a(IBlockState p_196271_1_, EnumFacing p_196271_2_, IBlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_) {
@ -26,8 +26,8 @@
p_196271_4_.func_205219_F_().func_205360_a(p_196271_5_, Fluids.field_204546_a, Fluids.field_204546_a.func_205569_a(p_196271_4_)); p_196271_4_.func_205219_F_().func_205360_a(p_196271_5_, Fluids.field_204546_a, Fluids.field_204546_a.func_205569_a(p_196271_4_));
} }
- return p_196271_2_.func_176740_k().func_176716_d() == EnumFacing.Plane.HORIZONTAL ? (IBlockState)p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.func_196416_a(p_196271_3_, p_196271_3_.func_193401_d(p_196271_4_, p_196271_6_, p_196271_2_.func_176734_d())))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); - return p_196271_2_.func_176740_k().func_176716_d() == EnumFacing.Plane.HORIZONTAL ? p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.func_196416_a(p_196271_3_, p_196271_3_.func_193401_d(p_196271_4_, p_196271_6_, p_196271_2_.func_176734_d())))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
+ return p_196271_2_.func_176740_k().func_176716_d() == EnumFacing.Plane.HORIZONTAL ? (IBlockState)p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.canFenceConnectTo(p_196271_4_, p_196271_5_, p_196271_2_))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); + return p_196271_2_.func_176740_k().func_176716_d() == EnumFacing.Plane.HORIZONTAL ? p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.canFenceConnectTo(p_196271_4_, p_196271_5_, p_196271_2_))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
} }
protected void func_206840_a(StateContainer.Builder<Block, IBlockState> p_206840_1_) { protected void func_206840_a(StateContainer.Builder<Block, IBlockState> p_206840_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/BlockFire.java --- a/net/minecraft/block/BlockFire.java
+++ b/net/minecraft/block/BlockFire.java +++ b/net/minecraft/block/BlockFire.java
@@ -63,13 +63,13 @@ @@ -64,13 +64,13 @@
public IBlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) { public IBlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
IBlockState iblockstate = p_196448_1_.func_180495_p(p_196448_2_.func_177977_b()); IBlockState iblockstate = p_196448_1_.func_180495_p(p_196448_2_.func_177977_b());
@ -11,12 +11,12 @@
for(EnumFacing enumfacing : EnumFacing.values()) { for(EnumFacing enumfacing : EnumFacing.values()) {
BooleanProperty booleanproperty = field_196449_B.get(enumfacing); BooleanProperty booleanproperty = field_196449_B.get(enumfacing);
if (booleanproperty != null) { if (booleanproperty != null) {
- iblockstate1 = (IBlockState)iblockstate1.func_206870_a(booleanproperty, Boolean.valueOf(this.func_196446_i(p_196448_1_.func_180495_p(p_196448_2_.func_177972_a(enumfacing))))); - iblockstate1 = iblockstate1.func_206870_a(booleanproperty, Boolean.valueOf(this.func_196446_i(p_196448_1_.func_180495_p(p_196448_2_.func_177972_a(enumfacing)))));
+ iblockstate1 = iblockstate1.func_206870_a(booleanproperty, this.canCatchFire(p_196448_1_, p_196448_2_.func_177972_a(enumfacing), enumfacing.func_176734_d())); + iblockstate1 = iblockstate1.func_206870_a(booleanproperty, Boolean.valueOf(this.canCatchFire(p_196448_1_, p_196448_2_.func_177972_a(enumfacing), enumfacing.func_176734_d())));
} }
} }
@@ -97,12 +97,13 @@ @@ -98,12 +98,13 @@
public void func_196267_b(IBlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_196267_b(IBlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
if (p_196267_2_.func_82736_K().func_82766_b("doFireTick")) { if (p_196267_2_.func_82736_K().func_82766_b("doFireTick")) {
@ -32,7 +32,7 @@
int i = p_196267_1_.func_177229_b(field_176543_a); int i = p_196267_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_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) {
p_196267_2_.func_175698_g(p_196267_3_); p_196267_2_.func_175698_g(p_196267_3_);
@@ -116,14 +117,14 @@ @@ -117,14 +118,14 @@
if (!flag) { if (!flag) {
p_196267_2_.func_205220_G_().func_205360_a(p_196267_3_, this, this.func_149738_a(p_196267_2_) + p_196267_4_.nextInt(10)); p_196267_2_.func_205220_G_().func_205360_a(p_196267_3_, this, this.func_149738_a(p_196267_2_) + p_196267_4_.nextInt(10));
if (!this.func_196447_a(p_196267_2_, p_196267_3_)) { if (!this.func_196447_a(p_196267_2_, p_196267_3_)) {
@ -49,7 +49,7 @@
p_196267_2_.func_175698_g(p_196267_3_); p_196267_2_.func_175698_g(p_196267_3_);
return; return;
} }
@@ -131,12 +132,12 @@ @@ -132,12 +133,12 @@
boolean flag1 = p_196267_2_.func_180502_D(p_196267_3_); boolean flag1 = p_196267_2_.func_180502_D(p_196267_3_);
int k = flag1 ? -50 : 0; int k = flag1 ? -50 : 0;
@ -68,7 +68,7 @@
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
for(int l = -1; l <= 1; ++l) { for(int l = -1; l <= 1; ++l) {
@@ -174,28 +175,31 @@ @@ -175,16 +176,18 @@
return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d()); return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d());
} }
@ -84,32 +84,12 @@
- private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_) { - private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_) {
- int i = this.func_176532_c(p_176536_1_.func_180495_p(p_176536_2_).func_177230_c()); - int i = this.func_176532_c(p_176536_1_.func_180495_p(p_176536_2_).func_177230_c());
- if (p_176536_4_.nextInt(p_176536_3_) < i) { + private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, EnumFacing face) {
- IBlockState iblockstate = p_176536_1_.func_180495_p(p_176536_2_); + int i = p_176536_1_.func_180495_p(p_176536_2_).getFlammability(p_176536_1_, p_176536_2_, face);
- if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) { if (p_176536_4_.nextInt(p_176536_3_) < i) {
- int j = Math.min(p_176536_5_ + p_176536_4_.nextInt(5) / 4, 15); IBlockState iblockstate = p_176536_1_.func_180495_p(p_176536_2_);
- p_176536_1_.func_180501_a(p_176536_2_, (IBlockState)this.func_196448_a(p_176536_1_, p_176536_2_).func_206870_a(field_176543_a, Integer.valueOf(j)), 3); if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) {
+ private void tryCatchFire(World worldIn, BlockPos pos, int chance, Random random, int age, EnumFacing face) { @@ -204,7 +207,7 @@
+ IBlockState other = worldIn.func_180495_p(pos);
+ int i = other.getFlammability(worldIn, pos, face);
+ if (random.nextInt(chance) < i) {
+ IBlockState iblockstate = worldIn.func_180495_p(pos);
+ if (random.nextInt(age + 10) < 5 && !worldIn.func_175727_C(pos)) {
+ int j = Math.min(age + random.nextInt(5) / 4, 15);
+ worldIn.func_180501_a(pos, (IBlockState)this.func_196448_a(worldIn, pos).func_206870_a(field_176543_a, Integer.valueOf(j)), 3);
} else {
- p_176536_1_.func_175698_g(p_176536_2_);
+ worldIn.func_175698_g(pos);
}
Block block = iblockstate.func_177230_c();
if (block instanceof BlockTNT) {
- ((BlockTNT)block).func_196534_a(p_176536_1_, p_176536_2_);
+ ((BlockTNT)block).func_196534_a(worldIn, pos);
}
}
@@ -203,7 +207,7 @@
private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) { private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) {
for(EnumFacing enumfacing : EnumFacing.values()) { for(EnumFacing enumfacing : EnumFacing.values()) {
@ -118,7 +98,7 @@
return true; return true;
} }
} }
@@ -218,7 +222,7 @@ @@ -219,7 +222,7 @@
int i = 0; int i = 0;
for(EnumFacing enumfacing : EnumFacing.values()) { for(EnumFacing enumfacing : EnumFacing.values()) {
@ -127,7 +107,7 @@
} }
return i; return i;
@@ -229,6 +233,7 @@ @@ -230,6 +233,7 @@
return false; return false;
} }
@ -135,7 +115,7 @@
public boolean func_196446_i(IBlockState p_196446_1_) { public boolean func_196446_i(IBlockState p_196446_1_) {
return this.func_176534_d(p_196446_1_.func_177230_c()) > 0; return this.func_176534_d(p_196446_1_.func_177230_c()) > 0;
} }
@@ -251,8 +256,8 @@ @@ -252,8 +256,8 @@
p_180655_2_.func_184134_a((double)((float)p_180655_3_.func_177958_n() + 0.5F), (double)((float)p_180655_3_.func_177956_o() + 0.5F), (double)((float)p_180655_3_.func_177952_p() + 0.5F), SoundEvents.field_187643_bs, SoundCategory.BLOCKS, 1.0F + p_180655_4_.nextFloat(), p_180655_4_.nextFloat() * 0.7F + 0.3F, false); p_180655_2_.func_184134_a((double)((float)p_180655_3_.func_177958_n() + 0.5F), (double)((float)p_180655_3_.func_177956_o() + 0.5F), (double)((float)p_180655_3_.func_177952_p() + 0.5F), SoundEvents.field_187643_bs, SoundCategory.BLOCKS, 1.0F + p_180655_4_.nextFloat(), p_180655_4_.nextFloat() * 0.7F + 0.3F, false);
} }
@ -146,7 +126,7 @@
for(int j = 0; j < 2; ++j) { for(int j = 0; j < 2; ++j) {
double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * (double)0.1F; double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * (double)0.1F;
double d8 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble(); double d8 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -261,7 +266,7 @@ @@ -262,7 +266,7 @@
} }
} }
@ -155,7 +135,7 @@
for(int k = 0; k < 2; ++k) { for(int k = 0; k < 2; ++k) {
double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * (double)0.1F; double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
double d9 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble(); double d9 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -270,7 +275,7 @@ @@ -271,7 +275,7 @@
} }
} }
@ -164,7 +144,7 @@
for(int l = 0; l < 2; ++l) { for(int l = 0; l < 2; ++l) {
double d5 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); double d5 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d10 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble(); double d10 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -279,7 +284,7 @@ @@ -280,7 +284,7 @@
} }
} }
@ -173,7 +153,7 @@
for(int i1 = 0; i1 < 2; ++i1) { for(int i1 = 0; i1 < 2; ++i1) {
double d6 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble(); double d6 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d11 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble(); double d11 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -288,7 +293,7 @@ @@ -289,7 +293,7 @@
} }
} }
@ -182,7 +162,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;
@@ -320,10 +325,23 @@ @@ -321,10 +325,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

@ -4,8 +4,8 @@
import net.minecraft.world.World; import net.minecraft.world.World;
public class BlockFlowerPot extends Block { public class BlockFlowerPot extends Block {
- private static final Map<Block, Block> field_196451_b = Maps.<Block, Block>newHashMap(); - private static final Map<Block, Block> field_196451_b = Maps.newHashMap();
+ private static final Map<Block, Block> field_196451_b = Maps.<Block, Block>newHashMap(); //TODO: Delegates + private static final Map<Block, Block> field_196451_b = Maps.newHashMap(); //TODO: Delegates
protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D); protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D);
private final Block field_196452_c; private final Block field_196452_c;

View file

@ -72,7 +72,7 @@
protected void func_206840_a(StateContainer.Builder<Block, IBlockState> p_206840_1_) { protected void func_206840_a(StateContainer.Builder<Block, IBlockState> p_206840_1_) {
@@ -189,4 +192,10 @@ @@ -189,4 +192,10 @@
public IBlockState func_196258_a(BlockItemUseContext p_196258_1_) { public IBlockState func_196258_a(BlockItemUseContext p_196258_1_) {
return func_208493_b((IBlockState)this.func_176223_P().func_206870_a(field_208495_b, Boolean.valueOf(true)), p_196258_1_.func_195991_k(), p_196258_1_.func_195995_a()); return func_208493_b(this.func_176223_P().func_206870_a(field_208495_b, Boolean.valueOf(true)), p_196258_1_.func_195991_k(), p_196258_1_.func_195995_a());
} }
+ +
+ @Override + @Override

View file

@ -6,7 +6,7 @@
public class BlockMobSpawner extends BlockContainer { public class BlockMobSpawner extends BlockContainer {
+ private static final java.util.Random RAND = new java.util.Random(); + private static final java.util.Random RAND = new java.util.Random();
+ +
protected BlockMobSpawner(Block.Builder p_i48364_1_) { protected BlockMobSpawner(Block.Properties p_i48364_1_) {
super(p_i48364_1_); super(p_i48364_1_);
} }
@@ -27,10 +29,13 @@ @@ -27,10 +29,13 @@

View file

@ -1,17 +1,14 @@
--- a/net/minecraft/block/BlockNetherWart.java --- a/net/minecraft/block/BlockNetherWart.java
+++ b/net/minecraft/block/BlockNetherWart.java +++ b/net/minecraft/block/BlockNetherWart.java
@@ -33,26 +33,33 @@ @@ -33,16 +33,22 @@
public void func_196267_b(IBlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_196267_b(IBlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
int i = p_196267_1_.func_177229_b(field_176486_a); int i = p_196267_1_.func_177229_b(field_176486_a);
- if (i < 3 && p_196267_4_.nextInt(10) == 0) { - if (i < 3 && p_196267_4_.nextInt(10) == 0) {
- p_196267_1_ = (IBlockState)p_196267_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
- p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
+ 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_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(10) == 0)) {
+ IBlockState newState = (IBlockState)p_196267_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1)); p_196267_1_ = p_196267_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
+ p_196267_2_.func_180501_a(p_196267_3_, newState, 2); p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
+ p_196267_1_ = newState;
} }
super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_);
@ -19,22 +16,16 @@
public void func_196255_a(IBlockState p_196255_1_, World p_196255_2_, BlockPos p_196255_3_, float p_196255_4_, int p_196255_5_) { public void func_196255_a(IBlockState p_196255_1_, World p_196255_2_, BlockPos p_196255_3_, float p_196255_4_, int p_196255_5_) {
- if (!p_196255_2_.field_72995_K) { - if (!p_196255_2_.field_72995_K) {
+ super.func_196255_a(p_196255_1_, p_196255_2_, p_196255_3_, p_196255_4_, p_196255_5_); + super.func_196255_a(p_196255_1_, p_196255_2_, p_196255_3_, p_196255_4_, p_196255_5_);
+ } + }
+ +
+ @Override + @Override
+ public void getDrops(IBlockState state, net.minecraft.util.NonNullList<ItemStack> drops, World worldIn, BlockPos pos, int fortune) { + public void getDrops(IBlockState p_196255_1_, net.minecraft.util.NonNullList<ItemStack> drops, World p_196255_2_, BlockPos p_196255_3_, int p_196255_5_) {
+ { + {
int i = 1; int i = 1;
- if (p_196255_1_.func_177229_b(field_176486_a) >= 3) { if (p_196255_1_.func_177229_b(field_176486_a) >= 3) {
- i = 2 + p_196255_2_.field_73012_v.nextInt(3); i = 2 + p_196255_2_.field_73012_v.nextInt(3);
- if (p_196255_5_ > 0) { @@ -52,7 +58,7 @@
- i += p_196255_2_.field_73012_v.nextInt(p_196255_5_ + 1);
+ if (state.func_177229_b(field_176486_a) >= 3) {
+ i = 2 + worldIn.field_73012_v.nextInt(3);
+ if (fortune > 0) {
+ i += worldIn.field_73012_v.nextInt(fortune + 1);
}
} }
for(int j = 0; j < i; ++j) { for(int j = 0; j < i; ++j) {

View file

@ -13,7 +13,7 @@
if (p_196250_2_.field_72995_K) { if (p_196250_2_.field_72995_K) {
return true; return true;
} else { } else {
- p_196250_1_ = (IBlockState)p_196250_1_.func_177231_a(field_196485_c); - p_196250_1_ = p_196250_1_.func_177231_a(field_196485_c);
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_196250_2_, p_196250_3_, p_196250_1_, p_196250_1_.func_177229_b(field_196485_c), p_196250_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c)); + int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_196250_2_, p_196250_3_, p_196250_1_, p_196250_1_.func_177229_b(field_196485_c), p_196250_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
+ if (_new == -1) return false; + if (_new == -1) return false;
+ p_196250_1_ = (IBlockState)p_196250_1_.func_206870_a(field_196485_c, _new); + p_196250_1_ = (IBlockState)p_196250_1_.func_206870_a(field_196485_c, _new);
@ -29,4 +29,4 @@
+ p_189539_1_ = p_189539_1_.func_206870_a(field_196485_c, e.getVanillaNoteId()).func_206870_a(field_196483_a, e.getInstrument()); + p_189539_1_ = p_189539_1_.func_206870_a(field_196485_c, e.getVanillaNoteId()).func_206870_a(field_196483_a, e.getInstrument());
int i = p_189539_1_.func_177229_b(field_196485_c); int i = p_189539_1_.func_177229_b(field_196485_c);
float f = (float)Math.pow(2.0D, (double)(i - 12) / 12.0D); float f = (float)Math.pow(2.0D, (double)(i - 12) / 12.0D);
p_189539_2_.func_184133_a((EntityPlayer)null, p_189539_3_, ((NoteBlockInstrument)p_189539_1_.func_177229_b(field_196483_a)).func_208088_a(), SoundCategory.RECORDS, 3.0F, f); p_189539_2_.func_184133_a((EntityPlayer)null, p_189539_3_, p_189539_1_.func_177229_b(field_196483_a).func_208088_a(), SoundCategory.RECORDS, 3.0F, f);

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/block/BlockIronBars.java --- a/net/minecraft/block/BlockPane.java
+++ b/net/minecraft/block/BlockIronBars.java +++ b/net/minecraft/block/BlockPane.java
@@ -25,15 +25,12 @@ @@ -25,15 +25,12 @@
IBlockReader iblockreader = p_196258_1_.func_195991_k(); IBlockReader iblockreader = p_196258_1_.func_195991_k();
BlockPos blockpos = p_196258_1_.func_195995_a(); BlockPos blockpos = p_196258_1_.func_195995_a();
@ -12,13 +12,13 @@
- IBlockState iblockstate1 = iblockreader.func_180495_p(blockpos2); - IBlockState iblockstate1 = iblockreader.func_180495_p(blockpos2);
- IBlockState iblockstate2 = iblockreader.func_180495_p(blockpos3); - IBlockState iblockstate2 = iblockreader.func_180495_p(blockpos3);
- IBlockState iblockstate3 = iblockreader.func_180495_p(blockpos4); - IBlockState iblockstate3 = iblockreader.func_180495_p(blockpos4);
- return (IBlockState)((IBlockState)((IBlockState)((IBlockState)((IBlockState)this.func_176223_P().func_206870_a(field_196409_a, Boolean.valueOf(this.func_196417_a(iblockstate, iblockstate.func_193401_d(iblockreader, blockpos1, EnumFacing.SOUTH))))).func_206870_a(field_196413_c, Boolean.valueOf(this.func_196417_a(iblockstate1, iblockstate1.func_193401_d(iblockreader, blockpos2, EnumFacing.NORTH))))).func_206870_a(field_196414_y, Boolean.valueOf(this.func_196417_a(iblockstate2, iblockstate2.func_193401_d(iblockreader, blockpos3, EnumFacing.EAST))))).func_206870_a(field_196411_b, Boolean.valueOf(this.func_196417_a(iblockstate3, iblockstate3.func_193401_d(iblockreader, blockpos4, EnumFacing.WEST))))).func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a)); - return this.func_176223_P().func_206870_a(field_196409_a, Boolean.valueOf(this.func_196417_a(iblockstate, iblockstate.func_193401_d(iblockreader, blockpos1, EnumFacing.SOUTH)))).func_206870_a(field_196413_c, Boolean.valueOf(this.func_196417_a(iblockstate1, iblockstate1.func_193401_d(iblockreader, blockpos2, EnumFacing.NORTH)))).func_206870_a(field_196414_y, Boolean.valueOf(this.func_196417_a(iblockstate2, iblockstate2.func_193401_d(iblockreader, blockpos3, EnumFacing.EAST)))).func_206870_a(field_196411_b, Boolean.valueOf(this.func_196417_a(iblockstate3, iblockstate3.func_193401_d(iblockreader, blockpos4, EnumFacing.WEST)))).func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a));
+ return this.func_176223_P() + return this.func_176223_P()
+ .func_206870_a(field_196409_a, canPaneConnectTo(iblockreader, blockpos, EnumFacing.NORTH)) + .func_206870_a(field_196409_a, canPaneConnectTo(iblockreader, blockpos, EnumFacing.NORTH))
+ .func_206870_a(field_196413_c, canPaneConnectTo(iblockreader, blockpos, EnumFacing.SOUTH)) + .func_206870_a(field_196413_c, canPaneConnectTo(iblockreader, blockpos, EnumFacing.SOUTH))
+ .func_206870_a(field_196414_y, canPaneConnectTo(iblockreader, blockpos, EnumFacing.WEST)) + .func_206870_a(field_196414_y, canPaneConnectTo(iblockreader, blockpos, EnumFacing.WEST))
+ .func_206870_a(field_196411_b, canPaneConnectTo(iblockreader, blockpos, EnumFacing.EAST)) + .func_206870_a(field_196411_b, canPaneConnectTo(iblockreader, blockpos, EnumFacing.EAST))
+ .func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a)); + .func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a));
} }
public IBlockState func_196271_a(IBlockState p_196271_1_, EnumFacing p_196271_2_, IBlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_) { public IBlockState func_196271_a(IBlockState p_196271_1_, EnumFacing p_196271_2_, IBlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_) {
@ -26,8 +26,8 @@
p_196271_4_.func_205219_F_().func_205360_a(p_196271_5_, Fluids.field_204546_a, Fluids.field_204546_a.func_205569_a(p_196271_4_)); p_196271_4_.func_205219_F_().func_205360_a(p_196271_5_, Fluids.field_204546_a, Fluids.field_204546_a.func_205569_a(p_196271_4_));
} }
- return p_196271_2_.func_176740_k().func_176722_c() ? (IBlockState)p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.func_196417_a(p_196271_3_, p_196271_3_.func_193401_d(p_196271_4_, p_196271_6_, p_196271_2_.func_176734_d())))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); - return p_196271_2_.func_176740_k().func_176722_c() ? p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.func_196417_a(p_196271_3_, p_196271_3_.func_193401_d(p_196271_4_, p_196271_6_, p_196271_2_.func_176734_d())))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
+ return p_196271_2_.func_176740_k().func_176722_c() ? (IBlockState)p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.canPaneConnectTo(p_196271_4_, p_196271_5_, p_196271_2_))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); + return p_196271_2_.func_176740_k().func_176722_c() ? p_196271_1_.func_206870_a(field_196415_z.get(p_196271_2_), Boolean.valueOf(this.canPaneConnectTo(p_196271_4_, p_196271_5_, p_196271_2_))) : super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
} }
public boolean func_149686_d(IBlockState p_149686_1_) { public boolean func_149686_d(IBlockState p_149686_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/BlockPistonBase.java --- a/net/minecraft/block/BlockPistonBase.java
+++ b/net/minecraft/block/BlockPistonBase.java +++ b/net/minecraft/block/BlockPistonBase.java
@@ -235,7 +235,7 @@ @@ -244,7 +244,7 @@
return false; return false;
} }
@ -9,19 +9,19 @@
} else { } else {
return false; return false;
} }
@@ -266,7 +266,9 @@ @@ -280,7 +280,9 @@
for(int j = list2.size() - 1; j >= 0; --j) { for(int j = list2.size() - 1; j >= 0; --j) {
BlockPos blockpos1 = list2.get(j); BlockPos blockpos2 = list2.get(j);
IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos1); IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos2);
- iblockstate.func_196949_c(p_176319_1_, blockpos1, 0); - iblockstate.func_196949_c(p_176319_1_, blockpos2, 0);
+ // Forge: With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior. + // Forge: With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
+ float chance = iblockstate.func_177230_c() instanceof BlockSnow ? -1.0f : 1.0f; + float chance = iblockstate.func_177230_c() instanceof BlockSnow ? -1.0f : 1.0f;
+ iblockstate.func_196941_a(p_176319_1_, blockpos1, chance, 0); + iblockstate.func_196941_a(p_176319_1_, blockpos2, chance, 0);
p_176319_1_.func_180501_a(blockpos1, 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;
aiblockstate[k] = iblockstate; aiblockstate[k] = iblockstate;
@@ -320,6 +322,10 @@ @@ -333,6 +335,10 @@
return (IBlockState)p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a((EnumFacing)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)));
} }
+ public IBlockState rotate(IBlockState state, net.minecraft.world.IWorld world, BlockPos pos, Rotation direction) { + public IBlockState rotate(IBlockState state, net.minecraft.world.IWorld world, BlockPos pos, Rotation direction) {
@ -29,5 +29,5 @@
+ } + }
+ +
public IBlockState func_185471_a(IBlockState p_185471_1_, Mirror p_185471_2_) { public IBlockState func_185471_a(IBlockState p_185471_1_, Mirror p_185471_2_) {
return p_185471_1_.func_185907_a(p_185471_2_.func_185800_a((EnumFacing)p_185471_1_.func_177229_b(field_176387_N))); return p_185471_1_.func_185907_a(p_185471_2_.func_185800_a(p_185471_1_.func_177229_b(field_176387_N)));
} }

View file

@ -22,5 +22,5 @@
+ } + }
+ +
public VoxelShape func_196244_b(IBlockState p_196244_1_, IBlockReader p_196244_2_, BlockPos p_196244_3_) { public VoxelShape func_196244_b(IBlockState p_196244_1_, IBlockReader p_196244_2_, BlockPos p_196244_3_) {
return ShapeUtils.func_197880_a(); return VoxelShapes.func_197880_a();
} }

View file

@ -4,7 +4,7 @@
} }
public VoxelShape func_196244_b(IBlockState p_196244_1_, IBlockReader p_196244_2_, BlockPos p_196244_3_) { public VoxelShape func_196244_b(IBlockState p_196244_1_, IBlockReader p_196244_2_, BlockPos p_196244_3_) {
- RailShape railshape = p_196244_1_.func_177230_c() == this ? (RailShape)p_196244_1_.func_177229_b(this.func_176560_l()) : null; - RailShape railshape = p_196244_1_.func_177230_c() == this ? p_196244_1_.func_177229_b(this.func_176560_l()) : null;
+ RailShape railshape = p_196244_1_.func_177230_c() == this ? getRailDirection(p_196244_1_, p_196244_2_, p_196244_3_, null) : null; + RailShape railshape = p_196244_1_.func_177230_c() == this ? getRailDirection(p_196244_1_, p_196244_2_, p_196244_3_, null) : null;
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;
} }
@ -22,7 +22,7 @@
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) { public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_) {
if (!p_189540_2_.field_72995_K) { if (!p_189540_2_.field_72995_K) {
- RailShape railshape = (RailShape)p_189540_1_.func_177229_b(this.func_176560_l()); - RailShape railshape = p_189540_1_.func_177229_b(this.func_176560_l());
+ RailShape railshape = getRailDirection(p_189540_1_, p_189540_2_, p_189540_3_, null); + RailShape railshape = getRailDirection(p_189540_1_, p_189540_2_, p_189540_3_, null);
boolean flag = false; boolean flag = false;
- if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).func_185896_q()) { - if (!p_189540_2_.func_180495_p(p_189540_3_.func_177977_b()).func_185896_q()) {
@ -48,7 +48,7 @@
public void func_196243_a(IBlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, IBlockState p_196243_4_, boolean p_196243_5_) { public void func_196243_a(IBlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, IBlockState p_196243_4_, boolean p_196243_5_) {
if (!p_196243_5_) { if (!p_196243_5_) {
super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_); super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_);
- if (((RailShape)p_196243_1_.func_177229_b(this.func_176560_l())).func_208092_c()) { - if (p_196243_1_.func_177229_b(this.func_176560_l()).func_208092_c()) {
+ if (getRailDirection(p_196243_1_, p_196243_2_, p_196243_3_, null).func_208092_c()) { + if (getRailDirection(p_196243_1_, p_196243_2_, p_196243_3_, null).func_208092_c()) {
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);
} }

View file

@ -6,6 +6,6 @@
if (p_180641_1_.func_177229_b(field_176574_M)) { if (p_180641_1_.func_177229_b(field_176574_M)) {
+ List<EntityMinecart> carts = this.func_200878_a(p_180641_2_, p_180641_3_, EntityMinecart.class, null); + List<EntityMinecart> carts = this.func_200878_a(p_180641_2_, p_180641_3_, EntityMinecart.class, null);
+ if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel(); + if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>func_200878_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class, (Predicate)null); List<EntityMinecartCommandBlock> list = this.func_200878_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class, (Predicate<Entity>)null);
if (!list.isEmpty()) { if (!list.isEmpty()) {
return ((EntityMinecartCommandBlock)list.get(0)).func_145822_e().func_145760_g(); return list.get(0).func_145822_e().func_145760_g();

View file

@ -6,14 +6,14 @@
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u; public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
+ private final boolean isActivator; + private final boolean isActivator;
protected BlockRailPowered(Block.Builder p_i48349_1_) { protected BlockRailPowered(Block.Properties p_i48349_1_) {
- super(true, p_i48349_1_); - super(true, p_i48349_1_);
+ this(p_i48349_1_, false); + this(p_i48349_1_, false);
+ } + }
+ +
+ protected BlockRailPowered(Block.Builder builder, boolean isActivator) { + protected BlockRailPowered(Block.Properties builder, boolean isActivator) {
+ super(true, builder); + super(true, builder);
this.func_180632_j((IBlockState)((IBlockState)(this.field_176227_L.func_177621_b()).func_206870_a(field_176568_b, RailShape.NORTH_SOUTH)).func_206870_a(field_176569_M, Boolean.valueOf(false))); this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false)));
+ this.isActivator = isActivator; + this.isActivator = isActivator;
} }
@ -26,4 +26,4 @@
+ if (!(iblockstate.func_177230_c() instanceof BlockRailPowered) || isActivator != ((BlockRailPowered)iblockstate.func_177230_c()).isActivator) { + if (!(iblockstate.func_177230_c() instanceof BlockRailPowered) || isActivator != ((BlockRailPowered)iblockstate.func_177230_c()).isActivator) {
return false; return false;
} else { } else {
RailShape railshape = (RailShape)iblockstate.func_177229_b(field_176568_b); RailShape railshape = iblockstate.func_177229_b(field_176568_b);

View file

@ -3,7 +3,7 @@
@@ -16,14 +16,16 @@ @@ -16,14 +16,16 @@
private IBlockState field_196923_d; private IBlockState field_196923_d;
private final boolean field_208513_e; private final boolean field_208513_e;
private final List<BlockPos> field_196924_e = Lists.<BlockPos>newArrayList(); private final List<BlockPos> field_196924_e = Lists.newArrayList();
+ private final boolean canMakeSlopes; + private final boolean canMakeSlopes;
public BlockRailState(World p_i47755_1_, BlockPos p_i47755_2_, IBlockState p_i47755_3_) { public BlockRailState(World p_i47755_1_, BlockPos p_i47755_2_, IBlockState p_i47755_3_) {
@ -11,7 +11,7 @@
this.field_196921_b = p_i47755_2_; this.field_196921_b = p_i47755_2_;
this.field_196923_d = p_i47755_3_; this.field_196923_d = p_i47755_3_;
this.field_196922_c = (BlockRailBase)p_i47755_3_.func_177230_c(); this.field_196922_c = (BlockRailBase)p_i47755_3_.func_177230_c();
- RailShape railshape = (RailShape)p_i47755_3_.func_177229_b(this.field_196922_c.func_176560_l()); - RailShape railshape = p_i47755_3_.func_177229_b(this.field_196922_c.func_176560_l());
- this.field_208513_e = this.field_196922_c.func_208490_b(); - this.field_208513_e = this.field_196922_c.func_208490_b();
+ RailShape railshape = this.field_196922_c.getRailDirection(field_196923_d, p_i47755_1_, p_i47755_2_, null); + RailShape railshape = this.field_196922_c.getRailDirection(field_196923_d, p_i47755_1_, p_i47755_2_, null);
+ this.field_208513_e = this.field_196922_c.isFlexibleRail(field_196923_d, p_i47755_1_, p_i47755_2_); + this.field_208513_e = this.field_196922_c.isFlexibleRail(field_196923_d, p_i47755_1_, p_i47755_2_);

View file

@ -11,7 +11,7 @@
public void func_196267_b(IBlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { public void func_196267_b(IBlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
@@ -172,6 +172,8 @@ @@ -172,6 +172,8 @@
protected void func_176400_h(World p_176400_1_, BlockPos p_176400_2_, IBlockState p_176400_3_) { protected void func_176400_h(World p_176400_1_, BlockPos p_176400_2_, IBlockState p_176400_3_) {
EnumFacing enumfacing = (EnumFacing)p_176400_3_.func_177229_b(field_185512_D); EnumFacing enumfacing = p_176400_3_.func_177229_b(field_185512_D);
BlockPos blockpos = p_176400_2_.func_177972_a(enumfacing.func_176734_d()); BlockPos blockpos = p_176400_2_.func_177972_a(enumfacing.func_176734_d());
+ if (net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d()), false).isCanceled()) + if (net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d()), false).isCanceled())
+ return; + return;

View file

@ -4,8 +4,8 @@
public class BlockRedstoneTorch extends BlockTorch { public class BlockRedstoneTorch extends BlockTorch {
public static final BooleanProperty field_196528_a = BlockStateProperties.field_208190_q; public static final BooleanProperty field_196528_a = BlockStateProperties.field_208190_q;
- private static final Map<IBlockReader, List<BlockRedstoneTorch.Toggle>> field_196529_b = Maps.<IBlockReader, List<BlockRedstoneTorch.Toggle>>newHashMap(); - private static final Map<IBlockReader, List<BlockRedstoneTorch.Toggle>> field_196529_b = Maps.newHashMap();
+ private static final Map<IBlockReader, List<BlockRedstoneTorch.Toggle>> field_196529_b = new java.util.WeakHashMap<IBlockReader, List<BlockRedstoneTorch.Toggle>>(); // FORGE - fix vanilla MC-101233 + private static final Map<IBlockReader, List<BlockRedstoneTorch.Toggle>> field_196529_b = new java.util.WeakHashMap<IBlockReader, List<BlockRedstoneTorch.Toggle>>(); // FORGE - fix vanilla MC-101233
protected BlockRedstoneTorch(Block.Builder p_i48342_1_) { protected BlockRedstoneTorch(Block.Properties p_i48342_1_) {
super(p_i48342_1_); super(p_i48342_1_);

View file

@ -29,7 +29,7 @@
} }
private IBlockState func_176338_e(World p_176338_1_, BlockPos p_176338_2_, IBlockState p_176338_3_) { private IBlockState func_176338_e(World p_176338_1_, BlockPos p_176338_2_, IBlockState p_176338_3_) {
@@ -337,36 +337,28 @@ @@ -338,26 +338,18 @@
IBlockState iblockstate = p_176339_1_.func_180495_p(blockpos); IBlockState iblockstate = p_176339_1_.func_180495_p(blockpos);
boolean flag = iblockstate.func_185915_l(); boolean flag = iblockstate.func_185915_l();
boolean flag1 = p_176339_1_.func_180495_p(p_176339_2_.func_177984_a()).func_185915_l(); boolean flag1 = p_176339_1_.func_180495_p(p_176339_2_.func_177984_a()).func_185915_l();
@ -37,7 +37,7 @@
+ if (!flag1 && flag && canConnectTo(p_176339_1_.func_180495_p(blockpos.func_177984_a()), p_176339_1_, blockpos.func_177984_a(), null)) { + if (!flag1 && flag && canConnectTo(p_176339_1_.func_180495_p(blockpos.func_177984_a()), p_176339_1_, blockpos.func_177984_a(), null)) {
return true; return true;
- } else if (func_176343_a(iblockstate, p_176339_3_)) { - } else if (func_176343_a(iblockstate, p_176339_3_)) {
+ } else if (canConnectTo(iblockstate, p_176339_1_, p_176339_2_, p_176339_3_)) { + } else if (canConnectTo(iblockstate, p_176339_1_, blockpos, p_176339_3_)) {
return true; return true;
} else if (iblockstate.func_177230_c() == Blocks.field_196633_cV && iblockstate.func_177229_b(BlockRedstoneDiode.field_196348_c) && iblockstate.func_177229_b(BlockRedstoneDiode.field_185512_D) == p_176339_3_) { } else if (iblockstate.func_177230_c() == Blocks.field_196633_cV && iblockstate.func_177229_b(BlockRedstoneDiode.field_196348_c) && iblockstate.func_177229_b(BlockRedstoneDiode.field_185512_D) == p_176339_3_) {
return true; return true;
@ -56,24 +56,16 @@
- } - }
- -
- protected static boolean func_176343_a(IBlockState p_176343_0_, @Nullable EnumFacing p_176343_1_) { - protected static boolean func_176343_a(IBlockState p_176343_0_, @Nullable EnumFacing p_176343_1_) {
- Block block = p_176343_0_.func_177230_c(); + protected boolean canConnectTo(IBlockState p_176343_0_, IBlockReader world, BlockPos pos, @Nullable EnumFacing p_176343_1_) {
+ protected boolean canConnectTo(IBlockState blockState, IBlockReader world, BlockPos pos, @Nullable EnumFacing side) { Block block = p_176343_0_.func_177230_c();
+ Block block = blockState.func_177230_c();
if (block == Blocks.field_150488_af) { if (block == Blocks.field_150488_af) {
return true; return true;
- } else if (p_176343_0_.func_177230_c() == Blocks.field_196633_cV) { @@ -367,7 +359,7 @@
- EnumFacing enumfacing = (EnumFacing)p_176343_0_.func_177229_b(BlockRedstoneRepeater.field_185512_D); } else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) {
- return enumfacing == p_176343_1_ || enumfacing.func_176734_d() == p_176343_1_; return p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N);
- } else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) {
- return p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N);
+ } else if (blockState.func_177230_c() == Blocks.field_196633_cV) {
+ EnumFacing enumfacing = (EnumFacing)blockState.func_177229_b(BlockRedstoneRepeater.field_185512_D);
+ return enumfacing == side || enumfacing.func_176734_d() == side;
+ } else if (Blocks.field_190976_dk == blockState.func_177230_c()) {
+ return side == blockState.func_177229_b(BlockObserver.field_176387_N);
} else { } else {
- return p_176343_0_.func_185897_m() && p_176343_1_ != null; - return p_176343_0_.func_185897_m() && p_176343_1_ != null;
+ return blockState.canConnectRedstone(world, pos, side); + return p_176343_0_.canConnectRedstone(world, pos, p_176343_1_) && p_176343_1_ != null;
} }
} }

View file

@ -16,9 +16,9 @@
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, true)) { + if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_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_196267_2_.func_175656_a(p_196267_3_.func_177984_a(), this.func_176223_P());
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4); p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4);
} else { } else {
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4); p_196267_2_.func_180501_a(p_196267_3_, p_196267_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_196267_2_, p_196267_3_, p_196267_1_);
+ } + }

View file

@ -10,7 +10,7 @@
} }
@@ -39,6 +40,7 @@ @@ -39,6 +40,7 @@
if (p_176478_3_.func_177229_b(field_176479_b) == 0) { if (p_176478_3_.func_177229_b(field_176479_b) == 0) {
p_176478_1_.func_180501_a(p_176478_2_, (IBlockState)p_176478_3_.func_177231_a(field_176479_b), 4); p_176478_1_.func_180501_a(p_176478_2_, p_176478_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_176478_1_, p_176478_4_, p_176478_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_196935_a(p_176478_1_, p_176478_2_, p_176478_3_, p_176478_4_);

View file

@ -3,7 +3,7 @@
@@ -84,30 +84,45 @@ @@ -84,30 +84,45 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) { public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
Integer integer = (Integer)p_180657_4_.func_177229_b(field_176315_a); Integer integer = p_180657_4_.func_177229_b(field_176315_a);
- if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) { - if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0) {
+ net.minecraft.util.NonNullList<ItemStack> items = net.minecraft.util.NonNullList.func_191196_a(); + net.minecraft.util.NonNullList<ItemStack> items = net.minecraft.util.NonNullList.func_191196_a();
+ int fortune = EnchantmentHelper.func_77506_a(Enchantments.field_185308_t, p_180657_6_); + int fortune = EnchantmentHelper.func_77506_a(Enchantments.field_185308_t, p_180657_6_);

View file

@ -11,7 +11,7 @@
+ 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_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
int i = p_196267_1_.func_177229_b(field_176484_a); int i = p_196267_1_.func_177229_b(field_176484_a);
if (i < 7) { if (i < 7) {
- p_196267_1_ = (IBlockState)p_196267_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)); - p_196267_1_ = p_196267_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_196267_2_.func_180501_a(p_196267_3_, p_196267_1_, 2);
+ p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176484_a, i + 1), 2); + p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176484_a, i + 1), 2);
} else { } else {
@ -23,7 +23,7 @@
+ 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(), EnumFacing.UP, this) || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) { + if (p_196267_2_.func_180495_p(blockpos).isAir(p_196267_2_, blockpos) && (soil.canSustainPlant(p_196267_2_, blockpos.func_177977_b(), EnumFacing.UP, this) || 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_196267_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P());
p_196267_2_.func_175656_a(p_196267_3_, (IBlockState)this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(BlockHorizontal.field_185512_D, enumfacing)); p_196267_2_.func_175656_a(p_196267_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(BlockHorizontal.field_185512_D, enumfacing));
} }
} }
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);

View file

@ -8,7 +8,7 @@
+public class BlockTallGrass extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable { +public class BlockTallGrass extends BlockBush implements IGrowable, net.minecraftforge.common.IShearable {
protected static final VoxelShape field_196389_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D); protected static final VoxelShape field_196389_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
protected BlockTallGrass(Block.Builder p_i48310_1_) { protected BlockTallGrass(Block.Properties p_i48310_1_) {
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
} }

View file

@ -40,5 +40,5 @@
+ boolean flag2 = canWallConnectTo(iworldreaderbase, blockpos, EnumFacing.SOUTH); + boolean flag2 = canWallConnectTo(iworldreaderbase, blockpos, EnumFacing.SOUTH);
+ boolean flag3 = canWallConnectTo(iworldreaderbase, blockpos, EnumFacing.WEST); + boolean flag3 = canWallConnectTo(iworldreaderbase, blockpos, EnumFacing.WEST);
boolean flag4 = (!flag || flag1 || !flag2 || flag3) && (flag || !flag1 || flag2 || !flag3); boolean flag4 = (!flag || flag1 || !flag2 || flag3) && (flag || !flag1 || flag2 || !flag3);
return (IBlockState)((IBlockState)((IBlockState)((IBlockState)((IBlockState)((IBlockState)this.func_176223_P().func_206870_a(field_176256_a, Boolean.valueOf(flag4 || !iworldreaderbase.func_175623_d(blockpos.func_177984_a())))).func_206870_a(field_196409_a, Boolean.valueOf(flag))).func_206870_a(field_196411_b, Boolean.valueOf(flag1))).func_206870_a(field_196413_c, Boolean.valueOf(flag2))).func_206870_a(field_196414_y, Boolean.valueOf(flag3))).func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a)); return this.func_176223_P().func_206870_a(field_176256_a, Boolean.valueOf(flag4 || !iworldreaderbase.func_175623_d(blockpos.func_177984_a()))).func_206870_a(field_196409_a, Boolean.valueOf(flag)).func_206870_a(field_196411_b, Boolean.valueOf(flag1)).func_206870_a(field_196413_c, Boolean.valueOf(flag2)).func_206870_a(field_196414_y, Boolean.valueOf(flag3)).func_206870_a(field_204514_u, Boolean.valueOf(ifluidstate.func_206886_c() == Fluids.field_204546_a));
} }

View file

@ -14,7 +14,7 @@
-public class BlockWeb extends Block { -public class BlockWeb extends Block {
+public class BlockWeb extends Block implements net.minecraftforge.common.IShearable { +public class BlockWeb extends Block implements net.minecraftforge.common.IShearable {
public BlockWeb(Block.Builder p_i48296_1_) { public BlockWeb(Block.Properties p_i48296_1_) {
super(p_i48296_1_); super(p_i48296_1_);
} }
@@ -54,4 +55,10 @@ @@ -54,4 +55,10 @@

View file

@ -6,8 +6,8 @@
-public interface IBlockState extends IStateHolder<IBlockState> { -public interface IBlockState extends IStateHolder<IBlockState> {
+public interface IBlockState extends IStateHolder<IBlockState>, net.minecraftforge.common.extensions.IForgeBlockState { +public interface IBlockState extends IStateHolder<IBlockState>, net.minecraftforge.common.extensions.IForgeBlockState {
ThreadLocal<Object2ByteMap<IBlockState>> field_208776_a = ThreadLocal.<Object2ByteMap<IBlockState>>withInitial(() -> { ThreadLocal<Object2ByteMap<IBlockState>> field_208776_a = ThreadLocal.withInitial(() -> {
Object2ByteOpenHashMap<IBlockState> object2byteopenhashmap = new Object2ByteOpenHashMap<IBlockState>(); Object2ByteOpenHashMap<IBlockState> object2byteopenhashmap = new Object2ByteOpenHashMap<>();
object2byteopenhashmap.defaultReturnValue((byte)127); object2byteopenhashmap.defaultReturnValue((byte)127);
@@ -97,6 +97,7 @@ @@ -97,6 +97,7 @@
return this.func_177230_c().func_149750_m(this); return this.func_177230_c().func_149750_m(this);

View file

@ -1,22 +1,22 @@
--- a/net/minecraft/client/GameSettings.java --- a/net/minecraft/client/GameSettings.java
+++ b/net/minecraft/client/GameSettings.java +++ b/net/minecraft/client/GameSettings.java
@@ -168,6 +168,7 @@ @@ -167,6 +167,7 @@
public boolean field_211842_aO; public boolean field_211842_aO;
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) { public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
+ setForgeKeybindProperties(); + setForgeKeybindProperties();
this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[]{this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac); this.field_74317_L = p_i46326_1_;
this.field_74318_M = EnumDifficulty.NORMAL; this.field_74354_ai = new File(p_i46326_2_, "options.txt");
this.field_74332_R = ""; if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
@@ -186,6 +187,7 @@ @@ -180,6 +181,7 @@
} }
public GameSettings() { public GameSettings() {
+ setForgeKeybindProperties(); + setForgeKeybindProperties();
this.field_74324_K = (KeyBinding[])ArrayUtils.addAll(new KeyBinding[]{this.field_74312_F, this.field_74313_G, this.field_74351_w, this.field_74370_x, this.field_74368_y, this.field_74366_z, this.field_74314_A, this.field_74311_E, this.field_151444_V, this.field_74316_C, this.field_151445_Q, this.field_74310_D, this.field_74321_H, this.field_74322_I, this.field_74323_J, this.field_151447_Z, this.field_151457_aa, this.field_151458_ab, this.field_152395_am, this.field_178883_an, this.field_186718_X, this.field_193629_ap, this.field_193630_aq, this.field_194146_ao}, this.field_151456_ac); }
this.field_74318_M = EnumDifficulty.NORMAL;
this.field_74332_R = ""; public void func_198014_a(KeyBinding p_198014_1_, InputMappings.Input p_198014_2_) {
@@ -247,7 +249,7 @@ @@ -236,7 +238,7 @@
this.field_74317_L.func_147117_R().func_147633_a(this.field_151442_I); this.field_74317_L.func_147117_R().func_147633_a(this.field_151442_I);
this.field_74317_L.func_110434_K().func_110577_a(TextureMap.field_110575_b); this.field_74317_L.func_110434_K().func_110577_a(TextureMap.field_110575_b);
this.field_74317_L.func_147117_R().func_174937_a(false, this.field_151442_I > 0); this.field_74317_L.func_147117_R().func_174937_a(false, this.field_151442_I > 0);
@ -25,7 +25,7 @@
} }
} }
@@ -857,7 +859,11 @@ @@ -846,7 +848,11 @@
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
if (s1.equals("key_" + keybinding.func_151464_g())) { if (s1.equals("key_" + keybinding.func_151464_g())) {
@ -38,7 +38,7 @@
} }
} }
@@ -905,6 +911,7 @@ @@ -894,6 +900,7 @@
} }
public void func_74303_b() { public void func_74303_b() {
@ -46,7 +46,7 @@
PrintWriter printwriter = null; PrintWriter printwriter = null;
try { try {
@@ -982,7 +989,7 @@ @@ -971,7 +978,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) {
@ -55,7 +55,7 @@
} }
for(SoundCategory soundcategory : SoundCategory.values()) { for(SoundCategory soundcategory : SoundCategory.values()) {
@@ -1084,6 +1091,33 @@ @@ -1073,6 +1080,33 @@
p_198017_1_.func_198985_a(set); p_198017_1_.func_198985_a(set);
} }

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
@@ -266,10 +266,14 @@ @@ -271,10 +271,14 @@
GuiScreen.func_195121_a(() -> { GuiScreen.func_195121_a(() -> {
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) {
@ -17,7 +17,7 @@
} }
}, "keyPressed event handler", iguieventlistener.getClass().getCanonicalName()); }, "keyPressed event handler", iguieventlistener.getClass().getCanonicalName());
@@ -346,12 +350,16 @@ @@ -351,12 +355,16 @@
if (iguieventlistener != null) { if (iguieventlistener != null) {
if (Character.charCount(p_197963_3_) == 1) { if (Character.charCount(p_197963_3_) == 1) {
GuiScreen.func_195121_a(() -> { GuiScreen.func_195121_a(() -> {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/Minecraft.java --- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java
@@ -318,7 +318,6 @@ @@ -322,7 +322,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());
@ -8,7 +8,7 @@
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;
@@ -405,9 +404,11 @@ @@ -409,9 +408,11 @@
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab); this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
this.field_110451_am.func_199006_a(this.field_135017_as); this.field_110451_am.func_199006_a(this.field_135017_as);
this.field_71474_y.func_198017_a(this.field_110448_aq); this.field_71474_y.func_198017_a(this.field_110448_aq);
@ -20,7 +20,7 @@
this.field_195558_d.func_198098_h(); this.field_195558_d.func_198098_h();
this.func_147108_a(new GuiScreenLoading()); this.func_147108_a(new GuiScreenLoading());
this.func_195547_ap(); this.func_195547_ap();
@@ -425,6 +426,8 @@ @@ -429,6 +430,8 @@
this.field_110451_am.func_199006_a(new GrassColorReloadListener()); this.field_110451_am.func_199006_a(new GrassColorReloadListener());
this.field_110451_am.func_199006_a(new FoliageColorReloadListener()); this.field_110451_am.func_199006_a(new FoliageColorReloadListener());
@ -29,7 +29,7 @@
this.field_195558_d.func_198076_a("Startup"); this.field_195558_d.func_198076_a("Startup");
GlStateManager.func_179098_w(); GlStateManager.func_179098_w();
GlStateManager.func_179103_j(7425); GlStateManager.func_179103_j(7425);
@@ -438,19 +441,24 @@ @@ -442,19 +445,24 @@
GlStateManager.func_179096_D(); GlStateManager.func_179096_D();
GlStateManager.func_179128_n(5888); GlStateManager.func_179128_n(5888);
this.field_195558_d.func_198076_a("Post startup"); this.field_195558_d.func_198076_a("Post startup");
@ -51,10 +51,10 @@
this.field_110451_am.func_199006_a(this.field_175621_X); this.field_110451_am.func_199006_a(this.field_175621_X);
+ bar.step("Loading Entity Renderer"); + bar.step("Loading Entity Renderer");
+ //net.minecraftforge.fml.client.SplashProgress.pause(); + //net.minecraftforge.fml.client.SplashProgress.pause();
this.field_71460_t = new EntityRenderer(this, this.field_110451_am); this.field_71460_t = new GameRenderer(this, this.field_110451_am);
this.field_110451_am.func_199006_a(this.field_71460_t); this.field_110451_am.func_199006_a(this.field_71460_t);
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_184127_aH); this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_184127_aH);
@@ -461,7 +469,10 @@ @@ -465,7 +473,10 @@
this.field_110451_am.func_199006_a(this.field_193995_ae); this.field_110451_am.func_199006_a(this.field_193995_ae);
GlStateManager.func_179083_b(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l()); GlStateManager.func_179083_b(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o); this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
@ -66,7 +66,7 @@
if (this.field_71475_ae != null) { if (this.field_71475_ae != null) {
this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af)); this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
} else { } else {
@@ -470,6 +481,7 @@ @@ -474,6 +485,7 @@
this.field_184132_p = new DebugRenderer(this); this.field_184132_p = new DebugRenderer(this);
GLFW.glfwSetErrorCallback(this::func_195545_a).free(); GLFW.glfwSetErrorCallback(this::func_195545_a).free();
@ -74,16 +74,16 @@
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) { if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
this.field_195558_d.func_198077_g(); this.field_195558_d.func_198077_g();
} }
@@ -485,7 +497,7 @@ @@ -489,7 +501,7 @@
}); });
List<String> list = Lists.<String>newArrayList(); List<String> list = Lists.newArrayList();
GLFWErrorCallback glfwerrorcallback = GLFW.glfwSetErrorCallback((p_211100_1_, p_211100_2_) -> { GLFWErrorCallback glfwerrorcallback = GLFW.glfwSetErrorCallback((p_211100_1_, p_211100_2_) -> {
- list.add(String.format("GLFW error during init: [0x%X]%s", p_211100_1_, p_211100_2_)); - list.add(String.format("GLFW error during init: [0x%X]%s", p_211100_1_, p_211100_2_));
+ list.add(String.format("GLFW error during init: [0x%X] %s", p_211100_1_, GLFWErrorCallback.getDescription(p_211100_2_))); + list.add(String.format("GLFW error during init: [0x%X] %s", p_211100_1_, GLFWErrorCallback.getDescription(p_211100_2_)));
}); });
if (!GLFW.glfwInit()) { if (!GLFW.glfwInit()) {
throw new IllegalStateException("Failed to initialize GLFW, errors: " + Joiner.on(",").join(list)); throw new IllegalStateException("Failed to initialize GLFW, errors: " + Joiner.on(",").join(list));
@@ -595,7 +607,7 @@ @@ -599,7 +611,7 @@
Bootstrap.func_179870_a(p_71377_1_.func_71502_e()); Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
if (p_71377_1_.func_71497_f() != null) { if (p_71377_1_.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_1_.func_71497_f());
@ -92,15 +92,15 @@
} else if (p_71377_1_.func_147149_a(file2)) { } else if (p_71377_1_.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);
@@ -610,6 +622,7 @@ @@ -614,6 +626,7 @@
return this.field_71474_y.field_211842_aO; return this.field_71474_y.field_211842_aO;
} }
+ @Deprecated // Forge: Use selective refreshResources method in FMLClientHandler + @Deprecated // Forge: Use selective refreshResources method in FMLClientHandler
public void func_110436_a() { public void func_110436_a() {
List<IResourcePack> list = Lists.<IResourcePack>newArrayList();
this.field_110448_aq.func_198983_a(); this.field_110448_aq.func_198983_a();
@@ -667,16 +680,20 @@ List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList());
@@ -668,16 +681,20 @@
} }
public void func_147108_a(@Nullable GuiScreen p_147108_1_) { public void func_147108_a(@Nullable GuiScreen p_147108_1_) {
@ -125,7 +125,7 @@
if (p_147108_1_ instanceof GuiMainMenu || p_147108_1_ instanceof GuiMultiplayer) { if (p_147108_1_ instanceof GuiMainMenu || p_147108_1_ instanceof GuiMultiplayer) {
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);
@@ -760,7 +777,7 @@ @@ -761,7 +778,7 @@
GLFW.glfwPollEvents(); GLFW.glfwPollEvents();
long i1 = Util.func_211178_c() - l; long i1 = Util.func_211178_c() - l;
this.field_71424_I.func_76318_c("sound"); this.field_71424_I.func_76318_c("sound");
@ -134,7 +134,7 @@
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
this.field_71424_I.func_76320_a("render"); this.field_71424_I.func_76320_a("render");
GlStateManager.func_179094_E(); GlStateManager.func_179094_E();
@@ -770,11 +787,13 @@ @@ -771,11 +788,13 @@
GlStateManager.func_179098_w(); GlStateManager.func_179098_w();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
if (!this.field_71454_w) { if (!this.field_71454_w) {
@ -148,7 +148,7 @@
} }
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
@@ -992,8 +1011,8 @@ @@ -994,8 +1013,8 @@
if (this.field_71429_W <= 0 && !this.field_71439_g.func_184587_cr()) { if (this.field_71429_W <= 0 && !this.field_71439_g.func_184587_cr()) {
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) { if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) {
BlockPos blockpos = this.field_71476_x.func_178782_a(); BlockPos blockpos = this.field_71476_x.func_178782_a();
@ -159,7 +159,7 @@
this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND); this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND);
} }
@@ -1018,7 +1037,7 @@ @@ -1020,7 +1039,7 @@
break; break;
case BLOCK: case BLOCK:
BlockPos blockpos = this.field_71476_x.func_178782_a(); BlockPos blockpos = this.field_71476_x.func_178782_a();
@ -168,7 +168,7 @@
this.field_71442_b.func_180511_b(blockpos, this.field_71476_x.field_178784_b); this.field_71442_b.func_180511_b(blockpos, this.field_71476_x.field_178784_b);
break; break;
} }
@@ -1028,6 +1047,7 @@ @@ -1030,6 +1049,7 @@
} }
this.field_71439_g.func_184821_cY(); this.field_71439_g.func_184821_cY();
@ -176,7 +176,16 @@
} }
this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND); this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND);
@@ -1077,6 +1097,9 @@ @@ -1060,7 +1080,7 @@
break;
case BLOCK:
BlockPos blockpos = this.field_71476_x.func_178782_a();
- 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)) {
int i = itemstack.func_190916_E();
EnumActionResult enumactionresult = this.field_71442_b.func_187099_a(this.field_71439_g, this.field_71441_e, blockpos, this.field_71476_x.field_178784_b, this.field_71476_x.field_72307_f, enumhand);
if (enumactionresult == EnumActionResult.SUCCESS) {
@@ -1079,6 +1099,9 @@
} }
} }
@ -186,7 +195,7 @@
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, enumhand) == EnumActionResult.SUCCESS) { if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, enumhand) == EnumActionResult.SUCCESS) {
this.field_71460_t.field_78516_c.func_187460_a(enumhand); this.field_71460_t.field_78516_c.func_187460_a(enumhand);
return; return;
@@ -1096,6 +1119,8 @@ @@ -1098,6 +1121,8 @@
--this.field_71467_ac; --this.field_71467_ac;
} }
@ -195,7 +204,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();
@@ -1216,6 +1241,8 @@ @@ -1220,6 +1245,8 @@
this.field_71424_I.func_76318_c("keyboard"); this.field_71424_I.func_76318_c("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();
@ -204,7 +213,7 @@
} }
private void func_184117_aA() { private void func_184117_aA() {
@@ -1392,8 +1419,14 @@ @@ -1396,8 +1423,14 @@
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress); NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null, (p_209507_0_) -> { networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null, (p_209507_0_) -> {
})); }));
@ -220,7 +229,7 @@
this.field_71453_ak = networkmanager; this.field_71453_ak = networkmanager;
} }
@@ -1407,6 +1440,7 @@ @@ -1411,6 +1444,7 @@
} }
public void func_205055_a(@Nullable WorldClient p_205055_1_, GuiScreen p_205055_2_) { public void func_205055_a(@Nullable WorldClient p_205055_1_, GuiScreen p_205055_2_) {
@ -228,7 +237,7 @@
if (p_205055_1_ == null) { if (p_205055_1_ == null) {
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u(); NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
if (nethandlerplayclient != null) { if (nethandlerplayclient != null) {
@@ -1443,6 +1477,7 @@ @@ -1447,6 +1481,7 @@
} }
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_205055_1_); TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_205055_1_);
@ -236,15 +245,15 @@
if (p_205055_1_ != null) { if (p_205055_1_ != null) {
if (!this.field_71455_al) { if (!this.field_71455_al) {
AuthenticationService authenticationservice = new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString()); AuthenticationService authenticationservice = new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString());
@@ -1489,6 +1524,7 @@ @@ -1493,6 +1528,7 @@
EntityPlayerSP entityplayersp = this.field_71439_g; EntityPlayerSP entityplayersp = this.field_71439_g;
this.field_71439_g = this.field_71442_b.func_199681_a(this.field_71441_e, this.field_71439_g == null ? new StatisticsManager() : this.field_71439_g.func_146107_m(), this.field_71439_g == null ? new RecipeBookClient(new RecipeManager()) : this.field_71439_g.func_199507_B()); this.field_71439_g = this.field_71442_b.func_199681_a(this.field_71441_e, this.field_71439_g == null ? new StatisticsManager() : this.field_71439_g.func_146107_m(), this.field_71439_g == null ? new RecipeBookClient(new RecipeManager()) : this.field_71439_g.func_199507_B());
this.field_71439_g.func_184212_Q().func_187218_a(entityplayersp.func_184212_Q().func_187231_c()); this.field_71439_g.func_184212_Q().func_187218_a(entityplayersp.func_184212_Q().func_187231_c());
+ this.field_71439_g.updateSyncFields(entityplayersp); // Forge: fix MC-10657 + this.field_71439_g.updateSyncFields(entityplayersp); // Forge: fix MC-10657
this.field_71439_g.field_71093_bK = p_71354_1_; this.field_71439_g.field_71093_bK = p_212315_1_;
this.field_175622_Z = this.field_71439_g; this.field_175622_Z = this.field_71439_g;
this.field_71439_g.func_70065_x(); this.field_71439_g.func_70065_x();
@@ -1528,110 +1564,8 @@ @@ -1532,110 +1568,8 @@
private void func_147112_ai() { private void func_147112_ai() {
if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS) { if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS) {
@ -327,9 +336,9 @@
- if (itemstack.func_190926_b()) { - if (itemstack.func_190926_b()) {
- String s = ""; - String s = "";
- if (this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) { - if (this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) {
- s = ((ResourceLocation)Block.field_149771_c.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c())).toString(); - s = IRegistry.field_212618_g.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c()).toString();
- } else if (this.field_71476_x.field_72313_a == RayTraceResult.Type.ENTITY) { - } else if (this.field_71476_x.field_72313_a == RayTraceResult.Type.ENTITY) {
- s = ((ResourceLocation)EntityType.field_200787_a.func_177774_c(this.field_71476_x.field_72308_g.func_200600_R())).toString(); - s = IRegistry.field_212629_r.func_177774_c(this.field_71476_x.field_72308_g.func_200600_R()).toString();
- } - }
- -
- field_147123_G.warn("Picking on: [{}] {} gave null item", this.field_71476_x.field_72313_a, s); - field_147123_G.warn("Picking on: [{}] {} gave null item", this.field_71476_x.field_72313_a, s);
@ -357,7 +366,7 @@
} }
} }
@@ -1708,6 +1642,7 @@ @@ -1712,6 +1646,7 @@
return field_71432_P; return field_71432_P;
} }
@ -365,7 +374,7 @@
public ListenableFuture<Object> func_175603_A() { public ListenableFuture<Object> func_175603_A() {
return this.func_152344_a(this::func_110436_a); return this.func_152344_a(this::func_110436_a);
} }
@@ -1867,6 +1802,8 @@ @@ -1871,6 +1806,8 @@
} }
public MusicTicker.MusicType func_147109_W() { public MusicTicker.MusicType func_147109_W() {
@ -374,7 +383,7 @@
if (this.field_71462_r instanceof GuiWinGame) { if (this.field_71462_r instanceof GuiWinGame) {
return MusicTicker.MusicType.CREDITS; return MusicTicker.MusicType.CREDITS;
} else if (this.field_71439_g == null) { } else if (this.field_71439_g == null) {
@@ -2006,4 +1943,12 @@ @@ -2010,4 +1947,12 @@
public FontResourceManager func_211500_ak() { public FontResourceManager func_211500_ak() {
return this.field_211501_aD; return this.field_211501_aD;
} }

View file

@ -1,14 +1,14 @@
--- 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
@@ -63,6 +63,7 @@ @@ -64,6 +64,7 @@
public void func_195410_a(IResourceManager p_195410_1_) { public void func_195410_a(IResourceManager p_195410_1_) {
this.field_147697_e.func_148763_c(); this.field_147697_e.clear();
+ java.util.List<net.minecraft.util.Tuple<ResourceLocation, SoundList>> resources = new java.util.LinkedList<>(); + java.util.List<net.minecraft.util.Tuple<ResourceLocation, SoundList>> resources = new java.util.LinkedList<>();
for(String s : p_195410_1_.func_199001_a()) { for(String s : p_195410_1_.func_199001_a()) {
try { try {
for(IResource iresource : p_195410_1_.func_199004_b(new ResourceLocation(s, "sounds.json"))) { for(IResource iresource : p_195410_1_.func_199004_b(new ResourceLocation(s, "sounds.json"))) {
@@ -70,7 +71,7 @@ @@ -71,7 +72,7 @@
Map<String, SoundList> map = this.func_175085_a(iresource.func_199027_b()); Map<String, SoundList> map = this.func_175085_a(iresource.func_199027_b());
for(Entry<String, SoundList> entry : map.entrySet()) { for(Entry<String, SoundList> entry : map.entrySet()) {
@ -17,10 +17,10 @@
} }
} catch (RuntimeException runtimeexception) { } catch (RuntimeException runtimeexception) {
field_147698_b.warn("Invalid sounds.json in resourcepack: '{}'", iresource.func_199026_d(), runtimeexception); field_147698_b.warn("Invalid sounds.json in resourcepack: '{}'", iresource.func_199026_d(), runtimeexception);
@@ -81,6 +82,17 @@ @@ -81,7 +82,18 @@
;
} }
} }
+ try (net.minecraftforge.fml.common.progress.ProgressBar resourcesBar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Loading sounds", resources.size())) { + try (net.minecraftforge.fml.common.progress.ProgressBar resourcesBar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Loading sounds", resources.size())) {
+ resources.forEach(entry -> { + resources.forEach(entry -> {
+ resourcesBar.step(entry.func_76341_a().toString()); + resourcesBar.step(entry.func_76341_a().toString());
@ -31,11 +31,12 @@
+ } + }
+ }); + });
+ }; // Forge: end progress bar + }; // Forge: end progress bar
+ +
for(ResourceLocation resourcelocation : this.field_147697_e.func_148742_b()) { for(ResourceLocation resourcelocation : this.field_147697_e.keySet()) {
SoundEventAccessor soundeventaccessor = (SoundEventAccessor)this.field_147697_e.func_82594_a(resourcelocation); SoundEventAccessor soundeventaccessor = this.field_147697_e.get(resourcelocation);
if (soundeventaccessor.func_188712_c() instanceof TextComponentTranslation) { if (soundeventaccessor.func_188712_c() instanceof TextComponentTranslation) {
@@ -210,6 +222,10 @@ @@ -211,6 +223,10 @@
this.field_147694_f.func_148615_a(p_147691_1_, p_147691_2_); this.field_147694_f.func_148615_a(p_147691_1_, p_147691_2_);
} }
@ -46,7 +47,7 @@
public void func_147689_b() { public void func_147689_b() {
this.field_147694_f.func_148610_e(); this.field_147694_f.func_148610_e();
} }
@@ -257,4 +273,9 @@ @@ -258,4 +274,9 @@
public void func_195478_a(@Nullable ResourceLocation p_195478_1_, @Nullable SoundCategory p_195478_2_) { public void func_195478_a(@Nullable ResourceLocation p_195478_1_, @Nullable SoundCategory p_195478_2_) {
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/audio/SoundManager.java --- a/net/minecraft/client/audio/SoundManager.java
+++ b/net/minecraft/client/audio/SoundManager.java +++ b/net/minecraft/client/audio/SoundManager.java
@@ -75,6 +75,7 @@ @@ -69,6 +69,7 @@
try { try {
SoundSystemConfig.addLibrary(LibraryLWJGL3.class); SoundSystemConfig.addLibrary(LibraryLWJGL3.class);
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class); SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
@ -8,7 +8,7 @@
} catch (SoundSystemException soundsystemexception) { } catch (SoundSystemException soundsystemexception) {
field_148621_b.error(field_148623_a, "Error linking with the LibraryJavaSound plug-in", (Throwable)soundsystemexception); field_148621_b.error(field_148623_a, "Error linking with the LibraryJavaSound plug-in", (Throwable)soundsystemexception);
} }
@@ -94,6 +95,7 @@ @@ -88,6 +89,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() {
@@ -299,6 +301,8 @@ @@ -293,6 +295,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) {
@@ -340,8 +344,10 @@ @@ -334,8 +338,10 @@
ResourceLocation resourcelocation1 = sound.func_188721_b(); ResourceLocation resourcelocation1 = sound.func_188721_b();
if (sound.func_188723_h()) { if (sound.func_188723_h()) {
this.field_148620_e.newStreamingSource(p_148611_1_.func_204200_l(), s, func_148612_a(resourcelocation1), resourcelocation1.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f); this.field_148620_e.newStreamingSource(p_148611_1_.func_204200_l(), s, func_148612_a(resourcelocation1), resourcelocation1.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f);
@ -36,7 +36,7 @@
} }
field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", sound.func_188719_a(), resourcelocation, s); field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", sound.func_188719_a(), resourcelocation, s);
@@ -429,12 +435,16 @@ @@ -423,12 +429,16 @@
} }
public void func_148615_a(EntityPlayer p_148615_1_, float p_148615_2_) { public void func_148615_a(EntityPlayer p_148615_1_, float p_148615_2_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/entity/EntityPlayerSP.java --- a/net/minecraft/client/entity/EntityPlayerSP.java
+++ b/net/minecraft/client/entity/EntityPlayerSP.java +++ b/net/minecraft/client/entity/EntityPlayerSP.java
@@ -137,6 +137,7 @@ @@ -139,6 +139,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;
} }
@@ -465,6 +466,11 @@ @@ -468,6 +469,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_) {
@ -20,7 +20,7 @@
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.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);
} }
@@ -670,6 +676,7 @@ @@ -673,6 +679,7 @@
float f = 0.8F; float f = 0.8F;
boolean flag2 = this.field_71158_b.field_192832_b >= 0.8F; boolean flag2 = this.field_71158_b.field_192832_b >= 0.8F;
this.field_71158_b.func_78898_a(); this.field_71158_b.func_78898_a();
@ -28,7 +28,7 @@
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;
@@ -685,10 +692,14 @@ @@ -688,10 +695,14 @@
} }
AxisAlignedBB axisalignedbb = this.func_174813_aQ(); AxisAlignedBB axisalignedbb = this.func_174813_aQ();
@ -43,7 +43,7 @@
boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c; boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c;
if ((this.field_70122_E || this.func_204231_K()) && !flag1 && !flag2 && this.field_71158_b.field_192832_b >= 0.8F && !this.func_70051_ag() && flag4 && !this.func_184587_cr() && !this.func_70644_a(MobEffects.field_76440_q)) { if ((this.field_70122_E || this.func_204231_K()) && !flag1 && !flag2 && this.field_71158_b.field_192832_b >= 0.8F && !this.func_70051_ag() && flag4 && !this.func_184587_cr() && !this.func_70644_a(MobEffects.field_76440_q)) {
if (this.field_71156_d <= 0 && !this.field_71159_c.field_71474_y.field_151444_V.func_151470_d()) { if (this.field_71156_d <= 0 && !this.field_71159_c.field_71474_y.field_151444_V.func_151470_d()) {
@@ -973,4 +984,16 @@ @@ -979,4 +990,16 @@
return this.field_204230_bP; return this.field_204230_bP;
} }
} }

View file

@ -1,14 +1,14 @@
--- a/net/minecraft/client/gui/GuiButton.java --- a/net/minecraft/client/gui/GuiButton.java
+++ b/net/minecraft/client/gui/GuiButton.java +++ b/net/minecraft/client/gui/GuiButton.java
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
public boolean field_146125_m; public boolean field_146125_m = true;
protected boolean field_146123_n; protected boolean field_146123_n;
private boolean field_194832_o; private boolean field_194832_o;
+ public int packedFGColor; // FML + public int packedFGColor; // FML
public GuiButton(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_) { public GuiButton(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_) {
this(p_i1020_1_, p_i1020_2_, p_i1020_3_, 200, 20, p_i1020_4_); this(p_i1020_1_, p_i1020_2_, p_i1020_3_, 200, 20, p_i1020_4_);
@@ -66,6 +67,11 @@ @@ -62,6 +63,11 @@
this.func_73729_b(this.field_146128_h + this.field_146120_f / 2, this.field_146129_i, 200 - this.field_146120_f / 2, 46 + i * 20, this.field_146120_f / 2, this.field_146121_g); this.func_73729_b(this.field_146128_h + this.field_146120_f / 2, this.field_146129_i, 200 - this.field_146120_f / 2, 46 + i * 20, this.field_146120_f / 2, this.field_146121_g);
this.func_146119_b(minecraft, p_194828_1_, p_194828_2_); this.func_146119_b(minecraft, p_194828_1_, p_194828_2_);
int j = 14737632; int j = 14737632;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/GuiCreateWorld.java --- a/net/minecraft/client/gui/GuiCreateWorld.java
+++ b/net/minecraft/client/gui/GuiCreateWorld.java +++ b/net/minecraft/client/gui/GuiCreateWorld.java
@@ -159,14 +159,7 @@ @@ -158,14 +158,7 @@
this.field_146321_E.field_146125_m = false; this.field_146321_E.field_146125_m = false;
this.field_146322_F = this.func_189646_b(new GuiButton(8, this.field_146294_l / 2 + 5, 120, 150, 20, I18n.func_135052_a("selectWorld.customizeType")) { this.field_146322_F = this.func_189646_b(new GuiButton(8, this.field_146294_l / 2 + 5, 120, 150, 20, I18n.func_135052_a("selectWorld.customizeType")) {
public void func_194829_a(double p_194829_1_, double p_194829_3_) { public void func_194829_a(double p_194829_1_, double p_194829_3_) {
@ -16,11 +16,11 @@
} }
}); });
this.field_146322_F.field_146125_m = false; this.field_146322_F.field_146125_m = false;
@@ -258,6 +251,7 @@ @@ -257,6 +250,7 @@
i = (long)s.hashCode(); i = (long)s.hashCode();
} }
} }
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress(); + 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]); 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]);
worldsettings.func_205390_a((JsonElement)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));

View file

@ -9,16 +9,19 @@
this.func_73729_b(j1, j + 14 + 19 * i1, 0, 185, 108, 19); this.func_73729_b(j1, j + 14 + 19 * i1, 0, 185, 108, 19);
this.func_73729_b(j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16); this.func_73729_b(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);
@@ -193,9 +193,10 @@ @@ -193,10 +193,12 @@
Enchantment enchantment = Enchantment.func_185262_c(this.field_147075_G.field_185001_h[j]); Enchantment enchantment = Enchantment.func_185262_c(this.field_147075_G.field_185001_h[j]);
int l = this.field_147075_G.field_185002_i[j]; int l = this.field_147075_G.field_185002_i[j];
int i1 = j + 1; int i1 = j + 1;
- if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_73863_1_, (double)p_73863_2_) && k > 0 && l >= 0 && enchantment != null) { - if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_73863_1_, (double)p_73863_2_) && k > 0 && l >= 0 && enchantment != null) {
+ if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_73863_1_, (double)p_73863_2_) && k > 0) { + if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_73863_1_, (double)p_73863_2_) && k > 0) {
List<String> list = Lists.<String>newArrayList(); List<String> list = Lists.newArrayList();
- list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment.func_200305_d(l).func_150254_d())); - list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment.func_200305_d(l).func_150254_d()));
- if (!flag) {
+ list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment == null ? "" : enchantment.func_200305_d(l).func_150254_d())); + list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment == null ? "" : enchantment.func_200305_d(l).func_150254_d()));
+ if (enchantment == null) java.util.Collections.addAll(list, "", TextFormatting.RED + I18n.func_135052_a("forge.container.enchant.limitedEnchantability")); else + if (enchantment == null) {
if (!flag) { + java.util.Collections.addAll(list, "", TextFormatting.RED + I18n.func_135052_a("forge.container.enchant.limitedEnchantability"));
+ } else if (!flag) {
list.add(""); list.add("");
if (this.field_146297_k.field_71439_g.field_71068_ca < k) { if (this.field_146297_k.field_71439_g.field_71068_ca < k) {
list.add(TextFormatting.RED + I18n.func_135052_a("container.enchant.level.requirement", this.field_147075_G.field_75167_g[j]));

View file

@ -3,12 +3,12 @@
@@ -59,6 +59,7 @@ @@ -59,6 +59,7 @@
private int field_193978_M; private int field_193978_M;
private int field_193979_N; private int field_193979_N;
private final RenderSkybox field_209101_K; private final RenderSkybox field_209101_K = new RenderSkybox(new RenderSkyboxCube(new ResourceLocation("textures/gui/title/background/panorama")));
+ private net.minecraftforge.client.gui.NotificationModUpdateScreen modUpdateNotification; + private net.minecraftforge.client.gui.NotificationModUpdateScreen modUpdateNotification;
public GuiMainMenu() { public GuiMainMenu() {
this.field_146972_A = field_96138_a; this.field_73975_c = "missingno";
@@ -178,7 +179,7 @@ @@ -176,7 +177,7 @@
if (this.func_183501_a()) { if (this.func_183501_a()) {
this.field_183503_M.func_146280_a(this.field_146297_k, this.field_146294_l, this.field_146295_m); this.field_183503_M.func_146280_a(this.field_146297_k, this.field_146294_l, this.field_146295_m);
} }
@ -17,7 +17,7 @@
} }
private void func_73969_a(int p_73969_1_, int p_73969_2_) { private void func_73969_a(int p_73969_1_, int p_73969_2_) {
@@ -192,11 +193,17 @@ @@ -190,11 +191,17 @@
GuiMainMenu.this.field_146297_k.func_147108_a(new GuiMultiplayer(GuiMainMenu.this)); GuiMainMenu.this.field_146297_k.func_147108_a(new GuiMultiplayer(GuiMainMenu.this));
} }
}); });
@ -36,7 +36,7 @@
} }
private void func_73972_b(int p_73972_1_, int p_73972_2_) { private void func_73972_b(int p_73972_1_, int p_73972_2_) {
@@ -206,7 +213,7 @@ @@ -204,7 +211,7 @@
} }
}); });
this.field_73973_d = this.func_189646_b(new GuiButton(12, this.field_146294_l / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.func_135052_a("menu.resetdemo")) { this.field_73973_d = this.func_189646_b(new GuiButton(12, this.field_146294_l / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.func_135052_a("menu.resetdemo")) {
@ -45,7 +45,7 @@
ISaveFormat isaveformat1 = GuiMainMenu.this.field_146297_k.func_71359_d(); ISaveFormat isaveformat1 = GuiMainMenu.this.field_146297_k.func_71359_d();
WorldInfo worldinfo1 = isaveformat1.func_75803_c("Demo_World"); WorldInfo worldinfo1 = isaveformat1.func_75803_c("Demo_World");
if (worldinfo1 != null) { if (worldinfo1 != null) {
@@ -268,6 +275,9 @@ @@ -266,6 +273,9 @@
this.field_146297_k.func_110434_K().func_110577_a(field_194400_H); this.field_146297_k.func_110434_K().func_110577_a(field_194400_H);
func_146110_a(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F); func_146110_a(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);
@ -55,7 +55,7 @@
GlStateManager.func_179094_E(); GlStateManager.func_179094_E();
GlStateManager.func_179109_b((float)(this.field_146294_l / 2 + 90), 70.0F, 0.0F); GlStateManager.func_179109_b((float)(this.field_146294_l / 2 + 90), 70.0F, 0.0F);
GlStateManager.func_179114_b(-20.0F, 0.0F, 0.0F, 1.0F); GlStateManager.func_179114_b(-20.0F, 0.0F, 0.0F, 1.0F);
@@ -283,7 +293,10 @@ @@ -281,7 +291,10 @@
s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d()); s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d());
} }
@ -67,7 +67,7 @@
this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_146295_m - 10, -1); this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_146295_m - 10, -1);
if (p_73863_1_ > this.field_193979_N && p_73863_1_ < this.field_193979_N + this.field_193978_M && p_73863_2_ > this.field_146295_m - 10 && p_73863_2_ < this.field_146295_m) { if (p_73863_1_ > this.field_193979_N && p_73863_1_ < this.field_193979_N + this.field_193978_M && p_73863_2_ > this.field_146295_m - 10 && p_73863_2_ < this.field_146295_m) {
func_73734_a(this.field_193979_N, this.field_146295_m - 1, this.field_193979_N + this.field_193978_M, this.field_146295_m, -1); func_73734_a(this.field_193979_N, this.field_146295_m - 1, this.field_193979_N + this.field_193978_M, this.field_146295_m, -1);
@@ -299,6 +312,7 @@ @@ -297,6 +310,7 @@
if (this.func_183501_a()) { if (this.func_183501_a()) {
this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/achievement/GuiStats.java --- a/net/minecraft/client/gui/achievement/GuiStats.java
+++ b/net/minecraft/client/gui/achievement/GuiStats.java +++ b/net/minecraft/client/gui/achievement/GuiStats.java
@@ -118,8 +118,8 @@ @@ -122,8 +122,8 @@
public void func_193026_g() { public void func_193026_g() {
if (this.field_146543_v) { if (this.field_146543_v) {
this.func_193028_a(); this.func_193028_a();

View file

@ -0,0 +1,10 @@
--- a/net/minecraft/client/gui/advancements/AdvancementTabType.java
+++ b/net/minecraft/client/gui/advancements/AdvancementTabType.java
@@ -14,6 +14,7 @@
LEFT(0, 64, 32, 28, 5),
RIGHT(96, 64, 32, 28, 5);
+ public static final int MAX_TABS = java.util.Arrays.stream(values()).mapToInt(e -> e.field_192664_j).sum();
private final int field_192660_f;
private final int field_192661_g;
private final int field_192662_h;

View file

@ -30,8 +30,8 @@
for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) { for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) {
- if (p_193936_2_ < advancementtabtype.func_192650_a()) { - if (p_193936_2_ < advancementtabtype.func_192650_a()) {
- return new GuiAdvancementTab(p_193936_0_, p_193936_1_, advancementtabtype, p_193936_2_, p_193936_3_, p_193936_3_.func_192068_c()); - return new GuiAdvancementTab(p_193936_0_, p_193936_1_, advancementtabtype, p_193936_2_, p_193936_3_, p_193936_3_.func_192068_c());
+ if ((p_193936_2_ % AdvancementTabType.field_192659_e) < advancementtabtype.func_192650_a()) { + if ((p_193936_2_ % AdvancementTabType.MAX_TABS) < advancementtabtype.func_192650_a()) {
+ return new GuiAdvancementTab(p_193936_0_, p_193936_1_, advancementtabtype, p_193936_2_ % AdvancementTabType.field_192659_e, p_193936_2_ / AdvancementTabType.field_192659_e, p_193936_3_, p_193936_3_.func_192068_c()); + return new GuiAdvancementTab(p_193936_0_, p_193936_1_, advancementtabtype, p_193936_2_ % AdvancementTabType.MAX_TABS, p_193936_2_ / AdvancementTabType.MAX_TABS, p_193936_3_, p_193936_3_.func_192068_c());
} }
p_193936_2_ -= advancementtabtype.func_192650_a(); p_193936_2_ -= advancementtabtype.func_192650_a();

View file

@ -1,7 +1,7 @@
--- a/net/minecraft/client/gui/advancements/GuiScreenAdvancements.java --- a/net/minecraft/client/gui/advancements/GuiScreenAdvancements.java
+++ b/net/minecraft/client/gui/advancements/GuiScreenAdvancements.java +++ b/net/minecraft/client/gui/advancements/GuiScreenAdvancements.java
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
private final Map<Advancement, GuiAdvancementTab> field_191947_i = Maps.<Advancement, GuiAdvancementTab>newLinkedHashMap(); private final Map<Advancement, GuiAdvancementTab> field_191947_i = Maps.newLinkedHashMap();
private GuiAdvancementTab field_191940_s; private GuiAdvancementTab field_191940_s;
private boolean field_191944_v; private boolean field_191944_v;
+ private static int tabPage, maxPages; + private static int tabPage, maxPages;
@ -13,7 +13,7 @@
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);
} }
- -
+ if (this.field_191947_i.size() > AdvancementTabType.field_192659_e) { + if (this.field_191947_i.size() > AdvancementTabType.MAX_TABS) {
+ int guiLeft = (this.field_146294_l - 252) / 2; + int guiLeft = (this.field_146294_l - 252) / 2;
+ int guiTop = (this.field_146295_m - 140) / 2; + int guiTop = (this.field_146295_m - 140) / 2;
+ func_189646_b(new net.minecraft.client.gui.GuiButton(101, guiLeft, guiTop - 50, 20, 20, "<") { + func_189646_b(new net.minecraft.client.gui.GuiButton(101, guiLeft, guiTop - 50, 20, 20, "<") {
@ -28,7 +28,7 @@
+ tabPage = Math.min(tabPage + 1, maxPages); + tabPage = Math.min(tabPage + 1, maxPages);
+ } + }
+ }); + });
+ maxPages = this.field_191947_i.size() / AdvancementTabType.field_192659_e; + maxPages = this.field_191947_i.size() / AdvancementTabType.MAX_TABS;
+ } + }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/inventory/GuiContainerCreative.java --- a/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ b/net/minecraft/client/gui/inventory/GuiContainerCreative.java +++ b/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -53,6 +53,8 @@ @@ -54,6 +54,8 @@
private CreativeCrafting field_147059_E; private CreativeCrafting field_147059_E;
private boolean field_195377_F; private boolean field_195377_F;
private boolean field_199506_G; private boolean field_199506_G;
@ -9,7 +9,7 @@
public GuiContainerCreative(EntityPlayer p_i1088_1_) { public GuiContainerCreative(EntityPlayer p_i1088_1_) {
super(new GuiContainerCreative.ContainerCreative(p_i1088_1_)); super(new GuiContainerCreative.ContainerCreative(p_i1088_1_));
@@ -230,6 +232,22 @@ @@ -231,6 +233,22 @@
this.func_147050_b(ItemGroup.field_78032_a[i]); this.func_147050_b(ItemGroup.field_78032_a[i]);
this.field_147059_E = new CreativeCrafting(this.field_146297_k); this.field_147059_E = new CreativeCrafting(this.field_146297_k);
this.field_146297_k.field_71439_g.field_71069_bz.func_75132_a(this.field_147059_E); this.field_146297_k.field_71439_g.field_71069_bz.func_75132_a(this.field_147059_E);
@ -32,7 +32,7 @@
} else { } else {
this.field_146297_k.func_147108_a(new GuiInventory(this.field_146297_k.field_71439_g)); this.field_146297_k.func_147108_a(new GuiInventory(this.field_146297_k.field_71439_g));
} }
@@ -255,7 +273,7 @@ @@ -259,7 +277,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;
@ -41,7 +41,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();
@@ -273,7 +291,7 @@ @@ -277,7 +295,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;
@ -50,7 +50,7 @@
if (this.field_146297_k.field_71474_y.field_74310_D.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) { if (this.field_146297_k.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);
@@ -309,6 +327,32 @@ @@ -313,6 +331,32 @@
private void func_147053_i() { private void func_147053_i() {
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h; GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
guicontainercreative$containercreative.field_148330_a.clear(); guicontainercreative$containercreative.field_148330_a.clear();
@ -81,9 +81,9 @@
+ } + }
+ +
if (this.field_147062_A.func_146179_b().isEmpty()) { if (this.field_147062_A.func_146179_b().isEmpty()) {
for(Item item : Item.field_150901_e) { for(Item item : IRegistry.field_212630_s) {
item.func_150895_a(ItemGroup.field_78027_g, guicontainercreative$containercreative.field_148330_a); item.func_150895_a(ItemGroup.field_78027_g, guicontainercreative$containercreative.field_148330_a);
@@ -323,9 +367,9 @@ @@ -327,9 +371,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];
@ -95,7 +95,7 @@
} }
} }
@@ -357,7 +401,7 @@ @@ -361,7 +405,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) {
@ -104,7 +104,7 @@
this.func_147050_b(itemgroup); this.func_147050_b(itemgroup);
return true; return true;
} }
@@ -368,12 +412,15 @@ @@ -372,12 +416,15 @@
} }
private boolean func_147055_p() { private boolean func_147055_p() {
@ -120,7 +120,7 @@
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h; GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
this.field_147008_s.clear(); this.field_147008_s.clear();
guicontainercreative$containercreative.field_148330_a.clear(); guicontainercreative$containercreative.field_148330_a.clear();
@@ -447,13 +494,15 @@ @@ -451,13 +498,15 @@
} }
if (this.field_147062_A != null) { if (this.field_147062_A != null) {
@ -137,7 +137,7 @@
this.func_147053_i(); this.func_147053_i();
} else { } else {
@@ -512,16 +561,36 @@ @@ -517,16 +566,36 @@
this.func_146276_q_(); this.func_146276_q_();
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_); super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
@ -175,7 +175,7 @@
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.func_179140_f(); GlStateManager.func_179140_f();
this.func_191948_b(p_73863_1_, p_73863_2_); this.func_191948_b(p_73863_1_, p_73863_2_);
@@ -563,7 +632,10 @@ @@ -568,7 +637,10 @@
} }
} }
@ -187,7 +187,7 @@
} else { } else {
super.func_146285_a(p_146285_1_, p_146285_2_, p_146285_3_); super.func_146285_a(p_146285_1_, p_146285_2_, p_146285_3_);
} }
@@ -575,25 +647,44 @@ @@ -580,25 +652,44 @@
RenderHelper.func_74520_c(); RenderHelper.func_74520_c();
ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w]; ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w];
@ -236,7 +236,7 @@
this.func_147051_a(itemgroup); this.func_147051_a(itemgroup);
if (itemgroup == ItemGroup.field_78036_m) { if (itemgroup == ItemGroup.field_78036_m) {
GuiInventory.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.field_146297_k.field_71439_g); GuiInventory.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.field_146297_k.field_71439_g);
@@ -602,6 +693,7 @@ @@ -607,6 +698,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_) {
@ -244,7 +244,7 @@
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;
@@ -671,6 +763,8 @@ @@ -676,6 +768,8 @@
} }
GlStateManager.func_179140_f(); GlStateManager.func_179140_f();
@ -253,7 +253,7 @@
this.func_73729_b(l, i1, j, k, 28, 32); this.func_73729_b(l, i1, j, k, 28, 32);
this.field_73735_i = 100.0F; this.field_73735_i = 100.0F;
this.field_146296_j.field_77023_b = 100.0F; this.field_146296_j.field_77023_b = 100.0F;
@@ -845,6 +939,31 @@ @@ -850,6 +944,31 @@
public boolean func_82869_a(EntityPlayer p_82869_1_) { public boolean func_82869_a(EntityPlayer 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_);
} }

View file

@ -1,10 +1,10 @@
--- a/net/minecraft/client/multiplayer/ChunkProviderClient.java --- a/net/minecraft/client/multiplayer/ChunkProviderClient.java
+++ b/net/minecraft/client/multiplayer/ChunkProviderClient.java +++ b/net/minecraft/client/multiplayer/ChunkProviderClient.java
@@ -55,6 +55,7 @@ @@ -59,6 +59,7 @@
public Chunk func_73158_c(int p_73158_1_, int p_73158_2_) { return new Chunk(this.field_73235_d, p_212474_1_, p_212474_2_, new Biome[256]);
Chunk chunk = new Chunk(this.field_73235_d, p_73158_1_, p_73158_2_, new Biome[256]); });
this.field_73236_b.put(ChunkPos.func_77272_a(p_73158_1_, p_73158_2_), chunk); chunk.func_186033_a(p_212474_3_, p_212474_4_, p_212474_5_);
+ 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));
chunk.func_177417_c(true); chunk.func_177417_c(true);
return chunk; return chunk;
} }

View file

@ -70,7 +70,7 @@
if (this.field_78780_h % 4.0F == 0.0F) { if (this.field_78780_h % 4.0F == 0.0F) {
- SoundType soundtype = block.func_185467_w(); - SoundType soundtype = block.func_185467_w();
+ SoundType soundtype = iblockstate.getSoundType(field_78776_a.field_71441_e, p_180512_1_, field_78776_a.field_71439_g); + SoundType soundtype = iblockstate.getSoundType(field_78776_a.field_71441_e, p_180512_1_, field_78776_a.field_71439_g);
this.field_78776_a.func_147118_V().func_147682_a(new PositionedSoundRecord(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_)); 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_));
} }
@@ -251,7 +256,8 @@ @@ -251,7 +256,8 @@

View file

@ -1,25 +1,17 @@
--- a/net/minecraft/client/multiplayer/WorldClient.java --- a/net/minecraft/client/multiplayer/WorldClient.java
+++ b/net/minecraft/client/multiplayer/WorldClient.java +++ b/net/minecraft/client/multiplayer/WorldClient.java
@@ -69,18 +69,20 @@ @@ -76,11 +76,13 @@
private Scoreboard field_200261_M;
public WorldClient(NetHandlerPlayClient p_i45063_1_, WorldSettings p_i45063_2_, int p_i45063_3_, EnumDifficulty p_i45063_4_, Profiler p_i45063_5_) {
- super(new SaveHandlerMP(), new WorldInfo(p_i45063_2_, "MpServer"), DimensionType.func_186069_a(p_i45063_3_).func_186070_d(), p_i45063_5_, true);
+ super(new SaveHandlerMP(), new WorldInfo(p_i45063_2_, "MpServer"), net.minecraftforge.common.DimensionManager.createProviderFor(p_i45063_3_), p_i45063_5_, true);
this.field_184158_M = this.field_73012_v.nextInt(12000);
this.field_184157_a = Sets.<ChunkPos>newHashSet();
this.field_200261_M = new Scoreboard(); this.field_200261_M = new Scoreboard();
this.field_73035_a = p_i45063_1_; this.field_73035_a = p_i49845_1_;
this.func_72912_H().func_176144_a(p_i45063_4_); this.func_72912_H().func_176144_a(p_i49845_4_);
- this.func_175652_B(new BlockPos(8, 64, 8)); - this.func_175652_B(new BlockPos(8, 64, 8));
this.field_73011_w.func_76558_a(this); this.field_73011_w.func_76558_a(this);
+ this.func_175652_B(new BlockPos(8, 64, 8)); //Forge: Moved below registerWorld to prevent NPE in our redirect. + this.func_175652_B(new BlockPos(8, 64, 8)); //Forge: Moved below registerWorld to prevent NPE in our redirect.
this.field_73020_y = this.func_72970_h(); this.field_73020_y = this.func_72970_h();
this.field_72988_C = new SaveDataMemoryStorage();
this.func_72966_v(); this.func_72966_v();
this.func_72947_a(); this.func_72947_a();
+ this.initCapabilities(); + this.initCapabilities();
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
} }
public void func_72835_b() { public void func_72835_b(BooleanSupplier p_72835_1_) {

View file

@ -1,12 +1,10 @@
--- a/net/minecraft/client/network/NetHandlerLoginClient.java --- a/net/minecraft/client/network/NetHandlerLoginClient.java
+++ b/net/minecraft/client/network/NetHandlerLoginClient.java +++ b/net/minecraft/client/network/NetHandlerLoginClient.java
@@ -122,7 +122,9 @@ @@ -122,6 +122,7 @@
} }
public void func_209521_a(SPacketCustomPayloadLogin p_209521_1_) { public void func_209521_a(SPacketCustomPayloadLogin p_209521_1_) {
+ if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_209521_1_, this.field_147393_d)) { + if (net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_209521_1_, this.field_147393_d)) return;
this.field_209525_d.accept(new TextComponentTranslation("connect.negotiating", new Object[0])); this.field_209525_d.accept(new TextComponentTranslation("connect.negotiating"));
this.field_147393_d.func_179290_a(new CPacketCustomPayloadLogin(p_209521_1_.func_209918_a(), (PacketBuffer)null)); this.field_147393_d.func_179290_a(new CPacketCustomPayloadLogin(p_209521_1_.func_209918_a(), (PacketBuffer)null));
} }
}
+}

View file

@ -1,15 +1,15 @@
--- a/net/minecraft/client/network/NetHandlerPlayClient.java --- a/net/minecraft/client/network/NetHandlerPlayClient.java
+++ b/net/minecraft/client/network/NetHandlerPlayClient.java +++ b/net/minecraft/client/network/NetHandlerPlayClient.java
@@ -654,7 +654,7 @@ @@ -659,7 +659,7 @@
Chunk chunk = this.field_147300_g.func_72964_e(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f()); int j = p_147263_1_.func_149271_f();
chunk.func_186033_a(p_147263_1_.func_186946_a(), p_147263_1_.func_149276_g(), p_147263_1_.func_149274_i()); Chunk chunk = this.field_147300_g.func_72863_F().func_212474_a(i, j, p_147263_1_.func_186946_a(), p_147263_1_.func_149276_g(), p_147263_1_.func_149274_i());
this.field_147300_g.func_147458_c(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15); this.field_147300_g.func_147458_c(i << 4, 0, j << 4, (i << 4) + 15, 256, (j << 4) + 15);
- if (!p_147263_1_.func_149274_i() || !(this.field_147300_g.field_73011_w instanceof OverworldDimension)) { - if (!p_147263_1_.func_149274_i() || !(this.field_147300_g.field_73011_w instanceof OverworldDimension)) {
+ if (!p_147263_1_.func_149274_i() || this.field_147300_g.field_73011_w.shouldClientCheckLighting()) { + if (!p_147263_1_.func_149274_i() || this.field_147300_g.field_73011_w.shouldClientCheckLighting()) {
chunk.func_76613_n(); chunk.func_76613_n();
} }
@@ -662,7 +662,7 @@ @@ -667,7 +667,7 @@
BlockPos blockpos = new BlockPos(nbttagcompound.func_74762_e("x"), nbttagcompound.func_74762_e("y"), nbttagcompound.func_74762_e("z")); BlockPos blockpos = new BlockPos(nbttagcompound.func_74762_e("x"), nbttagcompound.func_74762_e("y"), nbttagcompound.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) {
@ -18,7 +18,7 @@
} }
} }
@@ -727,7 +727,9 @@ @@ -735,7 +735,9 @@
public void func_147251_a(SPacketChat p_147251_1_) { public void func_147251_a(SPacketChat p_147251_1_) {
PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f); PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f);
@ -29,7 +29,7 @@
} }
public void func_147279_a(SPacketAnimation p_147279_1_) { public void func_147279_a(SPacketAnimation p_147279_1_) {
@@ -1008,6 +1010,12 @@ @@ -1017,6 +1019,12 @@
boolean flag = i == 2 && tileentity instanceof TileEntityCommandBlock; boolean flag = i == 2 && tileentity instanceof TileEntityCommandBlock;
if (i == 1 && tileentity instanceof TileEntityMobSpawner || flag || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityStructure || i == 8 && tileentity instanceof TileEntityEndGateway || i == 9 && tileentity instanceof TileEntitySign || i == 10 && tileentity instanceof TileEntityShulkerBox || i == 11 && tileentity instanceof TileEntityBed || i == 5 && tileentity instanceof TileEntityConduit) { if (i == 1 && tileentity instanceof TileEntityMobSpawner || flag || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityStructure || i == 8 && tileentity instanceof TileEntityEndGateway || i == 9 && tileentity instanceof TileEntitySign || i == 10 && tileentity instanceof TileEntityShulkerBox || i == 11 && tileentity instanceof TileEntityBed || i == 5 && tileentity instanceof TileEntityConduit) {
tileentity.func_145839_a(p_147273_1_.func_148857_g()); tileentity.func_145839_a(p_147273_1_.func_148857_g());
@ -42,7 +42,7 @@
} }
if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock) { if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock) {
@@ -1182,6 +1190,7 @@ @@ -1191,6 +1199,7 @@
recipebookclient.func_199644_c(); recipebookclient.func_199644_c();
recipebookclient.func_199642_d().forEach(searchtree::func_194043_a); recipebookclient.func_199642_d().forEach(searchtree::func_194043_a);
searchtree.func_194040_a(); searchtree.func_194040_a();
@ -50,7 +50,7 @@
} }
public void func_200232_a(SPacketPlayerLook p_200232_1_) { public void func_200232_a(SPacketPlayerLook p_200232_1_) {
@@ -1272,7 +1281,7 @@ @@ -1281,7 +1290,7 @@
PacketThreadUtil.func_180031_a(p_147260_1_, this, this.field_147299_f); PacketThreadUtil.func_180031_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 EntityLivingBase) { if (entity instanceof EntityLivingBase) {
@ -59,7 +59,7 @@
if (potion != null) { if (potion != null) {
PotionEffect potioneffect = new PotionEffect(potion, 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()); PotionEffect potioneffect = new PotionEffect(potion, 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());
potioneffect.func_100012_b(p_147260_1_.func_149429_c()); potioneffect.func_100012_b(p_147260_1_.func_149429_c());
@@ -1598,10 +1607,12 @@ @@ -1607,10 +1616,12 @@
((DebugRendererWorldGenAttempts)this.field_147299_f.field_184132_p.field_201750_j).func_201734_a(packetbuffer.func_179259_c(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat()); ((DebugRendererWorldGenAttempts)this.field_147299_f.field_184132_p.field_201750_j).func_201734_a(packetbuffer.func_179259_c(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat());
field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation); field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
} else { } else {

View file

@ -1,15 +1,15 @@
--- a/net/minecraft/client/particle/Particle.java --- a/net/minecraft/client/particle/Particle.java
+++ b/net/minecraft/client/particle/Particle.java +++ b/net/minecraft/client/particle/Particle.java
@@ -253,6 +253,8 @@ @@ -249,6 +249,8 @@
public void func_187110_a(double p_187110_1_, double p_187110_3_, double p_187110_5_) { public void func_187110_a(double p_187110_1_, double p_187110_3_, double p_187110_5_) {
double d0 = p_187110_3_; double d0 = p_187110_3_;
+ double origX = p_187110_1_; + double origX = p_187110_1_;
+ double origZ = p_187110_5_; + double origZ = p_187110_5_;
if (this.field_190017_n && (p_187110_1_ != 0.0D || p_187110_3_ != 0.0D || p_187110_5_ != 0.0D)) { if (this.field_190017_n && (p_187110_1_ != 0.0D || p_187110_3_ != 0.0D || p_187110_5_ != 0.0D)) {
VoxelShape voxelshape = this.field_187122_b.func_199406_a((Entity)null, this.func_187116_l(), p_187110_1_, p_187110_3_, p_187110_5_); ReuseableStream<VoxelShape> reuseablestream = new ReuseableStream<>(this.field_187122_b.func_199406_a((Entity)null, this.func_187116_l(), p_187110_1_, p_187110_3_, p_187110_5_));
p_187110_3_ = ShapeUtils.func_197884_a(EnumFacing.Axis.Y, this.func_187116_l(), voxelshape, p_187110_3_); p_187110_3_ = VoxelShapes.func_212437_a(EnumFacing.Axis.Y, this.func_187116_l(), reuseablestream.func_212761_a(), p_187110_3_);
@@ -271,12 +273,12 @@ @@ -267,12 +269,12 @@
} }
this.func_187118_j(); this.func_187118_j();

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
@@ -145,6 +145,7 @@ @@ -146,6 +146,7 @@
} }
public void func_78873_a(Particle p_78873_1_) { public void func_78873_a(Particle p_78873_1_) {
@ -8,7 +8,7 @@
this.field_187241_h.add(p_78873_1_); this.field_187241_h.add(p_78873_1_);
} }
@@ -332,7 +333,7 @@ @@ -337,7 +338,7 @@
} }
public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_) { public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_) {
@ -17,7 +17,7 @@
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_199284_3_, p_199284_5_, p_199284_7_, p_199284_9_, p_199284_11_, p_199284_13_) -> {
@@ -411,4 +412,10 @@ @@ -416,4 +417,10 @@
return String.valueOf(i); return String.valueOf(i);
} }

View file

@ -1,31 +1,30 @@
--- 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
@@ -116,6 +116,9 @@ @@ -103,6 +103,9 @@
if (f4 > 1.0F / this.field_205095_e) { f3 = 1.0F / this.field_205095_e;
}
+ // Forge: fix MC-4647 and MC-10480
+ if (Float.isInfinite(f3)) f3 = Math.nextAfter(f3, 0.0);
+
this.field_205093_c = this.field_205093_c * (1.0F - f1) + this.field_205093_c * f3 * f1;
this.field_205094_d = this.field_205094_d * (1.0F - f1) + this.field_205094_d * f3 * f1;
this.field_205095_e = this.field_205095_e * (1.0F - f1) + this.field_205095_e * f3 * f1;
@@ -117,11 +120,21 @@
f4 = 1.0F / this.field_205095_e; f4 = 1.0F / this.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(f4)) f4 = Math.nextAfter(f4, 0.0);
+
this.field_205093_c = this.field_205093_c * (1.0F - f2) + this.field_205093_c * f4 * f2; this.field_205093_c = this.field_205093_c * (1.0F - f2) + this.field_205093_c * f4 * f2;
this.field_205094_d = this.field_205094_d * (1.0F - f2) + this.field_205094_d * f4 * f2; this.field_205094_d = this.field_205094_d * (1.0F - f2) + this.field_205094_d * f4 * f2;
@@ -130,12 +133,22 @@ this.field_205095_e = this.field_205095_e * (1.0F - f2) + this.field_205095_e * f4 * f2;
if (f5 > 1.0F / this.field_205095_e) {
f5 = 1.0F / this.field_205095_e;
}
+
+ // Forge: fix MC-4647 and MC-10480
+ if (Float.isInfinite(f5)) f5 = Math.nextAfter(f5, 0.0);
this.field_205093_c = this.field_205093_c * (1.0F - f3) + this.field_205093_c * f5 * f3;
this.field_205094_d = this.field_205094_d * (1.0F - f3) + this.field_205094_d * f5 * f3;
this.field_205095_e = this.field_205095_e * (1.0F - f3) + this.field_205095_e * f5 * f3;
} }
+
+ net.minecraftforge.client.event.EntityViewRenderEvent.FogColors event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogColors(this, this.field_205104_n, entity, ActiveRenderInfo.func_186703_a(world, entity, p_78466_1_), ifluidstate, p_78466_1_, 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(this, this.field_205104_n, entity, ActiveRenderInfo.func_186703_a(world, entity, p_78466_1_), ifluidstate, p_78466_1_, this.field_205093_c, this.field_205094_d, this.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(); + this.field_205093_c = event.getRed();
+ this.field_205094_d = event.getGreen(); + this.field_205094_d = event.getGreen();
+ this.field_205095_e = event.getBlue(); + this.field_205095_e = event.getBlue();
@ -33,7 +32,7 @@
GlStateManager.func_179082_a(this.field_205093_c, this.field_205094_d, this.field_205095_e, 0.0F); GlStateManager.func_179082_a(this.field_205093_c, this.field_205094_d, this.field_205095_e, 0.0F);
} }
@@ -227,6 +240,10 @@ @@ -213,6 +226,10 @@
GlStateManager.func_187432_a(0.0F, -1.0F, 0.0F); GlStateManager.func_187432_a(0.0F, -1.0F, 0.0F);
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
IFluidState ifluidstate = ActiveRenderInfo.func_206243_b(this.field_205105_o.field_71441_e, entity, p_78468_2_); IFluidState ifluidstate = ActiveRenderInfo.func_206243_b(this.field_205105_o.field_71441_e, entity, p_78468_2_);
@ -44,7 +43,7 @@
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).func_70644_a(MobEffects.field_76440_q)) { if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).func_70644_a(MobEffects.field_76440_q)) {
float f2 = 5.0F; float f2 = 5.0F;
int i = ((EntityLivingBase)entity).func_70660_b(MobEffects.field_76440_q).func_76459_b(); int i = ((EntityLivingBase)entity).func_70660_b(MobEffects.field_76440_q).func_76459_b();
@@ -286,6 +303,7 @@ @@ -272,6 +289,7 @@
GlStateManager.func_179102_b(f1 * 0.05F); GlStateManager.func_179102_b(f1 * 0.05F);
GlStateManager.func_179153_c(Math.min(f1, 192.0F) * 0.5F); GlStateManager.func_179153_c(Math.min(f1, 192.0F) * 0.5F);
} }

View file

@ -1,15 +1,15 @@
--- a/net/minecraft/client/renderer/EntityRenderer.java --- a/net/minecraft/client/renderer/GameRenderer.java
+++ b/net/minecraft/client/renderer/EntityRenderer.java +++ b/net/minecraft/client/renderer/GameRenderer.java
@@ -171,7 +171,7 @@ @@ -171,6 +171,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 EntityEnderman) { } else if (p_175066_1_ instanceof EntityEnderman) {
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);
}
} }
} @@ -309,7 +311,7 @@
@@ -310,7 +310,7 @@
} else if (raytraceresult != null) { } else if (raytraceresult != null) {
double d3 = vec3d.func_72438_d(raytraceresult.field_72307_f); double d3 = vec3d.func_72438_d(raytraceresult.field_72307_f);
if (d3 < d2 || d2 == 0.0D) { if (d3 < d2 || d2 == 0.0D) {
@ -18,7 +18,7 @@
if (d2 == 0.0D) { if (d2 == 0.0D) {
this.field_78528_u = entity1; this.field_78528_u = entity1;
vec3d3 = raytraceresult.field_72307_f; vec3d3 = raytraceresult.field_72307_f;
@@ -381,7 +381,7 @@ @@ -380,7 +382,7 @@
d0 = d0 * 60.0D / 70.0D; d0 = d0 * 60.0D / 70.0D;
} }
@ -27,7 +27,7 @@
} }
} }
@@ -488,8 +488,16 @@ @@ -487,8 +489,16 @@
} }
if (!this.field_78531_r.field_71474_y.field_74325_U) { if (!this.field_78531_r.field_71474_y.field_74325_U) {
@ -46,16 +46,15 @@
} }
GlStateManager.func_179109_b(0.0F, -f, 0.0F); GlStateManager.func_179109_b(0.0F, -f, 0.0F);
@@ -543,6 +551,8 @@ @@ -542,6 +552,7 @@
} }
boolean flag = this.field_78531_r.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_78531_r.func_175606_aa()).func_70608_bn(); boolean flag = this.field_78531_r.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_78531_r.func_175606_aa()).func_70608_bn();
+
+ if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(field_78531_r.field_71438_f, p_195457_1_)) + if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(field_78531_r.field_71438_f, p_195457_1_))
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.func_180436_i();
this.field_78516_c.func_78440_a(p_195457_1_); this.field_78516_c.func_78440_a(p_195457_1_);
@@ -631,13 +641,17 @@ @@ -630,13 +641,17 @@
GlStateManager.func_179128_n(5888); GlStateManager.func_179128_n(5888);
GlStateManager.func_179096_D(); GlStateManager.func_179096_D();
this.field_78531_r.field_195558_d.func_198094_a(); this.field_78531_r.field_195558_d.func_198094_a();
@ -70,24 +69,23 @@
try { try {
- this.field_78531_r.field_71462_r.func_73863_a(i, j, this.field_78531_r.func_193989_ak()); - this.field_78531_r.field_71462_r.func_73863_a(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 crashreport = CrashReport.func_85055_a(throwable, "Rendering screen"); CrashReport crashreport = CrashReport.func_85055_a(throwable, "Rendering screen");
CrashReportCategory crashreportcategory = crashreport.func_85058_a("Screen render details"); CrashReportCategory crashreportcategory = crashreport.func_85058_a("Screen render details");
@@ -698,9 +712,10 @@ @@ -700,9 +715,9 @@
ItemStack itemstack = ((EntityPlayer)entity).func_184614_ca(); ItemStack itemstack = ((EntityPlayer)entity).func_184614_ca();
if (this.field_78531_r.field_71476_x != null && this.field_78531_r.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) { if (this.field_78531_r.field_71476_x != null && this.field_78531_r.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK) {
BlockPos blockpos = this.field_78531_r.field_71476_x.func_178782_a(); BlockPos blockpos = this.field_78531_r.field_71476_x.func_178782_a();
- Block block = this.field_78531_r.field_71441_e.func_180495_p(blockpos).func_177230_c(); - Block block = this.field_78531_r.field_71441_e.func_180495_p(blockpos).func_177230_c();
+ IBlockState state = this.field_78531_r.field_71441_e.func_180495_p(blockpos); + IBlockState state = this.field_78531_r.field_71441_e.func_180495_p(blockpos);
+ Block block = state.func_177230_c();
if (this.field_78531_r.field_71442_b.func_178889_l() == GameType.SPECTATOR) { if (this.field_78531_r.field_71442_b.func_178889_l() == GameType.SPECTATOR) {
- flag = block.func_149716_u() && this.field_78531_r.field_71441_e.func_175625_s(blockpos) instanceof IInventory; - flag = block.func_149716_u() && this.field_78531_r.field_71441_e.func_175625_s(blockpos) instanceof IInventory;
+ flag = block.hasTileEntity(state) && this.field_78531_r.field_71441_e.func_175625_s(blockpos) instanceof IInventory; + flag = state.hasTileEntity() && this.field_78531_r.field_71441_e.func_175625_s(blockpos) instanceof IInventory;
} else { } else {
BlockWorldState blockworldstate = new BlockWorldState(this.field_78531_r.field_71441_e, blockpos, false); BlockWorldState blockworldstate = new BlockWorldState(this.field_78531_r.field_71441_e, blockpos, false);
flag = !itemstack.func_190926_b() && (itemstack.func_206848_a(this.field_78531_r.field_71441_e.func_205772_D(), blockworldstate) || itemstack.func_206847_b(this.field_78531_r.field_71441_e.func_205772_D(), blockworldstate)); flag = !itemstack.func_190926_b() && (itemstack.func_206848_a(this.field_78531_r.field_71441_e.func_205772_D(), blockworldstate) || itemstack.func_206847_b(this.field_78531_r.field_71441_e.func_205772_D(), blockworldstate));
@@ -738,7 +753,7 @@ @@ -740,7 +755,7 @@
GlStateManager.func_179086_m(16640); GlStateManager.func_179086_m(16640);
this.field_78531_r.field_71424_I.func_76318_c("camera"); this.field_78531_r.field_71424_I.func_76318_c("camera");
this.func_195460_g(p_181560_1_); this.func_195460_g(p_181560_1_);
@ -96,45 +94,45 @@
this.field_78531_r.field_71424_I.func_76318_c("frustum"); this.field_78531_r.field_71424_I.func_76318_c("frustum");
ClippingHelperImpl.func_78558_a(); ClippingHelperImpl.func_78558_a();
this.field_78531_r.field_71424_I.func_76318_c("culling"); this.field_78531_r.field_71424_I.func_76318_c("culling");
@@ -782,7 +797,9 @@ @@ -784,7 +799,9 @@
GlStateManager.func_179118_c(); GlStateManager.func_179118_c();
renderglobal.func_195464_a(BlockRenderLayer.SOLID, (double)p_181560_1_, entity); worldrenderer.func_195464_a(BlockRenderLayer.SOLID, (double)p_181560_1_, entity);
GlStateManager.func_179141_d(); GlStateManager.func_179141_d();
+ this.field_78531_r.func_110434_K().func_110581_b(TextureMap.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 + this.field_78531_r.func_110434_K().func_110581_b(TextureMap.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
renderglobal.func_195464_a(BlockRenderLayer.CUTOUT_MIPPED, (double)p_181560_1_, entity); worldrenderer.func_195464_a(BlockRenderLayer.CUTOUT_MIPPED, (double)p_181560_1_, entity);
+ this.field_78531_r.func_110434_K().func_110581_b(TextureMap.field_110575_b).func_174935_a(); + this.field_78531_r.func_110434_K().func_110581_b(TextureMap.field_110575_b).func_174935_a();
this.field_78531_r.func_110434_K().func_110581_b(TextureMap.field_110575_b).func_174936_b(false, false); this.field_78531_r.func_110434_K().func_110581_b(TextureMap.field_110575_b).func_174936_b(false, false);
renderglobal.func_195464_a(BlockRenderLayer.CUTOUT, (double)p_181560_1_, entity); worldrenderer.func_195464_a(BlockRenderLayer.CUTOUT, (double)p_181560_1_, entity);
this.field_78531_r.func_110434_K().func_110581_b(TextureMap.field_110575_b).func_174935_a(); this.field_78531_r.func_110434_K().func_110581_b(TextureMap.field_110575_b).func_174935_a();
@@ -793,7 +810,9 @@ @@ -795,7 +812,9 @@
GlStateManager.func_179094_E(); GlStateManager.func_179094_E();
RenderHelper.func_74519_b(); RenderHelper.func_74519_b();
this.field_78531_r.field_71424_I.func_76318_c("entities"); this.field_78531_r.field_71424_I.func_76318_c("entities");
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0); + net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
renderglobal.func_180446_a(entity, icamera, p_181560_1_); worldrenderer.func_180446_a(entity, icamera, p_181560_1_);
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0); + net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
RenderHelper.func_74518_a(); RenderHelper.func_74518_a();
this.func_175072_h(); this.func_175072_h();
GlStateManager.func_179128_n(5888); GlStateManager.func_179128_n(5888);
@@ -802,6 +821,7 @@ @@ -804,6 +823,7 @@
EntityPlayer entityplayer = (EntityPlayer)entity; EntityPlayer entityplayer = (EntityPlayer)entity;
GlStateManager.func_179118_c(); GlStateManager.func_179118_c();
this.field_78531_r.field_71424_I.func_76318_c("outline"); this.field_78531_r.field_71424_I.func_76318_c("outline");
+ if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, field_78531_r.field_71476_x, 0, p_181560_1_)) + if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(worldrenderer, entityplayer, field_78531_r.field_71476_x, 0, p_181560_1_))
renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_181560_1_); worldrenderer.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_181560_1_);
GlStateManager.func_179141_d(); GlStateManager.func_179141_d();
} }
@@ -852,6 +872,9 @@ @@ -854,6 +874,9 @@
this.func_195456_a(renderglobal, p_181560_1_, d0, d1, d2); this.func_195456_a(worldrenderer, p_181560_1_, d0, d1, d2);
} }
+ this.field_78531_r.field_71424_I.func_76318_c("forge_render_last"); + this.field_78531_r.field_71424_I.func_76318_c("forge_render_last");
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(renderglobal, p_181560_1_); + net.minecraftforge.client.ForgeHooksClient.dispatchRenderLast(worldrenderer, p_181560_1_);
+ +
this.field_78531_r.field_71424_I.func_76318_c("hand"); this.field_78531_r.field_71424_I.func_76318_c("hand");
if (this.field_175074_C) { if (this.field_175074_C) {
GlStateManager.func_179086_m(256); GlStateManager.func_179086_m(256);
@@ -955,6 +978,11 @@ @@ -957,6 +980,11 @@
} }
protected void func_78474_d(float p_78474_1_) { protected void func_78474_d(float p_78474_1_) {
@ -146,7 +144,7 @@
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_); float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
if (!(f <= 0.0F)) { if (!(f <= 0.0F)) {
this.func_180436_i(); this.func_180436_i();
@@ -1182,4 +1210,9 @@ @@ -1184,4 +1212,9 @@
public float func_205001_m() { public float func_205001_m() {
return this.field_78530_s; return this.field_78530_s;
} }

View file

@ -1,22 +1,22 @@
--- a/net/minecraft/client/renderer/ItemRenderer.java --- a/net/minecraft/client/renderer/ItemRenderer.java
+++ b/net/minecraft/client/renderer/ItemRenderer.java +++ b/net/minecraft/client/renderer/ItemRenderer.java
@@ -49,13 +49,14 @@ @@ -50,13 +50,14 @@
public ItemRenderer(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_) { public ItemRenderer(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_) {
this.field_175057_n = p_i46552_1_; this.field_175057_n = p_i46552_1_;
- this.field_175059_m = new ItemModelMesher(p_i46552_2_); - this.field_175059_m = new ItemModelMesher(p_i46552_2_);
+ this.field_175059_m = new net.minecraftforge.client.ItemModelMesherForge(p_i46552_2_); + this.field_175059_m = new net.minecraftforge.client.ItemModelMesherForge(p_i46552_2_);
for(Item item : Item.field_150901_e) { for(Item item : IRegistry.field_212630_s) {
if (!field_195411_c.contains(item)) { if (!field_195411_c.contains(item)) {
this.field_175059_m.func_199311_a(item, new ModelResourceLocation(Item.field_150901_e.func_177774_c(item), "inventory")); this.field_175059_m.func_199311_a(item, new ModelResourceLocation(IRegistry.field_212630_s.func_177774_c(item), "inventory"));
} }
} }
+ net.minecraftforge.client.model.ModelLoader.onRegisterItems(this.field_175059_m); + net.minecraftforge.client.model.ModelLoader.onRegisterItems(this.field_175059_m);
this.field_184395_f = p_i46552_3_; this.field_184395_f = p_i46552_3_;
} }
@@ -96,7 +97,7 @@ @@ -97,7 +98,7 @@
if (p_180454_2_.func_188618_c()) { if (p_180454_2_.func_188618_c()) {
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.func_179091_B(); GlStateManager.func_179091_B();
@ -25,7 +25,7 @@
} else { } else {
this.func_191961_a(p_180454_2_, p_180454_1_); this.func_191961_a(p_180454_2_, p_180454_1_);
if (p_180454_1_.func_77962_s()) { if (p_180454_1_.func_77962_s()) {
@@ -162,7 +163,7 @@ @@ -163,7 +164,7 @@
k = k | -16777216; k = k | -16777216;
} }
@ -34,7 +34,7 @@
} }
} }
@@ -223,11 +224,8 @@ @@ -224,11 +225,8 @@
GlStateManager.func_179147_l(); GlStateManager.func_179147_l();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.func_179094_E(); GlStateManager.func_179094_E();
@ -48,7 +48,7 @@
this.func_180454_a(p_184394_1_, p_184394_2_); this.func_180454_a(p_184394_1_, p_184394_2_);
GlStateManager.func_187407_a(GlStateManager.CullFace.BACK); GlStateManager.func_187407_a(GlStateManager.CullFace.BACK);
@@ -258,7 +256,7 @@ @@ -259,7 +257,7 @@
GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
this.func_180452_a(p_191962_2_, p_191962_3_, p_191962_4_.func_177556_c()); this.func_180452_a(p_191962_2_, p_191962_3_, p_191962_4_.func_177556_c());
@ -57,7 +57,7 @@
this.func_180454_a(p_191962_1_, p_191962_4_); this.func_180454_a(p_191962_1_, p_191962_4_);
GlStateManager.func_179118_c(); GlStateManager.func_179118_c();
GlStateManager.func_179101_C(); GlStateManager.func_179101_C();
@@ -297,6 +295,7 @@ @@ -298,6 +296,7 @@
crashreportcategory.func_189529_a("Item Type", () -> { crashreportcategory.func_189529_a("Item Type", () -> {
return String.valueOf((Object)p_184391_2_.func_77973_b()); return String.valueOf((Object)p_184391_2_.func_77973_b());
}); });
@ -65,8 +65,8 @@
crashreportcategory.func_189529_a("Item Damage", () -> { crashreportcategory.func_189529_a("Item Damage", () -> {
return String.valueOf(p_184391_2_.func_77952_i()); return String.valueOf(p_184391_2_.func_77952_i());
}); });
@@ -327,9 +326,12 @@ @@ -329,9 +328,12 @@
p_180453_1_.func_175063_a(s, (float)(p_180453_3_ + 19 - 2 - p_180453_1_.func_78256_a(s)), (float)(p_180453_4_ + 6 + 3), 16777215); GlStateManager.func_179147_l();
GlStateManager.func_179145_e(); GlStateManager.func_179145_e();
GlStateManager.func_179126_j(); GlStateManager.func_179126_j();
+ // Fixes opaque cooldown overlay a bit lower + // Fixes opaque cooldown overlay a bit lower
@ -79,7 +79,7 @@
GlStateManager.func_179140_f(); GlStateManager.func_179140_f();
GlStateManager.func_179097_i(); GlStateManager.func_179097_i();
GlStateManager.func_179090_x(); GlStateManager.func_179090_x();
@@ -337,11 +339,9 @@ @@ -339,11 +341,9 @@
GlStateManager.func_179084_k(); GlStateManager.func_179084_k();
Tessellator tessellator = Tessellator.func_178181_a(); Tessellator tessellator = Tessellator.func_178181_a();
BufferBuilder bufferbuilder = tessellator.func_178180_c(); BufferBuilder bufferbuilder = tessellator.func_178180_c();
@ -94,7 +94,7 @@
this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255); this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255);
this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255); this.func_181565_a(bufferbuilder, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255);
GlStateManager.func_179147_l(); GlStateManager.func_179147_l();
@@ -380,4 +380,9 @@ @@ -382,4 +382,9 @@
public void func_195410_a(IResourceManager p_195410_1_) { public void func_195410_a(IResourceManager p_195410_1_) {
this.field_175059_m.func_178085_b(); this.field_175059_m.func_178085_b();
} }

View file

@ -1,14 +1,13 @@
--- a/net/minecraft/client/renderer/LightTexture.java --- a/net/minecraft/client/renderer/LightTexture.java
+++ b/net/minecraft/client/renderer/LightTexture.java +++ b/net/minecraft/client/renderer/LightTexture.java
@@ -110,7 +110,16 @@ @@ -112,6 +112,15 @@
f11 = 0.28F + f8 * 0.75F;
f12 = 0.25F + f9 * 0.75F; f12 = 0.25F + f9 * 0.75F;
} }
+
+ float[] colors = {f10, f11, f12}; + float[] colors = {f10, f11, f12};
+ world.func_201675_m().getLightmapColors(p_205106_1_, f, f4, f5, colors); + world.func_201675_m().getLightmapColors(p_205106_1_, f, f4, f5, colors);
+ f10 = colors[0]; f11 = colors[1]; f12 = colors[2]; + f10 = colors[0]; f11 = colors[1]; f12 = colors[2];
+
+ // Forge: fix MC-58177 + // Forge: fix MC-58177
+ f10 = net.minecraft.util.math.MathHelper.func_76131_a(f10, 0f, 1f); + f10 = net.minecraft.util.math.MathHelper.func_76131_a(f10, 0f, 1f);
+ f11 = net.minecraft.util.math.MathHelper.func_76131_a(f11, 0f, 1f); + f11 = net.minecraft.util.math.MathHelper.func_76131_a(f11, 0f, 1f);

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/RenderGlobal.java --- a/net/minecraft/client/renderer/WorldRenderer.java
+++ b/net/minecraft/client/renderer/RenderGlobal.java +++ b/net/minecraft/client/renderer/WorldRenderer.java
@@ -507,7 +507,9 @@ @@ -507,7 +507,9 @@
} }
@ -14,7 +14,7 @@
this.field_72769_h.field_72984_F.func_76320_a("prepare"); this.field_72769_h.field_72984_F.func_76320_a("prepare");
TileEntityRendererDispatcher.field_147556_a.func_190056_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_71476_x, p_180446_3_); TileEntityRendererDispatcher.field_147556_a.func_190056_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_71476_x, p_180446_3_);
this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_180446_3_); this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_180446_3_);
+ if(pass == 0) { + if (pass == 0) {
this.field_72748_H = 0; this.field_72748_H = 0;
this.field_72749_I = 0; this.field_72749_I = 0;
this.field_72750_J = 0; this.field_72750_J = 0;
@ -22,12 +22,12 @@
Entity entity = this.field_72777_q.func_175606_aa(); Entity entity = this.field_72777_q.func_175606_aa();
double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_; double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_;
double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_; double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_;
@@ -530,10 +534,12 @@ @@ -529,10 +533,12 @@
this.field_175010_j.func_178628_a(d3, d4, d5);
this.field_72777_q.field_71460_t.func_180436_i(); this.field_72777_q.field_71460_t.func_180436_i();
this.field_72769_h.field_72984_F.func_76318_c("global"); this.field_72769_h.field_72984_F.func_76318_c("global");
List<Entity> list = this.field_72769_h.func_72910_y();
+ if (pass == 0) { + if (pass == 0) {
this.field_72748_H = list.size(); this.field_72748_H = this.field_72769_h.func_212419_R();
- -
+ } + }
for(int i = 0; i < this.field_72769_h.field_73007_j.size(); ++i) { for(int i = 0; i < this.field_72769_h.field_73007_j.size(); ++i) {
@ -36,36 +36,37 @@
++this.field_72749_I; ++this.field_72749_I;
if (entity1.func_145770_h(d0, d1, d2)) { if (entity1.func_145770_h(d0, d1, d2)) {
this.field_175010_j.func_188388_a(entity1, p_180446_3_, false); this.field_175010_j.func_188388_a(entity1, p_180446_3_, false);
@@ -550,6 +556,7 @@ @@ -549,6 +555,7 @@
ClassInheritanceMultiMap<Entity> classinheritancemultimap = chunk.func_177429_s()[renderglobal$containerlocalrenderinformation.field_178036_a.func_178568_j().func_177956_o() / 16]; ClassInheritanceMultiMap<Entity> classinheritancemultimap = chunk.func_177429_s()[worldrenderer$containerlocalrenderinformation.field_178036_a.func_178568_j().func_177956_o() / 16];
if (!classinheritancemultimap.isEmpty()) { if (!classinheritancemultimap.isEmpty()) {
for(Entity entity2 : classinheritancemultimap) { for(Entity entity2 : classinheritancemultimap) {
+ if(!entity2.shouldRenderInPass(pass)) continue; + if (!entity2.shouldRenderInPass(pass)) continue;
boolean flag = this.field_175010_j.func_178635_a(entity2, p_180446_2_, d0, d1, d2) || entity2.func_184215_y(this.field_72777_q.field_71439_g); boolean flag = this.field_175010_j.func_178635_a(entity2, p_180446_2_, d0, d1, d2) || entity2.func_184215_y(this.field_72777_q.field_71439_g);
if (flag) { if (flag) {
boolean flag1 = this.field_72777_q.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_72777_q.func_175606_aa()).func_70608_bn(); boolean flag1 = this.field_72777_q.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_72777_q.func_175606_aa()).func_70608_bn();
@@ -576,6 +583,7 @@ @@ -575,7 +582,7 @@
} }
} }
+ if(pass == 0) - if (this.func_174985_d() && (!list.isEmpty() || this.field_184386_ad)) {
if (this.func_174985_d() && (!list1.isEmpty() || this.field_184386_ad)) { + if (pass == 0 && this.func_174985_d() && (!list.isEmpty() || this.field_184386_ad)) {
this.field_72769_h.field_72984_F.func_76318_c("entityOutlines"); this.field_72769_h.field_72984_F.func_76318_c("entityOutlines");
this.field_175015_z.func_147614_f(); this.field_175015_z.func_147614_f();
@@ -611,10 +619,12 @@ this.field_184386_ad = !list.isEmpty();
@@ -610,10 +617,12 @@
this.field_72769_h.field_72984_F.func_76318_c("blockentities"); this.field_72769_h.field_72984_F.func_76318_c("blockentities");
RenderHelper.func_74519_b(); RenderHelper.func_74519_b();
+ TileEntityRendererDispatcher.field_147556_a.preDrawBatch(); + TileEntityRendererDispatcher.field_147556_a.preDrawBatch();
for(RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation1 : this.field_72755_R) { for(WorldRenderer.ContainerLocalRenderInformation worldrenderer$containerlocalrenderinformation1 : this.field_72755_R) {
List<TileEntity> list3 = renderglobal$containerlocalrenderinformation1.field_178036_a.func_178571_g().func_178485_b(); List<TileEntity> list2 = worldrenderer$containerlocalrenderinformation1.field_178036_a.func_178571_g().func_178485_b();
if (!list3.isEmpty()) { if (!list2.isEmpty()) {
for(TileEntity tileentity1 : list3) { for(TileEntity tileentity1 : list2) {
+ if (!tileentity1.shouldRenderInPass(pass) || !p_180446_2_.func_78546_a(tileentity1.getRenderBoundingBox())) continue; + if (!tileentity1.shouldRenderInPass(pass) || !p_180446_2_.func_78546_a(tileentity1.getRenderBoundingBox())) continue;
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity1, p_180446_3_, -1); TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity1, p_180446_3_, -1);
} }
} }
@@ -622,16 +632,18 @@ @@ -621,16 +630,18 @@
synchronized(this.field_181024_n) { synchronized(this.field_181024_n) {
for(TileEntity tileentity : this.field_181024_n) { for(TileEntity tileentity : this.field_181024_n) {
@ -84,17 +85,17 @@
+ if (iblockstate.hasTileEntity()) { + if (iblockstate.hasTileEntity()) {
TileEntity tileentity2 = this.field_72769_h.func_175625_s(blockpos); TileEntity tileentity2 = this.field_72769_h.func_175625_s(blockpos);
if (tileentity2 instanceof TileEntityChest && iblockstate.func_177229_b(BlockChest.field_196314_b) == ChestType.LEFT) { if (tileentity2 instanceof TileEntityChest && iblockstate.func_177229_b(BlockChest.field_196314_b) == ChestType.LEFT) {
blockpos = blockpos.func_177972_a(((EnumFacing)iblockstate.func_177229_b(BlockChest.field_176459_a)).func_176746_e()); blockpos = blockpos.func_177972_a(iblockstate.func_177229_b(BlockChest.field_176459_a).func_176746_e());
@@ -767,7 +779,7 @@ @@ -766,7 +777,7 @@
for(int j = -this.field_72739_F; j <= this.field_72739_F; ++j) { for(int j = -this.field_72739_F; j <= this.field_72739_F; ++j) {
for(int k = -this.field_72739_F; k <= this.field_72739_F; ++k) { for(int k = -this.field_72739_F; k <= this.field_72739_F; ++k) {
RenderChunk renderchunk1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8)); RenderChunk renderchunk1 = this.field_175008_n.func_178161_a(new BlockPos((j << 4) + 8, i, (k << 4) + 8));
- if (renderchunk1 != null && p_195473_3_.func_78546_a(renderchunk1.field_178591_c)) { - if (renderchunk1 != null && p_195473_3_.func_78546_a(renderchunk1.field_178591_c)) {
+ if (renderchunk1 != null && p_195473_3_.func_78546_a(renderchunk1.field_178591_c.func_72321_a(0.0, blockpos1.func_177956_o() > 0 ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY, 0.0))) { // Forge: fix MC-73139 + if (renderchunk1 != null && p_195473_3_.func_78546_a(renderchunk1.field_178591_c.func_72321_a(0.0, blockpos1.func_177956_o() > 0 ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY, 0.0))) { // Forge: fix MC-73139
renderchunk1.func_178577_a(p_195473_4_); renderchunk1.func_178577_a(p_195473_4_);
queue.add(new RenderGlobal.ContainerLocalRenderInformation(renderchunk1, (EnumFacing)null, 0)); queue.add(new WorldRenderer.ContainerLocalRenderInformation(renderchunk1, (EnumFacing)null, 0));
} }
@@ -812,7 +824,7 @@ @@ -811,7 +822,7 @@
this.field_147595_R = true; this.field_147595_R = true;
BlockPos blockpos2 = renderchunk4.func_178568_j().func_177982_a(8, 8, 8); BlockPos blockpos2 = renderchunk4.func_178568_j().func_177982_a(8, 8, 8);
boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D; boolean flag3 = blockpos2.func_177951_i(blockpos1) < 768.0D;
@ -103,7 +104,7 @@
this.field_175009_l.add(renderchunk4); this.field_175009_l.add(renderchunk4);
} else { } else {
this.field_72777_q.field_71424_I.func_76320_a("build near"); this.field_72777_q.field_71424_I.func_76320_a("build near");
@@ -1032,6 +1044,12 @@ @@ -1031,6 +1042,11 @@
} }
public void func_195465_a(float p_195465_1_) { public void func_195465_a(float p_195465_1_) {
@ -112,11 +113,10 @@
+ renderer.render(p_195465_1_, field_72769_h, field_72777_q); + renderer.render(p_195465_1_, field_72769_h, field_72777_q);
+ return; + return;
+ } + }
+ if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p() == DimensionType.THE_END) {
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p().func_186068_a() == 1) {
this.func_180448_r(); this.func_180448_r();
} else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) { } else if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
@@ -1176,6 +1194,7 @@ @@ -1175,6 +1191,7 @@
} }
public void func_195466_a(float p_195466_1_, double p_195466_2_, double p_195466_4_, double p_195466_6_) { public void func_195466_a(float p_195466_1_, double p_195466_2_, double p_195466_4_, double p_195466_6_) {
@ -124,7 +124,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) { if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d()) {
float f = 12.0F; float f = 12.0F;
float f1 = 4.0F; float f1 = 4.0F;
@@ -1552,7 +1571,11 @@ @@ -1551,7 +1568,11 @@
DestroyBlockProgress destroyblockprogress = iterator.next(); DestroyBlockProgress destroyblockprogress = iterator.next();
BlockPos blockpos = destroyblockprogress.func_180246_b(); BlockPos blockpos = destroyblockprogress.func_180246_b();
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c(); Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
@ -137,16 +137,36 @@
double d3 = (double)blockpos.func_177958_n() - d0; double d3 = (double)blockpos.func_177958_n() - d0;
double d4 = (double)blockpos.func_177956_o() - d1; double d4 = (double)blockpos.func_177956_o() - d1;
double d5 = (double)blockpos.func_177952_p() - d2; double d5 = (double)blockpos.func_177952_p() - d2;
@@ -2006,7 +2029,7 @@ @@ -1559,7 +1580,7 @@
iterator.remove();
} else {
IBlockState iblockstate = this.field_72769_h.func_180495_p(blockpos);
- if (!iblockstate.func_196958_f()) {
+ if (!iblockstate.isAir(field_72769_h, blockpos)) {
int i = destroyblockprogress.func_73106_e();
TextureAtlasSprite textureatlassprite = this.field_94141_F[i];
BlockRendererDispatcher blockrendererdispatcher = this.field_72777_q.func_175602_ab();
@@ -1580,7 +1601,7 @@
if (p_72731_3_ == 0 && p_72731_2_.field_72313_a == RayTraceResult.Type.BLOCK) {
BlockPos blockpos = p_72731_2_.func_178782_a();
IBlockState iblockstate = this.field_72769_h.func_180495_p(blockpos);
- if (!iblockstate.func_196958_f() && this.field_72769_h.func_175723_af().func_177746_a(blockpos)) {
+ if (!iblockstate.isAir(field_72769_h, blockpos) && this.field_72769_h.func_175723_af().func_177746_a(blockpos)) {
GlStateManager.func_179147_l();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.func_187441_d(Math.max(2.5F, (float)this.field_72777_q.field_195558_d.func_198109_k() / 1920.0F * 2.5F));
@@ -2006,8 +2027,8 @@
break;
case 2001: case 2001:
IBlockState iblockstate = Block.func_196257_b(p_180439_4_); IBlockState iblockstate = Block.func_196257_b(p_180439_4_);
if (!iblockstate.func_196958_f()) { - if (!iblockstate.func_196958_f()) {
- SoundType soundtype = iblockstate.func_177230_c().func_185467_w(); - SoundType soundtype = iblockstate.func_177230_c().func_185467_w();
+ SoundType soundtype = iblockstate.func_177230_c().getSoundType(iblockstate, field_72769_h, p_180439_3_, null); + if (!iblockstate.isAir(field_72769_h, p_180439_3_)) {
+ SoundType soundtype = iblockstate.getSoundType(field_72769_h, p_180439_3_, null);
this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false); this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false);
} }
@@ -2126,6 +2149,11 @@ @@ -2127,6 +2148,11 @@
} }
} }

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/client/renderer/block/model/ModelBakery.java
+++ b/net/minecraft/client/renderer/block/model/ModelBakery.java
@@ -200,7 +200,7 @@
flag = true;
lvt_9_4_ = (List)this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_209591_1_) -> {
try (InputStream inputstream = p_209591_1_.func_199027_b()) {
- Pair pair1 = Pair.of(p_209591_1_.func_199026_d(), ModelBlockDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
+ Pair pair1 = Pair.of(p_209591_1_.func_199026_d(), ModelBlockDefinition.parseFromReader(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
return pair1;
} catch (Exception exception1) {
throw new ModelBakery.BlockStateDefinitionException(String.format("Exception loading blockstate definition: '%s' in resourcepack: '%s': %s", p_209591_1_.func_199029_a(), p_209591_1_.func_199026_d(), exception1.getMessage()));

View file

@ -1,18 +0,0 @@
--- a/net/minecraft/client/renderer/block/model/ModelBlockDefinition.java
+++ b/net/minecraft/client/renderer/block/model/ModelBlockDefinition.java
@@ -30,9 +30,14 @@
private final Map<String, VariantList> field_178332_b = Maps.<String, VariantList>newLinkedHashMap();
private Multipart field_188005_c;
+ @Deprecated
public static ModelBlockDefinition func_209577_a(ModelBlockDefinition.ContainerHolder p_209577_0_, Reader p_209577_1_) {
- return (ModelBlockDefinition)JsonUtils.func_193839_a(p_209577_0_.field_209575_a, p_209577_1_, ModelBlockDefinition.class);
+ return parseFromReader(p_209577_0_, p_209577_1_, null);
}
+
+ public static ModelBlockDefinition parseFromReader(ModelBlockDefinition.ContainerHolder containerHolder, Reader reader, net.minecraft.util.ResourceLocation location) {
+ return net.minecraftforge.client.model.BlockStateLoader.load(reader, location, containerHolder.field_209575_a);
+ }
public ModelBlockDefinition(Map<String, VariantList> p_i46572_1_, Multipart p_i46572_2_) {
this.field_188005_c = p_i46572_2_;

View file

@ -1,33 +1,33 @@
--- a/net/minecraft/client/renderer/chunk/RenderChunk.java --- a/net/minecraft/client/renderer/chunk/RenderChunk.java
+++ b/net/minecraft/client/renderer/chunk/RenderChunk.java +++ b/net/minecraft/client/renderer/chunk/RenderChunk.java
@@ -37,7 +37,7 @@ @@ -36,7 +36,7 @@
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
-public class RenderChunk { -public class RenderChunk {
+public class RenderChunk implements net.minecraftforge.client.extensions.IForgeRenderChunk { +public class RenderChunk implements net.minecraftforge.client.extensions.IForgeRenderChunk {
private volatile World field_178588_d; private volatile World field_178588_d;
private final RenderGlobal field_178589_e; private final WorldRenderer field_178589_e;
public static int field_178592_a; public static int field_178592_a;
@@ -128,7 +128,8 @@ @@ -125,7 +125,8 @@
p_178581_4_.func_178540_f().unlock(); p_178581_4_.func_178540_f().unlock();
} }
- ChunkCache lvt_10_1_ = new ChunkCache(world, blockpos.func_177982_a(-1, -1, -1), blockpos.func_177982_a(16, 16, 16), 1); - RenderChunkCache lvt_10_1_ = RenderChunkCache.func_212397_a(world, blockpos.func_177982_a(-1, -1, -1), blockpos.func_177982_a(16, 16, 16), 1);
+ ChunkCache lvt_10_1_ = createRegionRenderCache(this.field_178588_d, blockpos.func_177982_a(-1, -1, -1), blockpos.func_177982_a(16, 16, 16), 1); + RenderChunkCache lvt_10_1_ = createRegionRenderCache(world, blockpos.func_177982_a(-1, -1, -1), blockpos.func_177982_a(16, 16, 16), 1);
+ net.minecraftforge.client.MinecraftForgeClient.onRebuildChunk(this.field_178588_d, this.field_178586_f, lvt_10_1_); + net.minecraftforge.client.MinecraftForgeClient.onRebuildChunk(this.field_178588_d, this.field_178586_f, lvt_10_1_);
VisGraph lvt_11_1_ = new VisGraph(); VisGraph lvt_11_1_ = new VisGraph();
HashSet lvt_12_1_ = Sets.newHashSet(); HashSet lvt_12_1_ = Sets.newHashSet();
if (!lvt_10_1_.func_72806_N()) { if (lvt_10_1_ != null) {
@@ -145,22 +146,23 @@ @@ -142,22 +143,23 @@
lvt_11_1_.func_178606_a(blockpos$mutableblockpos); lvt_11_1_.func_178606_a(blockpos$mutableblockpos);
} }
- if (block.func_149716_u()) { - if (block.func_149716_u()) {
+ if (block.hasTileEntity(iblockstate)) { + if (iblockstate.hasTileEntity()) {
TileEntity tileentity = lvt_10_1_.func_190300_a(blockpos$mutableblockpos, Chunk.EnumCreateEntityType.CHECK); TileEntity tileentity = lvt_10_1_.func_212399_a(blockpos$mutableblockpos, Chunk.EnumCreateEntityType.CHECK);
if (tileentity != null) { if (tileentity != null) {
TileEntityRenderer<TileEntity> tileentityrenderer = TileEntityRendererDispatcher.field_147556_a.<TileEntity>func_147547_b(tileentity); TileEntityRenderer<TileEntity> tileentityrenderer = TileEntityRendererDispatcher.field_147556_a.func_147547_b(tileentity);
if (tileentityrenderer != null) { if (tileentityrenderer != null) {
- compiledchunk.func_178490_a(tileentity); - compiledchunk.func_178490_a(tileentity);
if (tileentityrenderer.func_188185_a(tileentity)) { if (tileentityrenderer.func_188185_a(tileentity)) {
@ -37,8 +37,7 @@
} }
} }
} }
-
+
IFluidState ifluidstate = lvt_10_1_.func_204610_c(blockpos$mutableblockpos); IFluidState ifluidstate = lvt_10_1_.func_204610_c(blockpos$mutableblockpos);
- if (!ifluidstate.func_206888_e()) { - if (!ifluidstate.func_206888_e()) {
- BlockRenderLayer blockrenderlayer1 = ifluidstate.func_180664_k(); - BlockRenderLayer blockrenderlayer1 = ifluidstate.func_180664_k();
@ -48,7 +47,7 @@
int j = blockrenderlayer1.ordinal(); int j = blockrenderlayer1.ordinal();
BufferBuilder bufferbuilder = p_178581_4_.func_178545_d().func_179039_a(j); BufferBuilder bufferbuilder = p_178581_4_.func_178545_d().func_179039_a(j);
if (!compiledchunk.func_178492_d(blockrenderlayer1)) { if (!compiledchunk.func_178492_d(blockrenderlayer1)) {
@@ -171,17 +173,18 @@ @@ -168,17 +170,18 @@
aboolean[j] |= blockrendererdispatcher.func_205318_a(blockpos$mutableblockpos, lvt_10_1_, bufferbuilder, ifluidstate); aboolean[j] |= blockrendererdispatcher.func_205318_a(blockpos$mutableblockpos, lvt_10_1_, bufferbuilder, ifluidstate);
} }

View file

@ -1,16 +1,16 @@
--- a/net/minecraft/client/renderer/color/BlockColors.java --- a/net/minecraft/client/renderer/color/BlockColors.java
+++ b/net/minecraft/client/renderer/color/BlockColors.java +++ b/net/minecraft/client/renderer/color/BlockColors.java
@@ -21,7 +21,8 @@ @@ -22,7 +22,8 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class BlockColors { public class BlockColors {
- private final ObjectIntIdentityMap<IBlockColor> field_186725_a = new ObjectIntIdentityMap<IBlockColor>(32); - private final ObjectIntIdentityMap<IBlockColor> field_186725_a = new ObjectIntIdentityMap<>(32);
+ // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant + // FORGE: Use RegistryDelegates as non-Vanilla block ids are not constant
+ private final java.util.Map<net.minecraftforge.registries.IRegistryDelegate<Block>, IBlockColor> field_186725_a = new java.util.HashMap<>(); + private final java.util.Map<net.minecraftforge.registries.IRegistryDelegate<Block>, IBlockColor> field_186725_a = new java.util.HashMap<>();
public static BlockColors func_186723_a() { public static BlockColors func_186723_a() {
BlockColors blockcolors = new BlockColors(); BlockColors blockcolors = new BlockColors();
@@ -62,11 +63,12 @@ @@ -63,11 +64,12 @@
blockcolors.func_186722_a((p_210228_0_, p_210228_1_, p_210228_2_, p_210228_3_) -> { blockcolors.func_186722_a((p_210228_0_, p_210228_1_, p_210228_2_, p_210228_3_) -> {
return p_210228_1_ != null && p_210228_2_ != null ? 2129968 : 7455580; return p_210228_1_ != null && p_210228_2_ != null ? 2129968 : 7455580;
}, Blocks.field_196651_dG); }, Blocks.field_196651_dG);
@ -19,23 +19,23 @@
} }
public int func_189991_a(IBlockState p_189991_1_, World p_189991_2_, BlockPos p_189991_3_) { public int func_189991_a(IBlockState p_189991_1_, World p_189991_2_, BlockPos p_189991_3_) {
- IBlockColor iblockcolor = this.field_186725_a.func_148745_a(Block.field_149771_c.func_148757_b(p_189991_1_.func_177230_c())); - IBlockColor iblockcolor = this.field_186725_a.func_148745_a(IRegistry.field_212618_g.func_148757_b(p_189991_1_.func_177230_c()));
+ IBlockColor iblockcolor = this.field_186725_a.get(p_189991_1_.func_177230_c().delegate); + IBlockColor iblockcolor = this.field_186725_a.get(p_189991_1_.func_177230_c().delegate);
if (iblockcolor != null) { if (iblockcolor != null) {
return iblockcolor.getColor(p_189991_1_, (IWorldReaderBase)null, (BlockPos)null, 0); return iblockcolor.getColor(p_189991_1_, (IWorldReaderBase)null, (BlockPos)null, 0);
} else { } else {
@@ -76,13 +78,13 @@ @@ -77,13 +79,13 @@
} }
public int func_186724_a(IBlockState p_186724_1_, @Nullable IWorldReaderBase p_186724_2_, @Nullable BlockPos p_186724_3_, int p_186724_4_) { public int func_186724_a(IBlockState p_186724_1_, @Nullable IWorldReaderBase p_186724_2_, @Nullable BlockPos p_186724_3_, int p_186724_4_) {
- IBlockColor iblockcolor = this.field_186725_a.func_148745_a(Block.field_149771_c.func_148757_b(p_186724_1_.func_177230_c())); - IBlockColor iblockcolor = this.field_186725_a.func_148745_a(IRegistry.field_212618_g.func_148757_b(p_186724_1_.func_177230_c()));
+ IBlockColor iblockcolor = this.field_186725_a.get(p_186724_1_.func_177230_c().delegate); + IBlockColor iblockcolor = this.field_186725_a.get(p_186724_1_.func_177230_c().delegate);
return iblockcolor == null ? -1 : iblockcolor.getColor(p_186724_1_, p_186724_2_, p_186724_3_, p_186724_4_); return iblockcolor == null ? -1 : iblockcolor.getColor(p_186724_1_, p_186724_2_, p_186724_3_, p_186724_4_);
} }
public void func_186722_a(IBlockColor p_186722_1_, Block... p_186722_2_) { public void func_186722_a(IBlockColor p_186722_1_, Block... p_186722_2_) {
for(Block block : p_186722_2_) { for(Block block : p_186722_2_) {
- this.field_186725_a.func_148746_a(p_186722_1_, Block.field_149771_c.func_148757_b(block)); - this.field_186725_a.func_148746_a(p_186722_1_, IRegistry.field_212618_g.func_148757_b(block));
+ this.field_186725_a.put(block.delegate, p_186722_1_); + this.field_186725_a.put(block.delegate, p_186722_1_);
} }

View file

@ -9,7 +9,7 @@
GlStateManager.func_179094_E(); GlStateManager.func_179094_E();
GlStateManager.func_179109_b(-0.5F, -0.5F, -0.5F); GlStateManager.func_179109_b(-0.5F, -0.5F, -0.5F);
if (this.field_188301_f) { if (this.field_188301_f) {
@@ -87,16 +87,18 @@ @@ -87,17 +87,17 @@
ItemStack itemstack = p_82402_1_.func_82335_i(); ItemStack itemstack = p_82402_1_.func_82335_i();
if (!itemstack.func_190926_b()) { if (!itemstack.func_190926_b()) {
GlStateManager.func_179094_E(); GlStateManager.func_179094_E();
@ -19,10 +19,9 @@
+ int i = mapdata != null ? p_82402_1_.func_82333_j() % 4 * 2 : p_82402_1_.func_82333_j(); + int i = mapdata != null ? p_82402_1_.func_82333_j() % 4 * 2 : p_82402_1_.func_82333_j();
GlStateManager.func_179114_b((float)i * 360.0F / 8.0F, 0.0F, 0.0F, 1.0F); GlStateManager.func_179114_b((float)i * 360.0F / 8.0F, 0.0F, 0.0F, 1.0F);
- if (flag) { - if (flag) {
+ net.minecraftforge.client.event.RenderItemInFrameEvent event = new net.minecraftforge.client.event.RenderItemInFrameEvent(p_82402_1_, this); + if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderItemInFrameEvent(p_82402_1_, this))) {
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
+ {
+ if (mapdata != null) { + if (mapdata != null) {
GlStateManager.func_179140_f();
this.field_76990_c.field_78724_e.func_110577_a(field_110789_a); this.field_76990_c.field_78724_e.func_110577_a(field_110789_a);
GlStateManager.func_179114_b(180.0F, 0.0F, 0.0F, 1.0F); GlStateManager.func_179114_b(180.0F, 0.0F, 0.0F, 1.0F);
float f = 0.0078125F; float f = 0.0078125F;
@ -32,7 +31,7 @@
GlStateManager.func_179109_b(0.0F, 0.0F, -1.0F); GlStateManager.func_179109_b(0.0F, 0.0F, -1.0F);
if (mapdata != null) { if (mapdata != null) {
this.field_147917_g.field_71460_t.func_147701_i().func_148250_a(mapdata, true); this.field_147917_g.field_71460_t.func_147701_i().func_148250_a(mapdata, true);
@@ -105,6 +107,7 @@ @@ -106,6 +106,7 @@
GlStateManager.func_179152_a(0.5F, 0.5F, 0.5F); GlStateManager.func_179152_a(0.5F, 0.5F, 0.5F);
this.field_177074_h.func_181564_a(itemstack, ItemCameraTransforms.TransformType.FIXED); this.field_177074_h.func_181564_a(itemstack, ItemCameraTransforms.TransformType.FIXED);
} }

View file

@ -1,19 +1,20 @@
--- a/net/minecraft/client/renderer/entity/RenderManager.java --- a/net/minecraft/client/renderer/entity/RenderManager.java
+++ b/net/minecraft/client/renderer/entity/RenderManager.java +++ b/net/minecraft/client/renderer/entity/RenderManager.java
@@ -242,7 +242,12 @@ @@ -241,8 +241,13 @@
this.field_178637_m = new RenderPlayer(this); this.field_178637_m = new RenderPlayer(this);
this.field_178636_l.put("default", this.field_178637_m); this.field_178636_l.put("default", this.field_178637_m);
this.field_178636_l.put("slim", new RenderPlayer(this, true)); this.field_178636_l.put("slim", new RenderPlayer(this, true));
+ net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.field_78729_o); + net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.field_78729_o);
} }
+
+ public Map<String, RenderPlayer> getSkinMap() { + public Map<String, RenderPlayer> getSkinMap() {
+ return (Map<String, RenderPlayer>) java.util.Collections.unmodifiableMap(field_178636_l); + return (Map<String, RenderPlayer>) java.util.Collections.unmodifiableMap(field_178636_l);
+ } + }
+
public void func_178628_a(double p_178628_1_, double p_178628_3_, double p_178628_5_) { public void func_178628_a(double p_178628_1_, double p_178628_3_, double p_178628_5_) {
this.field_78725_b = p_178628_1_; this.field_78725_b = p_178628_1_;
@@ -278,10 +283,11 @@ this.field_78726_c = p_178628_3_;
@@ -277,10 +282,11 @@
this.field_147941_i = p_180597_4_; this.field_147941_i = p_180597_4_;
this.field_78736_p = p_180597_2_; this.field_78736_p = p_180597_2_;
if (p_180597_3_ instanceof EntityLivingBase && ((EntityLivingBase)p_180597_3_).func_70608_bn()) { if (p_180597_3_ instanceof EntityLivingBase && ((EntityLivingBase)p_180597_3_).func_70608_bn()) {
@ -22,7 +23,7 @@
+ IBlockState iblockstate = p_180597_1_.func_180495_p(pos); + IBlockState iblockstate = p_180597_1_.func_180495_p(pos);
Block block = iblockstate.func_177230_c(); Block block = iblockstate.func_177230_c();
- if (block instanceof BlockBed) { - if (block instanceof BlockBed) {
- int i = ((EnumFacing)iblockstate.func_177229_b(BlockBed.field_185512_D)).func_176736_b(); - int i = iblockstate.func_177229_b(BlockBed.field_185512_D).func_176736_b();
+ if (block.isBed(iblockstate, p_180597_1_, pos, p_180597_3_)) { + if (block.isBed(iblockstate, p_180597_1_, pos, p_180597_3_)) {
+ int i = block.getBedDirection(iblockstate, p_180597_1_, pos).func_176736_b(); + int i = block.getBedDirection(iblockstate, p_180597_1_, pos).func_176736_b();
this.field_78735_i = (float)(i * 90 + 180); this.field_78735_i = (float)(i * 90 + 180);

View file

@ -16,12 +16,3 @@
} }
private void func_177137_d(AbstractClientPlayer p_177137_1_) { private void func_177137_d(AbstractClientPlayer p_177137_1_) {
@@ -104,6 +106,8 @@
EnumAction enumaction1 = itemstack1.func_77975_n();
if (enumaction1 == EnumAction.BLOCK) {
modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
+ } else if (enumaction1 == EnumAction.BOW) { // FORGE: fix MC-88356 allow offhand to use bow and arrow animation TODO Remove in 1.13.1 - Fixed
+ modelbiped$armpose1 = ModelBiped.ArmPose.BOW_AND_ARROW;
} else if (enumaction1 == EnumAction.SPEAR) {
modelbiped$armpose1 = ModelBiped.ArmPose.THROW_SPEAR;
}

View file

@ -1,14 +1,6 @@
--- a/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java --- a/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java
+++ b/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java +++ b/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java
@@ -2,6 +2,7 @@ @@ -51,12 +51,13 @@
import com.google.common.collect.Maps;
import java.util.Map;
+
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLivingBase;
@@ -50,12 +51,13 @@
ItemArmor itemarmor = (ItemArmor)itemstack.func_77973_b(); ItemArmor itemarmor = (ItemArmor)itemstack.func_77973_b();
if (itemarmor.func_185083_B_() == p_188361_9_) { if (itemarmor.func_185083_B_() == p_188361_9_) {
T t = this.func_188360_a(p_188361_9_); T t = this.func_188360_a(p_188361_9_);
@ -24,7 +16,7 @@
int i = ((ItemArmorDyeable)itemarmor).func_200886_f(itemstack); int i = ((ItemArmorDyeable)itemarmor).func_200886_f(itemstack);
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;
@@ -67,7 +69,7 @@ @@ -68,7 +69,7 @@
GlStateManager.func_179131_c(this.field_177184_f, this.field_177185_g, this.field_177192_h, this.field_177187_e); GlStateManager.func_179131_c(this.field_177184_f, this.field_177185_g, this.field_177192_h, this.field_177187_e);
t.func_78088_a(p_188361_1_, p_188361_2_, p_188361_3_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_); t.func_78088_a(p_188361_1_, p_188361_2_, p_188361_3_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_);
@ -33,7 +25,7 @@
func_188364_a(this.field_177190_a, p_188361_1_, t, p_188361_2_, p_188361_3_, p_188361_4_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_); func_188364_a(this.field_177190_a, p_188361_1_, t, p_188361_2_, p_188361_3_, p_188361_4_, p_188361_5_, p_188361_6_, p_188361_7_, p_188361_8_);
} }
@@ -119,10 +121,12 @@ @@ -120,10 +121,12 @@
Minecraft.func_71410_x().field_71460_t.func_191514_d(false); Minecraft.func_71410_x().field_71460_t.func_191514_d(false);
} }
@ -43,14 +35,14 @@
} }
+ @Deprecated //Use the more sensitive version getArmorResource below + @Deprecated //Use the more sensitive version getArmorResource below
private ResourceLocation func_177178_a(ItemArmor p_177178_1_, boolean p_177178_2_, String p_177178_3_) { private ResourceLocation func_177178_a(ItemArmor p_177178_1_, boolean p_177178_2_, @Nullable String p_177178_3_) {
String s = String.format("textures/models/armor/%s_layer_%d%s.png", p_177178_1_.func_200880_d().func_200897_d(), p_177178_2_ ? 2 : 1, p_177178_3_ == null ? "" : String.format("_%s", p_177178_3_)); String s = "textures/models/armor/" + p_177178_1_.func_200880_d().func_200897_d() + "_layer_" + (p_177178_2_ ? 2 : 1) + (p_177178_3_ == null ? "" : "_" + p_177178_3_) + ".png";
ResourceLocation resourcelocation = field_177191_j.get(s); return field_177191_j.computeIfAbsent(s, ResourceLocation::new);
@@ -137,4 +141,47 @@ @@ -132,4 +135,47 @@
protected abstract void func_177177_a(); protected abstract void func_177177_a();
protected abstract void func_188359_a(T p_188359_1_, EntityEquipmentSlot p_188359_2_); protected abstract void func_188359_a(T p_188359_1_, EntityEquipmentSlot p_188359_2_);
+ +
+ /*=================================== FORGE START =========================================*/ + /*=================================== FORGE START =========================================*/
+ +
+ /** + /**

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/BakedQuad.java --- a/net/minecraft/client/renderer/model/BakedQuad.java
+++ b/net/minecraft/client/renderer/block/model/BakedQuad.java +++ b/net/minecraft/client/renderer/model/BakedQuad.java
@@ -6,13 +6,23 @@ @@ -6,13 +6,23 @@
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java --- a/net/minecraft/client/renderer/model/BakedQuadRetextured.java
+++ b/net/minecraft/client/renderer/block/model/BakedQuadRetextured.java +++ b/net/minecraft/client/renderer/model/BakedQuadRetextured.java
@@ -17,10 +17,15 @@ @@ -17,10 +17,15 @@
private void func_178217_e() { private void func_178217_e() {

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/FaceBakery.java --- a/net/minecraft/client/renderer/model/FaceBakery.java
+++ b/net/minecraft/client/renderer/block/model/FaceBakery.java +++ b/net/minecraft/client/renderer/model/FaceBakery.java
@@ -39,18 +39,23 @@ @@ -39,18 +39,23 @@
}; };

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/IBakedModel.java --- a/net/minecraft/client/renderer/model/IBakedModel.java
+++ b/net/minecraft/client/renderer/block/model/IBakedModel.java +++ b/net/minecraft/client/renderer/model/IBakedModel.java
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -1,15 +1,11 @@
--- a/net/minecraft/client/renderer/block/model/IUnbakedModel.java --- a/net/minecraft/client/renderer/model/IUnbakedModel.java
+++ b/net/minecraft/client/renderer/block/model/IUnbakedModel.java +++ b/net/minecraft/client/renderer/model/IUnbakedModel.java
@@ -8,13 +8,21 @@ @@ -10,11 +10,17 @@
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
+import net.minecraftforge.client.model.IModel;
+import net.minecraftforge.common.model.IModelState;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
-public interface IUnbakedModel { -public interface IUnbakedModel {
+public interface IUnbakedModel extends IModel<IUnbakedModel> { +public interface IUnbakedModel extends net.minecraftforge.client.model.IModel<IUnbakedModel> {
Collection<ResourceLocation> func_187965_e(); Collection<ResourceLocation> func_187965_e();
Collection<ResourceLocation> func_209559_a(Function<ResourceLocation, IUnbakedModel> p_209559_1_, Set<String> p_209559_2_); Collection<ResourceLocation> func_209559_a(Function<ResourceLocation, IUnbakedModel> p_209559_1_, Set<String> p_209559_2_);

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/ItemCameraTransforms.java --- a/net/minecraft/client/renderer/model/ItemCameraTransforms.java
+++ b/net/minecraft/client/renderer/block/model/ItemCameraTransforms.java +++ b/net/minecraft/client/renderer/model/ItemCameraTransforms.java
@@ -12,6 +12,10 @@ @@ -12,6 +12,10 @@
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -1,21 +1,21 @@
--- a/net/minecraft/client/renderer/block/model/ItemOverrideList.java --- a/net/minecraft/client/renderer/model/ItemOverrideList.java
+++ b/net/minecraft/client/renderer/block/model/ItemOverrideList.java +++ b/net/minecraft/client/renderer/model/ItemOverrideList.java
@@ -25,7 +25,8 @@ @@ -25,7 +25,8 @@
this.field_209582_c = Collections.<IBakedModel>emptyList(); this.field_209582_c = Collections.emptyList();
} }
- public ItemOverrideList(ModelBlock p_i49525_1_, Function<ResourceLocation, IUnbakedModel> p_i49525_2_, Function<ResourceLocation, TextureAtlasSprite> p_i49525_3_, List<ItemOverride> p_i49525_4_) { - public ItemOverrideList(ModelBlock p_i49525_1_, Function<ResourceLocation, IUnbakedModel> p_i49525_2_, Function<ResourceLocation, TextureAtlasSprite> p_i49525_3_, List<ItemOverride> p_i49525_4_) {
+ // FORGE: No reason for first param to be limited to ModelBlock + // FORGE: No reason for first param to be limited to ModelBlock
+ public ItemOverrideList(IUnbakedModel p_i49525_1_, Function<ResourceLocation, IUnbakedModel> p_i49525_2_, Function<ResourceLocation, TextureAtlasSprite> p_i49525_3_, List<ItemOverride> p_i49525_4_) { + public ItemOverrideList(IUnbakedModel p_i49525_1_, Function<ResourceLocation, IUnbakedModel> p_i49525_2_, Function<ResourceLocation, TextureAtlasSprite> p_i49525_3_, List<ItemOverride> p_i49525_4_) {
this.field_209582_c = (List)p_i49525_4_.stream().<IBakedModel>map((p_209580_3_) -> { this.field_209582_c = p_i49525_4_.stream().map((p_209580_3_) -> {
IUnbakedModel iunbakedmodel = p_i49525_2_.apply(p_209580_3_.func_188026_a()); IUnbakedModel iunbakedmodel = p_i49525_2_.apply(p_209580_3_.func_188026_a());
return Objects.equals(iunbakedmodel, p_i49525_1_) ? null : iunbakedmodel.func_209558_a(p_i49525_2_, p_i49525_3_, ModelRotation.X0_Y0, false); return Objects.equals(iunbakedmodel, p_i49525_1_) ? null : iunbakedmodel.func_209558_a(p_i49525_2_, p_i49525_3_, ModelRotation.X0_Y0, false);
@@ -56,4 +57,8 @@ @@ -56,4 +57,8 @@
return p_209581_1_; return p_209581_1_;
} }
+ +
+ public com.google.common.collect.ImmutableList<ItemOverride> getOverrides() { + public com.google.common.collect.ImmutableList<ItemOverride> getOverrides() {
+ return com.google.common.collect.ImmutableList.copyOf(field_188023_b); + return com.google.common.collect.ImmutableList.copyOf(field_188023_b);
+ }
} }
+}

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/ItemTransformVec3f.java --- a/net/minecraft/client/renderer/model/ItemTransformVec3f.java
+++ b/net/minecraft/client/renderer/block/model/ItemTransformVec3f.java +++ b/net/minecraft/client/renderer/model/ItemTransformVec3f.java
@@ -12,8 +12,13 @@ @@ -12,8 +12,13 @@
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -0,0 +1,11 @@
--- a/net/minecraft/client/renderer/model/ModelBakery.java
+++ b/net/minecraft/client/renderer/model/ModelBakery.java
@@ -198,7 +198,7 @@
flag = true;
lvt_9_4_ = this.field_177598_f.func_199004_b(resourcelocation1).stream().map((p_209591_1_) -> {
try (InputStream inputstream = p_209591_1_.func_199027_b()) {
- return Pair.of(p_209591_1_.func_199026_d(), ModelBlockDefinition.func_209577_a(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8)));
+ return Pair.of(p_209591_1_.func_199026_d(), ModelBlockDefinition.fromJson(this.field_209610_F, new InputStreamReader(inputstream, StandardCharsets.UTF_8), p_209598_1_));
} catch (Exception exception1) {
throw new ModelBakery.BlockStateDefinitionException(String.format("Exception loading blockstate definition: '%s' in resourcepack: '%s': %s", p_209591_1_.func_199029_a(), p_209591_1_.func_199026_d(), exception1.getMessage()));
}

View file

@ -1,28 +1,6 @@
--- a/net/minecraft/client/renderer/block/model/ModelBlock.java --- a/net/minecraft/client/renderer/model/ModelBlock.java
+++ b/net/minecraft/client/renderer/block/model/ModelBlock.java +++ b/net/minecraft/client/renderer/model/ModelBlock.java
@@ -18,6 +18,7 @@ @@ -79,6 +79,9 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.Optional;
import java.util.Set;
import java.util.Map.Entry;
import java.util.function.Function;
@@ -25,11 +26,13 @@
import javax.annotation.Nullable;
import net.minecraft.client.renderer.texture.MissingTextureSprite;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
+import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
+
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -79,6 +82,9 @@
return this.field_178315_d != null; return this.field_178315_d != null;
} }
@ -32,14 +10,14 @@
public boolean func_178309_b() { public boolean func_178309_b() {
return this.func_178295_k() ? this.field_178315_d.func_178309_b() : this.field_178322_i; return this.func_178295_k() ? this.field_178315_d.func_178309_b() : this.field_178322_i;
} }
@@ -178,14 +184,18 @@ @@ -178,14 +181,18 @@
return set1; return set1;
} }
- public IBakedModel func_209558_a(Function<ResourceLocation, IUnbakedModel> p_209558_1_, Function<ResourceLocation, TextureAtlasSprite> p_209558_2_, ModelRotation p_209558_3_, boolean p_209558_4_) { - public IBakedModel func_209558_a(Function<ResourceLocation, IUnbakedModel> p_209558_1_, Function<ResourceLocation, TextureAtlasSprite> p_209558_2_, ModelRotation p_209558_3_, boolean p_209558_4_) {
- return this.func_209565_a(this, p_209558_1_, p_209558_2_, p_209558_3_, p_209558_4_); - return this.func_209565_a(this, p_209558_1_, p_209558_2_, p_209558_3_, p_209558_4_);
+ @Override + @Override
+ public IBakedModel bake(Function<ResourceLocation, IUnbakedModel> p_209558_1_, Function<ResourceLocation, TextureAtlasSprite> p_209558_2_, net.minecraftforge.common.model.IModelState p_209558_3_, boolean p_209558_4_, VertexFormat format) { + public IBakedModel bake(Function<ResourceLocation, IUnbakedModel> p_209558_1_, Function<ResourceLocation, TextureAtlasSprite> p_209558_2_, net.minecraftforge.common.model.IModelState p_209558_3_, boolean p_209558_4_, net.minecraft.client.renderer.vertex.VertexFormat format) {
+ if (!net.minecraftforge.client.model.Attributes.moreSpecific(format, net.minecraftforge.client.model.Attributes.DEFAULT_BAKED_FORMAT)) { + if (!net.minecraftforge.client.model.Attributes.moreSpecific(format, net.minecraftforge.client.model.Attributes.DEFAULT_BAKED_FORMAT)) {
+ throw new IllegalArgumentException("Cannot bake vanilla model to format other than BLOCK"); + throw new IllegalArgumentException("Cannot bake vanilla model to format other than BLOCK");
} }
@ -55,7 +33,7 @@
} else if (modelblock == ModelBakery.field_177616_r) { } else if (modelblock == ModelBakery.field_177616_r) {
return new BuiltInModel(this.func_181682_g(), this.func_209568_a(p_209565_1_, p_209565_2_, p_209565_3_)); return new BuiltInModel(this.func_181682_g(), this.func_209568_a(p_209565_1_, p_209565_2_, p_209565_3_));
} else { } else {
@@ -197,9 +207,10 @@ @@ -197,9 +204,10 @@
BlockPartFace blockpartface = blockpart.field_178240_c.get(enumfacing); BlockPartFace blockpartface = blockpart.field_178240_c.get(enumfacing);
TextureAtlasSprite textureatlassprite1 = p_209565_3_.apply(new ResourceLocation(this.func_178308_c(blockpartface.field_178242_d))); TextureAtlasSprite textureatlassprite1 = p_209565_3_.apply(new ResourceLocation(this.func_178308_c(blockpartface.field_178242_d)));
if (blockpartface.field_178244_b == null) { if (blockpartface.field_178244_b == null) {
@ -63,12 +41,12 @@
+ simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, p_209565_4_, p_209565_5_)); + simplebakedmodel$builder.func_177648_a(makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, p_209565_4_, p_209565_5_));
} else { } else {
- simplebakedmodel$builder.func_177650_a(p_209565_4_.func_177523_a(blockpartface.field_178244_b), func_209567_a(blockpart, blockpartface, textureatlassprite1, enumfacing, p_209565_4_, p_209565_5_)); - simplebakedmodel$builder.func_177650_a(p_209565_4_.func_177523_a(blockpartface.field_178244_b), func_209567_a(blockpart, blockpartface, textureatlassprite1, enumfacing, p_209565_4_, p_209565_5_));
+ +
+ simplebakedmodel$builder.func_177650_a(p_209565_4_.apply(Optional.empty()).map(trsr -> trsr.rotate(enumfacing)).orElse(enumfacing), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, p_209565_4_, p_209565_5_)); + simplebakedmodel$builder.func_177650_a(p_209565_4_.apply(java.util.Optional.empty()).map(trsr -> trsr.rotate(enumfacing)).orElse(enumfacing), makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, p_209565_4_, p_209565_5_));
} }
} }
} }
@@ -209,9 +220,13 @@ @@ -209,9 +217,13 @@
} }
private static BakedQuad func_209567_a(BlockPart p_209567_0_, BlockPartFace p_209567_1_, TextureAtlasSprite p_209567_2_, EnumFacing p_209567_3_, ModelRotation p_209567_4_, boolean p_209567_5_) { private static BakedQuad func_209567_a(BlockPart p_209567_0_, BlockPartFace p_209567_1_, TextureAtlasSprite p_209567_2_, EnumFacing p_209567_3_, ModelRotation p_209567_4_, boolean p_209567_5_) {
@ -77,7 +55,7 @@
} }
+ public static BakedQuad makeBakedQuad(BlockPart p_209567_0, BlockPartFace p_209567_1_, TextureAtlasSprite p_209567_2_, EnumFacing p_209567_3_, net.minecraftforge.common.model.IModelState p_209567_4_, boolean p_209567_5_) { + public static BakedQuad makeBakedQuad(BlockPart p_209567_0, BlockPartFace p_209567_1_, TextureAtlasSprite p_209567_2_, EnumFacing p_209567_3_, net.minecraftforge.common.model.IModelState p_209567_4_, boolean p_209567_5_) {
+ return field_209572_h.makeBakedQuad(p_209567_0.field_178241_a, p_209567_0.field_178239_b, p_209567_1_, p_209567_2_, p_209567_3_, p_209567_4_.apply(Optional.empty()).orElse(net.minecraftforge.common.model.TRSRTransformation.identity()), p_209567_0.field_178237_d, p_209567_5_, p_209567_0.field_178238_e); + return field_209572_h.makeBakedQuad(p_209567_0.field_178241_a, p_209567_0.field_178239_b, p_209567_1_, p_209567_2_, p_209567_3_, p_209567_4_.apply(java.util.Optional.empty()).orElse(net.minecraftforge.common.model.TRSRTransformation.identity()), p_209567_0.field_178237_d, p_209567_5_, p_209567_0.field_178238_e);
+ } + }
+ +
public boolean func_178300_b(String p_178300_1_) { public boolean func_178300_b(String p_178300_1_) {

View file

@ -0,0 +1,19 @@
--- a/net/minecraft/client/renderer/model/ModelBlockDefinition.java
+++ b/net/minecraft/client/renderer/model/ModelBlockDefinition.java
@@ -30,10 +30,15 @@
private final Map<String, VariantList> field_178332_b = Maps.newLinkedHashMap();
private Multipart field_188005_c;
+ @Deprecated
public static ModelBlockDefinition func_209577_a(ModelBlockDefinition.ContainerHolder p_209577_0_, Reader p_209577_1_) {
- return JsonUtils.func_193839_a(p_209577_0_.field_209575_a, p_209577_1_, ModelBlockDefinition.class);
+ return fromJson(p_209577_0_, p_209577_1_, null);
}
+ public static ModelBlockDefinition fromJson(ModelBlockDefinition.ContainerHolder containerHolderIn, Reader readerIn, @Nullable net.minecraft.util.ResourceLocation location) {
+ return net.minecraftforge.client.model.BlockStateLoader.load(readerIn, location, containerHolderIn.field_209575_a);
+ }
+
public ModelBlockDefinition(Map<String, VariantList> p_i46572_1_, Multipart p_i46572_2_) {
this.field_188005_c = p_i46572_2_;
this.field_178332_b.putAll(p_i46572_1_);

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/ModelManager.java --- a/net/minecraft/client/renderer/model/ModelManager.java
+++ b/net/minecraft/client/renderer/block/model/ModelManager.java +++ b/net/minecraft/client/renderer/model/ModelManager.java
@@ -21,9 +21,10 @@ @@ -21,9 +21,10 @@
} }
@ -7,12 +7,12 @@
- ModelBakery modelbakery = new ModelBakery(p_195410_1_, this.field_174956_b); - ModelBakery modelbakery = new ModelBakery(p_195410_1_, this.field_174956_b);
+ net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_195410_1_, this.field_174956_b); + net.minecraftforge.client.model.ModelLoader modelbakery = new net.minecraftforge.client.model.ModelLoader(p_195410_1_, this.field_174956_b);
this.field_174958_a = modelbakery.func_177570_a(); this.field_174958_a = modelbakery.func_177570_a();
this.field_174955_d = this.field_174958_a.func_82594_a(ModelBakery.field_177604_a); this.field_174955_d = this.field_174958_a.get(ModelBakery.field_177604_a);
+ net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, modelbakery); + net.minecraftforge.client.ForgeHooksClient.onModelBake(this, this.field_174958_a, modelbakery);
this.field_174957_c.func_178124_c(); this.field_174957_c.func_178124_c();
} }
@@ -39,4 +40,9 @@ @@ -38,4 +39,9 @@
public BlockModelShapes func_174954_c() { public BlockModelShapes func_174954_c() {
return this.field_174957_c; return this.field_174957_c;
} }

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/ModelResourceLocation.java --- a/net/minecraft/client/renderer/model/ModelResourceLocation.java
+++ b/net/minecraft/client/renderer/block/model/ModelResourceLocation.java +++ b/net/minecraft/client/renderer/model/ModelResourceLocation.java
@@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
import java.util.Locale; import java.util.Locale;

View file

@ -1,10 +1,7 @@
--- a/net/minecraft/client/renderer/block/model/ModelRotation.java --- a/net/minecraft/client/renderer/model/ModelRotation.java
+++ b/net/minecraft/client/renderer/block/model/ModelRotation.java +++ b/net/minecraft/client/renderer/model/ModelRotation.java
@@ -10,9 +10,10 @@ @@ -12,7 +12,7 @@
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
+import net.minecraftforge.client.model.IModel;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
-public enum ModelRotation { -public enum ModelRotation {
@ -12,7 +9,7 @@
X0_Y0(0, 0), X0_Y0(0, 0),
X0_Y90(0, 90), X0_Y90(0, 90),
X0_Y180(0, 180), X0_Y180(0, 180),
@@ -97,4 +98,9 @@ @@ -97,4 +97,9 @@
public static ModelRotation func_177524_a(int p_177524_0_, int p_177524_1_) { public static ModelRotation func_177524_a(int p_177524_0_, int p_177524_1_) {
return field_177546_q.get(func_177521_b(MathHelper.func_180184_b(p_177524_0_, 360), MathHelper.func_180184_b(p_177524_1_, 360))); return field_177546_q.get(func_177521_b(MathHelper.func_180184_b(p_177524_0_, 360), MathHelper.func_180184_b(p_177524_1_, 360)));
} }

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/SimpleBakedModel.java --- a/net/minecraft/client/renderer/model/SimpleBakedModel.java
+++ b/net/minecraft/client/renderer/block/model/SimpleBakedModel.java +++ b/net/minecraft/client/renderer/model/SimpleBakedModel.java
@@ -75,7 +75,7 @@ @@ -75,7 +75,7 @@
} }

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/Variant.java --- a/net/minecraft/client/renderer/model/Variant.java
+++ b/net/minecraft/client/renderer/block/model/Variant.java +++ b/net/minecraft/client/renderer/model/Variant.java
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/VariantList.java --- a/net/minecraft/client/renderer/model/VariantList.java
+++ b/net/minecraft/client/renderer/block/model/VariantList.java +++ b/net/minecraft/client/renderer/model/VariantList.java
@@ -56,14 +56,15 @@ @@ -56,14 +56,15 @@
} }
@ -13,8 +13,8 @@
WeightedBakedModel.Builder weightedbakedmodel$builder = new WeightedBakedModel.Builder(); WeightedBakedModel.Builder weightedbakedmodel$builder = new WeightedBakedModel.Builder();
for(Variant variant : this.func_188114_a()) { for(Variant variant : this.func_188114_a()) {
- IBakedModel ibakedmodel = (p_209558_1_.apply(variant.func_188046_a())).func_209558_a(p_209558_1_, p_209558_2_, variant.func_188048_b(), variant.func_188049_c()); - IBakedModel ibakedmodel = p_209558_1_.apply(variant.func_188046_a()).func_209558_a(p_209558_1_, p_209558_2_, variant.func_188048_b(), variant.func_188049_c());
+ IBakedModel ibakedmodel = (p_209558_1_.apply(variant.func_188046_a())).bake(p_209558_1_, p_209558_2_, variant.getState(), variant.func_188049_c(), format); + IBakedModel ibakedmodel = p_209558_1_.apply(variant.func_188046_a()).bake(p_209558_1_, p_209558_2_, variant.getState(), variant.func_188049_c(), format);
weightedbakedmodel$builder.func_177677_a(ibakedmodel, variant.func_188047_d()); weightedbakedmodel$builder.func_177677_a(ibakedmodel, variant.func_188047_d());
} }

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/WeightedBakedModel.java --- a/net/minecraft/client/renderer/model/WeightedBakedModel.java
+++ b/net/minecraft/client/renderer/block/model/WeightedBakedModel.java +++ b/net/minecraft/client/renderer/model/WeightedBakedModel.java
@@ -30,6 +30,9 @@ @@ -30,6 +30,9 @@
public boolean func_177555_b() { public boolean func_177555_b() {
return this.field_177566_c.func_177555_b(); return this.field_177566_c.func_177555_b();

View file

@ -1,5 +1,5 @@
--- a/net/minecraft/client/renderer/block/model/multipart/Multipart.java --- a/net/minecraft/client/renderer/model/multipart/Multipart.java
+++ b/net/minecraft/client/renderer/block/model/multipart/Multipart.java +++ b/net/minecraft/client/renderer/model/multipart/Multipart.java
@@ -81,11 +81,12 @@ @@ -81,11 +81,12 @@
} }

View file

@ -8,5 +8,5 @@
- NativeImage nativeimage2 = NativeImage.func_195713_a(iresource1.func_199027_b()); - NativeImage nativeimage2 = NativeImage.func_195713_a(iresource1.func_199027_b());
+ NativeImage nativeimage2 = net.minecraftforge.client.MinecraftForgeClient.getImageLayer(new ResourceLocation(s), p_195413_1_); + NativeImage nativeimage2 = net.minecraftforge.client.MinecraftForgeClient.getImageLayer(new ResourceLocation(s), p_195413_1_);
) { ) {
int j = ((EnumDyeColor)this.field_174950_i.get(i)).func_196057_c(); int j = this.field_174950_i.get(i).func_196057_c();
if (nativeimage2.func_195702_a() == nativeimage1.func_195702_a() && nativeimage2.func_195714_b() == nativeimage1.func_195714_b()) { if (nativeimage2.func_195702_a() == nativeimage1.func_195702_a() && nativeimage2.func_195714_b() == nativeimage1.func_195714_b()) {

View file

@ -7,11 +7,11 @@
+ private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger(); + private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
+ +
private final int field_147971_a; private final int field_147971_a;
private final Set<Stitcher.Holder> field_94319_a = Sets.<Stitcher.Holder>newHashSetWithExpectedSize(256); private final Set<Stitcher.Holder> field_94319_a = Sets.newHashSetWithExpectedSize(256);
private final List<Stitcher.Slot> field_94317_b = Lists.<Stitcher.Slot>newArrayListWithCapacity(256); private final List<Stitcher.Slot> field_94317_b = Lists.newArrayListWithCapacity(256);
@@ -48,16 +50,22 @@ @@ -48,16 +50,22 @@
public void func_94305_f() { public void func_94305_f() {
Stitcher.Holder[] astitcher$holder = (Stitcher.Holder[])this.field_94319_a.toArray(new Stitcher.Holder[this.field_94319_a.size()]); Stitcher.Holder[] astitcher$holder = this.field_94319_a.toArray(new Stitcher.Holder[this.field_94319_a.size()]);
Arrays.sort((Object[])astitcher$holder); Arrays.sort((Object[])astitcher$holder);
+ try(net.minecraftforge.fml.common.progress.ProgressBar bar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Texture stitching", astitcher$holder.length)) { + try(net.minecraftforge.fml.common.progress.ProgressBar bar = net.minecraftforge.fml.common.progress.StartupProgressManager.start("Texture stitching", astitcher$holder.length)) {

View file

@ -25,7 +25,12 @@
BlockPos blockpos = p_180546_1_.func_174877_v(); BlockPos blockpos = p_180546_1_.func_174877_v();
this.func_203602_a(p_180546_1_, (double)blockpos.func_177958_n() - field_147554_b, (double)blockpos.func_177956_o() - field_147555_c, (double)blockpos.func_177952_p() - field_147552_d, p_180546_2_, p_180546_3_, false); this.func_203602_a(p_180546_1_, (double)blockpos.func_177958_n() - field_147554_b, (double)blockpos.func_177956_o() - field_147555_c, (double)blockpos.func_177952_p() - field_147552_d, p_180546_2_, p_180546_3_, false);
} }
@@ -137,6 +140,9 @@ @@ -133,10 +136,13 @@
TileEntityRenderer<TileEntity> tileentityrenderer = this.func_147547_b(p_203602_1_);
if (tileentityrenderer != null) {
try {
- if (!p_203602_10_ && (!p_203602_1_.func_145830_o() || !p_203602_1_.func_195044_w().func_177230_c().func_149716_u())) {
+ if (!p_203602_10_ && (!p_203602_1_.func_145830_o() || !p_203602_1_.func_195044_w().hasTileEntity())) {
return; return;
} }
@ -35,12 +40,11 @@
tileentityrenderer.func_199341_a(p_203602_1_, p_203602_2_, p_203602_4_, p_203602_6_, p_203602_8_, p_203602_9_); tileentityrenderer.func_199341_a(p_203602_1_, p_203602_2_, p_203602_4_, p_203602_6_, p_203602_8_, p_203602_9_);
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.func_85055_a(throwable, "Rendering Block Entity"); CrashReport crashreport = CrashReport.func_85055_a(throwable, "Rendering Block Entity");
@@ -159,4 +165,53 @@ @@ -159,4 +165,51 @@
public FontRenderer func_147548_a() { public FontRenderer func_147548_a() {
return this.field_147557_n; return this.field_147557_n;
} }
+ +
+ /* ======================================== FORGE START =====================================*/
+ /** + /**
+ * Buffer used for batched TESRs + * Buffer used for batched TESRs
+ */ + */
@ -51,8 +55,7 @@
+ * Prepare for a batched TESR rendering. + * Prepare for a batched TESR rendering.
+ * You probably shouldn't call this manually. + * You probably shouldn't call this manually.
+ */ + */
+ public void preDrawBatch() + public void preDrawBatch() {
+ {
+ batchBuffer.func_178180_c().func_181668_a(org.lwjgl.opengl.GL11.GL_QUADS, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176600_a); + batchBuffer.func_178180_c().func_181668_a(org.lwjgl.opengl.GL11.GL_QUADS, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176600_a);
+ drawingBatch = true; + drawingBatch = true;
+ } + }
@ -61,25 +64,20 @@
+ * Render all TESRs batched so far. + * Render all TESRs batched so far.
+ * You probably shouldn't call this manually. + * You probably shouldn't call this manually.
+ */ + */
+ public void drawBatch(int pass) + public void drawBatch(int pass) {
+ {
+ field_147553_e.func_110577_a(net.minecraft.client.renderer.texture.TextureMap.field_110575_b); + field_147553_e.func_110577_a(net.minecraft.client.renderer.texture.TextureMap.field_110575_b);
+ net.minecraft.client.renderer.RenderHelper.func_74518_a(); + net.minecraft.client.renderer.RenderHelper.func_74518_a();
+ GlStateManager.func_179112_b(org.lwjgl.opengl.GL11.GL_SRC_ALPHA, org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.func_179112_b(org.lwjgl.opengl.GL11.GL_SRC_ALPHA, org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.func_179147_l(); + GlStateManager.func_179147_l();
+ GlStateManager.func_179129_p(); + GlStateManager.func_179129_p();
+ +
+ if (net.minecraft.client.Minecraft.func_71379_u()) + if (net.minecraft.client.Minecraft.func_71379_u()) {
+ {
+ GlStateManager.func_179103_j(org.lwjgl.opengl.GL11.GL_SMOOTH); + GlStateManager.func_179103_j(org.lwjgl.opengl.GL11.GL_SMOOTH);
+ } + } else {
+ else
+ {
+ GlStateManager.func_179103_j(org.lwjgl.opengl.GL11.GL_FLAT); + GlStateManager.func_179103_j(org.lwjgl.opengl.GL11.GL_FLAT);
+ } + }
+ +
+ if(pass > 0) + if(pass > 0) {
+ {
+ net.minecraft.util.math.Vec3d cameraPos = net.minecraft.client.renderer.ActiveRenderInfo.getCameraPosition(); + net.minecraft.util.math.Vec3d cameraPos = net.minecraft.client.renderer.ActiveRenderInfo.getCameraPosition();
+ batchBuffer.func_178180_c().func_181674_a((float)cameraPos.field_72450_a, (float)cameraPos.field_72448_b, (float)cameraPos.field_72449_c); + batchBuffer.func_178180_c().func_181674_a((float)cameraPos.field_72450_a, (float)cameraPos.field_72448_b, (float)cameraPos.field_72449_c);
+ } + }
@ -87,5 +85,10 @@
+ +
+ net.minecraft.client.renderer.RenderHelper.func_74519_b(); + net.minecraft.client.renderer.RenderHelper.func_74519_b();
+ drawingBatch = false; + drawingBatch = false;
+ }
+
+ //Internal, Do not call Use ClientRegistry.
+ public synchronized <T extends TileEntity> void setSpecialRenderer(Class<T> tileEntityClass, TileEntityRenderer<? super T> specialRenderer) {
+ this.field_147559_m.put(tileEntityClass, specialRenderer);
+ } + }
} }

View file

@ -1,14 +1,14 @@
--- a/net/minecraft/client/renderer/vertex/VertexFormat.java --- a/net/minecraft/client/renderer/vertex/VertexFormat.java
+++ b/net/minecraft/client/renderer/vertex/VertexFormat.java +++ b/net/minecraft/client/renderer/vertex/VertexFormat.java
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
private int field_177354_e; private int field_177354_e = -1;
private final List<Integer> field_177351_f; private final List<Integer> field_177351_f = Lists.newArrayList();
private int field_177352_g; private int field_177352_g = -1;
+ private int hashCode; + private int hashCode;
public VertexFormat(VertexFormat p_i46097_1_) { public VertexFormat(VertexFormat p_i46097_1_) {
this(); this();
@@ -42,6 +43,7 @@ @@ -37,6 +38,7 @@
this.field_177351_f.clear(); this.field_177351_f.clear();
this.field_177352_g = -1; this.field_177352_g = -1;
this.field_177353_d = 0; this.field_177353_d = 0;
@ -16,7 +16,7 @@
} }
public VertexFormat func_181721_a(VertexFormatElement p_181721_1_) { public VertexFormat func_181721_a(VertexFormatElement p_181721_1_) {
@@ -63,6 +65,7 @@ @@ -58,6 +60,7 @@
} }
this.field_177353_d += p_181721_1_.func_177368_f(); this.field_177353_d += p_181721_1_.func_177368_f();
@ -24,7 +24,7 @@
return this; return this;
} }
} }
@@ -157,9 +160,11 @@ @@ -152,9 +155,11 @@
} }
public int hashCode() { public int hashCode() {

View file

@ -6,11 +6,11 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
-public class KeyBinding implements Comparable<KeyBinding> { -public class KeyBinding implements Comparable<KeyBinding> {
+public class KeyBinding implements Comparable<KeyBinding>, net.minecraftforge.client.extensions.IForgeKeybinding { +public class KeyBinding implements Comparable<KeyBinding>, net.minecraftforge.client.extensions.IForgeKeybinding {
private static final Map<String, KeyBinding> field_74516_a = Maps.<String, KeyBinding>newHashMap(); private static final Map<String, KeyBinding> field_74516_a = Maps.newHashMap();
- private static final Map<InputMappings.Input, KeyBinding> field_74514_b = Maps.<InputMappings.Input, KeyBinding>newHashMap(); - private static final Map<InputMappings.Input, KeyBinding> field_74514_b = Maps.newHashMap();
+ private static final net.minecraftforge.client.settings.KeyBindingMap field_74514_b = new net.minecraftforge.client.settings.KeyBindingMap(); + private static final net.minecraftforge.client.settings.KeyBindingMap field_74514_b = new net.minecraftforge.client.settings.KeyBindingMap();
private static final Set<String> field_151473_c = Sets.<String>newHashSet(); private static final Set<String> field_151473_c = Sets.newHashSet();
private static final Map<String, Integer> field_193627_d = (Map)Util.func_200696_a(Maps.newHashMap(), (p_205215_0_) -> { private static final Map<String, Integer> field_193627_d = Util.func_200696_a(Maps.newHashMap(), (p_205215_0_) -> {
p_205215_0_.put("key.categories.movement", 1); p_205215_0_.put("key.categories.movement", 1);
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
private int field_151474_i; private int field_151474_i;
@ -58,51 +58,43 @@
} }
public String func_151466_e() { public String func_151466_e() {
@@ -122,17 +122,41 @@ @@ -122,7 +122,13 @@
} }
public int compareTo(KeyBinding p_compareTo_1_) { public int compareTo(KeyBinding p_compareTo_1_) {
- return this.field_151471_f.equals(p_compareTo_1_.field_151471_f) ? I18n.func_135052_a(this.field_74515_c).compareTo(I18n.func_135052_a(p_compareTo_1_.field_74515_c)) : ((Integer)field_193627_d.get(this.field_151471_f)).compareTo(field_193627_d.get(p_compareTo_1_.field_151471_f)); - return this.field_151471_f.equals(p_compareTo_1_.field_151471_f) ? I18n.func_135052_a(this.field_74515_c).compareTo(I18n.func_135052_a(p_compareTo_1_.field_74515_c)) : field_193627_d.get(this.field_151471_f).compareTo(field_193627_d.get(p_compareTo_1_.field_151471_f));
+ if (this.field_151471_f.equals(p_compareTo_1_.field_151471_f)) return I18n.func_135052_a(this.field_74515_c).compareTo(I18n.func_135052_a(p_compareTo_1_.field_74515_c)); + if (this.field_151471_f.equals(p_compareTo_1_.field_151471_f)) return I18n.func_135052_a(this.field_74515_c).compareTo(I18n.func_135052_a(p_compareTo_1_.field_74515_c));
+ Integer tCat = field_193627_d.get(this.field_151471_f); + Integer tCat = field_193627_d.get(this.field_151471_f);
+ Integer oCat = field_193627_d.get(p_compareTo_1_.field_151471_f); + Integer oCat = field_193627_d.get(p_compareTo_1_.field_151471_f);
+ if (tCat == null && oCat != null) return 1; + if (tCat == null && oCat != null) return 1;
+ if (tCat != null && oCat == null) return -1; + if (tCat != null && oCat == null) return -1;
+ if (tCat == null && oCat == null) return I18n.func_135052_a(this.field_151471_f).compareTo(I18n.func_135052_a(p_compareTo_1_.field_151471_f)); + if (tCat == null && oCat == null) return I18n.func_135052_a(this.field_151471_f).compareTo(I18n.func_135052_a(p_compareTo_1_.field_151471_f));
+ return tCat.compareTo(oCat); + return tCat.compareTo(oCat);
} }
public static Supplier<String> func_193626_b(String p_193626_0_) { public static Supplier<String> func_193626_b(String p_193626_0_) {
KeyBinding keybinding = field_74516_a.get(p_193626_0_); @@ -133,6 +139,20 @@
return keybinding == null ? () -> {
return p_193626_0_;
- } : keybinding::func_197978_k;
+ } : () -> keybinding.func_197978_k();
} }
public boolean func_197983_b(KeyBinding p_197983_1_) { public boolean func_197983_b(KeyBinding p_197983_1_) {
+ if (getKeyConflictContext().conflicts(p_197983_1_.getKeyConflictContext()) || p_197983_1_.getKeyConflictContext().conflicts(getKeyConflictContext())) + if (getKeyConflictContext().conflicts(p_197983_1_.getKeyConflictContext()) || p_197983_1_.getKeyConflictContext().conflicts(getKeyConflictContext())) {
+ {
+ net.minecraftforge.client.settings.KeyModifier keyModifier = getKeyModifier(); + net.minecraftforge.client.settings.KeyModifier keyModifier = getKeyModifier();
+ net.minecraftforge.client.settings.KeyModifier otherKeyModifier = p_197983_1_.getKeyModifier(); + net.minecraftforge.client.settings.KeyModifier otherKeyModifier = p_197983_1_.getKeyModifier();
+ if (keyModifier.matches(p_197983_1_.getKey()) || otherKeyModifier.matches(getKey())) + if (keyModifier.matches(p_197983_1_.getKey()) || otherKeyModifier.matches(getKey())) {
+ {
+ return true; + return true;
+ } + } else if (getKey().equals(p_197983_1_.getKey())) {
+ else if (getKey().equals(p_197983_1_.getKey())) + // IN_GAME key contexts have a conflict when at least one modifier is NONE.
+ { + // For example: If you hold shift to crouch, you can still press E to open your inventory. This means that a Shift+E hotkey is in conflict with E.
+ // GUI and other key contexts do not have this limitation.
+ return keyModifier == otherKeyModifier || + return keyModifier == otherKeyModifier ||
+ // IN_GAME key contexts have a conflict when at least one modifier is NONE. + (getKeyConflictContext().conflicts(net.minecraftforge.client.settings.KeyConflictContext.IN_GAME) &&
+ // For example: If you hold shift to crouch, you can still press E to open your inventory. This means that a Shift+E hotkey is in conflict with E. + (keyModifier == net.minecraftforge.client.settings.KeyModifier.NONE || otherKeyModifier == net.minecraftforge.client.settings.KeyModifier.NONE));
+ // GUI and other key contexts do not have this limitation.
+ (getKeyConflictContext().conflicts(net.minecraftforge.client.settings.KeyConflictContext.IN_GAME) &&
+ (keyModifier == net.minecraftforge.client.settings.KeyModifier.NONE || otherKeyModifier == net.minecraftforge.client.settings.KeyModifier.NONE));
+ } + }
+ } + }
return this.field_74512_d.equals(p_197983_1_.field_74512_d); return this.field_74512_d.equals(p_197983_1_.field_74512_d);
} }
@@ -153,14 +177,94 @@ @@ -153,14 +173,94 @@
} }
public String func_197978_k() { public String func_197978_k() {
@ -155,11 +147,11 @@
+ } + }
+ +
+ @Override + @Override
+ public InputMappings.Input getKey() + public InputMappings.Input getKey()
+ { + {
+ return this.field_74512_d; + return this.field_74512_d;
+ } + }
+ +
+ @Override + @Override
+ public void setKeyConflictContext(net.minecraftforge.client.settings.IKeyConflictContext keyConflictContext) + public void setKeyConflictContext(net.minecraftforge.client.settings.IKeyConflictContext keyConflictContext)
+ { + {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/shader/ShaderGroup.java --- a/net/minecraft/client/shader/ShaderGroup.java
+++ b/net/minecraft/client/shader/ShaderGroup.java +++ b/net/minecraft/client/shader/ShaderGroup.java
@@ -143,7 +143,8 @@ @@ -142,7 +142,8 @@
String s3 = JsonUtils.func_151200_h(jsonobject1, "id"); String s3 = JsonUtils.func_151200_h(jsonobject1, "id");
Framebuffer framebuffer2 = this.func_148017_a(s3); Framebuffer framebuffer2 = this.func_148017_a(s3);
if (framebuffer2 == null) { if (framebuffer2 == null) {

View file

@ -2,7 +2,7 @@
+++ b/net/minecraft/client/shader/ShaderLoader.java +++ b/net/minecraft/client/shader/ShaderLoader.java
@@ -51,7 +51,8 @@ @@ -51,7 +51,8 @@
public static ShaderLoader func_195655_a(IResourceManager p_195655_0_, ShaderLoader.ShaderType p_195655_1_, String p_195655_2_) throws IOException { public static ShaderLoader func_195655_a(IResourceManager p_195655_0_, ShaderLoader.ShaderType p_195655_1_, String p_195655_2_) throws IOException {
ShaderLoader shaderloader = (ShaderLoader)p_195655_1_.func_148064_d().get(p_195655_2_); ShaderLoader shaderloader = p_195655_1_.func_148064_d().get(p_195655_2_);
if (shaderloader == null) { if (shaderloader == null) {
- ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_195655_2_ + p_195655_1_.func_148063_b()); - ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_195655_2_ + p_195655_1_.func_148063_b());
+ ResourceLocation rl = ResourceLocation.func_208304_a(p_195655_2_); + ResourceLocation rl = ResourceLocation.func_208304_a(p_195655_2_);

View file

@ -1,9 +1,9 @@
--- a/net/minecraft/client/shader/ShaderManager.java --- a/net/minecraft/client/shader/ShaderManager.java
+++ b/net/minecraft/client/shader/ShaderManager.java +++ b/net/minecraft/client/shader/ShaderManager.java
@@ -51,7 +51,8 @@ @@ -50,7 +50,8 @@
private final ShaderLoader field_148012_t;
public ShaderManager(IResourceManager p_i45087_1_, String p_i45087_2_) throws IOException { public ShaderManager(IResourceManager p_i45087_1_, String p_i45087_2_) throws IOException {
JsonParser jsonparser = new JsonParser();
- ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_i45087_2_ + ".json"); - ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_i45087_2_ + ".json");
+ ResourceLocation rl = ResourceLocation.func_208304_a(p_i45087_2_); + ResourceLocation rl = ResourceLocation.func_208304_a(p_i45087_2_);
+ ResourceLocation resourcelocation = new ResourceLocation(rl.func_110624_b(), "shaders/program/" + rl.func_110623_a() + ".json"); + ResourceLocation resourcelocation = new ResourceLocation(rl.func_110624_b(), "shaders/program/" + rl.func_110623_a() + ".json");

View file

@ -1,11 +1,11 @@
--- a/net/minecraft/command/Commands.java --- a/net/minecraft/command/Commands.java
+++ b/net/minecraft/command/Commands.java +++ b/net/minecraft/command/Commands.java
@@ -189,7 +189,15 @@ @@ -193,7 +193,15 @@
try { try {
try { try {
- int lvt_4_3_ = this.field_197062_b.execute(p_197059_2_, p_197059_1_); - int lvt_4_3_ = this.field_197062_b.execute(stringreader, p_197059_1_);
+ com.mojang.brigadier.ParseResults<CommandSource> parse = this.field_197062_b.parse(p_197059_2_, p_197059_1_); + com.mojang.brigadier.ParseResults<CommandSource> parse = this.field_197062_b.parse(stringreader, p_197059_1_);
+ net.minecraftforge.event.CommandEvent event = new net.minecraftforge.event.CommandEvent(parse); + net.minecraftforge.event.CommandEvent event = new net.minecraftforge.event.CommandEvent(parse);
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) { + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
+ if (event.getException() != null) { + if (event.getException() != null) {

View file

@ -1,15 +1,22 @@
--- a/net/minecraft/command/arguments/BlockStateParser.java --- a/net/minecraft/command/arguments/BlockStateParser.java
+++ b/net/minecraft/command/arguments/BlockStateParser.java +++ b/net/minecraft/command/arguments/BlockStateParser.java
@@ -167,7 +167,7 @@ @@ -168,13 +168,13 @@
}
private CompletableFuture<Suggestions> func_197244_d(SuggestionsBuilder p_197244_1_) { private boolean func_212598_k() {
- if (p_197244_1_.getRemaining().isEmpty() && (this.field_197270_l == null || this.field_197270_l.func_177230_c().func_149716_u())) { if (this.field_197270_l != null) {
+ if (p_197244_1_.getRemaining().isEmpty() && (this.field_197270_l == null || this.field_197270_l.hasTileEntity())) { - return this.field_197270_l.func_177230_c().func_149716_u();
p_197244_1_.suggest(String.valueOf('{')); + return this.field_197270_l.hasTileEntity();
} } else {
if (this.field_199833_p != null) {
@@ -252,7 +252,7 @@ Tag<Block> tag = BlockTags.func_199896_a().func_199910_a(this.field_199833_p);
if (tag != null) {
for(Block block : tag.func_199885_a()) {
- if (block.func_149716_u()) {
+ if (block.func_176223_P().hasTileEntity()) {
return true;
}
}
@@ -291,7 +291,7 @@
p_197255_1_.suggest(String.valueOf('[')); p_197255_1_.suggest(String.valueOf('['));
} }

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