Recipe/docs for the Vinculotus.

This commit is contained in:
Vasco Lavos committed 2014-07-15 18:47:53 +01:00
1 parent 47d0f29ea0
commit 0b28a1ab1b
5 files changed
+47 -11

No files matched your search

@@ -11,15 +11,19 @@
*/
package vazkii.botania.common.block.subtile.functional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.SubTileFunctional;
import vazkii.botania.common.core.helper.MathHelper;
import vazkii.botania.common.lexicon.LexiconData;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class SubTileVinculotus extends SubTileFunctional {
@@ -40,6 +44,11 @@ public class SubTileVinculotus extends SubTileFunctional {
}
}
@Override
public boolean acceptsRedstone() {
return true;
}
@Override
public int getColor() {
return 0x0A6051;
@@ -50,6 +59,11 @@ public class SubTileVinculotus extends SubTileFunctional {
return 500;
}
@Override
public LexiconEntry getEntry() {
return LexiconData.vinculotus;
}
public static class EndermanIntercepter {
@SubscribeEvent
@@ -61,21 +75,31 @@ public class SubTileVinculotus extends SubTileFunctional {
int range = 64;
if(event.entity instanceof EntityEnderman) {
List<SubTileVinculotus> possibleFlowers = new ArrayList();
for(SubTileVinculotus flower : existingFlowers) {
if(flower.mana <= cost)
if(flower.redstoneSignal > 0 || flower.mana <= cost || flower.supertile.getWorldObj() != event.entity.worldObj || flower.supertile.getWorldObj().getTileEntity(flower.supertile.xCoord, flower.supertile.yCoord, flower.supertile.zCoord) != flower.supertile)
continue;
double x = flower.supertile.xCoord + 0.5;
double y = flower.supertile.yCoord + 1.5;
double z = flower.supertile.zCoord + 0.5;
if(MathHelper.pointDistanceSpace(x, y, z, event.targetX, event.targetY, event.targetZ) < range) {
event.targetX = x + Math.random() * 3 - 1;
event.targetY = y;
event.targetZ = z + Math.random() * 3 - 1;
flower.mana -= cost;
flower.sync();
}
if(MathHelper.pointDistanceSpace(x, y, z, event.targetX, event.targetY, event.targetZ) < range)
possibleFlowers.add(flower);
}
if(!possibleFlowers.isEmpty()) {
SubTileVinculotus flower = possibleFlowers.get(event.entity.worldObj.rand.nextInt(possibleFlowers.size()));
double x = flower.supertile.xCoord + 0.5;
double y = flower.supertile.yCoord + 1.5;
double z = flower.supertile.zCoord + 0.5;
event.targetX = x + Math.random() * 3 - 1;
event.targetY = y;
event.targetZ = z + Math.random() * 3 - 1;
flower.mana -= cost;
flower.sync();
}
}
}
@@ -61,6 +61,7 @@ public final class ModPetalRecipes {
public static RecipePetals clayconiaRecipe;
public static RecipePetals looniumRecipe;
public static RecipePetals daffomillRecipe;
public static RecipePetals vinculotusRecipe;
public static void init() {
pureDaisyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY), white, white, white, white);
@@ -95,7 +96,8 @@ public final class ModPetalRecipes {
clayconiaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_CLAYCONIA), gray, lightGray, lightGrayMana, lightGrayMana, grayMana, cyan, runeEarth);
looniumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_LOONIUM), green, green, greenMana, greenMana, gray, grayMana, runeSloth, runeGluttony, runeEnvy, redstoneRoot);
daffomillRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAFFOMILL), white, whiteMana, brown, yellowMana, runeAir, redstoneRoot);
vinculotusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_VINCULOTUS), purpleMana, purpleMana, lime, black, blackMana, black, runeWater, runeSloth, runeLust, redstoneRoot);
ItemStack stack = new ItemStack(Items.skull, 1, 3);
ItemNBTHelper.setString(stack, "SkullOwner", "Vazkii");
Object[] inputs = new Object[16];
@@ -100,6 +100,7 @@ public final class LexiconData {
public static LexiconEntry entropinnyum;
public static LexiconEntry kekimurus;
public static LexiconEntry daffomill;
public static LexiconEntry vinculotus;
public static LexiconEntry pistonRelay;
public static LexiconEntry pylon;
@@ -307,9 +308,12 @@ public final class LexiconData {
loonium = new BLexiconEntry(LibLexicon.FFLOWER_LOONIUM, categoryFunctionalFlowers);
loonium.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.looniumRecipe));
daffomill = new BLexiconEntry(LibLexicon.GFLOWER_DAFFOMILL, categoryFunctionalFlowers);
daffomill = new BLexiconEntry(LibLexicon.FFLOWER_DAFFOMILL, categoryFunctionalFlowers);
daffomill.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.daffomillRecipe));
vinculotus = new BLexiconEntry(LibLexicon.FFLOWER_VINCULOTUS, categoryFunctionalFlowers);
vinculotus.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.vinculotusRecipe));
// GENERATING FLOWERS ENTRIES
generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers);
generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
@@ -65,6 +65,8 @@ public final class LibLexicon {
public static final String FFLOWER_POLLIDISIAC = "pollidisiac";
public static final String FFLOWER_CLAYCONIA = "clayconia";
public static final String FFLOWER_LOONIUM = "loonium";
public static final String FFLOWER_DAFFOMILL = "daffomill";
public static final String FFLOWER_VINCULOTUS = "vinculotus";
public static final String GFLOWER_INTRO = "gIntro";
public static final String GFLOWER_DAYBLOOM = "daybloom";
@@ -76,7 +78,6 @@ public final class LibLexicon {
public static final String GFLOWER_MUNCHDEW = "munchdew";
public static final String GFLOWER_ENTROPINNYUM = "entropinnyum";
public static final String GFLOWER_KEKIMURUS = "kekimurus";
public static final String GFLOWER_DAFFOMILL = "daffomill";
public static final String DEVICE_PISTON_RELAY = "pistonRelay";
public static final String DEVICE_PYLON = "pylon";
+5
View File
@@ -895,6 +895,11 @@ botania.entry.daffomill=Daffomill
botania.page.daffomill0=The &1Daffomill&0 works as a fan of sorts. It pushes, at the cost of a small amount of &4Mana&0, any items found in front of it.<br>Shift-right clicking it with a &1Wand of the Forest&0 changes the orientation. Where it's currently facing can be seen via the subtle wind particles it emits.
botania.page.daffomill1=&oWind Turbines? I'm a big fan&r.
# -- VINCULOTUS
botania.entry.vinculotus=Vinculotus
botania.page.vinculotus0=The &1Vinculotus&0 has the power to create a disturbance among any &4Enderman&0's teleportation powers within a fairly large radius around it. For a cost of &4Mana&0, whenever an &4Enderman&0 would teleport anywhere, instead, they're teleported to the location of the &1Vinculotus&0.
botania.page.vinculotus1=Touch this black lotus with your fingers
# - GENERATING FLOWERS
# -- AN INTRODUCTION TO GENERATION
botania.entry.gIntro=An Introduction to Generation