mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 20:12:23 +00:00
Refractored Code
+added Solar Factory -removed unnessecary solar and essentia generator classes +started gtnh researches +added tooltip clearance on solars (maximal output) Signed-off-by: bartimaeusnek <[email protected]>
This commit is contained in:
1 parent
980df8516a
commit
0fecf28b65
397 files changed
+8693
-9288
No files matched your search
@@ -11,54 +11,52 @@ import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 200).add(Aspect.ENTROPY, 200);
|
||||
|
||||
public ItemExplosionFocus() {
|
||||
super("explosion");
|
||||
}
|
||||
public ItemExplosionFocus() {
|
||||
super("explosion");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0x8B0000;
|
||||
}
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0x8B0000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack focusstack) {
|
||||
return visCost;
|
||||
}
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack focusstack) {
|
||||
return visCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "EXPLOSION";
|
||||
}
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "EXPLOSION";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!world.isRemote) {
|
||||
EntityLaser laser;
|
||||
laser = new EntityLaser(world, player, 1);
|
||||
laser.setExplosionStrengthModifier(getUpgradeLevel(itemstack, FocusUpgradeType.potency) * 0.5f + 1);
|
||||
world.spawnEntityInWorld(laser);
|
||||
}
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
if (!world.isRemote) {
|
||||
EntityLaser laser;
|
||||
laser = new EntityLaser(world, player, 1);
|
||||
laser.setExplosionStrengthModifier(getUpgradeLevel(itemstack, FocusUpgradeType.potency) * 0.5f + 1);
|
||||
world.spawnEntityInWorld(laser);
|
||||
}
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user