diff --git a/dependencies.gradle b/dependencies.gradle index dec0c6a..25da39e 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -9,6 +9,7 @@ dependencies { compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.68-GTNH:dev') compileOnly("com.github.GTNewHorizons:Chisel:2.17.14-GTNH:dev") {transitive = false} + compileOnly("com.github.GTNewHorizons:twilightforest:2.7.23:dev") { transitive = false } runtimeOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev') diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 23449a2..dbc3ce4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index 335f37c..ea29dac 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,5 +17,5 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.19' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24' } diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/BHBlocks.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/BHBlocks.java index dd8941f..9b638d5 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/addons/BHBlocks.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/BHBlocks.java @@ -1,6 +1,7 @@ package net.fuzzycraft.botanichorizons.addons; import cpw.mods.fml.common.registry.GameRegistry; + import net.fuzzycraft.botanichorizons.addons.block.BlockAdvancedAlchemyPool; import net.fuzzycraft.botanichorizons.addons.block.BlockAdvancedAlfPortal; import net.fuzzycraft.botanichorizons.addons.block.BlockAdvancedConjurationPool; @@ -9,20 +10,34 @@ import net.fuzzycraft.botanichorizons.addons.tileentity.TileAdvancedAlfPortal; import net.fuzzycraft.botanichorizons.addons.tileentity.TileAdvancedConjurationPool; import net.fuzzycraft.botanichorizons.addons.tileentity.TileAdvancedCraftingPool; +import net.fuzzycraft.botanichorizons.addons.block.BlockFloatingSparkFlower; +import net.fuzzycraft.botanichorizons.addons.block.BlockSparkFlower; +import net.fuzzycraft.botanichorizons.addons.block.subtile.generating.SubTileReiujia; +import net.fuzzycraft.botanichorizons.addons.block.tile.TileFloatingSparkFlower; +import net.fuzzycraft.botanichorizons.addons.block.tile.TileSparkFlower; import net.fuzzycraft.botanichorizons.mod.ForgeMod; +import net.fuzzycraft.botanichorizons.util.Signature; + +import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; +import vazkii.botania.api.BotaniaAPI; + public final class BHBlocks { public static BlockAdvancedCraftingPool autoPoolInfusion; public static BlockAdvancedAlchemyPool autoPoolAlchemy; public static BlockAdvancedConjurationPool autoPoolConjuration; public static BlockAdvancedAlfPortal autoPortal; + public static Block sparkFlower; + public static Block floatingSparkFlower; public static void initBlocks() { autoPoolInfusion = new BlockAdvancedCraftingPool(); autoPoolAlchemy = new BlockAdvancedAlchemyPool(); autoPoolConjuration = new BlockAdvancedConjurationPool(); autoPortal = new BlockAdvancedAlfPortal(); + sparkFlower = new BlockSparkFlower(); + floatingSparkFlower = new BlockFloatingSparkFlower(); registerTileEntities(); } @@ -32,6 +47,12 @@ public static void registerTileEntities() { registerTile(TileAdvancedAlchemyPool.class, BlockAdvancedAlchemyPool.NAME); registerTile(TileAdvancedConjurationPool.class, BlockAdvancedConjurationPool.NAME); registerTile(TileAdvancedAlfPortal.class, BlockAdvancedAlfPortal.NAME); + registerTile(TileSparkFlower.class, BlockSparkFlower.NAME); + registerTile(TileFloatingSparkFlower.class, BlockFloatingSparkFlower.NAME); + + BotaniaAPI.registerSubTile(SubTileReiujia.NAME, SubTileReiujia.class); + BotaniaAPI.registerSubTileSignature(SubTileReiujia.class, new Signature(SubTileReiujia.NAME)); + BotaniaAPI.addSubTileToCreativeMenu(SubTileReiujia.NAME); } private static void registerTile(Class clazz, String key) { diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/block/BlockFloatingSparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/BlockFloatingSparkFlower.java new file mode 100644 index 0000000..26ff2ed --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/BlockFloatingSparkFlower.java @@ -0,0 +1,174 @@ +package net.fuzzycraft.botanichorizons.addons.block; + +// Mirrors BlockFloatingSpecialFlower + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.fuzzycraft.botanichorizons.addons.item.ItemBlockFloatingSparkFlower; +import net.fuzzycraft.botanichorizons.addons.item.ItemBlockSparkFlower; +import net.fuzzycraft.botanichorizons.addons.block.tile.TileFloatingSparkFlower; +import net.fuzzycraft.botanichorizons.addons.block.tile.TileSparkFlower; +import net.fuzzycraft.botanichorizons.addons.crafting.recipe.SparkFloatingFlowerRecipe; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.oredict.RecipeSorter; +import net.minecraftforge.oredict.RecipeSorter.Category; + +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; +import vazkii.botania.api.subtile.ISpecialFlower; +import vazkii.botania.api.wand.IWandHUD; +import vazkii.botania.api.wand.IWandable; +import vazkii.botania.common.block.decor.BlockFloatingFlower; +import vazkii.botania.common.block.tile.TileMod; +import vazkii.botania.common.integration.coloredlights.LightHelper; +import vazkii.botania.common.lib.LibBlockNames; + +import cpw.mods.fml.common.registry.GameRegistry; + +public class BlockFloatingSparkFlower extends BlockFloatingFlower implements ISpecialFlower, IWandable, ILexiconable, IWandHUD { + + public static String NAME = "blockFloatingSparkFlower"; + + public BlockFloatingSparkFlower() { + super(NAME); + + GameRegistry.addRecipe(new SparkFloatingFlowerRecipe()); + RecipeSorter.register("botania:floatingSparkFlower", SparkFloatingFlowerRecipe.class, Category.SHAPELESS, ""); + } + + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z) { + int currentLight = ((TileSparkFlower) world.getTileEntity(x, y, z)).getLightValue(); + if(currentLight == -1) + currentLight = originalLight; + return LightHelper.getPackedColor(world.getBlockMetadata(x, y, z), currentLight); + } + + @Override + public boolean hasComparatorInputOverride() { + return true; + } + + @Override + public int getComparatorInputOverride(World world, int x, int y, int z, int side) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).getComparatorInputOverride(side); + } + + @Override + public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).getPowerLevel(side); + } + + @Override + public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { + return isProvidingWeakPower(world, x, y, z, side); + } + + @Override + public boolean canProvidePower() { + return true; + } + + @Override + public void randomDisplayTick(World world, int x, int y, int z, Random random) { + // NO-OP + } + + @Override + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for(String s : BotaniaAPI.subtilesForCreativeMenu) { + list.add(ItemBlockSparkFlower.ofType(new ItemStack(item), s)); + if(BotaniaAPI.miniFlowers.containsKey(s)) + list.add(ItemBlockSparkFlower.ofType(new ItemStack(item), BotaniaAPI.miniFlowers.get(s))); + } + } + + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + String name = ((TileSparkFlower) world.getTileEntity(x, y, z)).subTileName; + return ItemBlockSparkFlower.ofType(new ItemStack(world.getBlock(x, y, z)), name); + } + + @Override + public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) { + if(!player.capabilities.isCreativeMode) { + dropBlockAsItem(world, x, y, z, meta, 0); + ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockHarvested(world, x, y, z, meta, player); + } + } + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + ArrayList list = new ArrayList<>(); + TileEntity tile = world.getTileEntity(x, y, z); + + if(tile != null) { + String name = ((TileSparkFlower) tile).subTileName; + list.add(ItemBlockSparkFlower.ofType(new ItemStack(world.getBlock(x, y, z)), name)); + ((TileSparkFlower) tile).getDrops(list); + } + + return list; + } + + @Override + public boolean onBlockEventReceived(World world, int x, int y, int z, int eventId, int eventData) { + super.onBlockEventReceived(world, x, y, z, eventId, eventData); + TileEntity tileentity = world.getTileEntity(x, y, z); + return tileentity != null ? tileentity.receiveClientEvent(eventId, eventData) : false; + } + + @Override + public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).onWanded(stack, player); + } + + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) { + ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockPlacedBy(world, x, y, z, entity, stack); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ) || super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z) { + ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockAdded(world, x, y, z); + } + + @Override + public void renderHUD(Minecraft mc, ScaledResolution res, World world, int x, int y, int z) { + ((TileSparkFlower) world.getTileEntity(x, y, z)).renderHUD(mc, res); + } + + @Override + protected void register(String name) { + GameRegistry.registerBlock(this, ItemBlockFloatingSparkFlower.class, name); + } + + @Override + public TileMod createNewTileEntity(World world, int meta) { + return new TileFloatingSparkFlower(); + } + + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).getEntry(); + } +} diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/block/BlockSparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/BlockSparkFlower.java new file mode 100644 index 0000000..089a60e --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/BlockSparkFlower.java @@ -0,0 +1,232 @@ +package net.fuzzycraft.botanichorizons.addons.block; + +// Mirrors BlockSpecialFlower + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFlower; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import net.fuzzycraft.botanichorizons.addons.item.ItemBlockSparkFlower; +import net.fuzzycraft.botanichorizons.addons.block.subtile.generating.SubTileReiujia; +import net.fuzzycraft.botanichorizons.addons.block.tile.TileSparkFlower; + +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; +import vazkii.botania.api.subtile.ISpecialFlower; +import vazkii.botania.api.wand.IWandHUD; +import vazkii.botania.api.wand.IWandable; +import vazkii.botania.client.lib.LibRenderIDs; +import vazkii.botania.common.block.BlockModFlower; +import vazkii.botania.common.block.BlockSpecialFlower; +import vazkii.botania.common.block.ModBlocks; +import vazkii.botania.common.core.BotaniaCreativeTab; +import vazkii.botania.common.integration.coloredlights.LightHelper; +import vazkii.botania.common.item.ModItems; + +import cpw.mods.fml.common.registry.GameRegistry; + +public class BlockSparkFlower extends BlockFlower implements ITileEntityProvider, ISpecialFlower, IWandable, ILexiconable, IWandHUD { + + public static Map icons = new HashMap<>(); + public static Map iconsAlt = new HashMap<>(); + public static String NAME = "sparkFlower"; + + static { + BotaniaAPI.subtilesForCreativeMenu.addAll(Arrays.asList(new String[] { + SubTileReiujia.NAME + })); + } + + public BlockSparkFlower() { + super(0); + setBlockName(this.NAME); + setHardness(0.1F); + setStepSound(soundTypeGrass); + setTickRandomly(false); + setCreativeTab(BotaniaCreativeTab.INSTANCE); + setBlockBounds(0.3F, 0.0F, 0.3F, 0.8F, 1, 0.8F); + } + + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z) { + int currentLight = ((TileSparkFlower) world.getTileEntity(x, y, z)).getLightValue(); + if(currentLight == -1) + currentLight = 0; + return LightHelper.getPackedColor(world.getBlockMetadata(x, y, z), currentLight); + } + + @Override + public boolean hasComparatorInputOverride() { + return true; + } + + @Override + public int getComparatorInputOverride(World world, int x, int y, int z, int side) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).getComparatorInputOverride(side); + } + + @Override + public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).getPowerLevel(side); + } + + @Override + public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { + return isProvidingWeakPower(world, x, y, z, side); + } + + @Override + public boolean canProvidePower() { + return true; + } + + @Override + public int getRenderType() { + return LibRenderIDs.idSpecialFlower; + } + + @Override + public Block setBlockName(String name) { + GameRegistry.registerBlock(this, ItemBlockSparkFlower.class, name); + return super.setBlockName(name); + } + + @Override + public void getSubBlocks(Item item, CreativeTabs tab, List list) { + for(String s : BotaniaAPI.subtilesForCreativeMenu) { + list.add(ItemBlockSparkFlower.ofType(s)); + if(BotaniaAPI.miniFlowers.containsKey(s)) + list.add(ItemBlockSparkFlower.ofType(BotaniaAPI.miniFlowers.get(s))); + } + } + + @Override + public void registerBlockIcons(IIconRegister register) { + for(String s : BotaniaAPI.getAllSubTiles()) + if(!s.isEmpty()) + BotaniaAPI.getSignatureForName(s).registerIcons(register); + } + + @Override + public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { + final TileSparkFlower flower = (TileSparkFlower) world.getTileEntity(x, y, z); + return flower != null ? flower.getIcon() : BlockModFlower.icons[16]; + } + + @Override + public IIcon getIcon(int side, int meta) { + return BlockModFlower.icons[16]; + } + + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + String name = ((TileSparkFlower) world.getTileEntity(x, y, z)).subTileName; + return ItemBlockSparkFlower.ofType(name); + } + + @Override + protected boolean canPlaceBlockOn(Block block) { + return super.canPlaceBlockOn(block) || block == ModBlocks.redStringRelay || block == Blocks.mycelium; + } + + @Override + public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) { + if(!player.capabilities.isCreativeMode) { + dropBlockAsItem(world, x, y, z, meta, 0); + ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockHarvested(world, x, y, z, meta, player); + } + } + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + ArrayList list = new ArrayList<>(); + TileEntity tile = world.getTileEntity(x, y, z); + + if(tile != null) { + String name = ((TileSparkFlower) tile).subTileName; + list.add(ItemBlockSparkFlower.ofType(name)); + ((TileSparkFlower) tile).getDrops(list); + } + + return list; + } + + @Override + public boolean onBlockEventReceived(World world, int x, int y, int z, int eventId, int eventData) { + super.onBlockEventReceived(world, x, y, z, eventId, eventData); + TileEntity tileentity = world.getTileEntity(x, y, z); + return tileentity != null ? tileentity.receiveClientEvent(eventId, eventData) : false; + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return new TileSparkFlower(); + } + + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return ((TileSparkFlower) world.getTileEntity(x, y, z)).getEntry(); + } + + @Override + public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int side) { + System.out.println("mana " + ((TileSparkFlower) world.getTileEntity(x, y, z)).getCurrentMana()); + return ((TileSparkFlower) world.getTileEntity(x, y, z)).onWanded(stack, player); + } + + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) { + ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockPlacedBy(world, x, y, z, entity, stack); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z) { + ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockAdded(world, x, y, z); + } + + @Override + public int colorMultiplier(IBlockAccess world, int x, int y, int z) { + float[] rgb = EntitySheep.fleeceColorTable[world.getBlockMetadata(x, y, z)]; + return ((int) (rgb[0] * 255) << 16) + ((int) (rgb[1] * 255) << 8) + (int) (rgb[2] * 255); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + ItemStack stack = player.getCurrentEquippedItem(); + if(stack != null && stack.getItem() == ModItems.dye) { + int newMeta = stack.getItemDamage(); + int oldMeta = world.getBlockMetadata(x, y, z); + if(newMeta != oldMeta) + world.setBlockMetadataWithNotify(x, y, z, newMeta, 1 | 2); + } + + return ((TileSparkFlower) world.getTileEntity(x, y, z)).onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ); + } + + @Override + public void renderHUD(Minecraft mc, ScaledResolution res, World world, int x, int y, int z) { + ((TileSparkFlower) world.getTileEntity(x, y, z)).renderHUD(mc, res); + } +} \ No newline at end of file diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/block/subtile/generating/SubTileReiujia.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/subtile/generating/SubTileReiujia.java new file mode 100644 index 0000000..19ad169 --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/subtile/generating/SubTileReiujia.java @@ -0,0 +1,188 @@ +package net.fuzzycraft.botanichorizons.addons.block.subtile.generating; + +import java.util.List; + +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityTNTPrimed; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.world.ExplosionEvent; + +import ic2.core.block.EntityIC2Explosive; + +import net.fuzzycraft.botanichorizons.lexicon.BHLexicon; +import net.fuzzycraft.botanichorizons.util.ISparkFlower; + +import vazkii.botania.api.lexicon.LexiconEntry; +import vazkii.botania.api.mana.spark.ISparkAttachable; +import vazkii.botania.api.mana.spark.ISparkEntity; +import vazkii.botania.api.subtile.RadiusDescriptor; +import vazkii.botania.api.subtile.SubTileGenerating; +import vazkii.botania.common.block.subtile.generating.SubTileEntropinnyum; +import vazkii.botania.common.Botania; + +public class SubTileReiujia extends SubTileEntropinnyum implements ISparkFlower { + + public SubTileReiujia() { + MinecraftForge.EVENT_BUS.register(new EventHandler()); + } + + public static final String NAME = "reiujia"; + private static final int ENTROPINNYUM_MAX_MANA = 6500; + private static final int RANGE = 12; + + //@Override + protected void handleExplosion(Entity tnt) { + if (!supertile.getWorldObj().isRemote) { + tnt.setDead(); + mana += ENTROPINNYUM_MAX_MANA; + supertile.getWorldObj().playSoundEffect( + tnt.posX, tnt.posY, tnt.posZ, + "random.explode", + 0.2F, + (1F + (supertile.getWorldObj().rand.nextFloat() - supertile.getWorldObj().rand.nextFloat()) * 0.2F) * 0.7F); + sync(); + } + for (int i = 0; i < 50; i++){ + Botania.proxy.sparkleFX( + tnt.worldObj, + tnt.posX + Math.random() * 4 - 2, + tnt.posY + Math.random() * 4 - 2, + tnt.posZ + Math.random() * 4 - 2, + 1F, + (float) Math.random() * 0.25F, + (float) Math.random() * 0.25F, + (float) (Math.random() * 0.65F + 1.25F), + 12); + } + supertile.getWorldObj().spawnParticle( + "hugeexplosion", + tnt.posX, tnt.posY, tnt.posZ, + 1D, 0D, 0D); + } + + @Override + public int getMaxMana() { + return 100*ENTROPINNYUM_MAX_MANA; + } + + @Override + public int getCurrentMana() { + return mana; + } + + @Override + public int receiveMana(int num) { + mana = mana + num > getMaxMana() ? getMaxMana() : mana + num < 0 ? 0 : mana + num; + return mana; + } + + @Override + public int setMana(int num) { + mana = num > getMaxMana() ? getMaxMana() : num < 0 ? 0 : num; + return mana; + } + + @Override + public LexiconEntry getEntry() { + return BHLexicon.reiujia; + } + + private void log() { + StackTraceElement[] stack = Thread.currentThread().getStackTrace(); + String caller = stack[2].getMethodName(); + System.out.println("Called from: " + caller + " Current mana: " + mana); + } + + public class EventHandler { + + @SubscribeEvent + public void consumeExplosion(ExplosionEvent.Start event) { + // duplicate code from SubTileEntropinnyum.EventHandler.consumeExplosion + log(); + if(processExplosion(event.world, event.explosion.exploder, event.explosion.explosionX, event.explosion.explosionY, event.explosion.explosionZ)) { + event.setCanceled(true); + } + } + + @SubscribeEvent + @Optional.Method(modid = "IC2") + public void consumeExplosionIC2(ic2.api.event.ExplosionEvent event) { + log(); + if(processExplosion(event.world, event.entity, event.x, event.y, event.z, event.power)) { + event.setCanceled(true); + } + } + + private boolean processExplosion(World world, Entity explosionSource, double posX, double posY, double posZ) { + return processExplosion(world, explosionSource, posX, posY, posZ, 0); + } + + private boolean processExplosion(World world, Entity explosionSource, double posX, double posY, double posZ, double power) { + System.out.println( + world + " " + + explosionSource + " " + + posX + " " + + posY + " " + + posZ + " " + + power); + if (world.isRemote || + mana != 0 || + !( Math.abs(supertile.xCoord - posX) <= RANGE && + Math.abs(supertile.yCoord - posY) <= RANGE && + Math.abs(supertile.zCoord - posZ) <= RANGE) + ) { + return false; + } + + if (explosionSource != null){ + explosionSource.setDead(); + mana += ENTROPINNYUM_MAX_MANA; + } else { + // ic2 reactor meltdowns have no explosionSource entity + // so assume that that's what happened if we're here + // + // regarding power + // per config nuclear explosion power is capped at 100, where a tnt is 4 + // the factor of 0.25 is not here because stronger flower and radiation I guess + mana += ENTROPINNYUM_MAX_MANA * (int)power; + } + // load bearing debug print ??? + System.out.println("mana " + mana); + + supertile.getWorldObj().playSoundEffect( + posX, + posY, + posZ, + "random.explode", + 0.2F, + (1F + (supertile.getWorldObj().rand.nextFloat() - supertile.getWorldObj().rand.nextFloat()) * 0.2F) * 0.7F); + sync(); + + for(int i = 0; i < 50; i++) { + Botania.proxy.sparkleFX( + world, + posX + Math.random() * 4 - 2, + posY + Math.random() * 4 - 2, + posZ + Math.random() * 4 - 2, + 1F, + (float) Math.random() * 0.25F, + (float) Math.random() * 0.25F, + (float) (Math.random() * 0.65F + 1.25F), + 12); + } + + supertile.getWorldObj().spawnParticle("hugeexplosion", posX, posY, posZ, 1D, 0D, 0D); + return true; + } + } + + +} \ No newline at end of file diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/block/tile/TileFloatingSparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/tile/TileFloatingSparkFlower.java new file mode 100644 index 0000000..c96b629 --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/tile/TileFloatingSparkFlower.java @@ -0,0 +1,15 @@ +package net.fuzzycraft.botanichorizons.addons.block.tile; + +import net.fuzzycraft.botanichorizons.addons.item.ItemBlockSparkFlower; + +import net.minecraft.item.ItemStack; + +import vazkii.botania.common.block.tile.TileFloatingSpecialFlower; + +public class TileFloatingSparkFlower extends TileFloatingSpecialFlower { + + @Override + public ItemStack getDisplayStack() { + return ItemBlockSparkFlower.ofType(subTileName); + } +} \ No newline at end of file diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/block/tile/TileSparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/tile/TileSparkFlower.java new file mode 100644 index 0000000..0a1e30d --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/block/tile/TileSparkFlower.java @@ -0,0 +1,62 @@ +package net.fuzzycraft.botanichorizons.addons.block.tile; + +import java.util.List; + +import net.fuzzycraft.botanichorizons.util.ISparkFlower; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; + +import vazkii.botania.common.block.tile.TileSpecialFlower; +import vazkii.botania.api.mana.spark.ISparkAttachable; +import vazkii.botania.api.mana.spark.ISparkEntity; +import vazkii.botania.api.subtile.SubTileGenerating; + +public class TileSparkFlower extends TileSpecialFlower implements ISparkAttachable { + + @Override + public boolean canAttachSpark(ItemStack stack) { + return true; + } + + @Override + public void attachSpark(ISparkEntity entity) { + // NO-OP + } + + @Override + public ISparkEntity getAttachedSpark() { + List sparks = getWorldObj().getEntitiesWithinAABB( + ISparkEntity.class, + AxisAlignedBB.getBoundingBox( + xCoord, + yCoord + 1, + zCoord, + xCoord + 1, + yCoord + 2, + zCoord + 1)); + if(sparks.size() == 1) { + Entity e = (Entity) sparks.get(0); + return (ISparkEntity) e; + } + return null; + } + + // generating flower should never accept mana + @Override + public int getAvailableSpaceForMana() { return 0; } + @Override + public boolean areIncomingTranfersDone() { return true; } + + @Override + public boolean isFull() { return true; } + @Override + public void recieveMana(int mana) { ((ISparkFlower)getSubTile()).receiveMana(mana); } + @Override + public boolean canRecieveManaFromBursts() { return false; } + + @Override + public int getCurrentMana() { return ((ISparkFlower)getSubTile()).getCurrentMana(); } +} \ No newline at end of file diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/crafting/recipe/SparkFloatingFlowerRecipe.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/crafting/recipe/SparkFloatingFlowerRecipe.java new file mode 100644 index 0000000..13ea2c1 --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/crafting/recipe/SparkFloatingFlowerRecipe.java @@ -0,0 +1,63 @@ +package net.fuzzycraft.botanichorizons.addons.crafting.recipe; + +// Mirrors SpecialFloatingFlowerRecipe + +import net.fuzzycraft.botanichorizons.addons.BHBlocks; +import net.fuzzycraft.botanichorizons.addons.item.ItemBlockSparkFlower; + +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.world.World; + +public class SparkFloatingFlowerRecipe implements IRecipe { + + @Override + public boolean matches(InventoryCrafting var1, World var2) { + boolean foundFloatingFlower = false; + boolean foundSparkFlower = false; + + for(int i = 0; i < var1.getSizeInventory(); i++) { + ItemStack stack = var1.getStackInSlot(i); + if(stack != null) { + if(stack.getItem() == Item.getItemFromBlock(BHBlocks.floatingSparkFlower)) + foundFloatingFlower = true; + + else if(stack.getItem() == Item.getItemFromBlock(BHBlocks.sparkFlower)) + foundSparkFlower = true; + + else return false; // Found an invalid item, breaking the recipe + } + } + + return foundFloatingFlower && foundSparkFlower; + } + + @Override + public ItemStack getCraftingResult(InventoryCrafting var1) { + ItemStack sparkFlower = null; + + for(int i = 0; i < var1.getSizeInventory(); i++) { + ItemStack stack = var1.getStackInSlot(i); + if(stack != null && stack.getItem() == Item.getItemFromBlock(BHBlocks.sparkFlower)) + sparkFlower = stack; + } + + if(sparkFlower == null) + return null; + + return ItemBlockSparkFlower.ofType(new ItemStack(BHBlocks.floatingSparkFlower), ItemBlockSparkFlower.getType(sparkFlower)); + } + + @Override + public int getRecipeSize() { + return 10; + } + + @Override + public ItemStack getRecipeOutput() { + return null; + } + +} diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/item/ItemBlockFloatingSparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/item/ItemBlockFloatingSparkFlower.java new file mode 100644 index 0000000..266d38f --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/item/ItemBlockFloatingSparkFlower.java @@ -0,0 +1,19 @@ +package net.fuzzycraft.botanichorizons.addons.item; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + +public class ItemBlockFloatingSparkFlower extends ItemBlockSparkFlower { + + public ItemBlockFloatingSparkFlower(Block block1) { + super(block1); + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + String flowerName = getUnlocalizedName(stack) + ".name"; + return String.format(StatCollector.translateToLocal("botaniamisc.floatingPrefix"), StatCollector.translateToLocal(flowerName)); + } + +} diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/item/ItemBlockSparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/item/ItemBlockSparkFlower.java new file mode 100644 index 0000000..87facbb --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/item/ItemBlockSparkFlower.java @@ -0,0 +1,41 @@ +package net.fuzzycraft.botanichorizons.addons.item; + +import net.fuzzycraft.botanichorizons.addons.BHBlocks; +import net.fuzzycraft.botanichorizons.addons.block.tile.TileSparkFlower; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import vazkii.botania.common.item.block.ItemBlockSpecialFlower; + +public class ItemBlockSparkFlower extends ItemBlockSpecialFlower { + + public ItemBlockSparkFlower(Block block1) { + super(block1); + } + + @Override + public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) { + boolean placed = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata); + if(placed) { + String type = getType(stack); + TileEntity te = world.getTileEntity(x, y, z); + if(te instanceof TileSparkFlower tile) { + tile.setSubTile(type); + tile.onBlockAdded(world, x, y, z); + tile.onBlockPlacedBy(world, x, y, z, player, stack); + if(!world.isRemote) + world.markBlockForUpdate(x, y, z); + } + } + + return placed; + } + + public static ItemStack ofType(String type) { + return ofType(new ItemStack(BHBlocks.sparkFlower), type); + } +} \ No newline at end of file diff --git a/src/main/java/net/fuzzycraft/botanichorizons/lexicon/BHLexicon.java b/src/main/java/net/fuzzycraft/botanichorizons/lexicon/BHLexicon.java index e7edb10..32301e2 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/lexicon/BHLexicon.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/lexicon/BHLexicon.java @@ -5,6 +5,7 @@ import net.fuzzycraft.botanichorizons.addons.BHBlocks; import net.fuzzycraft.botanichorizons.addons.BHItems; import net.fuzzycraft.botanichorizons.addons.Multiblocks; +import net.fuzzycraft.botanichorizons.addons.block.subtile.generating.SubTileReiujia; import net.fuzzycraft.botanichorizons.mod.ForgeMod; import net.fuzzycraft.botanichorizons.util.Constants; import net.minecraft.init.Items; @@ -28,6 +29,7 @@ private BHLexicon() {} public static LexiconEntry automatedPortal; public static LexiconEntry basicWrenches; public static LexiconEntry multiblockWrenches; + public static LexiconEntry reiujia; public static void preInit() { multiblockCategory = new LexiconCategory("botanichorizons.lexicon.category.multiblock") @@ -89,6 +91,10 @@ public static void init() { wrenchXLEntry.addPage(new PageText("botanichorizons.lexicon.text.multiblockWrenches.3")); wrenchXLEntry.setIcon(new ItemStack(BHItems.disassemblyWrench)); BHLexicon.multiblockWrenches = wrenchEntry; + + LexiconEntry reiujiaEntry = new BHLexiconEntry(SubTileReiujia.NAME, BotaniaAPI.categoryGenerationFlowers); + reiujiaEntry.setLexiconPages(new PageText("0")); + BHLexicon.reiujia = reiujiaEntry; } @SideOnly(Side.CLIENT) diff --git a/src/main/java/net/fuzzycraft/botanichorizons/patches/ThaumcraftPatches.java b/src/main/java/net/fuzzycraft/botanichorizons/patches/ThaumcraftPatches.java index 0f1404a..3d9e3a7 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/patches/ThaumcraftPatches.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/patches/ThaumcraftPatches.java @@ -1,24 +1,36 @@ package net.fuzzycraft.botanichorizons.patches; import com.gtnewhorizon.structurelib.StructureLibAPI; + +import gregtech.api.enums.ItemList; + import net.fuzzycraft.botanichorizons.addons.BHItems; +import net.fuzzycraft.botanichorizons.addons.block.subtile.generating.SubTileReiujia; +import net.fuzzycraft.botanichorizons.addons.item.ItemBlockSparkFlower; import net.fuzzycraft.botanichorizons.mod.ForgeMod; import net.fuzzycraft.botanichorizons.util.Constants; import net.fuzzycraft.botanichorizons.util.OreDict; import net.fuzzycraft.botanichorizons.util.ResearchBuilder; + import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.oredict.OreDictionary; + import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.research.ResearchCategories; + +import twilightforest.item.TFItems; + import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.ModFluffBlocks; +import vazkii.botania.common.item.block.ItemBlockSpecialFlower; import vazkii.botania.common.item.ModItems; +import vazkii.botania.common.lib.LibBlockNames; import vazkii.botania.common.lib.LibOreDict; import java.util.ArrayList; @@ -606,5 +618,47 @@ public static void applyPatches() { ThaumcraftApi.addWarpToItem(new ItemStack(ModItems.virus, 1, Constants.VIRUS_METADATA_NECRO), 1); ThaumcraftApi.addWarpToItem(new ItemStack(ModItems.virus, 1, Constants.VIRUS_METADATA_NULL), 1); + new ResearchBuilder("REIUJIA") + .setBookLocation(3, 1) + .setResearchIconItem("botanichorizons", "reiujia.png") + .setDifficulty(2) + .setResearchAspects( + (Aspect) gregtech.api.enums.TCAspects.ASTRUM.mAspect, + (Aspect) gregtech.api.enums.TCAspects.RADIO.mAspect, + Aspect.PLANT, + Aspect.ENERGY + ) + .setDependencies("ALTAR") + .addSingleTextPage() + .apply(builder -> { + ItemStack entropinnyum = ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENTROPINNYUM); + ItemStack uranium = ItemList.IC2_Uranium_238.get(1); + ItemStack plutonium = ItemList.IC2_Plutonium.get(1); + ItemStack ravenFeather = new ItemStack(TFItems.feather); + ItemStack fieldGen = ItemList.Field_Generator_EV.get(1); + builder.addInfusionRecipe( + new AspectList(). + add((Aspect) gregtech.api.enums.TCAspects.ASTRUM.mAspect, 16). + add((Aspect) gregtech.api.enums.TCAspects.RADIO.mAspect, 32). + add(Aspect.PLANT, 32). + add(Aspect.ENERGY, 64). + add(Aspect.ARMOR, 64). + add((Aspect) gregtech.api.enums.TCAspects.STRONTIO.mAspect, 16), + ItemBlockSparkFlower.ofType(SubTileReiujia.NAME), + 10, + entropinnyum, + fieldGen, + uranium, + entropinnyum, + plutonium, + ravenFeather, + plutonium, + entropinnyum, + uranium + ); + } + ) + .commit(); + } } diff --git a/src/main/java/net/fuzzycraft/botanichorizons/util/ISparkFlower.java b/src/main/java/net/fuzzycraft/botanichorizons/util/ISparkFlower.java new file mode 100644 index 0000000..2f5a233 --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/util/ISparkFlower.java @@ -0,0 +1,16 @@ +package net.fuzzycraft.botanichorizons.util; + +public interface ISparkFlower { + + // returns the flower's current mana + public int getCurrentMana(); + + // adds mana to flower + // should only be used to subtract + // should implement min/max safety + public int receiveMana(int num); + + // sets flower's mana + // should implement min/max safety + public int setMana(int num); +} \ No newline at end of file diff --git a/src/main/java/net/fuzzycraft/botanichorizons/util/Signature.java b/src/main/java/net/fuzzycraft/botanichorizons/util/Signature.java new file mode 100644 index 0000000..9c0d9b6 --- /dev/null +++ b/src/main/java/net/fuzzycraft/botanichorizons/util/Signature.java @@ -0,0 +1,37 @@ +package net.fuzzycraft.botanichorizons.util; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import vazkii.botania.api.subtile.signature.SubTileSignature; + +public class Signature extends SubTileSignature { + + String name; + IIcon icon; + + public Signature(String nombre) { + name = nombre; + } + + @Override + public void registerIcons(IIconRegister reg) { + icon = reg.registerIcon("botanichorizons:" + name); + } + + @Override + public IIcon getIconForStack(ItemStack item) { + return icon; + } + + @Override + public String getUnlocalizedNameForStack(ItemStack item) { + return "botanichorizons.flower." + name; + } + + @Override + public String getUnlocalizedLoreTextForStack(ItemStack item) { + return "tile.botanichorizons.flower." + name + ".lore"; + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botanichorizons/lang/en_GB.lang b/src/main/resources/assets/botanichorizons/lang/en_GB.lang index db615fd..91ae39d 100644 --- a/src/main/resources/assets/botanichorizons/lang/en_GB.lang +++ b/src/main/resources/assets/botanichorizons/lang/en_GB.lang @@ -50,6 +50,8 @@ tc.research_name.BH_LAPUTA=Shards of Laputa tc.research_text.BH_LAPUTA=Winning the game tc.research_name.BH_VIRUS=Dermological overgrowth tc.research_text.BH_VIRUS=This happens when you smoke weed +tc.research_name.BH_REIUJIA=Reiujia +tc.research_text.BH_REIUJIA=Homegrown nuclear protection botanichorizons.BH_FLOWERS.body=Old documents speak of magical flowers, but these seem to be extinct in the wild. You did notice that the mushrooms you've seen in deep caves share a lot of the properties with these purported flowers. With the invention of alchemy you think you can recreate these flowers by steeping the spores of a mushroom in the essence of surface plants. botanichorizons.BH_FLOWERDUPE.body=These flowers have proven very hard to grow in the wild, and don't take well to being broken. Fortunately your ventures into thaumaturgy have resulted in a new botanical recipe. Now you can split off a branch, dip it in this concoction, and it will create roots once more. @@ -78,6 +80,7 @@ botanichorizons.BH_ELVEN_WRENCH_XL.body=Now that you've seen Elven Elementium in botanichorizons.BH_LAPUTA.body_0=Sometimes you have to show off. You found a way to infuse a patch of land and make it float in the sky. It seems to be pretty difficult though. The shard of laputa works as a temporary vessel to house the energies required, before it's pushed into the ground. botanichorizons.BH_LAPUTA.body_1=Since the amount of energy needed increases per area of land you want to float, you have quickly realised that you need better and better materials to do the job. The return on investment also doesn't appear to be that good. botanichorizons.BH_VIRUS.body=You've ventured into an odd corner of carnivorous plants and created something nastier. At least animal test subjects seem not to be a moral issue for you. +botanichorizons.BH_REIUJIA.body=Entropinnyum's seemingly physics-defying ability to capture and nullify blasts has been a tantalizing mystery ever since you saw its first blooms appear in your garden. Turns out the flower relies on a rudimentary magical force field. With the application of some intelligent design, this natural phenomenon can be attuned and further strengthened, producing a new evolution of the flower. Superior in every way, it is capable of devouring even the cataclysmic consequences of a nuclear meltdown. tile.botanichorizons.automatedAlfPortal.name=Synthetic Elven Gateway tile.botanichorizons.automatedAlfPortal.hud.empty=Synthetic Elven Gateway (needs mana) @@ -95,6 +98,8 @@ tile.botanichorizons.automatedConjurationPool.name=Fountain of Conjuration tile.botanichorizons.automatedConjurationPool.hud.empty=Fountain of Conjuration (needs mana) tile.botanichorizons.automatedConjurationPool.hud.idle=Fountain of Conjuration (unformed) tile.botanichorizons.automatedConjurationPool.hud.active=Fountain of Conjuration (online) +botanichorizons.flower.reiujia.name=Reiujia +botanichorizons.flower.reiujia.reference=The culmination of mystic wisdom item.botanichorizons.manasteelWrench.name=Manasteel Wrench item.botanichorizons.manasteelSuperWrench.name=Demolition Wrench @@ -137,6 +142,11 @@ botanichorizons.lexicon.text.multiblockWrenches.1=The upgraded &1Wrench&0 is bui botanichorizons.lexicon.text.multiblockWrenches.2=There are two wrenches you can make. The &1Wrench of Erosion&0 is made from the &1Terrasteel Wrench&0, and it breaks brocks indiscriminately. The second, the &1Wrench of Evolution&0 is made from the &1Elementium Wrench&0, will only disassemble one specific kind of block at a time. Shift+right-click with the &1Wrench of Evolution&0 on the block you wish, to select which block you want to remove. botanichorizons.lexicon.text.multiblockWrenches.3=The wrench has some limitations. It requires that the block can be wrenched, or is soft enough that the game considers it to be removable by hand. The wrench deposits blocks removed at your feet, but may not do so with their contents. This tool has charge tiers, and the number of blocks removed multiplies by 5 after the second tier, up to a maximum of 625. +botanichorizons.entry.reiujia=Reiujia +botanichorizons.tagline.reiujia=If you can't solve a problem with brute force, you're not using enough of it. +botanichorizons.page.reiujia0=In order to generate a blast of &4Mana&0, one might in fact, require a blast nearby. Igniting a block of &1TNT&0 in the near an &1Entropinnyum&0, if it doesn't fall in water, will have the latter absorb all the entropy generated by the blast into itself, creating a large amount of &4Mana&0 and nullifying any possible damage. Lastly, to absorb the explosion, the flower must not have any &4Mana&0 stored in it or the process will fail. +botanichorizons.page.reiujia0=In principle there is no reason the &1Entropinnyum&0's blast absorption ability couldn't be scaled. The only limiting factor is that flowers are generally not too sturdy. Perhaps some magical reinforcement and attunement to the proper energy type will do the trick. + botanichorizons.tooltip.parallels=Processes up to %d recipes per second. botanichorizons.tooltip.multiblock.1=Dimensions: §6%d§7x§6%d§7x§6%d§7 (§6W§7x§6H§7x§6L§7) botanichorizons.tooltip.multiblock.2=This is an advanced multiblock. diff --git a/src/main/resources/assets/botanichorizons/lang/en_US.lang b/src/main/resources/assets/botanichorizons/lang/en_US.lang index e5fc634..8b52705 100644 --- a/src/main/resources/assets/botanichorizons/lang/en_US.lang +++ b/src/main/resources/assets/botanichorizons/lang/en_US.lang @@ -50,6 +50,8 @@ tc.research_name.BH_LAPUTA=Shards of Laputa tc.research_text.BH_LAPUTA=Winning the game tc.research_name.BH_VIRUS=Dermological overgrowth tc.research_text.BH_VIRUS=This happens when you smoke weed +tc.research_name.BH_REIUJIA=Reiujia +tc.research_text.BH_REIUJIA=Homegrown nuclear protection botanichorizons.BH_FLOWERS.body=Old documents speak of magical flowers, but these seem to be extinct in the wild. You did notice that the mushrooms you've seen in deep caves share a lot of the properties with these purported flowers. With the invention of alchemy you think you can recreate these flowers by steeping the spores of a mushroom in the essence of surface plants. botanichorizons.BH_FLOWERDUPE.body=These flowers have proven very hard to grow in the wild, and don't take well to being broken. Fortunately your ventures into thaumaturgy have resulted in a new botanical recipe. Now you can split off a branch, dip it in this concoction, and it will create roots once more. @@ -78,6 +80,7 @@ botanichorizons.BH_ELVEN_WRENCH_XL.body=Now that you've seen Elven Elementium in botanichorizons.BH_LAPUTA.body_0=Sometimes you have to show off. You found a way to infuse a patch of land and make it float in the sky. It seems to be pretty difficult though. The shard of laputa works as a temporary vessel to house the energies required, before it's pushed into the ground. botanichorizons.BH_LAPUTA.body_1=Since the amount of energy needed increases per area of land you want to float, you have quickly realised that you need better and better materials to do the job. The return on investment also doesn't appear to be that good. botanichorizons.BH_VIRUS.body=You've ventured into an odd corner of carnivorous plants and created something nastier. At least animal test subjects seem not to be a moral issue for you. +botanichorizons.BH_REIUJIA.body=Entropinnyum's seemingly physics-defying ability to capture and nullify blasts has been a tantalizing mystery ever since you saw its first blooms appear in your garden. Turns out the flower relies on a rudimentary magical force field. With the application of some intelligent design, this natural phenomenon can be attuned and further strengthened, producing a new evolution of the flower. Superior in every way, it is capable of devouring even the cataclysmic consequences of a nuclear meltdown. tile.botanichorizons.automatedAlfPortal.name=Synthetic Elven Gateway tile.botanichorizons.automatedAlfPortal.hud.empty=Synthetic Elven Gateway (needs mana) @@ -95,6 +98,8 @@ tile.botanichorizons.automatedConjurationPool.name=Fountain of Conjuration tile.botanichorizons.automatedConjurationPool.hud.empty=Fountain of Conjuration (needs mana) tile.botanichorizons.automatedConjurationPool.hud.idle=Fountain of Conjuration (unformed) tile.botanichorizons.automatedConjurationPool.hud.active=Fountain of Conjuration (online) +botanichorizons.flower.reiujia.name=Reiujia +botanichorizons.flower.reiujia.reference=The culmination of mystic wisdom item.botanichorizons.manasteelWrench.name=Manasteel Wrench item.botanichorizons.manasteelSuperWrench.name=Demolition Wrench @@ -137,6 +142,11 @@ botanichorizons.lexicon.text.multiblockWrenches.1=The upgraded &1Wrench&0 is bui botanichorizons.lexicon.text.multiblockWrenches.2=There are two wrenches you can make. The &1Wrench of Erosion&0 is made from the &1Terrasteel Wrench&0, and it breaks brocks indiscriminately. The second, the &1Wrench of Evolution&0 is made from the &1Elementium Wrench&0, will only disassemble one specific kind of block at a time. Shift+right-click with the &1Wrench of Evolution&0 on the block you wish, to select which block you want to remove. botanichorizons.lexicon.text.multiblockWrenches.3=The wrench has some limitations. It requires that the block can be wrenched, or is soft enough that the game considers it to be removable by hand. The wrench deposits blocks removed at your feet, but may not do so with their contents. This tool has charge tiers, and the number of blocks removed multiplies by 5 after the second tier, up to a maximum of 625. +botanichorizons.entry.reiujia=Reiujia +botanichorizons.tagline.reiujia=If you can't solve a problem with brute force, you're not using enough of it. +botanichorizons.page.reiujia0=In order to generate a blast of &4Mana&0, one might in fact, require a blast nearby. Igniting a block of &1TNT&0 in the near an &1Entropinnyum&0, if it doesn't fall in water, will have the latter absorb all the entropy generated by the blast into itself, creating a large amount of &4Mana&0 and nullifying any possible damage. Lastly, to absorb the explosion, the flower must not have any &4Mana&0 stored in it or the process will fail. +botanichorizons.page.reiujia0=In principle there is no reason the &1Entropinnyum&0's blast absorption ability couldn't be scaled. The only limiting factor is that flowers are generally not too sturdy. Perhaps some magical reinforcement and attunement to the proper energy type will do the trick. + botanichorizons.tooltip.parallels=Processes up to %d recipes per second. botanichorizons.tooltip.multiblock.1=Dimensions: §6%d§7x§6%d§7x§6%d§7 (§6W§7x§6H§7x§6L§7) botanichorizons.tooltip.multiblock.2=This is an advanced multiblock. diff --git a/src/main/resources/assets/botanichorizons/lang/zh_CN.lang b/src/main/resources/assets/botanichorizons/lang/zh_CN.lang index 48d0dee..961ea86 100644 --- a/src/main/resources/assets/botanichorizons/lang/zh_CN.lang +++ b/src/main/resources/assets/botanichorizons/lang/zh_CN.lang @@ -38,6 +38,8 @@ tc.research_name.BH_LAPUTA=拉普达碎片 tc.research_text.BH_LAPUTA=通关游戏 tc.research_name.BH_VIRUS=增生 tc.research_text.BH_VIRUS=一次醉酒后 +tc.research_name.BH_REIUJIA=霊烏路花 +tc.research_text.BH_REIUJIA=自家种的核防护 botanichorizons.BH_FLOWERS.body=你在故纸堆中翻到了魔法之花的只言片语,但看起来它们在野外已经灭绝.同时你注意到,岩穴中的蘑菇与这些传说中的花有许多类似的特征.随着炼金术的发展,你认为可以先从普通的地表植物中提取出某些源质,再将蘑菇孢子浸泡在其中,就可以得到那些传说中的花了. botanichorizons.BH_FLOWERDUPE.body=实践表明,这些花在野外很难繁殖,而且采集十分困难. 不过好在你在神秘学方面的冒险尝试获得了成功,开发了一系列植物魔法相关的合成表. 现在你可以分离一些花枝,将其浸入调配好的源质中,就可以繁殖出它的根部. diff --git a/src/main/resources/assets/botanichorizons/textures/blocks/reiujia.png b/src/main/resources/assets/botanichorizons/textures/blocks/reiujia.png new file mode 100644 index 0000000..6ec8b45 Binary files /dev/null and b/src/main/resources/assets/botanichorizons/textures/blocks/reiujia.png differ