It compiles. Somehow.
This commit is contained in:
parent
554c9852e6
commit
348fee1e2a
150 changed files with 1029 additions and 2186 deletions
|
@ -2,6 +2,7 @@ package WayofTime.bloodmagic.item.sigil;
|
|||
|
||||
import WayofTime.bloodmagic.api.iface.ISigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
|
@ -17,7 +18,6 @@ import net.minecraft.world.World;
|
|||
import WayofTime.bloodmagic.api.iface.ISentientSwordEffectProvider;
|
||||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
|
||||
public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectProvider
|
||||
{
|
||||
|
@ -42,9 +42,9 @@ public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectP
|
|||
double wantedVelocity = 1.7;
|
||||
|
||||
// TODO - Revisit after potions
|
||||
if (player.isPotionActive(ModPotions.boost))
|
||||
if (player.isPotionActive(RegistrarBloodMagic.BOOST))
|
||||
{
|
||||
int amplifier = player.getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
int amplifier = player.getActivePotionEffect(RegistrarBloodMagic.BOOST).getAmplifier();
|
||||
wantedVelocity += (1 + amplifier) * (0.35);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,19 +8,17 @@ import WayofTime.bloodmagic.BloodMagic;
|
|||
import WayofTime.bloodmagic.api.impl.ItemSigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import com.google.common.base.Strings;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
@Getter
|
||||
public class ItemSigilBase extends ItemSigil implements IVariantProvider
|
||||
{
|
||||
protected final String tooltipBase;
|
||||
|
@ -44,7 +42,7 @@ public class ItemSigilBase extends ItemSigil implements IVariantProvider
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
|
||||
{
|
||||
if (TextHelper.canTranslate(tooltipBase + "desc"))
|
||||
tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect(tooltipBase + "desc"))));
|
||||
|
@ -55,14 +53,18 @@ public class ItemSigilBase extends ItemSigil implements IVariantProvider
|
|||
if (!Strings.isNullOrEmpty(getOwnerName(stack)))
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.currentOwner", PlayerHelper.getUsernameFromStack(stack)));
|
||||
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
ret.add(new ImmutablePair<Integer, String>(0, "type=normal"));
|
||||
ret.add(Pair.of(0, "type=normal"));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
|
||||
public class ItemSigilBounce extends ItemSigilToggleableBase
|
||||
{
|
||||
|
@ -20,6 +20,6 @@ public class ItemSigilBounce extends ItemSigilToggleableBase
|
|||
if (PlayerHelper.isFakePlayer(player))
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(ModPotions.bounce, 2, 0, true, false));
|
||||
player.addPotionEffect(new PotionEffect(RegistrarBloodMagic.BOUNCE, 2, 0, true, false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
|
||||
public class ItemSigilClaw extends ItemSigilToggleableBase
|
||||
{
|
||||
|
@ -20,6 +20,6 @@ public class ItemSigilClaw extends ItemSigilToggleableBase
|
|||
if (PlayerHelper.isFakePlayer(player))
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(ModPotions.cling, 2, 0, true, false));
|
||||
player.addPotionEffect(new PotionEffect(RegistrarBloodMagic.CLING, 2, 0, true, false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ public class ItemSigilCompression extends ItemSigilToggleableBase
|
|||
@Override
|
||||
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
|
||||
{
|
||||
if (true)
|
||||
return; // TODO - Rewrite compression system
|
||||
|
||||
if (PlayerHelper.isFakePlayer(player))
|
||||
return;
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ package WayofTime.bloodmagic.item.sigil;
|
|||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
|
||||
public class ItemSigilEnderSeverance extends ItemSigilToggleableBase
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ public class ItemSigilEnderSeverance extends ItemSigilToggleableBase
|
|||
for (Entity entity : entityList)
|
||||
{
|
||||
if (entity instanceof EntityEnderman)
|
||||
((EntityEnderman) entity).addPotionEffect(new PotionEffect(ModPotions.planarBinding, 40, 0));
|
||||
((EntityEnderman) entity).addPotionEffect(new PotionEffect(RegistrarBloodMagic.PLANAR_BINDING, 40, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ItemSigilFastMiner extends ItemSigilToggleableBase
|
|||
int ticks = 600;
|
||||
int potionPotency = 2;
|
||||
|
||||
AxisAlignedBB bb = new AxisAlignedBB(pos).expandXyz(radius);
|
||||
AxisAlignedBB bb = new AxisAlignedBB(pos).grow(radius);
|
||||
List<EntityPlayer> playerList = world.getEntitiesWithinAABB(EntityPlayer.class, bb);
|
||||
for (EntityPlayer player : playerList)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ public class ItemSigilFastMiner extends ItemSigilToggleableBase
|
|||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
player.hurtResistantTime = 0;
|
||||
player.attackEntityFrom(BloodMagicAPI.getDamageSource(), 1.0F);
|
||||
player.attackEntityFrom(BloodMagicAPI.damageSource, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
@ -20,6 +20,6 @@ public class ItemSigilHaste extends ItemSigilToggleableBase
|
|||
if (PlayerHelper.isFakePlayer(player))
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(ModPotions.boost, 2, 0, true, false));
|
||||
player.addPotionEffect(new PotionEffect(RegistrarBloodMagic.BOOST, 2, 0, true, false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import WayofTime.bloodmagic.api.iface.ISigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.client.key.KeyBindings;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -67,9 +68,9 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
|
||||
{
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic.sigil.holding.press", KeyBindings.OPEN_HOLDING.getKey().getDisplayName()));
|
||||
|
||||
if (!stack.hasTagCompound())
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import WayofTime.bloodmagic.api.iface.ISigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -31,9 +32,9 @@ public class ItemSigilTeleposition extends ItemSigilBase
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
|
||||
{
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
|
||||
if (!stack.hasTagCompound())
|
||||
return;
|
||||
|
|
|
@ -10,9 +10,11 @@ import WayofTime.bloodmagic.client.IMeshProvider;
|
|||
import WayofTime.bloodmagic.client.mesh.CustomMeshDefinitionActivatable;
|
||||
import com.google.common.base.Strings;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -39,9 +41,9 @@ public class ItemSigilToggleableBase extends ItemSigilToggleable implements IMes
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
|
||||
{
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
if (!stack.hasTagCompound())
|
||||
return;
|
||||
tooltip.add(TextHelper.localizeEffect("tooltip.bloodmagic." + (getActivated(stack) ? "activated" : "deactivated")));
|
||||
|
|
|
@ -4,8 +4,10 @@ import java.util.List;
|
|||
|
||||
import WayofTime.bloodmagic.api.iface.ISigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.api_impl.BloodMagicAPI;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -16,9 +18,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.BlockStack;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
|
@ -32,9 +32,9 @@ public class ItemSigilTransposition extends ItemSigilBase
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
|
||||
{
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
|
||||
if (!stack.hasTagCompound())
|
||||
return;
|
||||
|
@ -80,19 +80,18 @@ public class ItemSigilTransposition extends ItemSigilBase
|
|||
IBlockState state = world.getBlockState(blockPos);
|
||||
if (!world.isRemote)
|
||||
{
|
||||
BlockStack rightClickedBlock = BlockStack.getStackFromPos(world, blockPos);
|
||||
if (BloodMagicAPI.getTranspositionBlacklist().contains(rightClickedBlock))
|
||||
if (BloodMagicAPI.INSTANCE.getBlacklist().getTransposition().contains(state))
|
||||
return EnumActionResult.FAIL;
|
||||
|
||||
if (!ConfigHandler.transpositionBlacklist.contains(rightClickedBlock) && player.isSneaking() && (!stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) || !stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_META)))
|
||||
if (player.isSneaking() && (!stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) || !stack.getTagCompound().hasKey(Constants.NBT.CONTAINED_BLOCK_META)))
|
||||
{
|
||||
if (rightClickedBlock.getState().getPlayerRelativeBlockHardness(player, world, blockPos) >= 0 && rightClickedBlock.getState().getBlockHardness(world, blockPos) >= 0)
|
||||
if (state.getPlayerRelativeBlockHardness(player, world, blockPos) >= 0 && state.getBlockHardness(world, blockPos) >= 0)
|
||||
{
|
||||
int cost = getLpUsed();
|
||||
|
||||
NBTTagCompound tileNBTTag = new NBTTagCompound();
|
||||
String blockName = rightClickedBlock.getBlock().getRegistryName().toString();
|
||||
byte metadata = (byte) rightClickedBlock.getMeta();
|
||||
String blockName = state.getBlock().getRegistryName().toString();
|
||||
byte metadata = (byte) state.getBlock().getMetaFromState(state);
|
||||
|
||||
if (world.getTileEntity(blockPos) != null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
@ -20,6 +20,6 @@ public class ItemSigilWhirlwind extends ItemSigilToggleableBase
|
|||
if (PlayerHelper.isFakePlayer(player))
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(ModPotions.whirlwind, 2, 0, true, false));
|
||||
player.addPotionEffect(new PotionEffect(RegistrarBloodMagic.WHIRLWIND, 2, 0, true, false));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue