mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +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
@@ -1,7 +1,5 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -13,52 +11,54 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
public class ItemShieldFocus extends ItemBaseFocus {
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5);
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.ORDER, 5).add(Aspect.WATER, 5).add(Aspect.AIR, 5);
|
||||
|
||||
public ItemShieldFocus() {
|
||||
super("shield");
|
||||
}
|
||||
public ItemShieldFocus() {
|
||||
super("shield");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0x1E90FF;
|
||||
}
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0x1E90FF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
return visCost;
|
||||
}
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
return visCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "SHIELD";
|
||||
}
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "SHIELD";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseItem(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean isUseItem(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
for (PotionEffect effect : new LinkedList<PotionEffect>(player.getActivePotionEffects())) {
|
||||
IC2.platform.removePotion(player, effect.getPotionID());
|
||||
}
|
||||
if (!player.capabilities.isCreativeMode && !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
for (PotionEffect effect : new LinkedList<PotionEffect>(player.getActivePotionEffects())) {
|
||||
IC2.platform.removePotion(player, effect.getPotionID());
|
||||
}
|
||||
if (!player.capabilities.isCreativeMode && !wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
player.setItemInUse(itemstack, Integer.MAX_VALUE);
|
||||
if (!world.isRemote && (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) {
|
||||
EntityShield shield = new EntityShield(world, player);
|
||||
world.spawnEntityInWorld(shield);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition paramMovingObjectPosition) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
player.setItemInUse(itemstack, Integer.MAX_VALUE);
|
||||
if (!world.isRemote && (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true))) {
|
||||
EntityShield shield = new EntityShield(world, player);
|
||||
world.spawnEntityInWorld(shield);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user