Skip to content

Commit

Permalink
Update VineFlower
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Dec 19, 2024
1 parent da0e33d commit a51e182
Show file tree
Hide file tree
Showing 334 changed files with 12,433 additions and 2,485 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ last_forge_version = 14.23.5.2860
mapping_channel = stable
mapping_version = 39-1.12
minecraft_version = 1.12.2
mcp_version = 20240102.171137
mcp_version = 20241219.222132

# Related Tooling
special_source = net.md-5:SpecialSource:1.9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,21 @@
}

public static class Deserializer implements JsonDeserializer<AdvancementRewards>
@@ -187,7 +153,7 @@
JsonArray jsonarray = JsonUtils.func_151213_a(jsonobject, "loot", new JsonArray());
ResourceLocation[] aresourcelocation = new ResourceLocation[jsonarray.size()];

- for (int j = 0; j < aresourcelocation.length; j++)
+ for (int j = 0; j < aresourcelocation.length; ++j)
{
aresourcelocation[j] = new ResourceLocation(JsonUtils.func_151206_a(jsonarray.get(j), "loot[" + j + "]"));
}
@@ -195,7 +161,7 @@
JsonArray jsonarray1 = JsonUtils.func_151213_a(jsonobject, "recipes", new JsonArray());
ResourceLocation[] aresourcelocation1 = new ResourceLocation[jsonarray1.size()];

- for (int k = 0; k < aresourcelocation1.length; k++)
+ for (int k = 0; k < aresourcelocation1.length; ++k)
{
aresourcelocation1[k] = new ResourceLocation(JsonUtils.func_151206_a(jsonarray1.get(k), "recipes[" + k + "]"));
IRecipe irecipe = CraftingManager.func_193373_a(aresourcelocation1[k]);
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,12 @@
}
}

@@ -424,7 +414,7 @@

private boolean func_192738_c(Advancement p_192738_1_)
{
- for (int i = 0; p_192738_1_ != null && i <= 2; i++)
+ for (int i = 0; p_192738_1_ != null && i <= 2; ++i)
{
if (i == 0 && this.func_192746_d(p_192738_1_))
{
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- before/net/minecraft/advancements/critereon/ItemPredicate.java
+++ after/net/minecraft/advancements/critereon/ItemPredicate.java
@@ -86,7 +86,7 @@
{
Map<Enchantment, Integer> map = EnchantmentHelper.func_82781_a(p_192493_1_);

- for (int i = 0; i < this.field_192499_e.length; i++)
+ for (int i = 0; i < this.field_192499_e.length; ++i)
{
if (!this.field_192499_e[i].func_192463_a(map))
{
@@ -104,6 +104,13 @@
if (p_192492_0_ != null && !p_192492_0_.isJsonNull())
{
Expand All @@ -14,3 +23,12 @@
MinMaxBounds minmaxbounds = MinMaxBounds.func_192515_a(jsonobject.get("count"));
MinMaxBounds minmaxbounds1 = MinMaxBounds.func_192515_a(jsonobject.get("durability"));
Integer integer = jsonobject.has("data") ? JsonUtils.func_151203_m(jsonobject, "data") : null;
@@ -151,7 +158,7 @@
JsonArray jsonarray = JsonUtils.func_151207_m(p_192494_0_, "items");
ItemPredicate[] aitempredicate = new ItemPredicate[jsonarray.size()];

- for (int i = 0; i < aitempredicate.length; i++)
+ for (int i = 0; i < aitempredicate.length; ++i)
{
aitempredicate[i] = func_192492_a(jsonarray.get(i));
}
4 changes: 2 additions & 2 deletions patches/minecraft/net/minecraft/block/Block.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
+ List<ItemStack> drops = getDrops(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_); // use the old method until it gets removed, for backward compatibility
+ p_180653_4_ = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(drops, p_180653_1_, p_180653_2_, p_180653_3_, p_180653_5_, p_180653_4_, false, harvesters.get());

- for (int j = 0; j < i; ++j)
- for (int j = 0; j < i; j++)
+ for (ItemStack drop : drops)
{
- if (!(p_180653_1_.field_73012_v.nextFloat() > p_180653_4_))
Expand Down Expand Up @@ -3036,7 +3036,7 @@
- {
- if (set.contains(block16))
- {
- for (int i = 0; i < 15; ++i)
- for (int i = 0; i < 15; i++)
- {
- int j = field_149771_c.func_148757_b(block16) << 4 | i;
- field_176229_d.func_148746_a(block16.func_176203_a(i), j);
Expand Down
28 changes: 27 additions & 1 deletion patches/minecraft/net/minecraft/block/BlockBed.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
public boolean func_190946_v(IBlockState p_190946_1_)
{
return true;
@@ -256,7 +231,7 @@
@@ -256,21 +231,21 @@
@Nullable
public static BlockPos func_176468_a(World p_176468_0_, BlockPos p_176468_1_, int p_176468_2_)
{
Expand All @@ -219,6 +219,32 @@
int i = p_176468_1_.func_177958_n();
int j = p_176468_1_.func_177956_o();
int k = p_176468_1_.func_177952_p();

- for (int l = 0; l <= 1; l++)
+ for (int l = 0; l <= 1; ++l)
{
int i1 = i - enumfacing.func_82601_c() * l - 1;
int j1 = k - enumfacing.func_82599_e() * l - 1;
int k1 = i1 + 2;
int l1 = j1 + 2;

- for (int i2 = i1; i2 <= k1; i2++)
+ for (int i2 = i1; i2 <= k1; ++i2)
{
- for (int j2 = j1; j2 <= l1; j2++)
+ for (int j2 = j1; j2 <= l1; ++j2)
{
BlockPos blockpos = new BlockPos(i2, j, j2);

@@ -281,7 +256,7 @@
return blockpos;
}

- p_176468_2_--;
+ --p_176468_2_;
}
}
}
@@ -292,12 +267,9 @@

protected static boolean func_176469_d(World p_176469_0_, BlockPos p_176469_1_)
Expand Down
45 changes: 24 additions & 21 deletions patches/minecraft/net/minecraft/block/BlockButton.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,20 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
for (EnumFacing enumfacing : EnumFacing.values())
@@ -103,7 +98,7 @@

if (p_181088_2_ == EnumFacing.UP)
{
- return block == Blocks.field_150438_bZ || !func_193384_b(block) && flag;
@@ -100,30 +95,25 @@
IBlockState iblockstate = p_181088_0_.func_180495_p(blockpos);
boolean flag = iblockstate.func_193401_d(p_181088_0_, blockpos, p_181088_2_) == BlockFaceShape.SOLID;
Block block = iblockstate.func_177230_c();
- return p_181088_2_ == EnumFacing.UP ? block == Blocks.field_150438_bZ || !func_193384_b(block) && flag : !func_193382_c(block) && flag;
+
+ if (p_181088_2_ == EnumFacing.UP)
+ {
+ return iblockstate.func_185896_q() || !func_193384_b(block) && flag;
}
else
{
@@ -111,27 +106,14 @@
}
+ }
+ else
+ {
+ return !func_193382_c(block) && flag;
+ }
}

- @Override
Expand Down Expand Up @@ -123,7 +126,7 @@
{
this.func_176226_b(p_189540_2_, p_189540_3_, p_189540_1_, 0);
p_189540_2_.func_175698_g(p_189540_3_);
@@ -152,11 +134,10 @@
@@ -144,11 +134,10 @@
}
}

Expand All @@ -137,7 +140,7 @@

switch (enumfacing)
{
@@ -176,29 +157,18 @@
@@ -168,29 +157,18 @@
}
}

Expand Down Expand Up @@ -171,7 +174,7 @@
p_180639_1_.func_175684_a(p_180639_2_, this, this.func_149738_a(p_180639_1_));
return true;
}
@@ -208,27 +178,24 @@
@@ -200,27 +178,24 @@

protected abstract void func_185617_b(World p_185617_1_, BlockPos p_185617_2_);

Expand Down Expand Up @@ -203,7 +206,7 @@
{
return 0;
}
@@ -238,23 +205,20 @@
@@ -230,23 +205,20 @@
}
}

Expand All @@ -228,7 +231,7 @@
{
if (this.field_150047_a)
{
@@ -262,8 +226,8 @@
@@ -254,8 +226,8 @@
}
else
{
Expand All @@ -239,7 +242,7 @@
this.func_185617_b(p_180650_1_, p_180650_2_);
p_180650_1_.func_175704_b(p_180650_2_, p_180650_2_);
}
@@ -271,14 +235,13 @@
@@ -263,14 +235,13 @@
}
}

Expand All @@ -255,7 +258,7 @@
{
this.func_185616_e(p_180634_3_, p_180634_1_, p_180634_2_);
}
@@ -288,22 +251,22 @@
@@ -280,22 +251,22 @@

private void func_185616_e(IBlockState p_185616_1_, World p_185616_2_, BlockPos p_185616_3_)
{
Expand Down Expand Up @@ -285,15 +288,15 @@
p_185616_2_.func_175704_b(p_185616_3_, p_185616_3_);
this.func_185617_b(p_185616_2_, p_185616_3_);
}
@@ -320,7 +283,6 @@
@@ -312,7 +283,6 @@
p_176582_1_.func_175685_c(p_176582_2_.func_177972_a(p_176582_3_.func_176734_d()), this, false);
}

- @Override
public IBlockState func_176203_a(int p_176203_1_)
{
EnumFacing enumfacing;
@@ -347,10 +309,9 @@
@@ -339,10 +309,9 @@
enumfacing = EnumFacing.UP;
}

Expand All @@ -305,7 +308,7 @@
public int func_176201_c(IBlockState p_176201_1_)
{
int i;
@@ -377,7 +338,7 @@
@@ -369,7 +338,7 @@
i = 0;
}

Expand All @@ -314,7 +317,7 @@
{
i |= 8;
}
@@ -385,25 +346,21 @@
@@ -377,25 +346,21 @@
return i;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- while (p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(i)).func_177230_c() == this)
+ for (i = 1; p_180650_1_.func_180495_p(p_180650_2_.func_177979_c(i)).func_177230_c() == this; ++i)
{
- ++i;
- i++;
+ ;
}

Expand Down
36 changes: 36 additions & 0 deletions patches/minecraft/net/minecraft/block/BlockChest.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,42 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
int i = 0;
@@ -347,7 +330,7 @@
return false;
}

- i++;
+ ++i;
}

if (p_176196_1_.func_180495_p(blockpos1).func_177230_c() == this)
@@ -357,7 +340,7 @@
return false;
}

- i++;
+ ++i;
}

if (p_176196_1_.func_180495_p(blockpos2).func_177230_c() == this)
@@ -367,7 +350,7 @@
return false;
}

- i++;
+ ++i;
}

if (p_176196_1_.func_180495_p(blockpos3).func_177230_c() == this)
@@ -377,7 +360,7 @@
return false;
}

- i++;
+ ++i;
}

return i <= 1;
@@ -403,7 +386,6 @@
}
}
Expand Down
Loading

0 comments on commit a51e182

Please sign in to comment.