Update Forge + mappings

This commit is contained in:
Nicholas Ignoffo 2016-04-24 10:06:28 -07:00
parent b408234ab0
commit d550513f0a
98 changed files with 313 additions and 296 deletions

View file

@ -2,10 +2,10 @@ mod_name=BloodMagic
package_group=com.wayoftime.bloodmagic
mod_version=2.0.0
mc_version=1.9
forge_version=12.16.0.1859-1.9
forge_version=12.16.0.1865-1.9
curse_id=224791
mappings_version=snapshot_20160321
mappings_version=snapshot_20160424
jei_version=3.2.8.182
waila_version=1.6.0-B3

View file

@ -6,7 +6,9 @@ import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.util.Utils;
import lombok.Getter;
import net.minecraft.block.Block;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
@ -299,7 +301,7 @@ public class ConfigHandler
{
String[] blockData = blockSet.split(":");
Block block = GameRegistry.findBlock(blockData[0], blockData[1]);
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockData[0], blockData[1]));
int meta = 0;
if (blockData.length == 3)

View file

@ -43,6 +43,6 @@ public class BlockStack
@Override
public String toString()
{
return GameData.getBlockRegistry().getNameForObject(getBlock()) + ":" + getMeta();
return getBlock().getRegistryName() + ":" + getMeta();
}
}

View file

@ -7,8 +7,9 @@ import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import java.util.ArrayList;
import java.util.HashMap;
@ -61,7 +62,7 @@ public class BloodMagicAPI
*/
public static Item getItem(String name)
{
return GameRegistry.findItem(Constants.Mod.MODID, name);
return ForgeRegistries.ITEMS.getValue(new ResourceLocation(Constants.Mod.MODID, name));
}
/**
@ -89,7 +90,7 @@ public class BloodMagicAPI
*/
public static Block getBlock(String name)
{
return GameRegistry.findBlock(Constants.Mod.MODID, name);
return ForgeRegistries.BLOCKS.getValue(new ResourceLocation(Constants.Mod.MODID, name));
}
/**

View file

@ -4,6 +4,8 @@ import lombok.Getter;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.potion.Potion;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameRegistry;
import java.util.Locale;
@ -143,7 +145,7 @@ public class Constants
public static final String WAILA_CONFIG_RITUAL = Mod.MODID + ".ritualController";
public static final String WAILA_CONFIG_ARRAY = Mod.MODID + ".array";
public static final Item THAUMCRAFT_GOGGLES = GameRegistry.findItem("Thaumcraft", "goggles");
public static final Item THAUMCRAFT_GOGGLES = ForgeRegistries.ITEMS.getValue(new ResourceLocation("Thaumcraft", "goggles"));
}
public static class Misc

View file

@ -180,7 +180,7 @@ public class SoulNetwork extends WorldSavedData
{
if (getPlayer() != null)
{
getPlayer().addPotionEffect(new PotionEffect(MobEffects.confusion, 99));
getPlayer().addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 99));
}
}

View file

@ -100,6 +100,6 @@ public class PlayerHelper
if (player == null)
return;
player.addPotionEffect(new PotionEffect(MobEffects.confusion, 80));
player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 80));
}
}

View file

@ -32,7 +32,7 @@ public class BlockAlchemyArray extends BlockContainer
public BlockAlchemyArray()
{
super(Material.cloth);
super(Material.CLOTH);
setUnlocalizedName(Constants.Mod.MODID + ".alchemyArray");
setHardness(0.1f);

View file

@ -37,7 +37,7 @@ public class BlockAltar extends BlockContainer implements IVariantProvider
{
public BlockAltar()
{
super(Material.rock);
super(Material.ROCK);
setUnlocalizedName(Constants.Mod.MODID + ".altar");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -26,7 +26,7 @@ public class BlockBloodLight extends Block
public BlockBloodLight()
{
super(Material.cloth);
super(Material.CLOTH);
setUnlocalizedName(Constants.Mod.MODID + ".bloodLight");
}

View file

@ -22,7 +22,7 @@ public class BlockBloodRune extends BlockString implements IVariantProvider
public BlockBloodRune()
{
super(Material.rock, names);
super(Material.ROCK, names);
setUnlocalizedName(Constants.Mod.MODID + ".rune.");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -19,7 +19,7 @@ public class BlockBloodStoneBrick extends BlockString implements IVariantProvide
public BlockBloodStoneBrick()
{
super(Material.rock, names);
super(Material.ROCK, names);
setUnlocalizedName(Constants.Mod.MODID + ".bloodstonebrick.");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -30,7 +30,7 @@ public class BlockBloodTank extends BlockContainer
{
public BlockBloodTank()
{
super(Material.iron);
super(Material.IRON);
setUnlocalizedName(Constants.Mod.MODID + ".bloodTank");
setHardness(2.0F);

View file

@ -19,7 +19,7 @@ public class BlockCrystal extends BlockString implements IVariantProvider
public BlockCrystal()
{
super(Material.rock, names);
super(Material.ROCK, names);
setUnlocalizedName(Constants.Mod.MODID + ".crystal.");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -31,7 +31,7 @@ public class BlockDemonCrucible extends BlockContainer implements IVariantProvid
{
public BlockDemonCrucible()
{
super(Material.rock);
super(Material.ROCK);
setUnlocalizedName(Constants.Mod.MODID + ".demonCrucible");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -39,7 +39,7 @@ public class BlockDemonCrystal extends BlockContainer
public BlockDemonCrystal()
{
super(Material.rock);
super(Material.ROCK);
this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, EnumDemonWillType.DEFAULT).withProperty(ATTACHED, EnumFacing.UP));
setUnlocalizedName(Constants.Mod.MODID + ".demonCrystal");

View file

@ -25,7 +25,7 @@ public class BlockDemonCrystallizer extends BlockContainer implements IVariantPr
{
public BlockDemonCrystallizer()
{
super(Material.rock);
super(Material.ROCK);
setUnlocalizedName(Constants.Mod.MODID + ".demonCrystallizer");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -24,7 +24,7 @@ public class BlockDemonPylon extends BlockContainer implements IVariantProvider
{
public BlockDemonPylon()
{
super(Material.rock);
super(Material.ROCK);
setUnlocalizedName(Constants.Mod.MODID + ".demonPylon");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -32,7 +32,7 @@ public class BlockDimensionalPortal extends BlockIntegerContainer
public BlockDimensionalPortal()
{
super(Material.portal, 2);
super(Material.PORTAL, 2);
setUnlocalizedName(Constants.Mod.MODID + ".dimensionalPortal");
setBlockUnbreakable();
setResistance(2000);

View file

@ -27,7 +27,7 @@ public class BlockIncenseAltar extends BlockContainer implements IVariantProvide
public BlockIncenseAltar()
{
super(Material.rock);
super(Material.ROCK);
setUnlocalizedName(Constants.Mod.MODID + ".incenseAltar");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -22,7 +22,7 @@ public class BlockLifeEssence extends BlockFluidClassic
public BlockLifeEssence()
{
super(lifeEssence, Material.water);
super(lifeEssence, Material.WATER);
setUnlocalizedName(Constants.Mod.MODID + ".fluid.lifeEssence");
lifeEssence.setBlock(this);

View file

@ -27,7 +27,7 @@ public class BlockPath extends BlockString implements IIncensePath, IVariantProv
public BlockPath()
{
super(Material.rock, names);
super(Material.ROCK, names);
setUnlocalizedName(Constants.Mod.MODID + ".path.");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -23,7 +23,7 @@ public class BlockPedestal extends BlockStringContainer
public BlockPedestal()
{
super(Material.rock, names);
super(Material.ROCK, names);
setUnlocalizedName(Constants.Mod.MODID + ".");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -30,7 +30,7 @@ public class BlockPhantom extends BlockContainer implements IVariantProvider
{
public BlockPhantom()
{
super(Material.cloth);
super(Material.CLOTH);
setUnlocalizedName(Constants.Mod.MODID + ".phantom");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -38,7 +38,7 @@ public class BlockRitualController extends BlockStringContainer implements IVari
public BlockRitualController()
{
super(Material.rock, names);
super(Material.ROCK, names);
setUnlocalizedName(Constants.Mod.MODID + ".stone.ritual.");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -29,7 +29,7 @@ public class BlockRitualStone extends BlockString implements IRitualStone, IVari
public BlockRitualStone()
{
super(Material.iron, names);
super(Material.IRON, names);
setUnlocalizedName(Constants.Mod.MODID + ".ritualStone.");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -31,7 +31,7 @@ public abstract class BlockRoutingNode extends BlockContainer
public BlockRoutingNode()
{
super(Material.rock);
super(Material.ROCK);
setCreativeTab(BloodMagic.tabBloodMagic);
setHardness(2.0F);
@ -78,7 +78,7 @@ public abstract class BlockRoutingNode extends BlockContainer
}
@Override
public boolean canRenderInLayer(BlockRenderLayer layer)
public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer)
{
return layer == BlockRenderLayer.CUTOUT_MIPPED || layer == BlockRenderLayer.TRANSLUCENT;
}

View file

@ -32,7 +32,7 @@ public class BlockSoulForge extends BlockContainer implements IVariantProvider
public BlockSoulForge()
{
super(Material.iron);
super(Material.IRON);
setUnlocalizedName(Constants.Mod.MODID + ".soulForge");
setHardness(2.0F);

View file

@ -28,7 +28,7 @@ public class BlockSpectral extends BlockContainer implements IVariantProvider
public BlockSpectral()
{
super(Material.cloth);
super(Material.CLOTH);
setUnlocalizedName(Constants.Mod.MODID + ".spectral");
}

View file

@ -28,7 +28,7 @@ public class BlockTeleposer extends BlockContainer implements IVariantProvider
{
public BlockTeleposer()
{
super(Material.rock);
super(Material.ROCK);
setCreativeTab(BloodMagic.tabBloodMagic);
setUnlocalizedName(Constants.Mod.MODID + ".teleposer");

View file

@ -84,7 +84,7 @@ public class BlockInteger extends Block
@Override
public BlockStateContainer createBlockState()
{
return Blocks.air.getBlockState();
return Blocks.AIR.getBlockState();
}
@Override

View file

@ -55,7 +55,7 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
int fluidColor = fluid.getColor(fluidStack);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
setGLColorFromInt(fluidColor);
double uMin = (double) fluidStillSprite.getMinU();

View file

@ -21,7 +21,7 @@ public class RenderFakeBlocks
double maxZ = minZ + 1;
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer wr = tessellator.getBuffer();
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);

View file

@ -28,7 +28,7 @@ public class RenderEntityBloodLight extends Render<EntityBloodLight>
GlStateManager.scale(0.5F, 0.5F, 0.5F);
GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
this.renderItem.renderItem(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), ItemCameraTransforms.TransformType.GROUND);
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
@ -37,6 +37,6 @@ public class RenderEntityBloodLight extends Render<EntityBloodLight>
protected ResourceLocation getEntityTexture(EntityBloodLight entity)
{
return TextureMap.locationBlocksTexture;
return TextureMap.LOCATION_BLOCKS_TEXTURE;
}
}

View file

@ -29,7 +29,7 @@ public class RenderEntitySoulSnare extends Render<EntitySoulSnare>
GlStateManager.scale(0.5F, 0.5F, 0.5F);
GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
this.renderItem.renderItem(new ItemStack(ModItems.soulSnare), ItemCameraTransforms.TransformType.GROUND);
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
@ -38,6 +38,6 @@ public class RenderEntitySoulSnare extends Render<EntitySoulSnare>
protected ResourceLocation getEntityTexture(EntitySoulSnare entity)
{
return TextureMap.locationBlocksTexture;
return TextureMap.LOCATION_BLOCKS_TEXTURE;
}
}

View file

@ -131,7 +131,7 @@ public class EntityBloodLight extends EntityThrowable implements IThrowableEntit
if (worldObj.isAirBlock(new BlockPos((int) this.posX, (int) this.posY, (int) this.posZ)))
{
worldObj.setBlockState(new BlockPos((int) this.posX, (int) this.posY, (int) this.posZ), Blocks.fire.getDefaultState());
worldObj.setBlockState(new BlockPos((int) this.posX, (int) this.posY, (int) this.posZ), Blocks.FIRE.getDefaultState());
}
// spawnHitParticles("magicCrit", 8);

View file

@ -62,6 +62,6 @@ public class EntitySentientArrow extends EntityTippedArrow
@Override
protected ItemStack getArrowStack()
{
return new ItemStack(Items.arrow);
return new ItemStack(Items.ARROW);
}
}

View file

@ -32,7 +32,7 @@ public class TranquilityHandlers
@Override
public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state)
{
if (block == Blocks.lava || block == Blocks.flowing_lava)
if (block == Blocks.LAVA || block == Blocks.FLOWING_LAVA)
{
return new TranquilityStack(EnumTranquilityType.LAVA, 1.2);
}
@ -51,7 +51,7 @@ public class TranquilityHandlers
return new TranquilityStack(EnumTranquilityType.FIRE, 1);
}
if (block == Blocks.netherrack)
if (block == Blocks.NETHERRACK)
{
return new TranquilityStack(EnumTranquilityType.FIRE, 0.5);
}
@ -65,7 +65,7 @@ public class TranquilityHandlers
@Override
public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state)
{
if (block == Blocks.dirt)
if (block == Blocks.DIRT)
{
return new TranquilityStack(EnumTranquilityType.EARTHEN, 0.25);
}
@ -75,7 +75,7 @@ public class TranquilityHandlers
return new TranquilityStack(EnumTranquilityType.EARTHEN, 0.5);
}
if (block == Blocks.farmland)
if (block == Blocks.FARMLAND)
{
return new TranquilityStack(EnumTranquilityType.EARTHEN, 1);
}
@ -89,7 +89,7 @@ public class TranquilityHandlers
@Override
public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state)
{
if (block == Blocks.potatoes || block == Blocks.carrots || block == Blocks.wheat || block == Blocks.nether_wart)
if (block == Blocks.POTATOES || block == Blocks.CARROTS || block == Blocks.WHEAT || block == Blocks.NETHER_WART)
{
return new TranquilityStack(EnumTranquilityType.CROP, 1);
}
@ -117,7 +117,7 @@ public class TranquilityHandlers
@Override
public TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, IBlockState state)
{
if (block == Blocks.water || block == Blocks.flowing_water)
if (block == Blocks.WATER || block == Blocks.FLOWING_WATER)
{
return new TranquilityStack(EnumTranquilityType.WATER, 1);
}

View file

@ -81,17 +81,17 @@ public class ItemAltarMaker extends Item implements IAltarManipulator, IVariantP
return super.onItemRightClick(stack, world, player, hand);
}
RayTraceResult mop = getMovingObjectPositionFromPlayer(world, player, false);
if (mop == null || mop.typeOfHit == RayTraceResult.Type.MISS || mop.typeOfHit == RayTraceResult.Type.ENTITY)
RayTraceResult rayTrace = rayTrace(world, player, false);
if (rayTrace == null || rayTrace.typeOfHit == RayTraceResult.Type.MISS || rayTrace.typeOfHit == RayTraceResult.Type.ENTITY)
return super.onItemRightClick(stack, world, player, hand);
if (mop.typeOfHit == RayTraceResult.Type.BLOCK && world.getBlockState(mop.getBlockPos()).getBlock() instanceof BlockAltar)
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK && world.getBlockState(rayTrace.getBlockPos()).getBlock() instanceof BlockAltar)
{
ChatUtil.sendNoSpam(player, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.building", NumeralHelper.toRoman(tierToBuild.toInt())));
buildAltar(world, mop.getBlockPos());
IBlockState state = world.getBlockState(mop.getBlockPos());
buildAltar(world, rayTrace.getBlockPos());
IBlockState state = world.getBlockState(rayTrace.getBlockPos());
world.notifyBlockUpdate(mop.getBlockPos(), state, state, 3);
world.notifyBlockUpdate(rayTrace.getBlockPos(), state, state, 3);
}
return super.onItemRightClick(stack, world, player, hand);
@ -135,8 +135,8 @@ public class ItemAltarMaker extends Item implements IAltarManipulator, IVariantP
if (world.isRemote)
return "";
RayTraceResult mop = getMovingObjectPositionFromPlayer(world, player, false);
BlockPos pos = mop.getBlockPos();
RayTraceResult rayTrace = rayTrace(world, player, false);
BlockPos pos = rayTrace.getBlockPos();
IBlockState state = world.getBlockState(pos);
EnumAltarTier altarTier = BloodAltar.getAltarTier(world, pos);

View file

@ -53,7 +53,7 @@ public class ItemBloodOrb extends ItemBindableBase implements IBloodOrb, IBindab
if (world == null)
return super.onItemRightClick(stack, null, player, hand);
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
// SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ,
// 20, world.provider.getDimensionId(), 4, posX, posY, posZ);

View file

@ -39,7 +39,7 @@ import javax.annotation.Nullable;
public class ItemBoundAxe extends ItemBoundTool implements IMeshProvider
{
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.planks, Blocks.bookshelf, Blocks.log, Blocks.log2, Blocks.chest, Blocks.pumpkin, Blocks.lit_pumpkin, Blocks.melon_block, Blocks.ladder);
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER);
public ItemBoundAxe()
{
@ -64,8 +64,8 @@ public class ItemBoundAxe extends ItemBoundTool implements IMeshProvider
if (world.isRemote)
return;
boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.silkTouch, stack) > 0;
int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, stack);
boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0;
int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
int range = (int) (charge / 6); //Charge is a max of 30 - want 5 to be the max
HashMultiset<ItemStackWrapper> drops = HashMultiset.create();

View file

@ -39,7 +39,7 @@ import javax.annotation.Nullable;
public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider
{
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.activator_rail, Blocks.coal_ore, Blocks.cobblestone, Blocks.detector_rail, Blocks.diamond_block, Blocks.diamond_ore, Blocks.double_stone_slab, Blocks.golden_rail, Blocks.gold_block, Blocks.gold_ore, Blocks.ice, Blocks.iron_block, Blocks.iron_ore, Blocks.lapis_block, Blocks.lapis_ore, Blocks.lit_redstone_ore, Blocks.mossy_cobblestone, Blocks.netherrack, Blocks.packed_ice, Blocks.rail, Blocks.redstone_ore, Blocks.sandstone, Blocks.red_sandstone, Blocks.stone, Blocks.stone_slab);
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB);
public ItemBoundPickaxe()
{
@ -61,8 +61,8 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider
@Override
public boolean canHarvestBlock(IBlockState blockIn)
{
return blockIn == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3
: (blockIn != Blocks.diamond_block && blockIn != Blocks.diamond_ore ? (blockIn != Blocks.emerald_ore && blockIn != Blocks.emerald_block ? (blockIn != Blocks.gold_block && blockIn != Blocks.gold_ore ? (blockIn != Blocks.iron_block && blockIn != Blocks.iron_ore ? (blockIn != Blocks.lapis_block && blockIn != Blocks.lapis_ore ? (blockIn != Blocks.redstone_ore && blockIn != Blocks.lit_redstone_ore ? (blockIn.getMaterial() == Material.rock || (blockIn.getMaterial() == Material.iron || blockIn.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2)
return blockIn == Blocks.OBSIDIAN ? this.toolMaterial.getHarvestLevel() == 3
: (blockIn != Blocks.DIAMOND_BLOCK && blockIn != Blocks.DIAMOND_ORE ? (blockIn != Blocks.EMERALD_ORE && blockIn != Blocks.EMERALD_BLOCK ? (blockIn != Blocks.GOLD_BLOCK && blockIn != Blocks.GOLD_ORE ? (blockIn != Blocks.IRON_BLOCK && blockIn != Blocks.IRON_ORE ? (blockIn != Blocks.LAPIS_BLOCK && blockIn != Blocks.LAPIS_ORE ? (blockIn != Blocks.REDSTONE_ORE && blockIn != Blocks.LIT_REDSTONE_ORE ? (blockIn.getMaterial() == Material.ROCK || (blockIn.getMaterial() == Material.IRON || blockIn.getMaterial() == Material.ANVIL)) : this.toolMaterial.getHarvestLevel() >= 2)
: this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2);
}
@ -72,7 +72,7 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider
if (!getActivated(stack))
return 1.0F;
return state.getMaterial() != Material.iron && state.getMaterial() != Material.anvil && state.getMaterial() != Material.rock ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
return state.getMaterial() != Material.IRON && state.getMaterial() != Material.ANVIL&& state.getMaterial() != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
}
@Override
@ -81,8 +81,8 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider
if (world.isRemote)
return;
boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.silkTouch, stack) > 0;
int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, stack);
boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0;
int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
int range = (charge / 6); //Charge is a max of 30 - want 5 to be the max
HashMultiset<ItemStackWrapper> drops = HashMultiset.create();

View file

@ -38,7 +38,7 @@ import javax.annotation.Nullable;
public class ItemBoundShovel extends ItemBoundTool implements IMeshProvider
{
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.clay, Blocks.dirt, Blocks.farmland, Blocks.grass, Blocks.gravel, Blocks.mycelium, Blocks.sand, Blocks.snow, Blocks.snow_layer, Blocks.soul_sand);
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND);
public ItemBoundShovel()
{
@ -63,8 +63,8 @@ public class ItemBoundShovel extends ItemBoundTool implements IMeshProvider
if (world.isRemote)
return;
boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.silkTouch, stack) > 0;
int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, stack);
boolean silkTouch = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0;
int fortuneLvl = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
int range = (int) (charge / 6); //Charge is a max of 30 - want 5 to be the max
HashMultiset<ItemStackWrapper> drops = HashMultiset.create();

View file

@ -13,7 +13,7 @@ public class ItemBucketEssence extends ItemBucket
super(ModBlocks.lifeEssence);
setUnlocalizedName(Constants.Mod.MODID + ".bucket.lifeEssence");
setContainerItem(Items.bucket);
setContainerItem(Items.BUCKET);
setCreativeTab(BloodMagic.tabBloodMagic);
}
}

View file

@ -54,7 +54,7 @@ public class ItemDaggerOfSacrifice extends Item implements IVariantProvider
if (PlayerSacrificeHelper.findAndFillAltar(attacker.worldObj, target, lifeEssence, true))
{
target.worldObj.playSound(null, target.posX, target.posY, target.posZ, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (target.worldObj.rand.nextFloat() - target.worldObj.rand.nextFloat()) * 0.8F);
target.worldObj.playSound(null, target.posX, target.posY, target.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (target.worldObj.rand.nextFloat() - target.worldObj.rand.nextFloat()) * 0.8F);
target.setHealth(-1);
target.onDeath(BloodMagicAPI.getDamageSource());
}

View file

@ -86,7 +86,7 @@ public class ItemExperienceBook extends Item implements IVariantProvider
if (player.experienceLevel % 5 == 0)
{
float f = player.experienceLevel > 30 ? 1.0F : (float) player.experienceLevel / 30.0F;
player.worldObj.playSound((EntityPlayer) null, player.posX, player.posY, player.posZ, SoundEvents.entity_player_levelup, player.getSoundCategory(), f * 0.75F, 1.0F);
player.worldObj.playSound((EntityPlayer) null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_LEVELUP, player.getSoundCategory(), f * 0.75F, 1.0F);
}
} else
{

View file

@ -72,7 +72,7 @@ public class ItemLavaCrystal extends ItemBindableBase implements IFuelHandler, I
EntityPlayer player = PlayerHelper.getPlayerFromUUID(this.getOwnerUUID(fuel));
if (player != null)
{
player.addPotionEffect(new PotionEffect(MobEffects.confusion, 99));
player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 99));
}
}

View file

@ -286,7 +286,7 @@ public class ItemRitualDiviner extends Item implements IVariantProvider
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
{
RayTraceResult ray = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult ray = this.rayTrace(world, player, false);
if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK)
{
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
@ -312,7 +312,7 @@ public class ItemRitualDiviner extends Item implements IVariantProvider
{
EntityPlayer player = (EntityPlayer) entityLiving;
RayTraceResult ray = this.getMovingObjectPositionFromPlayer(player.worldObj, player, false);
RayTraceResult ray = this.rayTrace(player.worldObj, player, false);
if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK)
{
return false;

View file

@ -70,7 +70,7 @@ public class ItemRitualReader extends Item implements IVariantProvider
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
{
RayTraceResult ray = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult ray = this.rayTrace(world, player, false);
if (ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK)
{
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);

View file

@ -107,10 +107,10 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider
int lpAdded = 200;
RayTraceResult mop = getMovingObjectPositionFromPlayer(world, player, false);
if (mop != null && mop.typeOfHit == RayTraceResult.Type.BLOCK)
RayTraceResult rayTrace = rayTrace(world, player, false);
if (rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
{
TileEntity tile = world.getTileEntity(mop.getBlockPos());
TileEntity tile = world.getTileEntity(rayTrace.getBlockPos());
if (tile != null && tile instanceof TileAltar && stack.getItemDamage() == 1)
lpAdded = ((TileAltar) tile).getCapacity();
@ -144,7 +144,7 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider
double posX = player.posX;
double posY = player.posY;
double posZ = player.posZ;
world.playSound(null, posX, posY, posZ, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
world.playSound(null, posX, posY, posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l)
world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), 0, 0, 0);

View file

@ -58,7 +58,7 @@ public class ItemTelepositionFocus extends ItemBindableBase implements IVariantP
{
if (player.isSneaking())
{
RayTraceResult mop = getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult mop = rayTrace(world, player, false);
if (mop != null && mop.typeOfHit == RayTraceResult.Type.BLOCK)
{

View file

@ -115,13 +115,13 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
switch (type)
{
case CORROSIVE:
if (player.isPotionActive(MobEffects.poison))
if (player.isPotionActive(MobEffects.POISON))
{
player.removeActivePotionEffect(MobEffects.poison);
player.removeActivePotionEffect(MobEffects.POISON);
}
if (player.isPotionActive(MobEffects.wither))
if (player.isPotionActive(MobEffects.WITHER))
{
player.removeActivePotionEffect(MobEffects.wither);
player.removeActivePotionEffect(MobEffects.WITHER);
}
break;
default:
@ -140,7 +140,7 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
case CORROSIVE:
if (!source.isProjectile())
{
attacker.addPotionEffect(new PotionEffect(MobEffects.poison, 100)); //TODO: customize duration
attacker.addPotionEffect(new PotionEffect(MobEffects.POISON, 100)); //TODO: customize duration
}
break;
case DEFAULT:

View file

@ -43,21 +43,21 @@ public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator, I
if (world.isRemote)
return ActionResult.newResult(EnumActionResult.FAIL, stack);
RayTraceResult position = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult rayTrace = this.rayTrace(world, player, false);
if (position == null)
if (rayTrace == null)
{
return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND);
} else
{
if (position.typeOfHit == RayTraceResult.Type.BLOCK)
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
{
TileEntity tile = world.getTileEntity(position.getBlockPos());
TileEntity tile = world.getTileEntity(rayTrace.getBlockPos());
if (!(tile instanceof IBloodAltar))
return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND);
LPContainer.tryAndFillAltar((IBloodAltar) tile, stack, world, position.getBlockPos());
LPContainer.tryAndFillAltar((IBloodAltar) tile, stack, world, rayTrace.getBlockPos());
}
}

View file

@ -59,7 +59,7 @@ public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulato
if (world.isRemote)
return ActionResult.newResult(EnumActionResult.FAIL, stack);
RayTraceResult position = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult position = this.rayTrace(world, player, false);
if (position == null)
{

View file

@ -42,7 +42,7 @@ public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectP
player.motionY = vec.yCoord * wantedVelocity;
player.motionZ = vec.zCoord * wantedVelocity;
player.velocityChanged = true;
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
player.fallDistance = 0;
@ -56,7 +56,7 @@ public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectP
@Override
public boolean applyOnHitEffect(EnumDemonWillType type, ItemStack swordStack, ItemStack providerStack, EntityLivingBase attacker, EntityLivingBase target)
{
target.addPotionEffect(new PotionEffect(MobEffects.levitation, 200, 0));
target.addPotionEffect(new PotionEffect(MobEffects.LEVITATION, 200, 0));
return true;
}

View file

@ -31,7 +31,7 @@ public class ItemSigilBloodLight extends ItemSigilBase
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
{
RayTraceResult mop = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult mop = this.rayTrace(world, player, false);
if (getCooldownRemainder(stack) > 0)
return super.onItemRightClick(stack, world, player, hand);

View file

@ -35,7 +35,7 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
{
super.onItemRightClick(stack, world, player, hand);
RayTraceResult position = getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult position = rayTrace(world, player, false);
if (position == null)
{

View file

@ -19,7 +19,7 @@ public class ItemSigilElementalAffinity extends ItemSigilToggleableBase
{
player.fallDistance = 0;
player.extinguish();
player.addPotionEffect(new PotionEffect(MobEffects.fireResistance, 2, 1, true, false));
player.addPotionEffect(new PotionEffect(MobEffects.waterBreathing, 2, 0, true, false));
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 2, 1, true, false));
player.addPotionEffect(new PotionEffect(MobEffects.WATER_BREATHING, 2, 0, true, false));
}
}

View file

@ -17,6 +17,6 @@ public class ItemSigilFastMiner extends ItemSigilToggleableBase
@Override
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
{
player.addPotionEffect(new PotionEffect(MobEffects.digSpeed, 2, 0, true, false));
player.addPotionEffect(new PotionEffect(MobEffects.HASTE, 2, 0, true, false));
}
}

View file

@ -31,31 +31,31 @@ public class ItemSigilLava extends ItemSigilBase
{
if (!world.isRemote && !isUnusable(stack))
{
RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult rayTrace = this.rayTrace(world, player, false);
if (movingobjectposition != null)
if (rayTrace != null)
{
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, rayTrace);
if (ret != null)
return ret;
if (movingobjectposition.typeOfHit == RayTraceResult.Type.BLOCK)
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
{
BlockPos blockpos = movingobjectposition.getBlockPos();
BlockPos blockpos = rayTrace.getBlockPos();
if (!world.isBlockModifiable(player, blockpos))
{
return super.onItemRightClick(stack, world, player, hand);
}
if (!player.canPlayerEdit(blockpos.offset(movingobjectposition.sideHit), movingobjectposition.sideHit, stack))
if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack))
{
return super.onItemRightClick(stack, world, player, hand);
}
BlockPos blockpos1 = blockpos.offset(movingobjectposition.sideHit);
BlockPos blockpos1 = blockpos.offset(rayTrace.sideHit);
if (!player.canPlayerEdit(blockpos1, movingobjectposition.sideHit, stack))
if (!player.canPlayerEdit(blockpos1, rayTrace.sideHit, stack))
{
return super.onItemRightClick(stack, world, player, hand);
}
@ -106,12 +106,12 @@ public class ItemSigilLava extends ItemSigilBase
if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isSolid())
{
return false;
} else if ((world.getBlockState(blockPos).getBlock() == Blocks.lava || world.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
} else if ((world.getBlockState(blockPos).getBlock() == Blocks.LAVA || world.getBlockState(blockPos).getBlock() == Blocks.FLOWING_LAVA) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
{
return false;
} else
{
world.setBlockState(blockPos, Blocks.flowing_lava.getBlockState().getBaseState(), 3);
world.setBlockState(blockPos, Blocks.FLOWING_LAVA.getBlockState().getBaseState(), 3);
return true;
}
}

View file

@ -35,9 +35,9 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
if (!world.isRemote)
{
super.onItemRightClick(stack, world, player, hand);
RayTraceResult position = getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult rayTrace = rayTrace(world, player, false);
if (position == null)
if (rayTrace == null)
{
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
@ -48,10 +48,10 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
} else
{
if (position.typeOfHit == RayTraceResult.Type.BLOCK)
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
{
TileEntity tile = world.getTileEntity(position.getBlockPos());
TileEntity tile = world.getTileEntity(rayTrace.getBlockPos());
if (tile != null && tile instanceof IBloodAltar)
{

View file

@ -29,29 +29,29 @@ public class ItemSigilVoid extends ItemSigilBase
{
if (!world.isRemote && !isUnusable(stack))
{
RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, true);
RayTraceResult rayTrace = this.rayTrace(world, player, true);
if (movingobjectposition != null)
if (rayTrace != null)
{
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, rayTrace);
if (ret != null)
return ret;
if (movingobjectposition.typeOfHit == RayTraceResult.Type.BLOCK)
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
{
BlockPos blockpos = movingobjectposition.getBlockPos();
BlockPos blockpos = rayTrace.getBlockPos();
if (!world.isBlockModifiable(player, blockpos))
{
return super.onItemRightClick(stack, world, player, hand);
}
if (!player.canPlayerEdit(blockpos.offset(movingobjectposition.sideHit), movingobjectposition.sideHit, stack))
if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack))
{
return super.onItemRightClick(stack, world, player, hand);
}
if (!player.canPlayerEdit(blockpos, movingobjectposition.sideHit, stack))
if (!player.canPlayerEdit(blockpos, rayTrace.sideHit, stack))
{
return super.onItemRightClick(stack, world, player, hand);
}

View file

@ -34,27 +34,27 @@ public class ItemSigilWater extends ItemSigilBase
{
if (!world.isRemote && !isUnusable(stack))
{
RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
RayTraceResult rayTrace = this.rayTrace(world, player, false);
if (movingobjectposition != null)
if (rayTrace != null)
{
ActionResult<ItemStack> ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
ActionResult<ItemStack> ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, rayTrace);
if (ret != null)
return ret;
if (movingobjectposition.typeOfHit == RayTraceResult.Type.BLOCK)
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
{
BlockPos blockpos = movingobjectposition.getBlockPos();
BlockPos blockpos = rayTrace.getBlockPos();
if (!world.isBlockModifiable(player, blockpos))
return super.onItemRightClick(stack, world, player, hand);
if (!player.canPlayerEdit(blockpos.offset(movingobjectposition.sideHit), movingobjectposition.sideHit, stack))
if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack))
return super.onItemRightClick(stack, world, player, hand);
BlockPos blockpos1 = blockpos.offset(movingobjectposition.sideHit);
BlockPos blockpos1 = blockpos.offset(rayTrace.sideHit);
if (!player.canPlayerEdit(blockpos1, movingobjectposition.sideHit, stack))
if (!player.canPlayerEdit(blockpos1, rayTrace.sideHit, stack))
return super.onItemRightClick(stack, world, player, hand);
if (this.canPlaceWater(world, blockpos1) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && this.tryPlaceWater(world, blockpos1))
@ -90,9 +90,9 @@ public class ItemSigilWater extends ItemSigilBase
return EnumActionResult.FAIL;
}
if (world.getBlockState(blockPos).getBlock() == Blocks.cauldron && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
if (world.getBlockState(blockPos).getBlock() == Blocks.CAULDRON && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
{
world.setBlockState(blockPos, Blocks.cauldron.getDefaultState().withProperty(BlockCauldron.LEVEL, 3));
world.setBlockState(blockPos, Blocks.CAULDRON.getDefaultState().withProperty(BlockCauldron.LEVEL, 3));
return EnumActionResult.SUCCESS;
}
@ -103,7 +103,7 @@ public class ItemSigilWater extends ItemSigilBase
{
if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isSolid())
return false;
else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
else if ((world.getBlockState(blockPos).getBlock() == Blocks.WATER || world.getBlockState(blockPos).getBlock() == Blocks.FLOWING_WATER) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
return false;
else
return true;
@ -125,7 +125,7 @@ public class ItemSigilWater extends ItemSigilBase
int i = pos.getX();
int j = pos.getY();
int k = pos.getZ();
worldIn.playSound((EntityPlayer) null, i, j, k, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
worldIn.playSound(null, i, j, k, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l)
worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D, 0);
@ -134,7 +134,7 @@ public class ItemSigilWater extends ItemSigilBase
if (!worldIn.isRemote && notSolid && !material.isLiquid())
worldIn.destroyBlock(pos, true);
worldIn.setBlockState(pos, Blocks.flowing_water.getDefaultState(), 3);
worldIn.setBlockState(pos, Blocks.FLOWING_WATER.getDefaultState(), 3);
}
return true;

View file

@ -211,7 +211,7 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool//, IMeshP
if (entityLiving instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) entityLiving;
boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantments.infinity, stack) > 0;
boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, stack) > 0;
ItemStack itemstack = this.getFiredArrow(player);
int i = this.getMaxItemUseDuration(stack) - timeLeft;
@ -223,7 +223,7 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool//, IMeshP
{
if (itemstack == null)
{
itemstack = new ItemStack(Items.arrow);
itemstack = new ItemStack(Items.ARROW);
}
float arrowVelocity = getArrowVelocity(i);
@ -241,25 +241,25 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool//, IMeshP
// ItemArrow itemarrow = ((ItemArrow) (itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.arrow));
// EntityArrow entityArrow = itemarrow.createArrow(world, itemstack, player);
EntityArrow entityArrow = new EntitySentientArrow(world, entityLiving, type);
entityArrow.func_184547_a(player, player.rotationPitch, player.rotationYaw, 0.0F, arrowVelocity * getVelocityOfArrow(stack), 1.0F);
entityArrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, arrowVelocity * getVelocityOfArrow(stack), 1.0F);
if (arrowVelocity == 1.0F)
{
entityArrow.setIsCritical(true);
}
int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.power, stack);
int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
entityArrow.setDamage(entityArrow.getDamage() + this.getDamageAdded(stack) + (j > 0 ? j * 0.5 + 0.5 : 0));
int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.punch, stack);
int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
if (k > 0)
{
entityArrow.setKnockbackStrength(k);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.flame, stack) > 0)
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack) > 0)
{
entityArrow.setFire(100);
}
@ -268,13 +268,13 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool//, IMeshP
if (flag1)
{
entityArrow.canBePickedUp = EntityArrow.PickupStatus.CREATIVE_ONLY;
entityArrow.pickupStatus = EntityArrow.PickupStatus.CREATIVE_ONLY;
}
world.spawnEntityInWorld(entityArrow);
}
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.entity_arrow_shoot, SoundCategory.NEUTRAL, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F);
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F);
if (!flag1)
{

View file

@ -158,7 +158,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
switch (type)
{
case CORROSIVE:
target.addPotionEffect(new PotionEffect(MobEffects.wither, poisonTime[willBracket], poisonLevel[willBracket]));
target.addPotionEffect(new PotionEffect(MobEffects.WITHER, poisonTime[willBracket], poisonLevel[willBracket]));
break;
case DEFAULT:
break;
@ -168,7 +168,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
if (!target.isEntityAlive())
{
float absorption = attacker.getAbsorptionAmount();
attacker.addPotionEffect(new PotionEffect(MobEffects.absorption, absorptionTime[willBracket]));
attacker.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, absorptionTime[willBracket]));
attacker.setAbsorptionAmount((float) Math.min(absorption + target.getMaxHealth() * 0.05f, maxAbsorptionHearts));
}
break;

View file

@ -47,12 +47,12 @@ public class ItemSoulSnare extends Item implements IVariantProvider
--itemStackIn.stackSize;
}
worldIn.playSound((EntityPlayer) null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.entity_snowball_throw, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
worldIn.playSound((EntityPlayer) null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!worldIn.isRemote)
{
EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn);
snare.func_184538_a(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
snare.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
worldIn.spawnEntityInWorld(snare);
}

View file

@ -46,7 +46,7 @@ public class StatTrackerPoison extends StatTracker
@Override
public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour)
{
if (player.isPotionActive(MobEffects.poison))
if (player.isPotionActive(MobEffects.POISON))
{
totalPoisonTicks++;
this.markDirty();

View file

@ -21,7 +21,7 @@ public class LivingArmourUpgradeCriticalStrike extends LivingArmourUpgrade
@Override
public double getAdditionalDamageOnHit(double damage, EntityPlayer wearer, EntityLivingBase hitEntity, ItemStack weapon)
{
boolean flag = wearer.fallDistance > 0.0F && !wearer.onGround && !wearer.isOnLadder() && !wearer.isInWater() && !wearer.isPotionActive(MobEffects.blindness) && !wearer.isRiding() && !wearer.isSprinting();
boolean flag = wearer.fallDistance > 0.0F && !wearer.onGround && !wearer.isOnLadder() && !wearer.isInWater() && !wearer.isPotionActive(MobEffects.BLINDNESS) && !wearer.isRiding() && !wearer.isSprinting();
if (flag)
{

View file

@ -39,10 +39,10 @@ public class LivingArmourUpgradeDigging extends LivingArmourUpgrade
{
changeMap.put(livingArmour, false);
player.addPotionEffect(new PotionEffect(MobEffects.digSpeed, digHasteTime[this.level], digHasteLevel[this.level], false, false));
player.addPotionEffect(new PotionEffect(MobEffects.HASTE, digHasteTime[this.level], digHasteLevel[this.level], false, false));
if (digSpeedTime[this.level] > 0)
{
player.addPotionEffect(new PotionEffect(MobEffects.moveSpeed, digSpeedTime[this.level], digSpeedLevel[this.level], false, false));
player.addPotionEffect(new PotionEffect(MobEffects.HASTE, digSpeedTime[this.level], digSpeedLevel[this.level], false, false));
}
}
}

View file

@ -27,12 +27,12 @@ public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade
@Override
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour)
{
if (player.isPotionActive(MobEffects.poison) && poisonCooldown <= 0)
if (player.isPotionActive(MobEffects.POISON) && poisonCooldown <= 0)
{
PotionEffect eff = player.getActivePotionEffect(MobEffects.poison);
PotionEffect eff = player.getActivePotionEffect(MobEffects.POISON);
if (eff.getAmplifier() <= poisonMaxCure[this.level])
{
player.removePotionEffect(MobEffects.poison);
player.removePotionEffect(MobEffects.POISON);
poisonCooldown = poisonCooldownTime[this.level];
ChatUtil.sendNoSpam(player, TextHelper.localize(chatBase + "poisonRemove"));

View file

@ -51,7 +51,7 @@ public class LivingArmourUpgradeSolarPowered extends LivingArmourUpgrade
if (fireResistTime[this.level] != 0 && counter % fireResistCooldown[this.level] == 0)
{
player.addPotionEffect(new PotionEffect(MobEffects.fireResistance, fireResistTime[this.level], 0, false, false));
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistTime[this.level], 0, false, false));
}
}
}

View file

@ -44,12 +44,12 @@ public class LivingArmourUpgradeSpeed extends LivingArmourUpgrade
{
if (sprintSpeedTime[this.level] > 0)
{
player.addPotionEffect(new PotionEffect(MobEffects.moveSpeed, sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false));
player.addPotionEffect(new PotionEffect(MobEffects.SPEED, sprintSpeedTime[this.level], sprintSpeedLevel[this.level], false, false));
}
if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(MobEffects.regeneration))
if (sprintRegenTime[this.level] > 0 && !player.isPotionActive(MobEffects.REGENERATION))
{
player.addPotionEffect(new PotionEffect(MobEffects.regeneration, sprintRegenTime[this.level], 0, false, false));
player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, sprintRegenTime[this.level], 0, false, false));
}
}
}

View file

@ -5,6 +5,7 @@ import net.minecraft.util.ResourceLocation;
import WayofTime.bloodmagic.api.util.helper.PlayerSacrificeHelper;
import WayofTime.bloodmagic.potion.PotionBloodMagic;
import WayofTime.bloodmagic.potion.PotionEventHandlers;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ModPotions
{
@ -45,9 +46,7 @@ public class ModPotions
protected static Potion registerPotion(String name, ResourceLocation location, boolean badEffect, int potionColour, int x, int y)
{
Potion potion = new PotionBloodMagic(name, location, badEffect, potionColour, x, y);
Potion.potionRegistry.register(-1, location, potion);
GameRegistry.register(potion.setRegistryName(location));
return potion;
}
}

View file

@ -1,5 +1,6 @@
package WayofTime.bloodmagic.registry;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectBinding;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.altar.EnumAltarTier;
@ -19,6 +20,7 @@ import WayofTime.bloodmagic.compress.StorageBlockCraftingManager;
import WayofTime.bloodmagic.item.ItemComponent;
import WayofTime.bloodmagic.item.ItemDemonCrystal;
import WayofTime.bloodmagic.item.soul.ItemSoulGem;
import com.google.common.base.Stopwatch;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@ -45,53 +47,53 @@ public class ModRecipes
{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.soulForge), "i i", "sgs", "sos", 'i', "ingotIron", 's', "stone", 'g', "ingotGold", 'o', "blockIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.sacrificialDagger), "aaa", " ba", "c a", 'a', "blockGlass", 'b', "ingotGold", 'c', "ingotIron"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.altar), "a a", "aba", "cdc", 'a', "stone", 'b', Blocks.furnace, 'c', "ingotGold", 'd', new ItemStack(ModItems.monsterSoul)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.packSelfSacrifice), "aba", "cdc", "aea", 'a', "blockGlass", 'b', Items.bucket, 'c', Items.flint, 'd', Items.leather_chestplate, 'e', ModItems.slate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.packSacrifice), "aba", "cdc", "aea", 'a', "blockGlass", 'b', Items.bucket, 'c', "ingotIron", 'd', Items.leather_chestplate, 'e', ModItems.slate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.altar), "a a", "aba", "cdc", 'a', "stone", 'b', Blocks.FURNACE, 'c', "ingotGold", 'd', new ItemStack(ModItems.monsterSoul)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.packSelfSacrifice), "aba", "cdc", "aea", 'a', "blockGlass", 'b', Items.BUCKET, 'c', Items.FLINT, 'd', Items.LEATHER_CHESTPLATE, 'e', ModItems.slate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.packSacrifice), "aba", "cdc", "aea", 'a', "blockGlass", 'b', Items.BUCKET, 'c', "ingotIron", 'd', Items.LEATHER_CHESTPLATE, 'e', ModItems.slate));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ritualDiviner), "dfd", "ase", "dwd", 'f', EnumRuneType.FIRE.getScribeStack(), 'a', EnumRuneType.AIR.getScribeStack(), 'w', EnumRuneType.WATER.getScribeStack(), 'e', EnumRuneType.EARTH.getScribeStack(), 'd', "gemDiamond", 's', "stickWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ritualDiviner, 1, 1), " S ", "tdt", " S ", 'S', new ItemStack(ModItems.slate, 1, 3), 't', EnumRuneType.DUSK.getScribeStack(), 'd', new ItemStack(ModItems.ritualDiviner)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodStoneBrick, 1, 1), "aa", "aa", 'a', new ItemStack(ModBlocks.bloodStoneBrick)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.bloodStoneBrick, 16), "stone", new ItemStack(ModItems.bloodShard)));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), new ItemStack(Items.nether_star), OrbRegistry.getOrbStack(ModItems.orbArchmage));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.soulSnare, 4, 0), "sis", "iri", "sis", 's', new ItemStack(Items.string), 'i', "ingotIron", 'r', "dustRedstone"));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.activationCrystal, 1, 1), new ItemStack(Items.NETHER_STAR), OrbRegistry.getOrbStack(ModItems.orbArchmage));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.soulSnare, 4, 0), "sis", "iri", "sis", 's', new ItemStack(Items.STRING), 'i', "ingotIron", 'r', "dustRedstone"));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.telepositionFocus, 1, 2), new ItemStack(ModItems.telepositionFocus, 1, 1), new ItemStack(ModItems.bloodShard));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.telepositionFocus, 1, 3), new ItemStack(ModItems.telepositionFocus, 1, 2), new ItemStack(ModItems.bloodShard, 1, 1));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.teleposer), "ggg", "efe", "ggg", 'g', "ingotGold", 'e', new ItemStack(Items.ender_pearl), 'f', ModItems.telepositionFocus));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.teleposer), "ggg", "efe", "ggg", 'g', "ingotGold", 'e', new ItemStack(Items.ENDER_PEARL), 'f', ModItems.telepositionFocus));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.lavaCrystal), "aba", "bcb", "ded", 'a', "blockGlass", 'b', Items.lava_bucket, 'c', OrbRegistry.getOrbStack(ModItems.orbWeak), 'd', Blocks.obsidian, 'e', "gemDiamond"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.lavaCrystal), "aba", "bcb", "ded", 'a', "blockGlass", 'b', Items.LAVA_BUCKET, 'c', OrbRegistry.getOrbStack(ModItems.orbWeak), 'd', Blocks.OBSIDIAN, 'e', "gemDiamond"));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune), "aaa", "bcb", "aaa", 'a', "stone", 'b', ModItems.slate, 'c', OrbRegistry.getOrbStack(ModItems.orbWeak)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 1), "aba", "cdc", "aba", 'a', "stone", 'b', ModItems.slate, 'c', Items.sugar, 'd', new ItemStack(ModBlocks.bloodRune))); //Speed
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 1), "aba", "cdc", "aba", 'a', "stone", 'b', ModItems.slate, 'c', Items.SUGAR, 'd', new ItemStack(ModBlocks.bloodRune))); //Speed
// GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 2), "aba", "cdc", "aba", 'a', "stone", 'b', ModItems.slate, 'c', Items.sugar, 'd', new ItemStack(ModBlocks.bloodRune))); //Efficiency
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 3), "aba", "cdc", "aea", 'a', "stone", 'b', new ItemStack(ModItems.slate, 1, 1), 'c', "ingotGold", 'd', new ItemStack(ModBlocks.bloodRune), 'e', OrbRegistry.getOrbStack(ModItems.orbApprentice))); //Sacrifice
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 4), "aba", "cdc", "aea", 'a', "stone", 'b', new ItemStack(ModItems.slate, 1, 1), 'c', "dustGlowstone", 'd', new ItemStack(ModBlocks.bloodRune), 'e', OrbRegistry.getOrbStack(ModItems.orbApprentice))); //Self-Sacrifice
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 5), "aba", "bcb", "ada", 'a', "stone", 'b', Items.water_bucket, 'c', new ItemStack(ModBlocks.bloodRune), 'd', new ItemStack(ModItems.slate, 1, 2))); //Displacement
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 6), "aba", "bcb", "ada", 'a', "stone", 'b', Items.bucket, 'c', new ItemStack(ModBlocks.bloodRune), 'd', new ItemStack(ModItems.slate, 1, 2))); //Capacity
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 7), "aba", "cdc", "aea", 'a', Blocks.obsidian, 'b', new ItemStack(ModItems.slate, 1, 3), 'c', Items.bucket, 'd', new ItemStack(ModBlocks.bloodRune, 1, 6), 'e', OrbRegistry.getOrbStack(ModItems.orbMaster))); //Augmented Capacity
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 5), "aba", "bcb", "ada", 'a', "stone", 'b', Items.WATER_BUCKET, 'c', new ItemStack(ModBlocks.bloodRune), 'd', new ItemStack(ModItems.slate, 1, 2))); //Displacement
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.bloodRune, 1, 6), "aba", "bcb", "ada", 'a', "stone", 'b', Items.BUCKET, 'c', new ItemStack(ModBlocks.bloodRune), 'd', new ItemStack(ModItems.slate, 1, 2))); //Capacity
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 7), "aba", "cdc", "aea", 'a', Blocks.OBSIDIAN, 'b', new ItemStack(ModItems.slate, 1, 3), 'c', Items.BUCKET, 'd', new ItemStack(ModBlocks.bloodRune, 1, 6), 'e', OrbRegistry.getOrbStack(ModItems.orbMaster))); //Augmented Capacity
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 8), "aba", "cdc", "aba", 'a', "stone", 'b', OrbRegistry.getOrbStack(ModItems.orbWeak), 'c', new ItemStack(ModBlocks.bloodRune), 'd', OrbRegistry.getOrbStack(ModItems.orbMaster))); //Orb
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 9), "aba", "cdc", "aea", 'a', Items.bucket, 'b', new ItemStack(ModItems.slate, 1, 4), 'c', "ingotGold", 'd', new ItemStack(ModBlocks.bloodRune, 1, 1), 'e', OrbRegistry.getOrbStack(ModItems.orbArchmage))); //Acceleration
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ritualStone, 4), "aba", "bcb", "aba", 'a', Blocks.obsidian, 'b', new ItemStack(ModItems.slate, 1, 1), 'c', OrbRegistry.getOrbStack(ModItems.orbApprentice)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ritualController), "aba", "bcb", "aba", 'a', Blocks.obsidian, 'b', ModBlocks.ritualStone, 'c', OrbRegistry.getOrbStack(ModItems.orbMagician)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ritualController, 1, 1), "aba", "bcb", "aba", 'a', Blocks.obsidian, 'b', "stone", 'c', OrbRegistry.getOrbStack(ModItems.orbWeak)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 9), "aba", "cdc", "aea", 'a', Items.BUCKET, 'b', new ItemStack(ModItems.slate, 1, 4), 'c', "ingotGold", 'd', new ItemStack(ModBlocks.bloodRune, 1, 1), 'e', OrbRegistry.getOrbStack(ModItems.orbArchmage))); //Acceleration
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ritualStone, 4), "aba", "bcb", "aba", 'a', Blocks.OBSIDIAN, 'b', new ItemStack(ModItems.slate, 1, 1), 'c', OrbRegistry.getOrbStack(ModItems.orbApprentice)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ritualController), "aba", "bcb", "aba", 'a', Blocks.OBSIDIAN, 'b', ModBlocks.ritualStone, 'c', OrbRegistry.getOrbStack(ModItems.orbMagician)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.ritualController, 1, 1), "aba", "bcb", "aba", 'a', Blocks.OBSIDIAN, 'b', "stone", 'c', OrbRegistry.getOrbStack(ModItems.orbWeak)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 0), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', new ItemStack(Blocks.glass), 's', Items.stick));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 1), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyeYellow", 's', Items.stick));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 2), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyeGreen", 's', Items.stick));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 3), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyePurple", 's', Items.stick));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 0), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "blockGlass", 's', "stickWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 1), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyeYellow", 's', "stickWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 2), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyeGreen", 's', "stickWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.baseItemFilter, 1, 3), "sgs", "gfg", "sgs", 'f', ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 'g', "dyePurple", 's', "stickWood"));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.upgradeTrainer), "ngn", "ioi", "ngn", 'o', OrbRegistry.getOrbStack(ModItems.orbMaster), 'i', "ingotIron", 'n', "nuggetGold", 'g', "ingotGold"));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.incenseAltar), "s s", "shs", "coc", 'o', OrbRegistry.getOrbStack(ModItems.orbWeak), 's', "stone", 'c', "cobblestone", 'h', new ItemStack(Items.coal, 1, 1)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.incenseAltar), "s s", "shs", "coc", 'o', OrbRegistry.getOrbStack(ModItems.orbWeak), 's', "stone", 'c', "cobblestone", 'h', new ItemStack(Items.COAL, 1, 1)));
GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.pathBlock, 4, 0), "plankWood", "plankWood", "plankWood", "plankWood", OrbRegistry.getOrbStack(ModItems.orbApprentice)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.pathBlock, 4, 1), new ItemStack(ModBlocks.pathBlock, 1, 0), new ItemStack(ModBlocks.pathBlock, 1, 0), new ItemStack(ModBlocks.pathBlock, 1, 0), new ItemStack(ModBlocks.pathBlock, 1, 0)));
GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.pathBlock, 4, 2), "stone", "stone", "stone", "stone", OrbRegistry.getOrbStack(ModItems.orbMagician)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.pathBlock, 4, 3), new ItemStack(ModBlocks.pathBlock, 1, 2), new ItemStack(ModBlocks.pathBlock, 1, 2), new ItemStack(ModBlocks.pathBlock, 1, 2), new ItemStack(ModBlocks.pathBlock, 1, 2)));
GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.pathBlock, 4, 4), new ItemStack(ModBlocks.pathBlock, 1, 2), new ItemStack(ModBlocks.pathBlock, 1, 2), new ItemStack(ModBlocks.pathBlock, 1, 2), new ItemStack(ModBlocks.pathBlock, 1, 2), OrbRegistry.getOrbStack(ModItems.orbMaster)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.pathBlock, 4, 5), new ItemStack(ModBlocks.pathBlock, 1, 4), new ItemStack(ModBlocks.pathBlock, 1, 4), new ItemStack(ModBlocks.pathBlock, 1, 4), new ItemStack(ModBlocks.pathBlock, 1, 4)));
GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.pathBlock, 4, 6), Blocks.obsidian, Blocks.obsidian, Blocks.obsidian, Blocks.obsidian, OrbRegistry.getOrbStack(ModItems.orbArchmage)));
GameRegistry.addRecipe(new ShapelessBloodOrbRecipe(new ItemStack(ModBlocks.pathBlock, 4, 6), Blocks.OBSIDIAN, Blocks.OBSIDIAN, Blocks.OBSIDIAN, Blocks.OBSIDIAN, OrbRegistry.getOrbStack(ModItems.orbArchmage)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.pathBlock, 4, 7), new ItemStack(ModBlocks.pathBlock, 1, 6), new ItemStack(ModBlocks.pathBlock, 1, 6), new ItemStack(ModBlocks.pathBlock, 1, 6), new ItemStack(ModBlocks.pathBlock, 1, 6)));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.experienceTome), "ses", "lbl", "gog", 'o', OrbRegistry.getOrbStack(ModItems.orbMagician), 'e', Blocks.lapis_block, 'l', new ItemStack(ModItems.slate, 1, 2), 'b', Items.enchanted_book, 's', Items.string, 'g', "ingotGold"));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.experienceTome), "ses", "lbl", "gog", 'o', OrbRegistry.getOrbStack(ModItems.orbMagician), 'e', Blocks.LAPIS_BLOCK, 'l', new ItemStack(ModItems.slate, 1, 2), 'b', Items.ENCHANTED_BOOK, 's', Items.STRING, 'g', "ingotGold"));
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModItems.ritualReader), "gog", "isi", " s ", 's', new ItemStack(ModItems.slate, 1, 3), 'g', "blockGlass", 'i', "ingotGold", 'o', OrbRegistry.getOrbStack(ModItems.orbMaster)));
for (int i = 1; i < BlockBloodRune.names.length; i++)
@ -116,57 +118,57 @@ public class ModRecipes
{
// ONE
AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.orbWeak), EnumAltarTier.ONE, ModItems.orbWeak.getCapacity(), 2, 1);
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.diamond), OrbRegistry.getOrbStack(ModItems.orbWeak), EnumAltarTier.ONE, 2000, 2, 1));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.stone), new ItemStack(ModItems.slate), EnumAltarTier.ONE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.bucket), new ItemStack(ModItems.bucketEssence), EnumAltarTier.ONE, 1000, 5, 0));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.DIAMOND), OrbRegistry.getOrbStack(ModItems.orbWeak), EnumAltarTier.ONE, 2000, 2, 1));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.STONE), new ItemStack(ModItems.slate), EnumAltarTier.ONE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.BUCKET), new ItemStack(ModItems.bucketEssence), EnumAltarTier.ONE, 1000, 5, 0));
// TWO
AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.orbApprentice), EnumAltarTier.TWO, ModItems.orbApprentice.getCapacity(), 5, 5);
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.redstone_block), OrbRegistry.getOrbStack(ModItems.orbApprentice), EnumAltarTier.TWO, 5000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.REDSTONE_BLOCK), OrbRegistry.getOrbStack(ModItems.orbApprentice), EnumAltarTier.TWO, 5000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.slate), new ItemStack(ModItems.slate, 1, 1), EnumAltarTier.TWO, 2000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.iron_sword), new ItemStack(ModItems.daggerOfSacrifice), EnumAltarTier.TWO, 3000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.IRON_SWORD), new ItemStack(ModItems.daggerOfSacrifice), EnumAltarTier.TWO, 3000, 5, 5));
// THREE
AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.orbMagician), EnumAltarTier.THREE, ModItems.orbMagician.getCapacity(), 15, 15);
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.gold_block), OrbRegistry.getOrbStack(ModItems.orbMagician), EnumAltarTier.THREE, 25000, 20, 20));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.GOLD_BLOCK), OrbRegistry.getOrbStack(ModItems.orbMagician), EnumAltarTier.THREE, 25000, 20, 20));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.slate, 1, 1), new ItemStack(ModItems.slate, 1, 2), EnumAltarTier.THREE, 5000, 15, 10));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.obsidian), EnumRuneType.EARTH.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.lapis_block), EnumRuneType.WATER.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.magma_cream), EnumRuneType.FIRE.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.ghast_tear), EnumRuneType.AIR.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.OBSIDIAN), EnumRuneType.EARTH.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.LAPIS_BLOCK), EnumRuneType.WATER.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.MAGMA_CREAM), EnumRuneType.FIRE.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.GHAST_TEAR), EnumRuneType.AIR.getScribeStack(), EnumAltarTier.THREE, 1000, 5, 5));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.lavaCrystal), new ItemStack(ModItems.activationCrystal), EnumAltarTier.THREE, 10000, 20, 10));
// FOUR
AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.orbMaster), EnumAltarTier.FOUR, ModItems.orbMaster.getCapacity(), 25, 25);
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.bloodShard), OrbRegistry.getOrbStack(ModItems.orbMaster), EnumAltarTier.FOUR, 25000, 30, 50));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.slate, 1, 2), new ItemStack(ModItems.slate, 1, 3), EnumAltarTier.FOUR, 15000, 20, 20));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.coal_block), EnumRuneType.DUSK.getScribeStack(), EnumAltarTier.FOUR, 2000, 20, 10));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.ender_pearl), new ItemStack(ModItems.telepositionFocus), EnumAltarTier.FOUR, 2000, 10, 10));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.COAL_BLOCK), EnumRuneType.DUSK.getScribeStack(), EnumAltarTier.FOUR, 2000, 20, 10));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.ENDER_PEARL), new ItemStack(ModItems.telepositionFocus), EnumAltarTier.FOUR, 2000, 10, 10));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.telepositionFocus), new ItemStack(ModItems.telepositionFocus, 1, 1), EnumAltarTier.FOUR, 10000, 20, 10));
// FIVE
AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.orbArchmage), EnumAltarTier.FIVE, ModItems.orbArchmage.getCapacity(), 50, 50);
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.nether_star), OrbRegistry.getOrbStack(ModItems.orbArchmage), EnumAltarTier.FIVE, 80000, 50, 100));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.NETHER_STAR), OrbRegistry.getOrbStack(ModItems.orbArchmage), EnumAltarTier.FIVE, 80000, 50, 100));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModItems.slate, 1, 3), new ItemStack(ModItems.slate, 1, 4), EnumAltarTier.FIVE, 30000, 40, 100));
// SIX
AltarRecipeRegistry.registerFillRecipe(OrbRegistry.getOrbStack(ModItems.orbTranscendent), EnumAltarTier.SIX, ModItems.orbTranscendent.getCapacity(), 50, 50);
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(ModBlocks.crystal), OrbRegistry.getOrbStack(ModItems.orbTranscendent), EnumAltarTier.SIX, 200000, 100, 200));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.glowstone), EnumRuneType.DAWN.getScribeStack(), EnumAltarTier.SIX, 200000, 100, 200));
AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Blocks.GLOWSTONE), EnumRuneType.DAWN.getScribeStack(), EnumAltarTier.SIX, 200000, 100, 200));
}
public static void addAlchemyArrayRecipes()
{
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.diamond_sword), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundSword)), new BindingAlchemyCircleRenderer());
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.diamond_axe), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundAxe)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.diamond_pickaxe), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundPickaxe)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.diamond_shovel), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundShovel)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.iron_helmet), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourHelmet)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.iron_chestplate), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourChest)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.iron_leggings), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourLegs)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.iron_boots), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourBoots)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_SWORD), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundSword)), new BindingAlchemyCircleRenderer());
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_AXE), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundAxe)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_PICKAXE), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundPickaxe)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.DIAMOND_SHOVEL), new AlchemyArrayEffectBinding(new ItemStack(ModItems.boundShovel)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_HELMET), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourHelmet)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_CHESTPLATE), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourChest)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_LEGGINGS), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourLegs)));
AlchemyArrayRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), new ItemStack(Items.IRON_BOOTS), new AlchemyArrayEffectBinding(new ItemStack(ModItems.livingArmourBoots)));
AlchemyArrayRecipeRegistry.registerCraftingRecipe(new ItemStack(Items.redstone), new ItemStack(ModItems.slate), new ItemStack(ModItems.sigilDivination), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/DivinationSigil.png"));
AlchemyArrayRecipeRegistry.registerCraftingRecipe(new ItemStack(Items.REDSTONE), new ItemStack(ModItems.slate), new ItemStack(ModItems.sigilDivination), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/DivinationSigil.png"));
AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), new ItemStack(ModItems.slate), new ItemStack(ModItems.sigilWater), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/WaterSigil.png"));
AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), new ItemStack(ModItems.slate), new ItemStack(ModItems.sigilLava), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/LavaSigil.png"));
@ -191,12 +193,16 @@ public class ModRecipes
public static void addCompressionHandlers()
{
Stopwatch stopwatch = Stopwatch.createStarted();
StorageBlockCraftingManager.getInstance().addStorageBlockRecipes();
CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.glowstone_dust, 4, 0), new ItemStack(Blocks.glowstone), 64));
CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.snowball, 4, 0), new ItemStack(Blocks.snow), 8));
CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.GLOWSTONE_DUST, 4, 0), new ItemStack(Blocks.GLOWSTONE), 64));
CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.SNOWBALL, 4, 0), new ItemStack(Blocks.SNOW), 8));
CompressionRegistry.registerHandler(new AdvancedCompressionHandler());
CompressionRegistry.registerItemThreshold(new ItemStack(Blocks.cobblestone), 64);
CompressionRegistry.registerItemThreshold(new ItemStack(Blocks.COBBLESTONE), 64);
stopwatch.stop();
BloodMagic.instance.getLogger().info("Added compression recipes in {}", stopwatch);
}
public static void addSoulForgeRecipes()
@ -205,33 +211,33 @@ public class ModRecipes
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 1), 60, 20, new ItemStack(ModItems.soulGem), "gemDiamond", "blockRedstone", "blockLapis");
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 2), 240, 50, new ItemStack(ModItems.soulGem, 1, 1), "gemDiamond", "blockGold", new ItemStack(ModItems.slate, 1, 2));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 3), 1000, 100, new ItemStack(ModItems.soulGem, 1, 2), new ItemStack(ModItems.slate, 1, 3), new ItemStack(ModItems.bloodShard), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DEFAULT));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 4), 4000, 500, new ItemStack(ModItems.soulGem, 1, 3), Items.nether_star);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientSword), 0, 0, new ItemStack(ModItems.soulGem), new ItemStack(Items.iron_sword));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientBow), 70, 0, new ItemStack(Items.bow), new ItemStack(ModItems.soulGem, 1, 1), Items.string, Items.string);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.arcaneAshes), 0, 0, "dustRedstone", "dyeWhite", new ItemStack(Items.gunpowder), Items.coal);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), 10, 3, new ItemStack(Items.sugar), new ItemStack(Items.water_bucket), new ItemStack(Items.water_bucket));
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), 32, 10, Items.lava_bucket, "dustRedstone", "cobblestone", "blockCoal");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_VOID), 64, 10, Items.bucket, Items.string, Items.string, Items.gunpowder);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH), 128, 20, "treeSapling", "treeSapling", Items.reeds, Items.sugar);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AIR), 128, 20, Items.ghast_tear, Items.feather, Items.feather);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 4), 4000, 500, new ItemStack(ModItems.soulGem, 1, 3), Items.NETHER_STAR);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientSword), 0, 0, new ItemStack(ModItems.soulGem), new ItemStack(Items.IRON_SWORD));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientBow), 70, 0, new ItemStack(Items.BOW), new ItemStack(ModItems.soulGem, 1, 1), Items.STRING, Items.STRING);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.arcaneAshes), 0, 0, "dustRedstone", "dyeWhite", new ItemStack(Items.GUNPOWDER), Items.COAL);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), 10, 3, new ItemStack(Items.SUGAR), new ItemStack(Items.WATER_BUCKET), new ItemStack(Items.WATER_BUCKET));
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), 32, 10, Items.LAVA_BUCKET, "dustRedstone", "cobblestone", "blockCoal");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_VOID), 64, 10, Items.BUCKET, Items.STRING, Items.STRING, Items.GUNPOWDER);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH), 128, 20, "treeSapling", "treeSapling", Items.REEDS, Items.SUGAR);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AIR), 128, 20, Items.GHAST_TEAR, Items.FEATHER, Items.FEATHER);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT), 64, 0, ModItems.sigilDivination, "blockGlass", "blockGlass", "dustGlowstone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), 128, 10, Items.iron_pickaxe, Items.iron_axe, Items.iron_shovel, Items.gunpowder);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.obsidian);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.water_bucket, Items.lava_bucket, Items.blaze_rod);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.gunpowder);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), 300, 10, "glowstone", Blocks.torch, "dustRedstone", "dustRedstone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_MAGNETISM), 600, 10, Items.string, "ingotGold", "blockIron", "ingotGold");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_HASTE), 1400, 100, Items.cookie, Items.sugar, Items.cookie, "stone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BRIDGE), 600, 50, Blocks.soul_sand, Blocks.soul_sand, "stone", Blocks.obsidian);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SEVERANCE), 800, 70, Items.ender_eye, Items.ender_pearl, "ingotGold", "ingotGold");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_COMPRESSION), 2000, 200, "blockIron", "blockGold", Blocks.obsidian, "cobblestone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), 128, 10, Items.IRON_PICKAXE, Items.IRON_AXE, Items.IRON_SHOVEL, Items.GUNPOWDER);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.OBSIDIAN);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.WATER_BUCKET, Items.LAVA_BUCKET, Items.BLAZE_ROD);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.GUNPOWDER);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), 300, 10, "glowstone", Blocks.TORCH, "dustRedstone", "dustRedstone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_MAGNETISM), 600, 10, Items.STRING, "ingotGold", "blockIron", "ingotGold");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_HASTE), 1400, 100, Items.COOKIE, Items.SUGAR, Items.COOKIE, "stone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BRIDGE), 600, 50, Blocks.SOUL_SAND, Blocks.SOUL_SAND, "stone", Blocks.OBSIDIAN);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SEVERANCE), 800, 70, Items.ENDER_EYE, Items.ENDER_PEARL, "ingotGold", "ingotGold");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_COMPRESSION), 2000, 200, "blockIron", "blockGold", Blocks.OBSIDIAN, "cobblestone");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TELEPOSITION), 1500, 200, ModBlocks.teleposer, "glowstone", "blockRedstone", "ingotGold");
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TRANSPOSITION), 1500, 200, ModBlocks.teleposer, "gemDiamond", Items.ender_pearl, Blocks.obsidian);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_TRANSPOSITION), 1500, 200, ModBlocks.teleposer, "gemDiamond", Items.ENDER_PEARL, Blocks.OBSIDIAN);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientArmourGem), 240, 150, Items.diamond_chestplate, new ItemStack(ModItems.soulGem, 1, 1), Blocks.iron_block, Blocks.obsidian);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientArmourGem), 240, 150, Items.DIAMOND_CHESTPLATE, new ItemStack(ModItems.soulGem, 1, 1), Blocks.IRON_BLOCK, Blocks.OBSIDIAN);
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 400, 10, "blockGlass", "stone", new ItemStack(ModItems.slate));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.nodeRouter), 400, 5, Items.stick, new ItemStack(ModItems.slate, 1, 1), "gemLapis", "gemLapis");
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.nodeRouter), 400, 5, "stickWood", new ItemStack(ModItems.slate, 1, 1), "gemLapis", "gemLapis");
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.itemRoutingNode), 400, 5, "dustGlowstone", "dustRedstone", "blockGlass", "stone");
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.outputRoutingNode), 400, 25, "dustGlowstone", "dustRedstone", "ingotIron", new ItemStack(ModBlocks.itemRoutingNode));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.inputRoutingNode), 400, 25, "dustGlowstone", "dustRedstone", "ingotGold", new ItemStack(ModBlocks.itemRoutingNode));
@ -242,7 +248,7 @@ public class ModRecipes
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.demonCrystal, 1, 2), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_DESTRUCTIVE));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.demonCrystal, 1, 4), 1200, 100, ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST), ItemDemonCrystal.getStack(ItemDemonCrystal.CRYSTAL_STEADFAST));
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.demonCrucible), 400, 100, Items.cauldron, "stone", "gemLapis", "gemDiamond");
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.demonCrucible), 400, 100, Items.CAULDRON, "stone", "gemLapis", "gemDiamond");
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.demonPylon), 400, 50, "blockIron", "stone", "gemLapis", ModItems.itemDemonCrystal);
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModBlocks.demonCrystallizer), 500, 100, ModBlocks.soulForge, "stone", "gemLapis", "blockGlass");
}

View file

@ -130,9 +130,9 @@ public class ModRituals
public static void initHarvestHandlers()
{
HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.diamond_block), 15);
HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.gold_block), 10);
HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.iron_block), 6);
HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.DIAMOND_BLOCK), 15);
HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.GOLD_BLOCK), 10);
HarvestRegistry.registerRangeAmplifier(new BlockStack(Blocks.IRON_BLOCK), 6);
HarvestRegistry.registerHandler(new HarvestHandlerPlantable());
HarvestRegistry.registerHandler(new HarvestHandlerTall());

View file

@ -293,7 +293,7 @@ public class RitualAltarBuilder extends Ritual
if (iItemHandler.getStackInSlot(i) != null && iItemHandler.getStackInSlot(i).stackSize > 0 && iItemHandler.getStackInSlot(i).getItem() instanceof ItemBlock && !(Block.getBlockFromItem(iItemHandler.getStackInSlot(i).getItem()) instanceof BlockBloodRune) && iItemHandler.extractItem(i, 1, true) != null)
{
Block block = Block.getBlockFromItem(iItemHandler.getStackInSlot(i).getItem());
if (block != null && block != Blocks.glowstone && block != ModBlocks.bloodStoneBrick && block != ModBlocks.crystal)
if (block != null && block != Blocks.GLOWSTONE && block != ModBlocks.bloodStoneBrick && block != ModBlocks.crystal)
{
BlockStack blockStack = new BlockStack(block, iItemHandler.getStackInSlot(i).getItemDamage());
iItemHandler.extractItem(i, 1, false);
@ -309,7 +309,7 @@ public class RitualAltarBuilder extends Ritual
if (inv.getStackInSlot(i) != null && inv.getStackInSlot(i).stackSize > 0 && inv.getStackInSlot(i).getItem() instanceof ItemBlock && !(Block.getBlockFromItem(inv.getStackInSlot(i).getItem()) instanceof BlockBloodRune))
{
Block block = Block.getBlockFromItem(inv.getStackInSlot(i).getItem());
if (block != null && block != Blocks.glowstone && block != ModBlocks.bloodStoneBrick && block != ModBlocks.crystal)
if (block != null && block != Blocks.GLOWSTONE && block != ModBlocks.bloodStoneBrick && block != ModBlocks.crystal)
{
BlockStack blockStack = new BlockStack(block, inv.getStackInSlot(i).getItemDamage());
inv.decrStackSize(i, 1);

View file

@ -32,7 +32,7 @@ public class RitualCobblestone extends Ritual
SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner());
int currentEssence = network.getCurrentEssence();
TileEntity tileEntity = world.getTileEntity(masterRitualStone.getBlockPos().up());
Block block = Blocks.cobblestone;
Block block = Blocks.COBBLESTONE;
if (currentEssence < getRefreshCost())
{
@ -53,12 +53,12 @@ public class RitualCobblestone extends Ritual
switch (alchemyArray.getStackInSlot(0).getItemDamage())
{
case 0:
block = Blocks.obsidian;
block = Blocks.OBSIDIAN;
alchemyArray.decrStackSize(0, 1);
world.setBlockToAir(alchemyArray.getPos());
break;
case 1:
block = Blocks.netherrack;
block = Blocks.NETHERRACK;
alchemyArray.decrStackSize(0, 1);
world.setBlockToAir(alchemyArray.getPos());
break;

View file

@ -156,7 +156,7 @@ public class RitualExpulsion extends Ritual
{
moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ);
if (!entityLiving.isCollided && !entityLiving.worldObj.isAnyLiquid(entityLiving.getEntityBoundingBox()))
if (!entityLiving.isCollided && !entityLiving.worldObj.containsAnyLiquid(entityLiving.getEntityBoundingBox()))
{
flag = true;
}

View file

@ -43,7 +43,7 @@ public class RitualLava extends Ritual
{
if (world.isAirBlock(newPos))
{
world.setBlockState(newPos, Blocks.flowing_lava.getDefaultState());
world.setBlockState(newPos, Blocks.FLOWING_LAVA.getDefaultState());
totalEffects++;
}

View file

@ -159,17 +159,17 @@ public class RitualMagnetic extends Ritual
public int getRadius(Block block)
{
if (block == Blocks.iron_block)
if (block == Blocks.IRON_BLOCK)
{
return 7;
}
if (block == Blocks.gold_block)
if (block == Blocks.GOLD_BLOCK)
{
return 15;
}
if (block == Blocks.diamond_block)
if (block == Blocks.DIAMOND_BLOCK)
{
return 31;
}

View file

@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import java.util.ArrayList;
@ -58,7 +59,7 @@ public class RitualPortal extends Ritual
if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.ritualStone))
{
blockState = getBlockState(world, i, y, k);
name = addStringToEnd(name, Block.blockRegistry.getNameForObject(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
}
}
}
@ -67,7 +68,7 @@ public class RitualPortal extends Ritual
if (!world.isAirBlock(new BlockPos(x - 3, j, z)) && !(getBlockState(world, x - 3, j, z).getBlock() == ModBlocks.ritualStone))
{
blockState = getBlockState(world, x - 3, j, z);
name = addStringToEnd(name, Block.blockRegistry.getNameForObject(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
}
}
for (int j = y + 1; j <= y + 5; j++)
@ -75,7 +76,7 @@ public class RitualPortal extends Ritual
if (!world.isAirBlock(new BlockPos(x + 3, j, z)) && !(getBlockState(world, x + 3, j, z) == ModBlocks.ritualStone))
{
blockState = getBlockState(world, x + 3, j, z);
name = addStringToEnd(name, Block.blockRegistry.getNameForObject(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
}
}
} else if (direction == EnumFacing.EAST || direction == EnumFacing.WEST)
@ -87,7 +88,7 @@ public class RitualPortal extends Ritual
if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.ritualStone))
{
blockState = getBlockState(world, i, y, k);
name = addStringToEnd(name, Block.blockRegistry.getNameForObject(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
}
}
}
@ -96,7 +97,7 @@ public class RitualPortal extends Ritual
if (!world.isAirBlock(new BlockPos(x, j, z - 3)) && !(getBlockState(world, x, j, z - 3).getBlock() == ModBlocks.ritualStone))
{
blockState = getBlockState(world, x, j, z - 3);
name = addStringToEnd(name, Block.blockRegistry.getNameForObject(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
}
}
for (int j = y + 1; j <= y + 5; j++)
@ -104,7 +105,7 @@ public class RitualPortal extends Ritual
if (!world.isAirBlock(new BlockPos(x, j, z + 3)) && !(getBlockState(world, x, j, z + 3).getBlock() == ModBlocks.ritualStone))
{
blockState = getBlockState(world, x, j, z + 3);
name = addStringToEnd(name, Block.blockRegistry.getNameForObject(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
}
}
}

View file

@ -78,7 +78,7 @@ public class RitualPump extends Ritual
network.syphon(getRefreshCost());
currentPos = blockPosIterator.next();
fluidHandler.fill(EnumFacing.DOWN, fluidHandler.drain(EnumFacing.DOWN, 1000, false), true);
world.setBlockState(currentPos, Blocks.stone.getDefaultState());
world.setBlockState(currentPos, Blocks.STONE.getDefaultState());
blockPosIterator.remove();
}
}

View file

@ -60,7 +60,7 @@ public class RitualRegeneration extends Ritual
float health = player.getHealth();
if (health <= player.getMaxHealth() - 1)
{
player.addPotionEffect(new PotionEffect(MobEffects.regeneration, 50, 0, false, false));
player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50, 0, false, false));
totalEffects++;

View file

@ -43,7 +43,7 @@ public class RitualWater extends Ritual
{
if (world.isAirBlock(newPos))
{
world.setBlockState(newPos, Blocks.flowing_water.getDefaultState());
world.setBlockState(newPos, Blocks.FLOWING_WATER.getDefaultState());
totalEffects++;
}

View file

@ -23,10 +23,11 @@ public class HarvestHandlerPlantable implements IHarvestHandler
{
public HarvestHandlerPlantable()
{
HarvestRegistry.registerStandardCrop(Blocks.carrots, 7);
HarvestRegistry.registerStandardCrop(Blocks.wheat, 7);
HarvestRegistry.registerStandardCrop(Blocks.potatoes, 7);
HarvestRegistry.registerStandardCrop(Blocks.nether_wart, 3);
HarvestRegistry.registerStandardCrop(Blocks.CARROTS, 7);
HarvestRegistry.registerStandardCrop(Blocks.WHEAT, 7);
HarvestRegistry.registerStandardCrop(Blocks.POTATOES, 7);
HarvestRegistry.registerStandardCrop(Blocks.BEETROOTS, 3);
HarvestRegistry.registerStandardCrop(Blocks.NETHER_WART, 3);
}
@Override

View file

@ -27,8 +27,8 @@ public class HarvestHandlerStem implements IHarvestHandler
{
public HarvestHandlerStem()
{
HarvestRegistry.registerStemCrop(new BlockStack(Blocks.pumpkin, OreDictionary.WILDCARD_VALUE), new BlockStack(Blocks.pumpkin_stem, 7));
HarvestRegistry.registerStemCrop(new BlockStack(Blocks.melon_block), new BlockStack(Blocks.melon_stem, 7));
HarvestRegistry.registerStemCrop(new BlockStack(Blocks.PUMPKIN, OreDictionary.WILDCARD_VALUE), new BlockStack(Blocks.PUMPKIN_STEM, 7));
HarvestRegistry.registerStemCrop(new BlockStack(Blocks.MELON_BLOCK), new BlockStack(Blocks.MELON_STEM, 7));
}
@Override

View file

@ -21,8 +21,8 @@ public class HarvestHandlerTall implements IHarvestHandler
{
public HarvestHandlerTall()
{
HarvestRegistry.registerTallCrop(new BlockStack(Blocks.reeds));
HarvestRegistry.registerTallCrop(new BlockStack(Blocks.cactus));
HarvestRegistry.registerTallCrop(new BlockStack(Blocks.REEDS));
HarvestRegistry.registerTallCrop(new BlockStack(Blocks.CACTUS));
}
@Override

View file

@ -11,7 +11,7 @@ public class ImperfectRitualDay extends ImperfectRitual
{
public ImperfectRitualDay()
{
super("day", new BlockStack(Blocks.gold_block), 5000, true, "ritual." + Constants.Mod.MODID + ".imperfect.day");
super("day", new BlockStack(Blocks.GOLD_BLOCK), 5000, true, "ritual." + Constants.Mod.MODID + ".imperfect.day");
}
@Override

View file

@ -11,7 +11,7 @@ public class ImperfectRitualNight extends ImperfectRitual
{
public ImperfectRitualNight()
{
super("night", new BlockStack(Blocks.lapis_block), 100, true, "ritual." + Constants.Mod.MODID + ".imperfect.night");
super("night", new BlockStack(Blocks.LAPIS_BLOCK), 100, true, "ritual." + Constants.Mod.MODID + ".imperfect.night");
}
@Override

View file

@ -11,7 +11,7 @@ public class ImperfectRitualRain extends ImperfectRitual
{
public ImperfectRitualRain()
{
super("rain", new BlockStack(Blocks.water), 5000, true, "ritual." + Constants.Mod.MODID + ".imperfect.rain");
super("rain", new BlockStack(Blocks.WATER), 5000, true, "ritual." + Constants.Mod.MODID + ".imperfect.rain");
}
@Override

View file

@ -14,14 +14,14 @@ public class ImperfectRitualResistance extends ImperfectRitual
{
public ImperfectRitualResistance()
{
super("resistance", new BlockStack(Blocks.bedrock), 5000, "ritual." + Constants.Mod.MODID + ".imperfect.resistance");
super("resistance", new BlockStack(Blocks.BEDROCK), 5000, "ritual." + Constants.Mod.MODID + ".imperfect.resistance");
}
@Override
public boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player)
{
player.addPotionEffect(new PotionEffect(MobEffects.fireResistance, 1200, 1));
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 1200, 1));
return true;
}

View file

@ -15,7 +15,7 @@ public class ImperfectRitualZombie extends ImperfectRitual
{
public ImperfectRitualZombie()
{
super("zombie", new BlockStack(Blocks.coal_block), 5000, "ritual." + Constants.Mod.MODID + ".imperfect.zombie");
super("zombie", new BlockStack(Blocks.COAL_BLOCK), 5000, "ritual." + Constants.Mod.MODID + ".imperfect.zombie");
}
@Override
@ -23,9 +23,9 @@ public class ImperfectRitualZombie extends ImperfectRitual
{
EntityZombie zombie = new EntityZombie(imperfectRitualStone.getRitualWorld());
zombie.setPosition(imperfectRitualStone.getRitualPos().getX() + 0.5, imperfectRitualStone.getRitualPos().getY() + 2.1, imperfectRitualStone.getRitualPos().getZ() + 0.5);
zombie.addPotionEffect(new PotionEffect(MobEffects.fireResistance, 2000));
zombie.addPotionEffect(new PotionEffect(MobEffects.damageBoost, 20000, 7));
zombie.addPotionEffect(new PotionEffect(MobEffects.resistance, 20000, 3));
zombie.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 2000));
zombie.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 20000, 7));
zombie.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 20000, 3));
if (!imperfectRitualStone.getRitualWorld().isRemote)
imperfectRitualStone.getRitualWorld().spawnEntityInWorld(zombie);

View file

@ -59,7 +59,7 @@ public class Teleports
player.playerNetServerHandler.sendPacket(new SPacketUpdateHealth(player.getHealth(), player.getFoodStats().getFoodLevel(), player.getFoodStats().getSaturationLevel()));
player.timeUntilPortal = 150;
player.worldObj.playSound(x, y, z, SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
player.worldObj.playSound(x, y, z, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
} else
{
SoulNetwork network = NetworkHelper.getSoulNetwork(networkToDrain);
@ -75,7 +75,7 @@ public class Teleports
entity.timeUntilPortal = 150;
world.resetUpdateEntityTick();
entity.worldObj.playSound(x, y, z, SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
entity.worldObj.playSound(x, y, z, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
}
}
}
@ -153,7 +153,7 @@ public class Teleports
entity.writeToNBTOptional(tag);
entity.setDead();
oldWorld.playSound(entity.posX, entity.posY, entity.posZ, SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
oldWorld.playSound(entity.posX, entity.posY, entity.posZ, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
Entity teleportedEntity = EntityList.createEntityFromNBT(tag, newWorldServer);
if (teleportedEntity != null)
@ -169,7 +169,7 @@ public class Teleports
newWorldServer.resetUpdateEntityTick();
}
entity.timeUntilPortal = entity instanceof EntityLiving ? 150 : 20;
newWorldServer.playSound(x, y, z, SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
newWorldServer.playSound(x, y, z, SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
}
}
}

View file

@ -3,6 +3,7 @@ package WayofTime.bloodmagic.routing;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameData;
public class ModIdItemFilter extends TestItemFilter
@ -20,9 +21,9 @@ public class ModIdItemFilter extends TestItemFilter
return false;
}
public String getModID(Item itm)
public String getModID(Item item)
{
ResourceLocation resource = GameData.getItemRegistry().getNameForObject(itm);
ResourceLocation resource = ForgeRegistries.ITEMS.getKey(item);
return resource.getResourceDomain();
}
}

View file

@ -8,8 +8,10 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ITickable;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
public class TileSpectralBlock extends TileEntity implements ITickable
{
@ -52,7 +54,7 @@ public class TileSpectralBlock extends TileEntity implements ITickable
private void setContainedBlockInfo(IBlockState blockState)
{
containedBlockName = Block.blockRegistry.getNameForObject(blockState.getBlock()).toString();
containedBlockName = blockState.getBlock().getRegistryName().toString();
containedBlockMeta = blockState.getBlock().getMetaFromState(blockState);
}
@ -72,7 +74,7 @@ public class TileSpectralBlock extends TileEntity implements ITickable
Block block = null;
if (!Strings.isNullOrEmpty(containedBlockName))
block = Block.getBlockFromName(containedBlockName);
block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(containedBlockName));
if (block != null && worldObj.setBlockState(pos, block.getStateFromMeta(containedBlockMeta)))
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);

View file

@ -148,19 +148,19 @@ public class Utils
switch (component)
{
case GLOWSTONE:
return Blocks.glowstone;
return Blocks.GLOWSTONE;
case BLOODSTONE:
return ModBlocks.bloodStoneBrick;
case BEACON:
return Blocks.beacon;
return Blocks.BEACON;
case BLOODRUNE:
return ModBlocks.bloodRune;
case CRYSTAL:
return ModBlocks.crystal;
case NOTAIR:
return Blocks.stonebrick;
return Blocks.STONEBRICK;
default:
return Blocks.air;
return Blocks.AIR;
}
}
@ -233,7 +233,7 @@ public class Utils
public static float applyPotionDamageCalculations(EntityLivingBase attackedEntity, DamageSource source, float damage)
{
Potion resistance = MobEffects.resistance;
Potion resistance = MobEffects.RESISTANCE;
if (source.isDamageAbsolute())
{
@ -694,11 +694,11 @@ public class Utils
BlockStack initialStack = BlockStack.getStackFromPos(initialWorld, initialPos);
BlockStack finalStack = BlockStack.getStackFromPos(finalWorld, finalPos);
if ((initialStack.getBlock().equals(Blocks.air) && finalStack.getBlock().equals(Blocks.air)) || initialStack.getBlock() instanceof BlockPortal || finalStack.getBlock() instanceof BlockPortal)
if ((initialStack.getBlock().equals(Blocks.AIR) && finalStack.getBlock().equals(Blocks.AIR)) || initialStack.getBlock() instanceof BlockPortal || finalStack.getBlock() instanceof BlockPortal)
return false;
initialWorld.playSound(initialPos.getX(), initialPos.getY(), initialPos.getZ(), SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
finalWorld.playSound(finalPos.getX(), finalPos.getY(), finalPos.getZ(), SoundEvents.entity_endermen_teleport, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
initialWorld.playSound(initialPos.getX(), initialPos.getY(), initialPos.getZ(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
finalWorld.playSound(finalPos.getX(), finalPos.getY(), finalPos.getZ(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.AMBIENT, 1.0F, 1.0F, false);
//Finally, we get to do something! (CLEARING TILES)
if (finalStack.getBlock() != null)

View file

@ -313,7 +313,7 @@ public class EventHandler
if (percentIncrease > 0 && (player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)
{
player.moveFlying(0F, 1F, player.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
player.moveRelative(0F, 1F, player.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
}
}
}
@ -421,7 +421,7 @@ public class EventHandler
@SubscribeEvent
public void onBucketFill(FillBucketEvent event)
{
if (event.getEmptyBucket().getItem() != Items.bucket)
if (event.getEmptyBucket().getItem() != Items.BUCKET)
return;
ItemStack result = null;
@ -682,7 +682,7 @@ public class EventHandler
StatTrackerSprintAttack.incrementCounter(armour, amount);
}
boolean isCritical = lastPlayerSwingStrength > 0.9 && player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(MobEffects.blindness) && !player.isRiding() && !player.isSprinting();
boolean isCritical = lastPlayerSwingStrength > 0.9 && player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(MobEffects.BLINDNESS) && !player.isRiding() && !player.isSprinting();
if (isCritical)
{
StatTrackerCriticalStrike.incrementCounter(armour, amount);
@ -734,8 +734,8 @@ public class EventHandler
int numberExtra = ((LivingArmourUpgradeArrowShot) upgrade).getExtraArrows();
for (int n = 0; n < numberExtra; n++)
{
ItemArrow itemarrow = (ItemArrow) Items.arrow;
EntityArrow entityarrow = itemarrow.createArrow(world, new ItemStack(Items.arrow), player);
ItemArrow itemarrow = (ItemArrow) Items.ARROW;
EntityArrow entityarrow = itemarrow.createArrow(world, new ItemStack(Items.ARROW), player);
double velocityModifier = 0.6 * f;
entityarrow.motionX += (random.nextDouble() - 0.5) * velocityModifier;
@ -747,26 +747,26 @@ public class EventHandler
entityarrow.setIsCritical(true);
}
int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.power, stack);
int j = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
if (j > 0)
{
entityarrow.setDamage(entityarrow.getDamage() + (double) j * 0.5D + 0.5D);
}
int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.punch, stack);
int k = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
if (k > 0)
{
entityarrow.setKnockbackStrength(k);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.flame, stack) > 0)
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, stack) > 0)
{
entityarrow.setFire(100);
}
entityarrow.canBePickedUp = EntityArrow.PickupStatus.CREATIVE_ONLY;
entityarrow.pickupStatus = EntityArrow.PickupStatus.CREATIVE_ONLY;
if (!world.isRemote)
{

View file

@ -5,7 +5,9 @@ import WayofTime.bloodmagic.util.Utils;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.event.FMLInterModComms;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class IMCHandler
@ -37,7 +39,7 @@ public class IMCHandler
String[] splitInfo = message.getStringValue().split(":");
if (splitInfo.length == 2)
{
Block block = GameRegistry.findBlock(splitInfo[0], splitInfo[1]);
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(splitInfo[0], splitInfo[1]));
if (block != null)
BloodMagicAPI.blacklistFromGreenGrove(block);
}