Finished most of the Augments for the Ritual of the Shepherd.
This commit is contained in:
parent
d1e6076cca
commit
0419800a86
7 changed files with 245 additions and 21 deletions
|
@ -9,7 +9,9 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
@ -21,6 +23,24 @@ public class MeteorComponent
|
|||
|
||||
public IBlockState getStateFromOre()
|
||||
{
|
||||
if (oreName.contains(":"))
|
||||
{
|
||||
String[] stringList = oreName.split(":");
|
||||
String domain = stringList[0];
|
||||
String block = stringList[1];
|
||||
int meta = 0;
|
||||
if (stringList.length > 2 && Utils.isInteger(stringList[2]))
|
||||
{
|
||||
meta = Integer.parseInt(stringList[2]);
|
||||
}
|
||||
|
||||
Block ore = Block.REGISTRY.getObject(new ResourceLocation(domain, block));
|
||||
if (ore != null)
|
||||
{
|
||||
return ore.getStateFromMeta(meta);
|
||||
}
|
||||
}
|
||||
|
||||
List<ItemStack> list = OreDictionary.getOres(oreName);
|
||||
if (list != null && !list.isEmpty())
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ public class MeteorConfigHandler
|
|||
diamondMeteorList.add(new MeteorComponent(250, "oreDiamond"));
|
||||
diamondMeteorList.add(new MeteorComponent(180, "oreEmerald"));
|
||||
diamondMeteorList.add(new MeteorComponent(50, "oreRedstone"));
|
||||
diamondMeteorList.add(new MeteorComponent(400, "oreCoal"));
|
||||
diamondMeteorList.add(new MeteorComponent(400, "minecraft:diamond_block"));
|
||||
|
||||
Meteor diamondMeteor = new Meteor(new ItemStack(Blocks.DIAMOND_BLOCK), diamondMeteorList, 10, 3, 1000);
|
||||
goldMeteor.setVersion(3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue