Initial 1.9 commit
This DOES NOT BUILD. Do not even attempt. Almost everything has been ported besides the block/item packages. Then it's a matter of testing what broke.
This commit is contained in:
parent
f896383fe6
commit
6c729db70c
359 changed files with 1858 additions and 4447 deletions
|
@ -1,26 +1,26 @@
|
|||
package WayofTime.bloodmagic.util;
|
||||
|
||||
import WayofTime.bloodmagic.network.BloodMagicPacketHandler;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiNewChat;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraftforge.fml.common.network.ByteBufUtils;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import WayofTime.bloodmagic.network.BloodMagicPacketHandler;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class ChatUtil
|
||||
{
|
||||
private static final int DELETION_ID = 2525277;
|
||||
private static int lastAdded;
|
||||
|
||||
private static void sendNoSpamMessages(IChatComponent[] messages)
|
||||
private static void sendNoSpamMessages(ITextComponent[] messages)
|
||||
{
|
||||
GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
|
||||
for (int i = DELETION_ID + messages.length - 1; i <= lastAdded; i++)
|
||||
|
@ -35,25 +35,25 @@ public class ChatUtil
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a standard {@link ChatComponentText} for the given {@link String}
|
||||
* Returns a standard {@link TextComponentString} for the given {@link String}
|
||||
* .
|
||||
*
|
||||
* @param s
|
||||
* The string to wrap.
|
||||
*
|
||||
* @return An {@link IChatComponent} containing the string.
|
||||
* @return An {@link ITextComponent} containing the string.
|
||||
*/
|
||||
public static IChatComponent wrap(String s)
|
||||
public static ITextComponent wrap(String s)
|
||||
{
|
||||
return new ChatComponentText(s);
|
||||
return new TextComponentString(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #wrap(String)
|
||||
*/
|
||||
public static IChatComponent[] wrap(String... s)
|
||||
public static ITextComponent[] wrap(String... s)
|
||||
{
|
||||
IChatComponent[] ret = new IChatComponent[s.length];
|
||||
ITextComponent[] ret = new ITextComponent[s.length];
|
||||
for (int i = 0; i < ret.length; i++)
|
||||
{
|
||||
ret[i] = wrap(s[i]);
|
||||
|
@ -70,9 +70,9 @@ public class ChatUtil
|
|||
* @param args
|
||||
* The args to apply to the format
|
||||
*/
|
||||
public static IChatComponent wrapFormatted(String s, Object... args)
|
||||
public static ITextComponent wrapFormatted(String s, Object... args)
|
||||
{
|
||||
return new ChatComponentTranslation(s, args);
|
||||
return new TextComponentTranslation(s, args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,11 +104,11 @@ public class ChatUtil
|
|||
* @param player
|
||||
* The player to send the chat lines to.
|
||||
* @param lines
|
||||
* The {@link IChatComponent chat components} to send.yes
|
||||
* The {@link ITextComponent chat components} to send.yes
|
||||
*/
|
||||
public static void sendChat(EntityPlayer player, IChatComponent... lines)
|
||||
public static void sendChat(EntityPlayer player, ITextComponent... lines)
|
||||
{
|
||||
for (IChatComponent c : lines)
|
||||
for (ITextComponent c : lines)
|
||||
{
|
||||
player.addChatComponentMessage(c);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class ChatUtil
|
|||
}
|
||||
|
||||
/**
|
||||
* Same as {@link #sendNoSpamClient(IChatComponent...)}, but wraps the
|
||||
* Same as {@link #sendNoSpamClient(ITextComponent...)}, but wraps the
|
||||
* Strings automatically.
|
||||
*
|
||||
* @param lines
|
||||
|
@ -141,9 +141,9 @@ public class ChatUtil
|
|||
/**
|
||||
* Skips the packet sending, unsafe to call on servers.
|
||||
*
|
||||
* @see #sendNoSpam(EntityPlayerMP, IChatComponent...)
|
||||
* @see #sendNoSpam(EntityPlayerMP, ITextComponent...)
|
||||
*/
|
||||
public static void sendNoSpamClient(IChatComponent... lines)
|
||||
public static void sendNoSpamClient(ITextComponent... lines)
|
||||
{
|
||||
sendNoSpamMessages(lines);
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class ChatUtil
|
|||
|
||||
/**
|
||||
* @see #wrap(String)
|
||||
* @see #sendNoSpam(EntityPlayer, IChatComponent...)
|
||||
* @see #sendNoSpam(EntityPlayer, ITextComponent...)
|
||||
*/
|
||||
public static void sendNoSpam(EntityPlayer player, String... lines)
|
||||
{
|
||||
|
@ -171,9 +171,9 @@ public class ChatUtil
|
|||
* First checks if the player is instanceof {@link EntityPlayerMP} before
|
||||
* casting.
|
||||
*
|
||||
* @see #sendNoSpam(EntityPlayerMP, IChatComponent...)
|
||||
* @see #sendNoSpam(EntityPlayerMP, ITextComponent...)
|
||||
*/
|
||||
public static void sendNoSpam(EntityPlayer player, IChatComponent... lines)
|
||||
public static void sendNoSpam(EntityPlayer player, ITextComponent... lines)
|
||||
{
|
||||
if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ public class ChatUtil
|
|||
|
||||
/**
|
||||
* @see #wrap(String)
|
||||
* @see #sendNoSpam(EntityPlayerMP, IChatComponent...)
|
||||
* @see #sendNoSpam(EntityPlayerMP, ITextComponent...)
|
||||
*/
|
||||
public static void sendNoSpam(EntityPlayerMP player, String... lines)
|
||||
{
|
||||
|
@ -211,7 +211,7 @@ public class ChatUtil
|
|||
* @param lines
|
||||
* The chat lines to send.
|
||||
*/
|
||||
public static void sendNoSpam(EntityPlayerMP player, IChatComponent... lines)
|
||||
public static void sendNoSpam(EntityPlayerMP player, ITextComponent... lines)
|
||||
{
|
||||
if (lines.length > 0)
|
||||
BloodMagicPacketHandler.INSTANCE.sendTo(new PacketNoSpamChat(lines), player);
|
||||
|
@ -225,14 +225,14 @@ public class ChatUtil
|
|||
public static class PacketNoSpamChat implements IMessage
|
||||
{
|
||||
|
||||
private IChatComponent[] chatLines;
|
||||
private ITextComponent[] chatLines;
|
||||
|
||||
public PacketNoSpamChat()
|
||||
{
|
||||
chatLines = new IChatComponent[0];
|
||||
chatLines = new ITextComponent[0];
|
||||
}
|
||||
|
||||
private PacketNoSpamChat(IChatComponent... lines)
|
||||
private PacketNoSpamChat(ITextComponent... lines)
|
||||
{
|
||||
// this is guaranteed to be >1 length by accessing methods
|
||||
this.chatLines = lines;
|
||||
|
@ -242,19 +242,19 @@ public class ChatUtil
|
|||
public void toBytes(ByteBuf buf)
|
||||
{
|
||||
buf.writeInt(chatLines.length);
|
||||
for (IChatComponent c : chatLines)
|
||||
for (ITextComponent c : chatLines)
|
||||
{
|
||||
ByteBufUtils.writeUTF8String(buf, IChatComponent.Serializer.componentToJson(c));
|
||||
ByteBufUtils.writeUTF8String(buf, ITextComponent.Serializer.componentToJson(c));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf)
|
||||
{
|
||||
chatLines = new IChatComponent[buf.readInt()];
|
||||
chatLines = new ITextComponent[buf.readInt()];
|
||||
for (int i = 0; i < chatLines.length; i++)
|
||||
{
|
||||
chatLines[i] = IChatComponent.Serializer.jsonToComponent(ByteBufUtils.readUTF8String(buf));
|
||||
chatLines[i] = ITextComponent.Serializer.jsonToComponent(ByteBufUtils.readUTF8String(buf));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.bloodmagic.util;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class GhostItemHelper
|
||||
{
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
package WayofTime.bloodmagic.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import WayofTime.bloodmagic.api.altar.EnumAltarComponent;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.tile.TileInventory;
|
||||
import com.google.common.collect.Iterables;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -17,6 +20,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
|
||||
|
@ -24,9 +28,8 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import WayofTime.bloodmagic.api.altar.EnumAltarComponent;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.tile.TileInventory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Utils
|
||||
{
|
||||
|
@ -91,14 +94,14 @@ public class Utils
|
|||
*/
|
||||
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot)
|
||||
{
|
||||
if (tile.getStackInSlot(slot) == null && player.getHeldItem() != null)
|
||||
if (tile.getStackInSlot(slot) == null && player.getHeldItemMainhand() != null)
|
||||
{
|
||||
ItemStack input = player.getHeldItem().copy();
|
||||
ItemStack input = player.getHeldItemMainhand().copy();
|
||||
input.stackSize = 1;
|
||||
player.getHeldItem().stackSize--;
|
||||
player.getHeldItemMainhand().stackSize--;
|
||||
tile.setInventorySlotContents(slot, input);
|
||||
return true;
|
||||
} else if (tile.getStackInSlot(slot) != null && player.getHeldItem() == null)
|
||||
} else if (tile.getStackInSlot(slot) != null && player.getHeldItemMainhand() == null)
|
||||
{
|
||||
if (!tile.getWorld().isRemote)
|
||||
{
|
||||
|
@ -147,7 +150,7 @@ public class Utils
|
|||
if (amount <= 0)
|
||||
return 0;
|
||||
|
||||
amount = applyArmor(attackedEntity, attackedEntity.getInventory(), source, amount);
|
||||
amount = applyArmor(attackedEntity, Iterables.toArray(attackedEntity.getEquipmentAndArmor(), ItemStack.class), source, amount);
|
||||
if (amount <= 0)
|
||||
return 0;
|
||||
amount = applyPotionDamageCalculations(attackedEntity, source, amount);
|
||||
|
@ -209,14 +212,16 @@ public class Utils
|
|||
|
||||
public static float applyPotionDamageCalculations(EntityLivingBase attackedEntity, DamageSource source, float damage)
|
||||
{
|
||||
Potion resistance = Potion.getPotionFromResourceLocation("resistance");
|
||||
|
||||
if (source.isDamageAbsolute())
|
||||
{
|
||||
return damage;
|
||||
} else
|
||||
{
|
||||
if (attackedEntity.isPotionActive(Potion.resistance) && source != DamageSource.outOfWorld)
|
||||
if (attackedEntity.isPotionActive(resistance) && source != DamageSource.outOfWorld)
|
||||
{
|
||||
int i = (attackedEntity.getActivePotionEffect(Potion.resistance).getAmplifier() + 1) * 5;
|
||||
int i = (attackedEntity.getActivePotionEffect(resistance).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
float f = damage * (float) j;
|
||||
damage = f / 25.0F;
|
||||
|
@ -227,7 +232,7 @@ public class Utils
|
|||
return 0.0F;
|
||||
} else
|
||||
{
|
||||
int k = EnchantmentHelper.getEnchantmentModifierDamage(attackedEntity.getInventory(), source);
|
||||
int k = EnchantmentHelper.getEnchantmentModifierDamage(attackedEntity.getArmorInventoryList(), source);
|
||||
|
||||
if (k > 20)
|
||||
{
|
||||
|
@ -543,15 +548,15 @@ public class Utils
|
|||
return stack;
|
||||
}
|
||||
|
||||
public static boolean isBlockLiquid(Block block)
|
||||
public static boolean isBlockLiquid(IBlockState state)
|
||||
{
|
||||
return (block instanceof IFluidBlock || block.getMaterial().isLiquid());
|
||||
return (state instanceof IFluidBlock || state.getMaterial().isLiquid());
|
||||
}
|
||||
|
||||
//Shamelessly ripped off of CoFH Lib
|
||||
public static boolean fillContainerFromHandler(World world, IFluidHandler handler, EntityPlayer player, FluidStack tankFluid)
|
||||
{
|
||||
ItemStack container = player.getCurrentEquippedItem();
|
||||
ItemStack container = player.getHeldItemMainhand();
|
||||
if (FluidContainerRegistry.isEmptyContainer(container))
|
||||
{
|
||||
ItemStack returnStack = FluidContainerRegistry.fillFluidContainer(tankFluid, container);
|
||||
|
@ -588,7 +593,7 @@ public class Utils
|
|||
//Shamelessly ripped off of CoFH Lib
|
||||
public static boolean fillHandlerWithContainer(World world, IFluidHandler handler, EntityPlayer player)
|
||||
{
|
||||
ItemStack container = player.getCurrentEquippedItem();
|
||||
ItemStack container = player.getHeldItemMainhand();
|
||||
FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(container);
|
||||
if (fluid != null)
|
||||
{
|
||||
|
|
|
@ -1,25 +1,5 @@
|
|||
package WayofTime.bloodmagic.util.handler;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.registry.RitualRegistry;
|
||||
import WayofTime.bloodmagic.api.ritual.IMasterRitualStone;
|
||||
|
@ -28,6 +8,22 @@ import WayofTime.bloodmagic.api.ritual.RitualComponent;
|
|||
import WayofTime.bloodmagic.client.render.RenderFakeBlocks;
|
||||
import WayofTime.bloodmagic.item.ItemRitualDiviner;
|
||||
import WayofTime.bloodmagic.util.GhostItemHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ClientEventHandler
|
||||
{
|
||||
|
@ -79,7 +75,7 @@ public class ClientEventHandler
|
|||
EntityPlayerSP player = minecraft.thePlayer;
|
||||
World world = player.worldObj;
|
||||
|
||||
if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != RayTraceResult.Type.BLOCK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -103,19 +99,19 @@ public class ClientEventHandler
|
|||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
Vec3 vec3 = new Vec3(minecraft.objectMouseOver.getBlockPos().getX(), minecraft.objectMouseOver.getBlockPos().getY(), minecraft.objectMouseOver.getBlockPos().getZ());
|
||||
BlockPos vec3 = new BlockPos(minecraft.objectMouseOver.getBlockPos().getX(), minecraft.objectMouseOver.getBlockPos().getY(), minecraft.objectMouseOver.getBlockPos().getZ());
|
||||
double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks;
|
||||
double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks;
|
||||
double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks;
|
||||
|
||||
for (RitualComponent ritualComponent : ritual.getComponents())
|
||||
{
|
||||
Vec3 vX = vec3.add(new Vec3(ritualComponent.getX(direction), ritualComponent.getY(), ritualComponent.getZ(direction)));
|
||||
double minX = vX.xCoord - posX;
|
||||
double minY = vX.yCoord - posY;
|
||||
double minZ = vX.zCoord - posZ;
|
||||
BlockPos vX = vec3.add(new BlockPos(ritualComponent.getX(direction), ritualComponent.getY(), ritualComponent.getZ(direction)));
|
||||
double minX = vX.getX() - posX;
|
||||
double minY = vX.getY() - posY;
|
||||
double minZ = vX.getZ() - posZ;
|
||||
|
||||
if (!world.getBlockState(new BlockPos(vX.xCoord, vX.yCoord, vX.zCoord)).getBlock().isOpaqueCube())
|
||||
if (!world.getBlockState(vX).isOpaqueCube())
|
||||
{
|
||||
TextureAtlasSprite texture = null;
|
||||
|
||||
|
|
|
@ -1,14 +1,42 @@
|
|||
package WayofTime.bloodmagic.util.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.event.AltarCraftedEvent;
|
||||
import WayofTime.bloodmagic.api.event.ItemBindEvent;
|
||||
import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent;
|
||||
import WayofTime.bloodmagic.api.event.TeleposeEvent;
|
||||
import WayofTime.bloodmagic.api.iface.IBindable;
|
||||
import WayofTime.bloodmagic.api.iface.IUpgradeTrainer;
|
||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||
import WayofTime.bloodmagic.api.network.SoulNetwork;
|
||||
import WayofTime.bloodmagic.api.orb.IBloodOrb;
|
||||
import WayofTime.bloodmagic.api.soul.*;
|
||||
import WayofTime.bloodmagic.api.util.helper.BindableHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.demonAura.PosXY;
|
||||
import WayofTime.bloodmagic.demonAura.WillChunk;
|
||||
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
|
||||
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
||||
import WayofTime.bloodmagic.item.ItemInscriptionTool;
|
||||
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
||||
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
||||
import WayofTime.bloodmagic.item.gear.ItemPackSacrifice;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.*;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.*;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import com.google.common.base.Strings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
|
@ -29,17 +57,8 @@ import net.minecraft.world.ChunkCoordIntPair;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.AnvilUpdateEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHealEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.living.*;
|
||||
import net.minecraftforge.event.entity.player.*;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.event.world.ChunkDataEvent;
|
||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
||||
|
@ -49,57 +68,12 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
|||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.event.AltarCraftedEvent;
|
||||
import WayofTime.bloodmagic.api.event.ItemBindEvent;
|
||||
import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent;
|
||||
import WayofTime.bloodmagic.api.event.TeleposeEvent;
|
||||
import WayofTime.bloodmagic.api.iface.IBindable;
|
||||
import WayofTime.bloodmagic.api.iface.IUpgradeTrainer;
|
||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||
import WayofTime.bloodmagic.api.soul.DemonWillHolder;
|
||||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
import WayofTime.bloodmagic.api.soul.IDemonWill;
|
||||
import WayofTime.bloodmagic.api.soul.IDemonWillWeapon;
|
||||
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
|
||||
import WayofTime.bloodmagic.api.util.helper.BindableHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.demonAura.PosXY;
|
||||
import WayofTime.bloodmagic.demonAura.WillChunk;
|
||||
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
|
||||
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
||||
import WayofTime.bloodmagic.item.ItemInscriptionTool;
|
||||
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
||||
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
||||
import WayofTime.bloodmagic.item.gear.ItemPackSacrifice;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerArrowShot;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerDigging;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerGrimReaperSprint;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerHealthboost;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerMeleeDamage;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerPhysicalProtect;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSelfSacrifice;
|
||||
import WayofTime.bloodmagic.livingArmour.tracker.StatTrackerSolarPowered;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeArrowShot;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeDigging;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeGrimReaperSprint;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSelfSacrifice;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeSpeed;
|
||||
import WayofTime.bloodmagic.livingArmour.upgrade.LivingArmourUpgradeStepAssist;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.registry.ModPotions;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class EventHandler
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package WayofTime.bloodmagic.util.handler;
|
||||
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
|
||||
public class IMCHandler
|
||||
{
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package WayofTime.bloodmagic.util.helper;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/TehNut">TehNut</a>
|
||||
|
|
|
@ -2,7 +2,7 @@ package WayofTime.bloodmagic.util.helper;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package WayofTime.bloodmagic.util.helper;
|
||||
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
public class TextHelper
|
||||
{
|
||||
public static String getFormattedText(String string)
|
||||
|
@ -16,7 +15,7 @@ public class TextHelper
|
|||
|
||||
public static String localize(String input, Object... format)
|
||||
{
|
||||
return StatCollector.translateToLocalFormatted(input, format);
|
||||
return I18n.translateToLocalFormatted(input, format);
|
||||
}
|
||||
|
||||
public static String localizeEffect(String input, Object... format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue