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

@ -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);
}
}
}