mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-10-25 20:32:29 +00:00
3 files changed
+16
-25
No files matched your search
+1
-1
@@ -35,7 +35,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.7'
|
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.13'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,15 +23,7 @@ public class BotaniaFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEntityHarmless(Entity entity) {
|
public static boolean isEntityHarmless(Entity entity) {
|
||||||
if(entity instanceof IManaBurst) {
|
ItemStack lens = ((IManaBurst)entity).getSourceLens();
|
||||||
ItemStack lens = ((IManaBurst)entity).getSourceLens();
|
return lens.getItemDamage() != 8 && lens.getItemDamage() != 11;
|
||||||
if(lens.getItemDamage()!=8 && lens.getItemDamage()!=11)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,9 +41,9 @@ import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
|
|||||||
import thaumic.tinkerer.common.research.IRegisterableResearch;
|
import thaumic.tinkerer.common.research.IRegisterableResearch;
|
||||||
import thaumic.tinkerer.common.research.ResearchHelper;
|
import thaumic.tinkerer.common.research.ResearchHelper;
|
||||||
import thaumic.tinkerer.common.research.TTResearchItem;
|
import thaumic.tinkerer.common.research.TTResearchItem;
|
||||||
|
import vazkii.botania.api.internal.IManaBurst;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemFocusDeflect extends ItemModFocus {
|
public class ItemFocusDeflect extends ItemModFocus {
|
||||||
@@ -65,9 +65,9 @@ public class ItemFocusDeflect extends ItemModFocus {
|
|||||||
int range = 0;
|
int range = 0;
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||||
range = wand.getFocusEnlarge(stack);
|
range = wand.getFocusEnlarge(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Entity> projectiles = p.worldObj.getEntitiesWithinAABB(IProjectile.class, AxisAlignedBB.getBoundingBox(p.posX - (4 + range), p.posY - (4 + range), p.posZ - (4 + range), p.posX + (3 + range), p.posY + (3 + range), p.posZ + (3 + range)));
|
List<Entity> projectiles = p.worldObj.getEntitiesWithinAABB(IProjectile.class, AxisAlignedBB.getBoundingBox(p.posX - (4 + range), p.posY - (4 + range), p.posZ - (4 + range), p.posX + (3 + range), p.posY + (3 + range), p.posZ + (3 + range)));
|
||||||
|
|
||||||
for (Entity e : projectiles) {
|
for (Entity e : projectiles) {
|
||||||
@@ -89,15 +89,15 @@ public class ItemFocusDeflect extends ItemModFocus {
|
|||||||
{
|
{
|
||||||
switch (rank)
|
switch (rank)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal};
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal};
|
||||||
case 2:
|
case 2:
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge};
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge};
|
||||||
case 3:
|
case 3:
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal};
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal};
|
||||||
case 4:
|
case 4:
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge};
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge};
|
||||||
case 5:
|
case 5:
|
||||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal};
|
return new FocusUpgradeType[] { FocusUpgradeType.frugal};
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -107,15 +107,14 @@ public class ItemFocusDeflect extends ItemModFocus {
|
|||||||
Class<? extends Entity> aClass=entity.getClass();
|
Class<? extends Entity> aClass=entity.getClass();
|
||||||
if(DeflectBlacklist.contains(aClass))
|
if(DeflectBlacklist.contains(aClass))
|
||||||
return true;
|
return true;
|
||||||
if (Loader.isModLoaded("Botania"))
|
if (Loader.isModLoaded("Botania") && entity instanceof IManaBurst)
|
||||||
{
|
{
|
||||||
return BotaniaFunctions.isEntityHarmless(entity);
|
return BotaniaFunctions.isEntityHarmless(entity);
|
||||||
}
|
}
|
||||||
for(Class<?> testClass:DeflectBlacklist)
|
for(Class<?> testClass:DeflectBlacklist)
|
||||||
{
|
{
|
||||||
if(testClass.isInterface())
|
if(testClass.isInterface() && testClass.isAssignableFrom(aClass))
|
||||||
if(testClass.isAssignableFrom(aClass))
|
return true;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -148,8 +147,8 @@ public class ItemFocusDeflect extends ItemModFocus {
|
|||||||
public AspectList getVisCost(ItemStack stack) {
|
public AspectList getVisCost(ItemStack stack) {
|
||||||
return visUsage;
|
return visUsage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user