commit
6f182805aa
33 changed files with 633 additions and 52 deletions
|
@ -1688,7 +1688,7 @@ public class AlchemicalWizardry
|
|||
// continue;
|
||||
// }
|
||||
//
|
||||
// strLine = strLine.replace('”', '"').replace('“','"').replace("…", "...").replace('’', '\'').replace('–', '-');
|
||||
// strLine = strLine.replace('', '"').replace('','"').replace("
", "...").replace('', '\'').replace('', '-');
|
||||
//
|
||||
// if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null)
|
||||
// {
|
||||
|
|
45
src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java
Normal file
45
src/main/java/WayofTime/alchemicalWizardry/api/Vector3.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
/*
|
||||
* Created in Scala by Alex-Hawks
|
||||
* Translated and implemented by Arcaratus
|
||||
*/
|
||||
public class Vector3
|
||||
{
|
||||
public int x, y, z;
|
||||
|
||||
public Vector3(int x, int y, int z)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public Vector3 add(Vector3 vec1)
|
||||
{
|
||||
return new Vector3(this.x + vec1.x, this.y + vec1.y, this.z + vec1.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "V3(" + x + "}, " + y + "}," + z + "})";
|
||||
}
|
||||
|
||||
private boolean canEqual(Object object)
|
||||
{
|
||||
return object instanceof Vector3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object)
|
||||
{
|
||||
return object == this ? true : (object instanceof Vector3 ? canEqual(this) && this.x == ((Vector3) object).x && this.y == ((Vector3) object).y && this.z == ((Vector3) object).z : false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return 48131 * x - 95021 * y + z;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.client;
|
||||
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RitualDivinerRender;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
@ -146,6 +147,7 @@ public class ClientProxy extends CommonProxy
|
|||
RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardianEarth.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMinorDemonGruntGuardianWind.class, new RenderMinorDemonGruntGuardian(new ModelMinorDemonGruntGuardian(), 0.5F));
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new RitualDivinerRender());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal());
|
||||
|
|
|
@ -20,8 +20,7 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler
|
|||
{
|
||||
public class CachedBindingRecipe extends CachedRecipe
|
||||
{
|
||||
PositionedStack input;
|
||||
PositionedStack output;
|
||||
PositionedStack input, output;
|
||||
|
||||
public CachedBindingRecipe(BindingRecipe recipe)
|
||||
{
|
||||
|
@ -45,7 +44,7 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if (outputId.equals("alchemicalwizardry.binding") && getClass() == NEIBindingRitualHandler.class)
|
||||
if (outputId.equals("alchemicalwizardry.bindingritual") && getClass() == NEIBindingRitualHandler.class)
|
||||
{
|
||||
for (BindingRecipe recipe : BindingRegistry.bindingRecipes)
|
||||
{
|
||||
|
@ -94,13 +93,13 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler
|
|||
@Override
|
||||
public String getOverlayIdentifier()
|
||||
{
|
||||
return "bindingritual";
|
||||
return "alchemicalwizardry.bindingritual";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects()
|
||||
{
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(90, 32, 22, 16), "alchemicalwizardry.bindingritual"));
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 16), "alchemicalwizardry.bindingritual"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package WayofTime.alchemicalWizardry.client.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
|
||||
public class Helper
|
||||
{
|
||||
public static RitualEffect getEffectFromString(String name)
|
||||
{
|
||||
Rituals ritual = Rituals.ritualMap.get(name);
|
||||
|
||||
if (ritual == null)
|
||||
return null;
|
||||
|
||||
return ritual.effect;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package WayofTime.alchemicalWizardry.client.renderer;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/*
|
||||
* Created in Scala by Alex-Hawks
|
||||
* Translated and implemented by Arcaratus
|
||||
*/
|
||||
public class RenderFakeBlocks
|
||||
{
|
||||
public static void drawFakeBlock(WayofTime.alchemicalWizardry.api.Vector3 vector3, Block block, int meta, double minX, double minY, double minZ, World world)
|
||||
{
|
||||
double maxX = minX + 1;
|
||||
double maxY = minY + 1;
|
||||
double maxZ = minZ + 1;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
float texMinU, texMaxU, texMinV, texMaxV;
|
||||
|
||||
texMinU = getMinU(block, meta, 0);
|
||||
texMaxU = getMaxU(block, meta, 0);
|
||||
texMinV = getMinV(block, meta, 0);
|
||||
texMaxV = getMaxV(block, meta, 0);
|
||||
tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMinV);
|
||||
tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMinV);
|
||||
tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV);
|
||||
tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV);
|
||||
|
||||
texMinU = getMinU(block, meta, 1);
|
||||
texMaxU = getMaxU(block, meta, 1);
|
||||
texMinV = getMinV(block, meta, 1);
|
||||
texMaxV = getMaxV(block, meta, 1);
|
||||
tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMaxV);
|
||||
tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMaxV);
|
||||
tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV);
|
||||
tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV);
|
||||
|
||||
texMinU = getMinU(block, meta, 2);
|
||||
texMaxU = getMaxU(block, meta, 2);
|
||||
texMinV = getMinV(block, meta, 2);
|
||||
texMaxV = getMaxV(block, meta, 2);
|
||||
tessellator.addVertexWithUV(maxX, minY, minZ, texMinU, texMaxV);
|
||||
tessellator.addVertexWithUV(minX, minY, minZ, texMaxU, texMaxV);
|
||||
tessellator.addVertexWithUV(minX, maxY, minZ, texMaxU, texMinV);
|
||||
tessellator.addVertexWithUV(maxX, maxY, minZ, texMinU, texMinV);
|
||||
|
||||
texMinU = getMinU(block, meta, 3);
|
||||
texMaxU = getMaxU(block, meta, 3);
|
||||
texMinV = getMinV(block, meta, 3);
|
||||
texMaxV = getMaxV(block, meta, 3);
|
||||
tessellator.addVertexWithUV(minX, minY, maxZ, texMinU, texMaxV);
|
||||
tessellator.addVertexWithUV(maxX, minY, maxZ, texMaxU, texMaxV);
|
||||
tessellator.addVertexWithUV(maxX, maxY, maxZ, texMaxU, texMinV);
|
||||
tessellator.addVertexWithUV(minX, maxY, maxZ, texMinU, texMinV);
|
||||
|
||||
texMinU = getMinU(block, meta, 4);
|
||||
texMaxU = getMaxU(block, meta, 4);
|
||||
texMinV = getMinV(block, meta, 4);
|
||||
texMaxV = getMaxV(block, meta, 4);
|
||||
tessellator.addVertexWithUV(minX, minY, minZ, texMinU, texMaxV);
|
||||
tessellator.addVertexWithUV(minX, minY, maxZ, texMaxU, texMaxV);
|
||||
tessellator.addVertexWithUV(minX, maxY, maxZ, texMaxU, texMinV);
|
||||
tessellator.addVertexWithUV(minX, maxY, minZ, texMinU, texMinV);
|
||||
|
||||
texMinU = getMinU(block, meta, 5);
|
||||
texMaxU = getMaxU(block, meta, 5);
|
||||
texMinV = getMinV(block, meta, 5);
|
||||
texMaxV = getMaxV(block, meta, 5);
|
||||
tessellator.addVertexWithUV(maxX, minY, maxZ, texMinU, texMaxV);
|
||||
tessellator.addVertexWithUV(maxX, minY, minZ, texMaxU, texMaxV);
|
||||
tessellator.addVertexWithUV(maxX, maxY, minZ, texMaxU, texMinV);
|
||||
tessellator.addVertexWithUV(maxX, maxY, maxZ, texMinU, texMinV);
|
||||
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
private static float getMinU(Block block, int meta, int side)
|
||||
{
|
||||
IIcon icon = block.getIcon(side, meta);
|
||||
return icon.getMinU();
|
||||
}
|
||||
|
||||
private static float getMaxU(Block block, int meta, int side)
|
||||
{
|
||||
IIcon icon = block.getIcon(side, meta);
|
||||
return icon.getMaxU();
|
||||
}
|
||||
|
||||
private static float getMinV(Block block, int meta, int side)
|
||||
{
|
||||
IIcon icon = block.getIcon(side, meta);
|
||||
return icon.getMinV();
|
||||
}
|
||||
|
||||
private static float getMaxV(Block block, int meta, int side)
|
||||
{
|
||||
IIcon icon = block.getIcon(side, meta);
|
||||
return icon.getMaxV();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package WayofTime.alchemicalWizardry.client.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.Vector3;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
|
||||
/*
|
||||
* Created in Scala by Alex-Hawks
|
||||
* Translated and implemented by Arcaratus
|
||||
*/
|
||||
public class RitualDivinerRender
|
||||
{
|
||||
@SubscribeEvent
|
||||
public void render(RenderWorldLastEvent event)
|
||||
{
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
EntityClientPlayerMP player = minecraft.thePlayer;
|
||||
World world = player.worldObj;
|
||||
|
||||
if (minecraft.objectMouseOver == null || minecraft.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileEntity tileEntity = world.getTileEntity(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ);
|
||||
|
||||
if (!(tileEntity instanceof IMasterRitualStone))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 vec3 = new Vector3(minecraft.objectMouseOver.blockX, minecraft.objectMouseOver.blockY, minecraft.objectMouseOver.blockZ);
|
||||
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;
|
||||
|
||||
if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemRitualDiviner)
|
||||
{
|
||||
ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem();
|
||||
int direction = ritualDiviner.getDirection(player.inventory.getCurrentItem());
|
||||
RitualEffect ritualEffect = getEffectFromString(ritualDiviner.getCurrentRitual(player.inventory.getCurrentItem()));
|
||||
|
||||
if (ritualEffect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (RitualComponent ritualComponent : ritualEffect.getRitualComponentList())
|
||||
{
|
||||
Vector3 vX = vec3.add(new Vector3(ritualComponent.getX(direction), ritualComponent.getY(), ritualComponent.getZ(direction)));
|
||||
double minX = vX.x - posX;
|
||||
double minY = vX.y - posY;
|
||||
double minZ = vX.z - posZ;
|
||||
|
||||
if (!world.getBlock(vX.x, vX.y, vX.z).isOpaqueCube())
|
||||
{
|
||||
RenderFakeBlocks.drawFakeBlock(vX, ModBlocks.ritualStone, ritualComponent.getStoneType(), minX, minY, minZ, world);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static RitualEffect getEffectFromString(String name)
|
||||
{
|
||||
Rituals ritual = Rituals.ritualMap.get(name);
|
||||
|
||||
if (ritual == null)
|
||||
return null;
|
||||
|
||||
return ritual.effect;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.achievements;
|
|||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
|
||||
|
@ -10,15 +11,18 @@ public class AchievementTrigger
|
|||
@SubscribeEvent
|
||||
public void onItemPickedUp(PlayerEvent.ItemPickupEvent event)
|
||||
{
|
||||
ItemStack stack = event.pickedUp.getEntityItem();
|
||||
|
||||
if (stack != null && stack.getItem() instanceof IPickupAchievement)
|
||||
for (Item item : AchievementsRegistry.pickupList)
|
||||
{
|
||||
Achievement achievement = ((IPickupAchievement) stack.getItem()).getAchievementOnPickup(stack, event.player, event.pickedUp);
|
||||
ItemStack stack = event.pickedUp.getEntityItem();
|
||||
|
||||
if (achievement != null)
|
||||
if (stack != null && stack.getItem() == item)
|
||||
{
|
||||
event.player.addStat(achievement, 1);
|
||||
Achievement achievement = AchievementsRegistry.getAchievementForItem(item);
|
||||
|
||||
if (achievement != null)
|
||||
{
|
||||
event.player.addStat(achievement, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,13 +30,16 @@ public class AchievementTrigger
|
|||
@SubscribeEvent
|
||||
public void onItemCrafted(PlayerEvent.ItemCraftedEvent event)
|
||||
{
|
||||
if (event.crafting != null && event.crafting.getItem() instanceof ICraftAchievement)
|
||||
for (Item item : AchievementsRegistry.craftinglist)
|
||||
{
|
||||
Achievement achievement = ((ICraftAchievement) event.crafting.getItem()).getAchievementOnCraft(event.crafting, event.player, event.craftMatrix);
|
||||
|
||||
if (achievement != null)
|
||||
if (event.crafting != null && event.crafting.getItem() == item)
|
||||
{
|
||||
event.player.addStat(achievement, 1);
|
||||
Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem());
|
||||
|
||||
if (achievement != null)
|
||||
{
|
||||
event.player.addStat(achievement, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package WayofTime.alchemicalWizardry.common.achievements;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.stats.Achievement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AchievementsRegistry
|
||||
{
|
||||
public final static List<Item> craftinglist = new ArrayList();
|
||||
public final static List<Item> pickupList = new ArrayList();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
addItemsToCraftingList();
|
||||
addItemsToPickupList();
|
||||
}
|
||||
|
||||
public static void addItemsToCraftingList()
|
||||
{
|
||||
craftinglist.add(ModItems.sacrificialDagger);
|
||||
}
|
||||
|
||||
public static void addItemsToPickupList()
|
||||
{
|
||||
pickupList.add(ModItems.weakBloodOrb);
|
||||
}
|
||||
|
||||
public static Achievement getAchievementForItem(Item item)
|
||||
{
|
||||
if (item == ModItems.sacrificialDagger)
|
||||
{
|
||||
return ModAchievements.firstPrick;
|
||||
}
|
||||
if (item == ModItems.weakBloodOrb)
|
||||
{
|
||||
return ModAchievements.weakOrb;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -7,5 +7,5 @@ import net.minecraft.stats.Achievement;
|
|||
|
||||
public interface ICraftAchievement
|
||||
{
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix);
|
||||
Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix);
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ import net.minecraft.stats.Achievement;
|
|||
|
||||
public interface IPickupAchievement
|
||||
{
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item);
|
||||
Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item);
|
||||
}
|
||||
|
|
|
@ -5,19 +5,23 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
|||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public class ModAchievements
|
||||
{
|
||||
public static AchievementPage alchemicalWizardryPage;
|
||||
|
||||
public static Achievement firstPrick;
|
||||
public static Achievement weakOrb;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
firstPrick = new AchievementsMod(StatCollector.translateToLocal("achievement.firstPrick"), 0, 0, ModItems.sacrificialDagger, firstPrick);
|
||||
firstPrick = new AchievementsMod(StatCollector.translateToLocal("firstPrick"), 0, 0, ModItems.sacrificialDagger, null);
|
||||
weakOrb = new AchievementsMod(StatCollector.translateToLocal("weakOrb"), 3, 0, ModItems.weakBloodOrb, firstPrick);
|
||||
|
||||
alchemicalWizardryPage = new AchievementPage("AlchemicalWizardry", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()]));
|
||||
AchievementPage.registerAchievementPage(alchemicalWizardryPage);
|
||||
AchievementsRegistry.init();
|
||||
FMLCommonHandler.instance().bus().register(new AchievementTrigger());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockReagentConduit extends BlockContainer
|
||||
|
@ -64,4 +65,10 @@ public class BlockReagentConduit extends BlockContainer
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class CommandBind extends CommandBase
|
|||
|
||||
if (targetPlayer == null)
|
||||
{
|
||||
throw new CommandException("commands.bind.failed.noPlayer", new Object[0]);
|
||||
throw new CommandException("commands.bind.failed.noPlayer");
|
||||
}
|
||||
|
||||
if (item != null && item.getItem() instanceof IBindable)
|
||||
|
@ -46,16 +46,16 @@ public class CommandBind extends CommandBase
|
|||
if (EnergyItems.getOwnerName(item).isEmpty())
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(item, targetPlayer);
|
||||
func_152373_a(iCommandSender, this, "commands.bind.success", new Object[0]);
|
||||
func_152373_a(iCommandSender, this, "commands.bind.success");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new CommandException("commands.bind.failed.alreadyBound", new Object[0]);
|
||||
throw new CommandException("commands.bind.failed.alreadyBound");
|
||||
}
|
||||
}
|
||||
else if (!(item.getItem() instanceof IBindable))
|
||||
{
|
||||
throw new CommandException("commands.bind.failed.notBindable", new Object[0]);
|
||||
throw new CommandException("commands.bind.failed.notBindable");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.commands;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -40,7 +42,7 @@ public class CommandSN extends CommandBase
|
|||
int amount = parseIntBounded(icommandsender, astring[2], Integer.MIN_VALUE, Integer.MAX_VALUE);
|
||||
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, amount, Integer.MAX_VALUE);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.add.success", new Object[] {amount, owner});
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.add.success", amount, owner);
|
||||
}
|
||||
else if ("subtract".equalsIgnoreCase(astring[1]))
|
||||
{
|
||||
|
@ -50,42 +52,42 @@ public class CommandSN extends CommandBase
|
|||
{
|
||||
int lp = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, lp);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", new Object[] {SoulNetworkHandler.getCurrentEssence(owner), owner});
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", SoulNetworkHandler.getCurrentEssence(owner), owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, amount);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", new Object[] {amount, owner});
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.subtract.success", amount, owner);
|
||||
}
|
||||
}
|
||||
else if ("fill".equalsIgnoreCase(astring[1]))
|
||||
{
|
||||
int amount = Integer.MAX_VALUE - SoulNetworkHandler.getCurrentEssence(owner);
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, amount, Integer.MAX_VALUE);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.fill.success", new Object[] {owner});
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.fill.success", owner);
|
||||
}
|
||||
else if ("empty".equalsIgnoreCase(astring[1]))
|
||||
{
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, SoulNetworkHandler.getCurrentEssence(owner));
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.empty.success", new Object[] {owner});
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.empty.success", owner);
|
||||
}
|
||||
else if ("get".equalsIgnoreCase(astring[1]))
|
||||
{
|
||||
int amount = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.get.success", new Object[] {amount, owner});
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.get.success", amount, owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new CommandException("commands.soulnetwork.notACommand", new Object[0]);
|
||||
throw new CommandException("commands.soulnetwork.notACommand");
|
||||
}
|
||||
}
|
||||
else if (astring.length == 0)
|
||||
{
|
||||
throw new CommandException("commands.soulnetwork.noPlayer", new Object[0]);
|
||||
throw new CommandException("commands.soulnetwork.noPlayer");
|
||||
}
|
||||
else if (astring.length == 1)
|
||||
{
|
||||
throw new CommandException("commands.soulnetwork.noCommand", new Object[0]);
|
||||
throw new CommandException("commands.soulnetwork.noCommand");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +99,7 @@ public class CommandSN extends CommandBase
|
|||
}
|
||||
else if (astring.length == 2)
|
||||
{
|
||||
return getListOfStringsMatchingLastWord(astring, new String[] {"add", "subtract", "fill", "empty"});
|
||||
return getListOfStringsMatchingLastWord(astring, "add", "subtract", "fill", "empty");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -36,17 +36,17 @@ public class CommandUnbind extends CommandBase
|
|||
{
|
||||
if (!EnergyItems.getOwnerName(item).isEmpty())
|
||||
{
|
||||
item.getTagCompound().setString("ownerName", "");
|
||||
func_152373_a(iCommandSender, this, "commands.unbind.success", new Object[0]);
|
||||
item.getTagCompound().removeTag("ownerName");
|
||||
func_152373_a(iCommandSender, this, "commands.unbind.success");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new CommandException("commands.unbind.failed.notBindable", new Object[0]);
|
||||
throw new CommandException("commands.unbind.failed.notBindable");
|
||||
}
|
||||
}
|
||||
else if (!(item.getItem() instanceof IBindable))
|
||||
{
|
||||
throw new CommandException("commands.unbind.failed.notBindable", new Object[0]);
|
||||
throw new CommandException("commands.unbind.failed.notBindable");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,13 +127,16 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
}
|
||||
}
|
||||
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.ritualdiviner.blankstones") + " " + blankStones);
|
||||
int totalStones = blankStones + airStones + waterStones + fireStones + earthStones + duskStones + dawnStones;
|
||||
|
||||
par3List.add(EnumChatFormatting.WHITE + StatCollector.translateToLocal("tooltip.ritualdiviner.blankstones") + " " + blankStones);
|
||||
par3List.add(EnumChatFormatting.AQUA + StatCollector.translateToLocal("tooltip.ritualdiviner.airstones") + " " + airStones);
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.ritualdiviner.waterstones") + " " + waterStones);
|
||||
par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocal("tooltip.ritualdiviner.firestones") + " " + fireStones);
|
||||
par3List.add(EnumChatFormatting.DARK_GREEN + StatCollector.translateToLocal("tooltip.ritualdiviner.earthstones") + " " + earthStones);
|
||||
par3List.add(EnumChatFormatting.BOLD + StatCollector.translateToLocal("tooltip.ritualdiviner.duskstones") + " " + duskStones);
|
||||
par3List.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tooltip.ritualdiviner.duskstones") + " " + duskStones);
|
||||
par3List.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("tooltip.ritualdiviner.dawnstones") + " " + dawnStones);
|
||||
par3List.add(EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal("tooltip.ritualdiviner.totalStones") + " " + totalStones);
|
||||
}
|
||||
}else
|
||||
{
|
||||
|
|
|
@ -257,11 +257,6 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
verticalOffset--;
|
||||
}
|
||||
|
||||
if (world.isRemote)
|
||||
{
|
||||
verticalOffset--;
|
||||
}
|
||||
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
|
|
|
@ -56,7 +56,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfTheFastMiner");
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_deactivated");
|
||||
this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_activated");
|
||||
this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:MiningSigil_deactivated");
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (resource.fluidID != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).fluidID)
|
||||
if (resource.getFluidID() != (new FluidStack(AlchemicalWizardry.lifeEssenceFluid, 1)).getFluidID())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -914,7 +914,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
sortList[1] = 0;
|
||||
} else
|
||||
{
|
||||
sortList[0] = this.fluid.fluidID;
|
||||
sortList[0] = this.fluid.getFluidID();
|
||||
sortList[1] = this.fluid.amount;
|
||||
}
|
||||
|
||||
|
@ -924,7 +924,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
sortList[3] = 0;
|
||||
} else
|
||||
{
|
||||
sortList[2] = this.fluidInput.fluidID;
|
||||
sortList[2] = this.fluidInput.getFluidID();
|
||||
sortList[3] = this.fluidInput.amount;
|
||||
}
|
||||
|
||||
|
@ -934,7 +934,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
sortList[5] = 0;
|
||||
} else
|
||||
{
|
||||
sortList[4] = this.fluidOutput.fluidID;
|
||||
sortList[4] = this.fluidOutput.getFluidID();
|
||||
sortList[5] = this.fluidOutput.amount;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue