mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Alfhomancy Rebalance: Part 5.
This commit is contained in:
1 parent
707ef12a1f
commit
8b4e22dfd4
8 files changed
+61
-10
No files matched your search
@@ -52,6 +52,7 @@ public final class LibResources {
|
||||
public static final String ENTRY_PORTAL3 = PREFIX_ENTRIES + "portal3.png";
|
||||
public static final String ENTRY_PORTAL4 = PREFIX_ENTRIES + "portal4.png";
|
||||
public static final String ENTRY_ELVEN_GARDE = PREFIX_ENTRIES + "elvenGarde.png";
|
||||
public static final String ENTRY_GAIA_RITUAL = PREFIX_ENTRIES + "gaiaRitual.png";
|
||||
|
||||
public static final String MODEL_ALTAR = PREFIX_MODEL + "altar.png";
|
||||
public static final String MODEL_ALTAR_MOSSY = PREFIX_MODEL + "altarMossy.png";
|
||||
|
||||
@@ -61,7 +61,6 @@ public class RenderDoppleganger extends RenderBiped {
|
||||
disfiguration = (0.025F + dopple.hurtTime * ((1F - 0.15F) / 20F)) / 2F;
|
||||
grainIntensity = 0.05F + dopple.hurtTime * ((1F - 0.15F) / 10F);
|
||||
}
|
||||
|
||||
|
||||
ShaderHelper.useShader(ShaderHelper.doppleganger, callback);
|
||||
super.doRender(par1Entity, par2, par4, par6, par8, par9);
|
||||
|
||||
@@ -159,6 +159,7 @@ public final class ModCrafingRecipes {
|
||||
public static IRecipe recipeLensWeight;
|
||||
public static IRecipe recipeLensPaint;
|
||||
public static List<IRecipe> recipesMiniIsland;
|
||||
public static IRecipe recipeGaiaPylon;
|
||||
|
||||
public static void init() {
|
||||
// Lexicon Recipe
|
||||
@@ -963,7 +964,15 @@ public final class ModCrafingRecipes {
|
||||
'S', new ItemStack(ModItems.grassSeeds),
|
||||
'D', new ItemStack(Blocks.dirt));
|
||||
recipesMiniIsland = BotaniaAPI.getLatestAddedRecipes(16);
|
||||
|
||||
|
||||
// Gaia Pylon Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.pylon, 1, 2),
|
||||
" D ", "EPE", " D ",
|
||||
'D', LibOreDict.PIXIE_DUST,
|
||||
'E', LibOreDict.ELEMENTIUM,
|
||||
'P', new ItemStack(ModBlocks.pylon));
|
||||
recipeGaiaPylon = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -15,12 +15,10 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
@@ -35,14 +33,17 @@ import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public class EntityDoppleganger extends EntityCreature implements IBossDisplayData {
|
||||
|
||||
public static final int SPAWN_TICKS = 100;
|
||||
|
||||
private static final float MAX_HP = 200F; // TODO
|
||||
private static final float MAX_HP = 200F;
|
||||
|
||||
private static final String TAG_SOURCE_X = "sourceX";
|
||||
private static final String TAG_SOURCE_Y = "sourceY";
|
||||
@@ -52,6 +53,13 @@ public class EntityDoppleganger extends EntityCreature implements IBossDisplayDa
|
||||
private static final String TAG_AGGRO = "aggro";
|
||||
private static final String TAG_TP_DELAY = "tpDelay";
|
||||
|
||||
private static final int[][] PYLON_LOCATIONS = new int[][] {
|
||||
{ 4, 1, 4 },
|
||||
{ 4, 1, -4 },
|
||||
{ -4, 1, 4 },
|
||||
{ -4, 1, -4 }
|
||||
};
|
||||
|
||||
boolean spawnLandmines = false;
|
||||
boolean spawnPixies = false;
|
||||
|
||||
@@ -68,6 +76,17 @@ public class EntityDoppleganger extends EntityCreature implements IBossDisplayDa
|
||||
public static boolean spawn(ItemStack par1ItemStack, World par3World, int par4, int par5, int par6) {
|
||||
Block block = par3World.getBlock(par4, par5, par6);
|
||||
if(block == Blocks.beacon && !par3World.isRemote) {
|
||||
for(int[] coords : PYLON_LOCATIONS) {
|
||||
int x = par4 + coords[0];
|
||||
int y = par5 + coords[1];
|
||||
int z = par6 + coords[2];
|
||||
|
||||
Block blockat = par3World.getBlock(x, y, z);
|
||||
int meta = par3World.getBlockMetadata(x, y, z);
|
||||
if(blockat != ModBlocks.pylon || meta != 2)
|
||||
return false;
|
||||
}
|
||||
|
||||
par1ItemStack.stackSize--;
|
||||
EntityDoppleganger e = new EntityDoppleganger(par3World);
|
||||
e.setPosition(par4 + 0.5, par5 + 3, par6 + 0.5);
|
||||
@@ -189,7 +208,13 @@ public class EntityDoppleganger extends EntityCreature implements IBossDisplayDa
|
||||
protected boolean canDespawn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void dropFewItems(boolean par1, int par2) {
|
||||
if(par1)
|
||||
entityDropItem(new ItemStack(ModItems.manaResource, 12, 5), 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLivingUpdate() {
|
||||
super.onLivingUpdate();
|
||||
@@ -275,7 +300,8 @@ public class EntityDoppleganger extends EntityCreature implements IBossDisplayDa
|
||||
}
|
||||
}
|
||||
|
||||
// Enderman code
|
||||
// EntityEnderman code below ============================================================================
|
||||
|
||||
protected boolean teleportRandomly() {
|
||||
double d0 = this.posX + (this.rand.nextDouble() - 0.5D) * 64.0D;
|
||||
double d1 = this.posY + (double)(this.rand.nextInt(64) - 32);
|
||||
@@ -315,6 +341,7 @@ public class EntityDoppleganger extends EntityCreature implements IBossDisplayDa
|
||||
if(this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox))
|
||||
flag = true;
|
||||
|
||||
// Prevent out of bounds teleporting
|
||||
ChunkCoordinates source = getSource();
|
||||
if(vazkii.botania.common.core.helper.MathHelper.pointDistanceSpace(posX, posY, posZ, source.posX, source.posY, source.posZ) > 15)
|
||||
flag = false;
|
||||
|
||||
@@ -26,6 +26,7 @@ import vazkii.botania.common.crafting.ModManaConjurationRecipes;
|
||||
import vazkii.botania.common.crafting.ModManaInfusionRecipes;
|
||||
import vazkii.botania.common.crafting.ModPetalRecipes;
|
||||
import vazkii.botania.common.crafting.ModRuneRecipes;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.page.PageCraftingRecipe;
|
||||
import vazkii.botania.common.lexicon.page.PageElvenRecipe;
|
||||
import vazkii.botania.common.lexicon.page.PageImage;
|
||||
@@ -151,6 +152,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry alfhomancyIntro;
|
||||
public static LexiconEntry elvenMessage;
|
||||
public static LexiconEntry elvenResources;
|
||||
public static LexiconEntry gaiaRitual;
|
||||
|
||||
public static LexiconEntry unstableBlocks;
|
||||
public static LexiconEntry decorativeBlocks;
|
||||
@@ -501,6 +503,10 @@ public final class LexiconData {
|
||||
elvenResources = new ALexiconEntry(LibLexicon.ALF_RESOURCES, categoryAlfhomancy);
|
||||
elvenResources.setPriority().setLexiconPages(new PageText("0"), new PageElvenRecipe("1", ModElvenTradeRecipes.dreamwoodRecipe), new PageText("2"), new PageElvenRecipe("3", ModElvenTradeRecipes.elementiumRecipes), new PageElvenRecipe("4", ModElvenTradeRecipes.pixieDustRecipe), new PageElvenRecipe("5", ModElvenTradeRecipes.dragonstoneRecipe), new PageText("6"), new PageElvenRecipe("7", ModElvenTradeRecipes.elvenQuartzRecipe));
|
||||
|
||||
gaiaRitual = new ALexiconEntry(LibLexicon.ALF_GAIA_RITUAL, categoryAlfhomancy);
|
||||
gaiaRitual.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeGaiaPylon), new PageImage("2", LibResources.ENTRY_GAIA_RITUAL), new PageText("3"), new PageText("4"));
|
||||
LexiconRecipeMappings.map(new ItemStack(ModItems.manaResource, 1, 5), gaiaRitual, 0);
|
||||
|
||||
// MISCLENAEOUS ENTRIES
|
||||
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);
|
||||
unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks), new PageText("3"), new PageImage("4", LibResources.ENTRY_UNSTABLE_BEACON), new PageCraftingRecipe("5", ModCrafingRecipes.recipesManaBeacons), new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipesSignalFlares));
|
||||
|
||||
@@ -129,6 +129,7 @@ public final class LibLexicon {
|
||||
public static final String ALF_INTRO = "aIntro";
|
||||
public static final String ALF_MESSAGE = "elfMessage";
|
||||
public static final String ALF_RESOURCES = "elfResources";
|
||||
public static final String ALF_GAIA_RITUAL = "gaiaRitual";
|
||||
|
||||
public static final String MISC_UNSTABLE_BLOCKS = "unstableBlocks";
|
||||
public static final String MISC_DECORATIVE_BLOCKS = "decorativeBlocks";
|
||||
|
||||
Reference in new issue
Block a user