From 7a242e956276fc135851ca35d3a4a28491be2ad9 Mon Sep 17 00:00:00 2001 From: Eloraam Date: Wed, 21 Sep 2011 08:08:58 +0000 Subject: [PATCH] Metadata-sensitive quantity dropped. --- forge/minecraft.patch | 54 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/forge/minecraft.patch b/forge/minecraft.patch index 63abdb14a1..c461805a2b 100644 --- a/forge/minecraft.patch +++ b/forge/minecraft.patch @@ -173,7 +173,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/BlockDoor diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Block.java ../src_work/minecraft/net/minecraft/src/Block.java --- ../src_base/minecraft/net/minecraft/src/Block.java 2011-09-19 16:32:51.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/Block.java 2011-09-19 16:35:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/Block.java 2011-09-21 03:50:55.000000000 -0400 @@ -4,6 +4,7 @@ package net.minecraft.src; @@ -199,7 +199,19 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Block.jav } public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) -@@ -283,19 +286,12 @@ +@@ -278,24 +281,24 @@ + return 1; + } + ++ /* FORGE: Metadata-sensitive version. ++ */ ++ public int quantityDropped(int i, Random random) ++ { ++ return quantityDropped(random); ++ } ++ + public int idDropped(int i, Random random) + { return blockID; } @@ -223,7 +235,16 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Block.jav } public final void dropBlockAsItem(World world, int i, int j, int k, int l) -@@ -618,6 +614,86 @@ +@@ -309,7 +312,7 @@ + { + return; + } +- int i1 = quantityDropped(world.rand); ++ int i1 = quantityDropped(l,world.rand); + for(int j1 = 0; j1 < i1; j1++) + { + if(world.rand.nextFloat() > f) +@@ -618,6 +621,86 @@ return iblockaccess.isBlockNormalCube(i, j, k) ? 0.2F : 1.0F; } @@ -2507,7 +2528,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Bl diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Block.java ../src_work/minecraft_server/net/minecraft/src/Block.java --- ../src_base/minecraft_server/net/minecraft/src/Block.java 2011-09-19 16:32:53.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/Block.java 2011-09-19 16:32:54.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/Block.java 2011-09-21 03:50:53.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -2516,7 +2537,19 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Bl import java.util.ArrayList; import java.util.Random; -@@ -223,19 +224,12 @@ +@@ -218,24 +219,24 @@ + return 1; + } + ++ /* FORGE: Metadata-sensitive version. ++ */ ++ public int quantityDropped(int i, Random random) ++ { ++ return quantityDropped(random); ++ } ++ + public int idDropped(int i, Random random) + { return blockID; } @@ -2540,7 +2573,16 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Bl } public final void dropBlockAsItem(World world, int i, int j, int k, int l) -@@ -529,6 +523,86 @@ +@@ -249,7 +250,7 @@ + { + return; + } +- int i1 = quantityDropped(world.rand); ++ int i1 = quantityDropped(l,world.rand); + for(int j1 = 0; j1 < i1; j1++) + { + if(world.rand.nextFloat() > f) +@@ -529,6 +530,86 @@ return blockMaterial.getMaterialMobility(); }