Skip to content

Commit 704b62a

Browse files
Update patch to Java 25
1 parent 74a03dc commit 704b62a

File tree

164 files changed

+2026
-1323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+2026
-1323
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ last_forge_version = 14.23.5.2864
77
mapping_channel = stable
88
mapping_version = 39-1.12
99
minecraft_version = 1.12.2
10-
mcp_version = 20250427.121127
10+
mcp_version = 20260220.202731
1111

1212
# Related Tooling
1313
special_source = net.md-5:SpecialSource:1.9.0

patches/minecraft/net/minecraft/advancements/PlayerAdvancements.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- before/net/minecraft/advancements/PlayerAdvancements.java
22
+++ after/net/minecraft/advancements/PlayerAdvancements.java
3-
@@ -199,6 +199,9 @@
3+
@@ -197,6 +197,9 @@
44

55
public boolean grantCriterion(Advancement p_192750_1_, String p_192750_2_)
66
{
@@ -10,7 +10,7 @@
1010
boolean flag = false;
1111
AdvancementProgress advancementprogress = this.getProgress(p_192750_1_);
1212
boolean flag1 = advancementprogress.isDone();
13-
@@ -227,6 +230,8 @@
13+
@@ -225,6 +228,8 @@
1414
)
1515
);
1616
}

patches/minecraft/net/minecraft/advancements/critereon/ItemPredicate.java.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
--- before/net/minecraft/advancements/critereon/ItemPredicate.java
22
+++ after/net/minecraft/advancements/critereon/ItemPredicate.java
3+
@@ -66,7 +66,7 @@
4+
{
5+
return false;
6+
}
7+
- else if (!this.count.test(item.getCount()))
8+
+ else if (!this.count.test((float)item.getCount()))
9+
{
10+
return false;
11+
}
12+
@@ -74,7 +74,7 @@
13+
{
14+
return false;
15+
}
16+
- else if (!this.durability.test(item.getMaxDamage() - item.getItemDamage()))
17+
+ else if (!this.durability.test((float)(item.getMaxDamage() - item.getItemDamage())))
18+
{
19+
return false;
20+
}
321
@@ -104,6 +104,13 @@
422
if (element != null && !element.isJsonNull())
523
{

patches/minecraft/net/minecraft/block/Block.java.patch

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@
149149
+ return;
150150
+ }
151151
float f = 0.5F;
152-
double d0 = (double)(worldIn.rand.nextFloat() * 0.5F) + 0.25;
153-
double d1 = (double)(worldIn.rand.nextFloat() * 0.5F) + 0.25;
154-
@@ -646,6 +644,7 @@
152+
double d0 = worldIn.rand.nextFloat() * 0.5F + 0.25;
153+
double d1 = worldIn.rand.nextFloat() * 0.5F + 0.25;
154+
@@ -636,6 +634,7 @@
155155
return 0;
156156
}
157157

158158
+ @Deprecated //Forge: State sensitive version
159159
public float getExplosionResistance(Entity exploder)
160160
{
161161
return this.blockResistance / 5.0F;
162-
@@ -691,7 +690,7 @@
162+
@@ -680,7 +679,7 @@
163163

164164
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
165165
{
@@ -168,7 +168,7 @@
168168
}
169169

170170
public boolean onBlockActivated(
171-
@@ -713,6 +712,8 @@
171+
@@ -702,6 +701,8 @@
172172
{
173173
}
174174

@@ -177,7 +177,7 @@
177177
public IBlockState getStateForPlacement(
178178
World worldIn,
179179
BlockPos pos,
180-
@@ -765,21 +766,35 @@
180+
@@ -754,21 +755,35 @@
181181
player.addStat(StatList.getBlockStats(this));
182182
player.addExhaustion(0.005F);
183183

@@ -216,23 +216,23 @@
216216
}
217217

218218
protected ItemStack getSilkTouchDrop(IBlockState state)
219-
@@ -865,6 +880,7 @@
219+
@@ -854,6 +869,7 @@
220220
entityIn.motionY = 0.0;
221221
}
222222

223223
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
224224
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
225225
{
226226
return new ItemStack(Item.getItemFromBlock(this), 1, this.damageDropped(state));
227-
@@ -978,6 +994,7 @@
227+
@@ -967,6 +983,7 @@
228228
}
229229
}
230230

231231
+ @Deprecated // Forge - World/state/pos/entity sensitive version below
232232
public SoundType getSoundType()
233233
{
234234
return this.blockSoundType;
235-
@@ -994,6 +1011,1388 @@
235+
@@ -983,6 +1000,1388 @@
236236
{
237237
}
238238

@@ -1621,7 +1621,7 @@
16211621
public static void registerBlocks()
16221622
{
16231623
registerBlock(0, AIR_ID, new BlockAir().setTranslationKey("air"));
1624-
@@ -1520,7 +2919,7 @@
1624+
@@ -1509,7 +2908,7 @@
16251625
"quartz_stairs",
16261626
new BlockStairs(block11.getDefaultState().withProperty(BlockQuartz.VARIANT, BlockQuartz.EnumType.DEFAULT)).setTranslationKey("stairsQuartz")
16271627
);
@@ -1630,7 +1630,7 @@
16301630
registerBlock(158, "dropper", new BlockDropper().setHardness(3.5F).setSoundType(SoundType.STONE).setTranslationKey("dropper"));
16311631
registerBlock(
16321632
159,
1633-
@@ -1936,28 +3335,6 @@
1633+
@@ -1925,28 +3324,6 @@
16341634
}
16351635

16361636
block15.useNeighborBrightness = flag;

patches/minecraft/net/minecraft/block/BlockDragonEgg.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
int i = 32;
1111

12-
@@ -73,7 +73,7 @@
12+
@@ -69,7 +69,7 @@
1313
worldIn.setBlockToAir(pos);
1414
BlockPos blockpos = pos;
1515

@@ -18,7 +18,7 @@
1818
{
1919
blockpos = blockpos.down();
2020
}
21-
@@ -123,7 +123,7 @@
21+
@@ -119,7 +119,7 @@
2222
worldIn.rand.nextInt(16) - worldIn.rand.nextInt(16)
2323
);
2424

patches/minecraft/net/minecraft/block/BlockFire.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@
149149

150150
@Override
151151
@@ -401,17 +407,17 @@
152-
(double)((float)pos.getY() + 0.5F),
153-
(double)((float)pos.getZ() + 0.5F),
152+
pos.getY() + 0.5F,
153+
pos.getZ() + 0.5F,
154154
SoundEvents.BLOCK_FIRE_AMBIENT,
155155
- SoundCategory.BLOCKS,
156156
+ SoundCategory.BLOCKS,

patches/minecraft/net/minecraft/block/BlockLiquid.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- before/net/minecraft/block/BlockLiquid.java
22
+++ after/net/minecraft/block/BlockLiquid.java
3-
@@ -415,14 +415,14 @@
3+
@@ -409,14 +409,14 @@
44

55
if (integer == 0)
66
{
@@ -17,7 +17,7 @@
1717
this.triggerMixEffects(worldIn, pos);
1818
return true;
1919
}
20-
@@ -514,8 +514,39 @@
20+
@@ -508,8 +508,39 @@
2121
}
2222

2323
@Override

patches/minecraft/net/minecraft/block/BlockNote.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(e)) return false;
1919
+ id = e.getInstrument().ordinal();
2020
+ param = e.getVanillaNoteId();
21-
float f = (float)Math.pow(2.0, (double)(param - 12) / 12.0);
21+
float f = (float)Math.pow(2.0, (param - 12) / 12.0);
2222
worldIn.playSound(null, pos, this.getInstrument(id), SoundCategory.RECORDS, 3.0F, f);
2323
worldIn.spawnParticle(

patches/minecraft/net/minecraft/block/BlockPistonBase.java.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
+ float chance = iblockstate.getBlock() instanceof BlockSnow ? -1.0f : 1.0f;
2828
+ iblockstate.getBlock().dropBlockAsItemWithChance(worldIn, blockpos1, iblockstate, chance, 0);
2929
worldIn.setBlockState(blockpos1, Blocks.AIR.getDefaultState(), 4);
30-
k--;
31-
aiblockstate[k] = iblockstate;
32-
@@ -495,6 +497,14 @@
30+
aiblockstate[--k] = iblockstate;
31+
}
32+
@@ -493,6 +495,14 @@
3333
{
3434
return new BlockStateContainer(this, FACING, EXTENDED);
3535
}

patches/minecraft/net/minecraft/block/BlockPumpkin.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- before/net/minecraft/block/BlockPumpkin.java
22
+++ after/net/minecraft/block/BlockPumpkin.java
3-
@@ -157,8 +157,8 @@
3+
@@ -153,8 +153,8 @@
44
@Override
55
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
66
{

0 commit comments

Comments
 (0)