mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Begin work on official TE2 integration :)
(Items done!)
This commit is contained in:
1 parent
8101ee2e26
commit
ec98b19ffb
48 files changed
+1056
-1721
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package cofh.api.world;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandomItem;
|
||||
|
||||
/**
|
||||
* This class essentially allows for ores to be generated in clusters, with Features randomly choosing one or more blocks from a weighted list.
|
||||
*
|
||||
* @author King Lemming
|
||||
*
|
||||
*/
|
||||
public final class WeightedRandomBlock extends WeightedRandomItem {
|
||||
|
||||
public final int blockId;
|
||||
public final int metadata;
|
||||
|
||||
public WeightedRandomBlock(ItemStack ore) {
|
||||
|
||||
super(100);
|
||||
this.blockId = ore.itemID;
|
||||
this.metadata = ore.getItemDamage();
|
||||
}
|
||||
|
||||
public WeightedRandomBlock(ItemStack ore, int weight) {
|
||||
|
||||
super(weight);
|
||||
this.blockId = ore.itemID;
|
||||
this.metadata = ore.getItemDamage();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user