mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 12:32:12 +00:00
EN localisation, new focus(WIP).
This commit is contained in:
1 parent
6a5fc496df
commit
381896031b
19 files changed
+177
-137
No files matched your search
@@ -41,7 +41,7 @@ public class ElectroMagicTools {
|
||||
public static CommonProxy proxy;
|
||||
public static CreativeTabs tabEMT = new EMTCreativeTab(ModInformation.modid + ".creativeTab");
|
||||
public static Logger logger = LogManager.getLogger(ModInformation.name);
|
||||
public static SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT");
|
||||
public static SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(ModInformation.channel);
|
||||
|
||||
@Instance(ModInformation.modid)
|
||||
public static ElectroMagicTools instance;
|
||||
|
||||
@@ -8,6 +8,6 @@ public class ModInformation {
|
||||
public static final String guiFactory = "emt.client.gui.config.EMTGuiFactory";
|
||||
public static final String clientProxy = "emt.proxy.ClientProxy";
|
||||
public static final String commonProxy = "emt.proxy.CommonProxy";
|
||||
public static final String channel = "ElectroMagicTools";
|
||||
public static final String channel = "EMT";
|
||||
public static final String depend = "required-after:Thaumcraft ; required-after:IC2";
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package emt.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityElectroBall extends EntityFireball {
|
||||
|
||||
public EntityElectroBall(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityElectroBall(World world, EntityLivingBase player, double rotX, double rotY, double rotZ) {
|
||||
super(world, player, rotX, rotY, rotZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import emt.item.armor.wings.ItemThaumiumReinforcedWing;
|
||||
import emt.item.focus.ItemChargeFocus;
|
||||
import emt.item.focus.ItemChristmasFocus;
|
||||
import emt.item.focus.ItemExplosionFocus;
|
||||
import emt.item.focus.ItemNoNameFocus;
|
||||
import emt.item.focus.ItemShieldFocus;
|
||||
import emt.item.focus.ItemWandChargingFocus;
|
||||
import emt.item.tool.ItemElectricHoeGrowth;
|
||||
@@ -62,6 +63,7 @@ public class EMTItems {
|
||||
public static Item explosionFocus;
|
||||
public static Item christmasFocus;
|
||||
public static Item shieldFocus;
|
||||
public static Item noNameFocus;
|
||||
public static Item electricGoggles;
|
||||
public static Item streamChainsaw;
|
||||
public static Item rockbreakerDrill;
|
||||
@@ -185,5 +187,8 @@ public class EMTItems {
|
||||
|
||||
wandChargeFocus = new ItemWandChargingFocus();
|
||||
GameRegistry.registerItem(wandChargeFocus, "WandChargingFocus");
|
||||
|
||||
noNameFocus = new ItemNoNameFocus();
|
||||
GameRegistry.registerItem(noNameFocus, "NoNameFocus");
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class EMTResearches {
|
||||
|
||||
public static void addResearchTab() {
|
||||
ResourceLocation background = new ResourceLocation(ModInformation.texturePath, "textures/misc/background.png");
|
||||
ResearchCategories.registerCategory("EMT", new ResourceLocation(ModInformation.texturePath, "textures/blocks/electricCloud.png"), background);
|
||||
ResearchCategories.registerCategory("EMT", new ResourceLocation(ModInformation.texturePath, "textures/misc/emt.png"), background);
|
||||
}
|
||||
|
||||
public static void addResearch() {
|
||||
@@ -76,8 +76,7 @@ public class EMTResearches {
|
||||
|
||||
if (!EMTConfigHandler.thaumiumDrillResearch && !EMTConfigHandler.thaumiumChainsawResearch) {
|
||||
if (!EMTConfigHandler.thaumiumOmnitoolResearch) {
|
||||
new EMTResearchItem("Thaumium Omnitool", EMTResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(EMTItems.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumOmnitool),
|
||||
new ResearchPage(EMTRecipes.diamondOmnitoolToThaumium));
|
||||
new EMTResearchItem("Thaumium Omnitool", EMTResearchAspects.thaumiumOmnitoolResearch, -6, 0, 2, new ItemStack(EMTItems.thaumiumOmnitool)).setParentsHidden("Thaumium Drill", "Thaumium Chainsaw").setParents("Diamond Omnitool").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.thaumiumOmnitool), new ResearchPage(EMTRecipes.diamondOmnitoolToThaumium));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,8 +159,7 @@ public class EMTResearches {
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
new EMTResearchItem("Compressed Solars", EMTResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(EMTBlocks.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.compressedSolar), new ResearchPage(EMTRecipes.doubleCompressedSolar),
|
||||
new ResearchPage(EMTRecipes.tripleCompressedSolar));
|
||||
new EMTResearchItem("Compressed Solars", EMTResearchAspects.compressedSolars, -4, -5, 2, new ItemStack(EMTBlocks.emtSolars)).setParentsHidden("Potentia Generator").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.compressedSolar), new ResearchPage(EMTRecipes.doubleCompressedSolar), new ResearchPage(EMTRecipes.tripleCompressedSolar));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
@@ -198,29 +196,25 @@ public class EMTResearches {
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.waterSolarsResearch) {
|
||||
new EMTResearchItem("Water Infused Solar Panels", EMTResearchAspects.waterSolars, -7, -7, 1, new ItemStack(EMTBlocks.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.waterSolar), new ResearchPage(EMTRecipes.doubleWaterSolar),
|
||||
new ResearchPage(EMTRecipes.tripleWaterSolar));
|
||||
new EMTResearchItem("Water Infused Solar Panels", EMTResearchAspects.waterSolars, -7, -7, 1, new ItemStack(EMTBlocks.emtSolars, 1, 3)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.waterSolar), new ResearchPage(EMTRecipes.doubleWaterSolar), new ResearchPage(EMTRecipes.tripleWaterSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.darkSolarsResearch) {
|
||||
new EMTResearchItem("Entropy Infused Solar Panels", EMTResearchAspects.darkSolars, -8, -6, 1, new ItemStack(EMTBlocks.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.darkSolar), new ResearchPage(EMTRecipes.doubleDarkSolar),
|
||||
new ResearchPage(EMTRecipes.tripleDarkSolar));
|
||||
new EMTResearchItem("Entropy Infused Solar Panels", EMTResearchAspects.darkSolars, -8, -6, 1, new ItemStack(EMTBlocks.emtSolars, 1, 6)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.darkSolar), new ResearchPage(EMTRecipes.doubleDarkSolar), new ResearchPage(EMTRecipes.tripleDarkSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.orderSolarsResearch) {
|
||||
new EMTResearchItem("Order Infused Solar Panels", EMTResearchAspects.orderSolars, -6, -8, 1, new ItemStack(EMTBlocks.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.orderSolar), new ResearchPage(EMTRecipes.doubleOrderSolar),
|
||||
new ResearchPage(EMTRecipes.tripleOrderSolar));
|
||||
new EMTResearchItem("Order Infused Solar Panels", EMTResearchAspects.orderSolars, -6, -8, 1, new ItemStack(EMTBlocks.emtSolars, 1, 9)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.orderSolar), new ResearchPage(EMTRecipes.doubleOrderSolar), new ResearchPage(EMTRecipes.tripleOrderSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.fireSolarsResearch) {
|
||||
new EMTResearchItem("Fire Infused Solar Panels", EMTResearchAspects.fireSolars, -5, -7, 1, new ItemStack(EMTBlocks.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.fireSolar), new ResearchPage(EMTRecipes.doubleFireSolar),
|
||||
new ResearchPage(EMTRecipes.tripleFireSolar));
|
||||
new EMTResearchItem("Fire Infused Solar Panels", EMTResearchAspects.fireSolars, -5, -7, 1, new ItemStack(EMTBlocks.emtSolars, 1, 12)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.fireSolar), new ResearchPage(EMTRecipes.doubleFireSolar), new ResearchPage(EMTRecipes.tripleFireSolar));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,15 +226,12 @@ public class EMTResearches {
|
||||
|
||||
if (!EMTConfigHandler.compressedSolarsResearch) {
|
||||
if (!EMTConfigHandler.earthSolarsResearch) {
|
||||
new EMTResearchItem("Earth Infused Solar Panels", EMTResearchAspects.earthSolars, -6, -7, 1, new ItemStack(EMTBlocks.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.earthSolar), new ResearchPage(EMTRecipes.doubleEarthSolar),
|
||||
new ResearchPage(EMTRecipes.tripleEarthSolar));
|
||||
new EMTResearchItem("Earth Infused Solar Panels", EMTResearchAspects.earthSolars, -6, -7, 1, new ItemStack(EMTBlocks.emtSolars2, 1, 2)).setSecondary().setParents("Compressed Solars").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.earthSolar), new ResearchPage(EMTRecipes.doubleEarthSolar), new ResearchPage(EMTRecipes.tripleEarthSolar));
|
||||
}
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.uuMInfusionResearch) {
|
||||
new EMTResearchItem("UU-Matter Infusion", EMTResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(EMTItems.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.uuMCrystal), new ResearchPage(EMTRecipes.charcoalToCoal),
|
||||
new ResearchPage(EMTRecipes.glowstoneDustToBlock), new ResearchPage(EMTRecipes.stoneBricksToIronOre), new ResearchPage(EMTRecipes.arcaneStoneToCopperOre), new ResearchPage(EMTRecipes.arcaneStoneBricksToTinOre), new ResearchPage(EMTRecipes.amberBlockToLeadOre), new ResearchPage(EMTRecipes.amberBricksToUraniumOre),
|
||||
new ResearchPage(EMTRecipes.shardToResin), new ResearchPage(EMTRecipes.shardToRedstone), new ResearchPage(EMTRecipes.shardToLapis), new ResearchPage(EMTRecipes.ironToGold), new ResearchPage(EMTRecipes.goldToDiamond), new ResearchPage(EMTRecipes.diamondToUranium), new ResearchPage(EMTRecipes.uraniumToIridium));
|
||||
new EMTResearchItem("UU-Matter Infusion", EMTResearchAspects.uuMInfusion, 5, 5, 3, new ItemStack(EMTItems.itemEMTItems, 1, 15)).setParentsHidden("Electric Magic Tools").setConcealed().registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.uuMCrystal), new ResearchPage(EMTRecipes.charcoalToCoal), new ResearchPage(EMTRecipes.glowstoneDustToBlock), new ResearchPage(EMTRecipes.stoneBricksToIronOre), new ResearchPage(EMTRecipes.arcaneStoneToCopperOre), new ResearchPage(EMTRecipes.arcaneStoneBricksToTinOre), new ResearchPage(EMTRecipes.amberBlockToLeadOre), new ResearchPage(EMTRecipes.amberBricksToUraniumOre), new ResearchPage(EMTRecipes.shardToResin), new ResearchPage(EMTRecipes.shardToRedstone), new ResearchPage(EMTRecipes.shardToLapis), new ResearchPage(EMTRecipes.ironToGold), new ResearchPage(EMTRecipes.goldToDiamond), new ResearchPage(EMTRecipes.diamondToUranium), new ResearchPage(EMTRecipes.uraniumToIridium));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.portableNodeResarch) {
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ItemBlockElectricCloud extends ItemBlock{
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = ir.registerIcon(ModInformation.texturePath + ":" + "electricCloud");
|
||||
icon = ir.registerIcon(ModInformation.texturePath + ":" + "electric_cloud");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,27 +23,22 @@ import emt.ModInformation;
|
||||
|
||||
public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
|
||||
private IIcon ornament, depth;
|
||||
String textureName = null;
|
||||
public IIcon ornament;
|
||||
String textureName = "";
|
||||
|
||||
public ItemBaseFocus(String unlocName, String textureName) {
|
||||
public ItemBaseFocus(String unlocName) {
|
||||
super();
|
||||
|
||||
setUnlocalizedName(ModInformation.modid + unlocName);
|
||||
setUnlocalizedName(ModInformation.modid + ".focus." + unlocName);
|
||||
setCreativeTab(ElectroMagicTools.tabEMT);
|
||||
setMaxDamage(1);
|
||||
setNoRepair();
|
||||
setMaxStackSize(1);
|
||||
this.textureName = textureName;
|
||||
}
|
||||
|
||||
boolean hasOrnament() {
|
||||
return false;
|
||||
this.textureName = unlocName;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon(ModInformation.texturePath + ":" + textureName);
|
||||
this.icon = ir.registerIcon(ModInformation.texturePath + ":" + "focus_" + textureName);
|
||||
}
|
||||
|
||||
boolean hasDepth() {
|
||||
@@ -65,20 +60,14 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon() {
|
||||
return depth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getOrnament(ItemStack focusstack) {
|
||||
return ornament;
|
||||
}
|
||||
|
||||
public WandFocusAnimation getAnimation() {
|
||||
return WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public AspectList getVisCost() {
|
||||
return null;
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack focusstack) {
|
||||
return new AspectList();
|
||||
}
|
||||
|
||||
public boolean isUseItem(ItemStack stack) {
|
||||
@@ -115,10 +104,6 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean acceptsEnchant(int id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
return 5;
|
||||
@@ -126,7 +111,7 @@ public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
AspectList cost = getVisCost();
|
||||
AspectList cost = getVisCost(stack);
|
||||
if (cost != null && cost.size() > 0) {
|
||||
list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
|
||||
for (Aspect aspect : cost.getAspectsSorted()) {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10);
|
||||
|
||||
public ItemChargeFocus() {
|
||||
super(".focus.charge", "focus_charge");
|
||||
super("charge");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -32,7 +32,7 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList actualCost = new AspectList();
|
||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet())
|
||||
actualCost.add(e.getKey(), (int)(e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
return visCost;
|
||||
}
|
||||
|
||||
@@ -41,16 +41,10 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
return "WANDCHARGING";
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank)
|
||||
{
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade "trees"
|
||||
* that make certain upgrades available only when others are unlocked first, when certain research is completed, or similar logic.
|
||||
*
|
||||
*/
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return true;
|
||||
}
|
||||
@@ -61,7 +55,7 @@ public class ItemChargeFocus extends ItemBaseFocus {
|
||||
if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!world.isRemote) {
|
||||
|
||||
int energyLeft = (int)(EMTConfigHandler.chargeFocusProduction * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
int energyLeft = (int) (EMTConfigHandler.chargeFocusProduction * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
|
||||
if (energyLeft > 0) {
|
||||
if ((player.inventory.armorInventory[i] != null) && (player.inventory.armorInventory[i].getItem() instanceof IElectricItem)) {
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ItemChristmasFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 500).add(Aspect.AIR, 500);
|
||||
|
||||
public ItemChristmasFocus() {
|
||||
super(".focus.christmas", "focus_christmas");
|
||||
super("christmas");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
|
||||
|
||||
public ItemExplosionFocus() {
|
||||
super(".focus.explosion", "focus_explosion");
|
||||
super("explosion");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import emt.entity.EntityElectroBall;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityLargeFireball;
|
||||
import net.minecraft.entity.projectile.EntitySmallFireball;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
public class ItemNoNameFocus extends ItemBaseFocus {
|
||||
|
||||
public ItemNoNameFocus() {
|
||||
super("noName");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0xFFFF00;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "NONAME";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) {
|
||||
if(!world.isRemote) {
|
||||
float rotX = (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100;
|
||||
float rotY = (-MathHelper.sin(player.rotationPitch / 180.0F * (float) Math.PI)) * 100;
|
||||
float rotZ = (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI)) * 100;
|
||||
world.spawnEntityInWorld(new EntityElectroBall(world, player, rotX, rotY, rotZ));
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class ItemShieldFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5);
|
||||
|
||||
public ItemShieldFocus() {
|
||||
super(".focus.shield", "focus_shield");
|
||||
super("shield");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
AspectList visCost = new AspectList().add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.AIR, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10);
|
||||
|
||||
public ItemWandChargingFocus() {
|
||||
super(".focus.charge.wand", "focus_chargeWand");
|
||||
super("chargeWand");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,20 +39,14 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList actualCost = new AspectList();
|
||||
for (Entry<Aspect, Integer> e : visCost.aspects.entrySet())
|
||||
actualCost.add(e.getKey(), (int)(e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
actualCost.add(e.getKey(), (int) (e.getValue() * Math.pow(1.1, getUpgradeLevel(stack, FocusUpgradeType.potency))));
|
||||
return visCost;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank)
|
||||
{
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.potency, FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to define custom logic about which upgrades can be applied. This can be used to set up upgrade "trees"
|
||||
* that make certain upgrades available only when others are unlocked first, when certain research is completed, or similar logic.
|
||||
*
|
||||
*/
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack focusstack, EntityPlayer player, FocusUpgradeType type, int rank) {
|
||||
return true;
|
||||
}
|
||||
@@ -66,7 +60,7 @@ public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
ItemStack armor = player.inventory.armorInventory[1];
|
||||
if (armor != null) {
|
||||
if ((ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)) && (ElectricItem.manager.use(armor, EMTConfigHandler.wandChargeFocusCost / 4, player)))) {
|
||||
int amount = (int)(100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
int amount = (int) (100 * Math.pow(1.1, getUpgradeLevel(itemstack, FocusUpgradeType.potency)));
|
||||
wandItem.addRealVis(itemstack, Aspect.ORDER, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.FIRE, amount, true);
|
||||
wandItem.addRealVis(itemstack, Aspect.ENTROPY, amount, true);
|
||||
|
||||
@@ -2,6 +2,7 @@ package emt.proxy;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderFireball;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowMan;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
@@ -10,6 +11,7 @@ import emt.client.EMTKeys;
|
||||
import emt.client.renderer.RenderLaser;
|
||||
import emt.client.renderer.RenderShield;
|
||||
import emt.entity.EntityArcher;
|
||||
import emt.entity.EntityElectroBall;
|
||||
import emt.entity.EntityLaser;
|
||||
import emt.entity.EntityShield;
|
||||
|
||||
@@ -25,5 +27,6 @@ public class ClientProxy extends CommonProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityArcher.class, new RenderSnowMan());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShield.class, new RenderShield());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityElectroBall.class, new RenderFireball(2));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user