mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Metadata-sensitive quantity dropped.
This commit is contained in:
1 parent
afdbc4064b
commit
7a242e9562
1 file changed
+48
-6
+48
-6
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user