Made WorldGenMinable metadata sensitive.
This commit is contained in:
parent
bf155beaad
commit
d7ccc8619f
2 changed files with 52 additions and 4 deletions
|
@ -1,6 +1,27 @@
|
|||
--- ../src_base/minecraft/net/minecraft/src/WorldGenMinable.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft/net/minecraft/src/WorldGenMinable.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -57,7 +57,8 @@
|
||||
@@ -6,6 +6,7 @@
|
||||
{
|
||||
/** The block ID of the ore to be placed using this generator. */
|
||||
private int minableBlockId;
|
||||
+ private int minableBlockMeta = 0;
|
||||
|
||||
/** The number of blocks to generate. */
|
||||
private int numberOfBlocks;
|
||||
@@ -15,6 +16,12 @@
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
}
|
||||
+
|
||||
+ public WorldGenMinable(int id, int meta, int number)
|
||||
+ {
|
||||
+ this(id, number);
|
||||
+ minableBlockMeta = meta;
|
||||
+ }
|
||||
|
||||
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
|
||||
{
|
||||
@@ -57,9 +64,10 @@
|
||||
{
|
||||
double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
|
||||
|
@ -8,5 +29,8 @@
|
|||
+ Block block = Block.blocksList[par1World.getBlockId(var38, var41, var44)];
|
||||
+ if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (block != null && block.isGenMineableReplaceable(par1World, var38, var41, var44)))
|
||||
{
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId);
|
||||
- par1World.setBlock(var38, var41, var44, this.minableBlockId);
|
||||
+ par1World.setBlockAndMetadata(var38, var41, var44, this.minableBlockId, minableBlockMeta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,27 @@
|
|||
--- ../src_base/minecraft_server/net/minecraft/src/WorldGenMinable.java 0000-00-00 00:00:00.000000000 -0000
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/WorldGenMinable.java 0000-00-00 00:00:00.000000000 -0000
|
||||
@@ -57,7 +57,8 @@
|
||||
@@ -6,6 +6,7 @@
|
||||
{
|
||||
/** The block ID of the ore to be placed using this generator. */
|
||||
private int minableBlockId;
|
||||
+ private int minableBlockMeta = 0;
|
||||
|
||||
/** The number of blocks to generate. */
|
||||
private int numberOfBlocks;
|
||||
@@ -15,6 +16,12 @@
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
}
|
||||
+
|
||||
+ public WorldGenMinable(int id, int meta, int number)
|
||||
+ {
|
||||
+ this(id, number);
|
||||
+ minableBlockMeta = meta;
|
||||
+ }
|
||||
|
||||
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
|
||||
{
|
||||
@@ -57,9 +64,10 @@
|
||||
{
|
||||
double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
|
||||
|
@ -8,5 +29,8 @@
|
|||
+ Block block = Block.blocksList[par1World.getBlockId(var38, var41, var44)];
|
||||
+ if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (block != null && block.isGenMineableReplaceable(par1World, var38, var41, var44)))
|
||||
{
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId);
|
||||
- par1World.setBlock(var38, var41, var44, this.minableBlockId);
|
||||
+ par1World.setBlockAndMetadata(var38, var41, var44, this.minableBlockId, minableBlockMeta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue