From 37b3e364384f826bf9fb305647bb743ce3f95ea8 Mon Sep 17 00:00:00 2001 From: quat Date: Tue, 9 Jan 2018 00:04:52 -0500 Subject: [PATCH 01/16] Fix #2497 by removing unneeded special-casing for TileEntityChest (this caused problems with other mods extending TileEntityChest) --- .../vazkii/botania/common/core/helper/InventoryHelper.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java b/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java index b382d7f53..199278aec 100644 --- a/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java +++ b/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java @@ -40,12 +40,6 @@ public class InventoryHelper { if(te == null) return null; - if(te instanceof TileEntityChest) { - IItemHandler doubleChest = VanillaDoubleChestItemHandler.get((TileEntityChest) te); - if(doubleChest != VanillaDoubleChestItemHandler.NO_ADJACENT_CHESTS_INSTANCE) - return doubleChest; - } - IItemHandler ret = te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side) ? te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side) : null; From 0b108e57032547b711b6462fbdabb13511806c65 Mon Sep 17 00:00:00 2001 From: quat Date: Tue, 9 Jan 2018 00:22:30 -0500 Subject: [PATCH 02/16] Fix #2474 (wrong crafty crate image for one of the patterns) --- .../textures/blocks/crate_crafty_pattern_6.png | Bin 830 -> 808 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/botania/textures/blocks/crate_crafty_pattern_6.png b/src/main/resources/assets/botania/textures/blocks/crate_crafty_pattern_6.png index 0d65352316c1ecc5c83f6be69a101666bc462488..3230b7e0d9e5edd4450ccfbf5cb2238653921c11 100644 GIT binary patch delta 764 zcmV@)~7yXdzi_fl)<*p<}HOn$p14K zE3A85SRMvVN9jYmlrhTIKBSC{z`7rhKwpeq*@+WNvUFuxeQ+aOcHS=Mo^#LVe!oX+ z9v$TVf6*cRctEq+I+f8f6te`ECH0j}d<=_UG?f9I*p&N2)GG$9Z`suZRWsH0=FvW*e~ z>&frbYBl^;n^F`-1YwA&X;e>DS-y3Xg~bM`Qmm}4var|y;MXs&@#xANsZu0ahLjR- zW}1?evKZ5KT#mzl$vAboM%VAa;VX{++Qk&2$kja$qhgnF9fvf}v4Nk~H!y|36oSq5 ze+_~#z!HKlcK1k?iR%b*T_<|;xuuhCNj3stVX?u=+A5YQxVpT=wHr%}Mk5|HKH|}p zx#IO+uQzVcj|Tu)dWj@eT)cFNR=f2UM)h>9KuA&rK&@6I2*WV~fT?MuO7Z=--xZvX zH}8|Aic~2Uf7@ZIUdJjy{>Ef+6pax&f4+~U>m-Ai>$h(5>F1x3D#g|1C05o}3l;9p zodX~k4yo8>!sGrJ!Jbf}>bOYP1t1E7LY+wjQ`3t3#))mai9#vG=K2Ons&E~bpYPot z7Xytae^7QLrT|OV`FDShD2gzm39pNtUGf+IkY^dWt`jE;#}Xu2hMni+fC7YJVie0} zNGbVXex6T$c}TC<``004R=004l4008;_ z004mL004C`008P>0026e000+nl3&F}0008SNkl(Q6!46oD^3eZA5DVIeA{HwOEq@|;P*Ow+>O)j21sfF- zD8jPq>?WJ+%;^ronSYbhoOVvgCX6C%!=Qem&ZVnY zSXyq8Y0c%eYb-6d0Qlhg8Y>r9$+RZTbEK5`volnrlz-(jJ>_u_g&emNQw{n-kGk^M z-y2{HQO26Sk5zN4cuJ8K1upQ-?K{{)U<<*$+jj_~5Jw2Uy!9EG)_BUJFiqlTpIbSq zmgW-xmX=#wUb}{43ocw*W#!^3lgWfP-+7z&u3jm-4+ew70>fkkfMZrjGtHT^XX$i1 z&tcT38h=R7BMw8-OastpGzg>U5COn83^J|x{F9p{=ly%%l4hDrYreX9i|J+)#}*XN zM3%(yAwn+*a7>eQl<@t97VC@iWLk6g{OhbQ&I9n{yDQv1_aXq{cudW$5*-W=5!_>w zVDCQ;{(SVD?wjO;T;VCfTfc4LsVM+j4}PbrB(?y@ zH2HgHn>dcK;$vDD4 Date: Wed, 17 Jan 2018 00:47:06 -0600 Subject: [PATCH 03/16] use new baubles packetsync constructor. bump baubles dep. Closes #2509 --- .../vazkii/botania/client/gui/box/ContainerBaubleBox.java | 4 ++-- .../botania/common/core/handler/InternalMethodHandler.java | 6 ++++-- src/main/java/vazkii/botania/common/lib/LibMisc.java | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java b/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java index 634435ddd..4d5bdef45 100644 --- a/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java +++ b/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java @@ -10,8 +10,8 @@ */ package vazkii.botania.client.gui.box; +import baubles.api.BaublesApi; import baubles.api.IBauble; -import baubles.api.cap.BaublesCapabilities; import baubles.api.cap.IBaublesItemHandler; import baubles.common.container.SlotBauble; import net.minecraft.entity.player.EntityPlayer; @@ -40,7 +40,7 @@ public class ContainerBaubleBox extends Container { IInventory playerInv = player.inventory; baubleBoxInv = boxInv; - baubles = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null); + baubles = BaublesApi.getBaublesHandler(player); addSlotToContainer(new SlotBauble(player, baubles, 0, 8, 8 + 0 * 18)); addSlotToContainer(new SlotBauble(player, baubles, 1, 8, 8 + 1 * 18)); diff --git a/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java b/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java index 719f5d024..079dc96b1 100644 --- a/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/InternalMethodHandler.java @@ -257,10 +257,12 @@ public class InternalMethodHandler extends DummyMethodHandler { return block instanceof BlockModFlower || block instanceof BlockFloatingFlower || block instanceof ISpecialFlower; } + // todo use our own sync packet or use the autosync system @Override public void sendBaubleUpdatePacket(EntityPlayer player, int slot) { - if(player instanceof EntityPlayerMP) - PacketHandler.INSTANCE.sendTo(new PacketSync(player, slot), (EntityPlayerMP) player); + if(player instanceof EntityPlayerMP) { + PacketHandler.INSTANCE.sendTo(new PacketSync(player, slot, BaublesApi.getBaublesHandler(player).getStackInSlot(slot)), (EntityPlayerMP) player); + } } @Override diff --git a/src/main/java/vazkii/botania/common/lib/LibMisc.java b/src/main/java/vazkii/botania/common/lib/LibMisc.java index 445979799..50973f8f9 100644 --- a/src/main/java/vazkii/botania/common/lib/LibMisc.java +++ b/src/main/java/vazkii/botania/common/lib/LibMisc.java @@ -17,7 +17,7 @@ public final class LibMisc { public static final String MOD_NAME = "Botania"; public static final String BUILD = "GRADLE:BUILD"; public static final String VERSION = "GRADLE:VERSION-" + BUILD; - public static final String DEPENDENCIES = "required-after:baubles;after:thaumcraft"; + public static final String DEPENDENCIES = "required-after:baubles@[1.5.2,);after:thaumcraft"; // Network Contants public static final String NETWORK_CHANNEL = MOD_ID; From a602860caf53f6828baaac6d65edadaf2dbc6bfd Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Wed, 17 Jan 2018 22:56:27 +0000 Subject: [PATCH 04/16] Update contributors.properties --- contributors.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributors.properties b/contributors.properties index dd1648c20..9628c8d13 100644 --- a/contributors.properties +++ b/contributors.properties @@ -79,7 +79,7 @@ drazuam=0 codycoolwaffle=6 ydyt=6 tbnrsuns=2 -creeper_in_black=2 +vectored_pixels=2 egoisticalgoat=6 konotyran=12 rosareven=14 From c9ded8a20f095d04b6344586991bad0ac4102fac Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 18 Jan 2018 20:54:05 -0600 Subject: [PATCH 05/16] Update some outdated questions on the FAQ --- web/module/faq.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/module/faq.php b/web/module/faq.php index 5558d643d..d29fbbfdb 100644 --- a/web/module/faq.php +++ b/web/module/faq.php @@ -11,8 +11,8 @@ Have a look through the license
  • Is Botania opensource? (permalink)
    Yes, yes it is.

  • -
  • When is the mod getting updated to 1.8? (permalink)
    -I don't know. I'm not sure if I'm even going to bother with it myself, honestly, due to the amount of work it takes for such a small reward. We'll see in the future what comes of it, but please don't bicker about it over email, twitter or what have you all the time, it doesn't help.

  • +
  • When is the mod getting updated to 1.x? (permalink)
    +It's ready when it's ready. Please don't bicker about it over email, twitter or what have you all the time, it doesn't help.

  • How can I contact you? (permalink)
    Check the contact section on my website. Please read this entire FAQ before you do. Please. Just... please.

  • @@ -21,7 +21,7 @@ Check the contact section on my No, they can't, due to the method they use for generation. They're generated during biome decoration, so the amount of flowers depends on how many flowers would be in that biome to begin with. You can still get the mod's flowers easilly through creating Floral Fertilizer, which is a pretty early game item.
  • There's too many flowers! How do I lower the amount? (permalink)
    -As of the latest versions, the amount of flowers generated by default has been drastically lowred. If you still want to, though, you can lower the frequency (how often they spawn) and the density (how many spawn at once for each "patch") in the config.

  • +As of the latest versions, the amount of flowers generated by default has been drastically lowered. If you still want to, though, you can lower the frequency (how often they spawn) and the density (how many spawn at once for each "patch") in the config.
  • My flowers disappeared or turned into dead bushes! What gives? (permalink)
    As of recently, passive flower decay has been enabled by default and the config option for it has been removed. (you can read more about that here). This cause any passive flowers to decay and turn into Dead Bushes after a while. This is normal, and you should consider upgrading to better flowers that won't do that.

  • @@ -29,8 +29,8 @@ As of recently, passive flower decay has been enabled by default and the config
  • Could you add a config option to restrict flowers to specific biomes? (permalink)
    Given that each flower is required for the progression, no, this seems like a terrible idea. I have no interest in doing this.

  • -
  • My Mana Pool's Mana isn't changing, I got a few Dayblooms producing and the bar doesn't move, what's wrong? (permalink)
    -The Mana Pool holds a lot of mana. Dayblooms produce a very little amount of it, so you probably won't even notice the difference in the bar. Go get some better flowers like Endoflames.

  • +
  • My Mana Pool's Mana isn't changing, I got a few flowers producing and the bar doesn't move, what's wrong? (permalink)
    +The Mana Pool holds a lot of mana. Flowers like Hydroangeas produce a very little amount of it, so you probably won't even notice the difference in the bar. Go get some better flowers like Endoflames.

  • I found a bug, how do I report it? (permalink)
    I made a website to teach people how to report bugs, read what's on there and then go report it on the issue tracker.

  • From c791f02711129515c578ee60b04f514d1aa11288 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Thu, 25 Jan 2018 15:53:06 +0000 Subject: [PATCH 06/16] Update contributors.properties --- contributors.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.properties b/contributors.properties index 9628c8d13..d2e16ae2a 100644 --- a/contributors.properties +++ b/contributors.properties @@ -92,3 +92,4 @@ xeanwolf20=11 aureiio=0 nightred=13 lukidwen=9 +quirkyrose=10 From d95d432dbe4a8f77aa20c15946b10c05c0920bec Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 25 Jan 2018 21:15:13 -0600 Subject: [PATCH 07/16] Fel pumpkin blazes now draw their drops from a loot table. Closes #2521 --- .../botania/common/block/BlockFelPumpkin.java | 6 ++-- src/main/resources/META-INF/botania_at.cfg | 2 ++ .../assets/botania/loot_tables/fel_blaze.json | 28 +++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/botania/loot_tables/fel_blaze.json diff --git a/src/main/java/vazkii/botania/common/block/BlockFelPumpkin.java b/src/main/java/vazkii/botania/common/block/BlockFelPumpkin.java index 17d77a61d..b8cf14afe 100644 --- a/src/main/java/vazkii/botania/common/block/BlockFelPumpkin.java +++ b/src/main/java/vazkii/botania/common/block/BlockFelPumpkin.java @@ -22,6 +22,7 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; @@ -42,7 +43,7 @@ import javax.annotation.Nonnull; @Mod.EventBusSubscriber(modid = LibMisc.MOD_ID) public class BlockFelPumpkin extends BlockMod implements ILexiconable { - + private static final ResourceLocation LOOT_TABLE = new ResourceLocation(LibMisc.MOD_ID, "fel_blaze"); private static final String TAG_FEL_SPAWNED = "Botania-FelSpawned"; public BlockFelPumpkin() { @@ -79,7 +80,7 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable { world.setBlockState(pos.down(2), Blocks.AIR.getDefaultState(), 2); EntityBlaze blaze = new EntityBlaze(world); blaze.setLocationAndAngles(pos.getX() + 0.5D, pos.getY() - 1.95D, pos.getZ() + 0.5D, 0.0F, 0.0F); - blaze.getEntityData().setBoolean(TAG_FEL_SPAWNED, true); + blaze.deathLootTable = LOOT_TABLE; blaze.onInitialSpawn(world.getDifficultyForLocation(pos), null); world.spawnEntity(blaze); world.notifyNeighborsOfStateChange(pos, Blocks.AIR, false); @@ -93,6 +94,7 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable { world.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, placer.getHorizontalFacing().getOpposite())); } + // Legacy support @SubscribeEvent public static void onDrops(LivingDropsEvent event) { if(event.getEntityLiving() instanceof EntityBlaze && event.getEntityLiving().getEntityData().getBoolean(TAG_FEL_SPAWNED)) diff --git a/src/main/resources/META-INF/botania_at.cfg b/src/main/resources/META-INF/botania_at.cfg index 32ea3d6de..72de64e55 100644 --- a/src/main/resources/META-INF/botania_at.cfg +++ b/src/main/resources/META-INF/botania_at.cfg @@ -49,3 +49,5 @@ public net.minecraft.item.ItemTool field_77862_b # toolMaterial public net.minecraft.client.multiplayer.ClientAdvancementManager field_192803_d # advancementToProgress public net.minecraft.item.EnumDyeColor field_193351_w # colorValue + +public net.minecraft.entity.EntityLiving field_184659_bA # deathLootTable \ No newline at end of file diff --git a/src/main/resources/assets/botania/loot_tables/fel_blaze.json b/src/main/resources/assets/botania/loot_tables/fel_blaze.json new file mode 100644 index 000000000..b204e9224 --- /dev/null +++ b/src/main/resources/assets/botania/loot_tables/fel_blaze.json @@ -0,0 +1,28 @@ +{ + "pools": [{ + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "item", + "entryName": "normal_death_powder", + "name": "minecraft:blaze_powder", + "functions": [ + { "function": "set_count", "count": 6 } + ] + }, + { + "type": "item", + "entryName": "player_kill_powder", + "name": "minecraft:blaze_powder", + "conditions": [ + { "condition": "killed_by_player" } + ], + "functions": [ + { "function": "set_count", "count": 10 }, + { "function": "looting_enchant", "count": { "min": 0, "max": 6 }} + ] + } + ] + }] +} \ No newline at end of file From 065ab12af9b2a04acbd22d5c521fc17955ed22db Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 25 Jan 2018 21:52:02 -0600 Subject: [PATCH 08/16] Hourglasses no longer spam resyncs as much, and don't cause chunk rerenders when they flip --- .../common/block/tile/TileHourglass.java | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/main/java/vazkii/botania/common/block/tile/TileHourglass.java b/src/main/java/vazkii/botania/common/block/tile/TileHourglass.java index 396c2023d..4204fc1dc 100644 --- a/src/main/java/vazkii/botania/common/block/tile/TileHourglass.java +++ b/src/main/java/vazkii/botania/common/block/tile/TileHourglass.java @@ -49,13 +49,16 @@ public class TileHourglass extends TileSimpleInventory implements ITickable { public int flipTicks = 0; public boolean lock = false; public boolean move = true; - public boolean dust = false; + + private boolean isDust() { + ItemStack stack = itemHandler.getStackInSlot(0); + return !stack.isEmpty() && stack.getItem() == ModItems.manaResource && stack.getMetadata() == 23; + } @Override public void update() { int totalTime = getTotalTime(); - ItemStack dustStack = itemHandler.getStackInSlot(0); - dust = !dustStack.isEmpty() && dustStack.getItem() == ModItems.manaResource; + boolean dust = isDust(); if(totalTime > 0 || dust) { if(move && !dust) @@ -66,8 +69,7 @@ public class TileHourglass extends TileSimpleInventory implements ITickable { flip = !flip; flipTicks = 4; if(!world.isRemote) { - world.setBlockState(getPos(), world.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, true), 1 | 2); - VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this); + world.setBlockState(getPos(), world.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, true), 1); world.scheduleUpdate(pos, getBlockType(), getBlockType().tickRate(world)); } @@ -93,7 +95,7 @@ public class TileHourglass extends TileSimpleInventory implements ITickable { public void onManaCollide() { if(!world.isRemote) { - if(dust) + if(isDust()) time++; else move = !move; VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this); @@ -144,6 +146,16 @@ public class TileHourglass extends TileSimpleInventory implements ITickable { return super.insertItem(slot, stack, simulate); else return stack; } + + @Override + public void onContentsChanged(int slot) { + super.onContentsChanged(slot); + if(!TileHourglass.this.world.isRemote) { + time = 0; + timeFraction = 0F; + VanillaPacketDispatcher.dispatchTEToNearbyPlayers(TileHourglass.this); + } + } }; } @@ -174,14 +186,6 @@ public class TileHourglass extends TileSimpleInventory implements ITickable { return 1; } - @Override - public void markDirty() { - super.markDirty(); - time = 0; - timeFraction = 0F; - VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this); - } - @SideOnly(Side.CLIENT) public void renderHUD(ScaledResolution res) { Minecraft mc = Minecraft.getMinecraft(); From 7f8c1360ee2a30e64ec08a3609d913875b387496 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 25 Jan 2018 22:01:22 -0600 Subject: [PATCH 09/16] Fix mana splitters and manastars loading chunks when placed on a chunk border (probably more cases to fix later) --- .../common/block/subtile/SubTileManastar.java | 10 +++++++--- .../common/block/tile/mana/TileDistributor.java | 16 ++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/main/java/vazkii/botania/common/block/subtile/SubTileManastar.java b/src/main/java/vazkii/botania/common/block/subtile/SubTileManastar.java index b578d41e1..d4ba4c1d8 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/SubTileManastar.java +++ b/src/main/java/vazkii/botania/common/block/subtile/SubTileManastar.java @@ -12,6 +12,7 @@ package vazkii.botania.common.block.subtile; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.mana.IManaPool; import vazkii.botania.api.subtile.SubTileEntity; @@ -35,9 +36,12 @@ public class SubTileManastar extends SubTileEntity { } else { int mana = 0; for(EnumFacing dir : EnumFacing.HORIZONTALS) { - TileEntity tile = supertile.getWorld().getTileEntity(supertile.getPos().offset(dir)); - if(tile instanceof IManaPool) - mana += ((IManaPool) tile).getCurrentMana(); + BlockPos pos = supertile.getPos().offset(dir); + if(getWorld().isBlockLoaded(pos)) { + TileEntity tile = supertile.getWorld().getTileEntity(pos); + if(tile instanceof IManaPool) + mana += ((IManaPool) tile).getCurrentMana(); + } } int newState = mana > lastMana ? INCREASING : mana < lastMana ? DECREASING : NONE; diff --git a/src/main/java/vazkii/botania/common/block/tile/mana/TileDistributor.java b/src/main/java/vazkii/botania/common/block/tile/mana/TileDistributor.java index a99a946af..faae9d1f3 100644 --- a/src/main/java/vazkii/botania/common/block/tile/mana/TileDistributor.java +++ b/src/main/java/vazkii/botania/common/block/tile/mana/TileDistributor.java @@ -13,6 +13,7 @@ package vazkii.botania.common.block.tile.mana; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; +import net.minecraft.util.math.BlockPos; import vazkii.botania.api.internal.VanillaPacketDispatcher; import vazkii.botania.api.mana.IManaPool; import vazkii.botania.api.mana.IManaReceiver; @@ -23,7 +24,7 @@ import java.util.List; public class TileDistributor extends TileMod implements IManaReceiver, ITickable { - final List validPools = new ArrayList<>(); + private final List validPools = new ArrayList<>(); @Override public void update() { @@ -31,11 +32,14 @@ public class TileDistributor extends TileMod implements IManaReceiver, ITickable return; validPools.clear(); for(EnumFacing dir : EnumFacing.HORIZONTALS) { - TileEntity tileAt = world.getTileEntity(pos.offset(dir)); - if(tileAt != null && tileAt instanceof IManaPool && !tileAt.isInvalid()) { - IManaReceiver receiver = (IManaReceiver) tileAt; - if(!receiver.isFull()) - validPools.add(receiver); + BlockPos pos = this.pos.offset(dir); + if(world.isBlockLoaded(pos)) { + TileEntity tileAt = world.getTileEntity(pos); + if(tileAt instanceof IManaPool && !tileAt.isInvalid()) { + IManaReceiver receiver = (IManaReceiver) tileAt; + if(!receiver.isFull()) + validPools.add(receiver); + } } } } From 71ebe397853159fd62bdef53ae7985b6cbc17064 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Fri, 26 Jan 2018 10:59:12 -0600 Subject: [PATCH 10/16] Update all Optional.Interface things to have proper modid, tc could be on 1.12 any time now --- src/main/java/vazkii/botania/common/block/BlockPylon.java | 2 +- .../botania/common/block/decor/BlockFloatingFlower.java | 2 +- .../vazkii/botania/common/block/decor/BlockModMushroom.java | 2 +- .../vazkii/botania/common/block/decor/BlockShinyFlower.java | 2 +- .../java/vazkii/botania/common/item/ItemPoolMinecart.java | 2 +- .../item/equipment/armor/manasteel/ItemManasteelArmor.java | 2 +- .../botania/common/item/equipment/bauble/ItemBauble.java | 2 +- .../interaction/thaumcraft/ItemElementiumHelmRevealing.java | 4 ++-- .../common/item/interaction/thaumcraft/ItemManaInkwell.java | 2 +- .../interaction/thaumcraft/ItemManasteelHelmRevealing.java | 4 ++-- .../interaction/thaumcraft/ItemTerrasteelHelmRevealing.java | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/vazkii/botania/common/block/BlockPylon.java b/src/main/java/vazkii/botania/common/block/BlockPylon.java index f549e396d..6ef94e53f 100644 --- a/src/main/java/vazkii/botania/common/block/BlockPylon.java +++ b/src/main/java/vazkii/botania/common/block/BlockPylon.java @@ -44,7 +44,7 @@ import vazkii.botania.common.lib.LibBlockNames; import javax.annotation.Nonnull; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) public class BlockPylon extends BlockMod implements ILexiconable, IInfusionStabiliser { private static final AxisAlignedBB AABB = new AxisAlignedBB(0.125, 0, 0.125, 0.875, 21.0/16, 0.875); diff --git a/src/main/java/vazkii/botania/common/block/decor/BlockFloatingFlower.java b/src/main/java/vazkii/botania/common/block/decor/BlockFloatingFlower.java index 3f9cdec34..a4e9e86c1 100644 --- a/src/main/java/vazkii/botania/common/block/decor/BlockFloatingFlower.java +++ b/src/main/java/vazkii/botania/common/block/decor/BlockFloatingFlower.java @@ -62,7 +62,7 @@ import vazkii.botania.common.lib.LibBlockNames; import javax.annotation.Nonnull; import java.util.Random; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) public class BlockFloatingFlower extends BlockMod implements ILexiconable, IInfusionStabiliser { private static final AxisAlignedBB AABB = new AxisAlignedBB(0.1, 0.1, 0.1, 0.9, 0.9, 0.9); diff --git a/src/main/java/vazkii/botania/common/block/decor/BlockModMushroom.java b/src/main/java/vazkii/botania/common/block/decor/BlockModMushroom.java index 4daaff9a9..81bb9a210 100644 --- a/src/main/java/vazkii/botania/common/block/decor/BlockModMushroom.java +++ b/src/main/java/vazkii/botania/common/block/decor/BlockModMushroom.java @@ -48,7 +48,7 @@ import vazkii.botania.common.lib.LibMisc; import javax.annotation.Nonnull; import java.util.Random; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) public class BlockModMushroom extends BlockMushroom implements IInfusionStabiliser, IHornHarvestable, ILexiconable, IModelRegister, IFlowerComponent { private static final AxisAlignedBB AABB = new AxisAlignedBB(0.3, 0, 0.3, 0.8, 1, 0.8); diff --git a/src/main/java/vazkii/botania/common/block/decor/BlockShinyFlower.java b/src/main/java/vazkii/botania/common/block/decor/BlockShinyFlower.java index 548c14165..9aaa983e9 100644 --- a/src/main/java/vazkii/botania/common/block/decor/BlockShinyFlower.java +++ b/src/main/java/vazkii/botania/common/block/decor/BlockShinyFlower.java @@ -32,7 +32,7 @@ import vazkii.botania.common.lib.LibBlockNames; import javax.annotation.Nonnull; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true) public class BlockShinyFlower extends BlockModFlower implements IInfusionStabiliser, IHornHarvestable { public BlockShinyFlower() { diff --git a/src/main/java/vazkii/botania/common/item/ItemPoolMinecart.java b/src/main/java/vazkii/botania/common/item/ItemPoolMinecart.java index d59ea57b6..ed4a1d5ed 100644 --- a/src/main/java/vazkii/botania/common/item/ItemPoolMinecart.java +++ b/src/main/java/vazkii/botania/common/item/ItemPoolMinecart.java @@ -27,7 +27,7 @@ import vazkii.botania.common.lib.LibItemNames; import javax.annotation.Nonnull; -@Optional.Interface(modid = "Railcraft", iface = "mods.railcraft.api.core.items.IMinecartItem", striprefs = true) +@Optional.Interface(modid = "railcraft", iface = "mods.railcraft.api.core.items.IMinecartItem", striprefs = true) public class ItemPoolMinecart extends ItemMod implements IMinecartItem { public ItemPoolMinecart() { diff --git a/src/main/java/vazkii/botania/common/item/equipment/armor/manasteel/ItemManasteelArmor.java b/src/main/java/vazkii/botania/common/item/equipment/armor/manasteel/ItemManasteelArmor.java index ef088b7ff..44fa68123 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/armor/manasteel/ItemManasteelArmor.java +++ b/src/main/java/vazkii/botania/common/item/equipment/armor/manasteel/ItemManasteelArmor.java @@ -54,7 +54,7 @@ import java.util.EnumMap; import java.util.List; import java.util.Map; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IRunicArmor") +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IRunicArmor") public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IManaUsingItem, IPhantomInkable, IRunicArmor, IModelRegister { private static final int MANA_PER_DAMAGE = 70; diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBauble.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBauble.java index 9bad619ea..6dccb43e0 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBauble.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemBauble.java @@ -49,7 +49,7 @@ import javax.annotation.Nonnull; import java.util.List; import java.util.UUID; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IRunicArmor") +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IRunicArmor") @Mod.EventBusSubscriber(modid = LibMisc.MOD_ID) public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAttachable, IPhantomInkable, IRunicArmor { diff --git a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemElementiumHelmRevealing.java b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemElementiumHelmRevealing.java index 225ae0e60..00007958c 100644 --- a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemElementiumHelmRevealing.java +++ b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemElementiumHelmRevealing.java @@ -22,8 +22,8 @@ import vazkii.botania.common.item.equipment.armor.elementium.ItemElementiumHelm; import vazkii.botania.common.lib.LibItemNames; @Optional.InterfaceList({ - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IGoggles", striprefs = true), - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IRevealer", striprefs = true)}) + @Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IGoggles", striprefs = true), + @Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IRevealer", striprefs = true)}) public class ItemElementiumHelmRevealing extends ItemElementiumHelm implements IGoggles, IRevealer { public ItemElementiumHelmRevealing() { diff --git a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java index 37c047011..7859c0712 100644 --- a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java +++ b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java @@ -26,7 +26,7 @@ import vazkii.botania.common.lib.LibItemNames; import javax.annotation.Nonnull; -@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IScribeTools") +@Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IScribeTools") public class ItemManaInkwell extends ItemMod implements IManaItem, IScribeTools { private static final int COST_PER_USE = 50; diff --git a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManasteelHelmRevealing.java b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManasteelHelmRevealing.java index 0b80db8ba..9f64de39e 100644 --- a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManasteelHelmRevealing.java +++ b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemManasteelHelmRevealing.java @@ -22,8 +22,8 @@ import vazkii.botania.common.item.equipment.armor.manasteel.ItemManasteelHelm; import vazkii.botania.common.lib.LibItemNames; @Optional.InterfaceList({ - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IGoggles", striprefs = true), - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IRevealer", striprefs = true)}) + @Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IGoggles", striprefs = true), + @Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IRevealer", striprefs = true)}) public class ItemManasteelHelmRevealing extends ItemManasteelHelm implements IGoggles, IRevealer { public ItemManasteelHelmRevealing() { diff --git a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemTerrasteelHelmRevealing.java b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemTerrasteelHelmRevealing.java index 4ba7c6e6b..1e0c89766 100644 --- a/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemTerrasteelHelmRevealing.java +++ b/src/main/java/vazkii/botania/common/item/interaction/thaumcraft/ItemTerrasteelHelmRevealing.java @@ -22,8 +22,8 @@ import vazkii.botania.common.item.equipment.armor.terrasteel.ItemTerrasteelHelm; import vazkii.botania.common.lib.LibItemNames; @Optional.InterfaceList({ - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IGoggles", striprefs = true), - @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.items.IRevealer", striprefs = true)}) + @Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IGoggles", striprefs = true), + @Optional.Interface(modid = "thaumcraft", iface = "thaumcraft.api.items.IRevealer", striprefs = true)}) public class ItemTerrasteelHelmRevealing extends ItemTerrasteelHelm implements IGoggles, IRevealer { public ItemTerrasteelHelmRevealing() { From 60b160472d157dd3273aca50c7a20f9af2088c54 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Fri, 26 Jan 2018 22:40:15 +0000 Subject: [PATCH 11/16] builderino --- build.properties | 4 ++-- version/1.12.2.txt | 1 + web/changelog.txt | 29 +++++++++++++++++++++++++++++ web/versions.ini | 3 ++- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 version/1.12.2.txt diff --git a/build.properties b/build.properties index a966de247..e4e72a6af 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,5 @@ # -#Sat Dec 09 13:14:01 GMT 2017 +#Fri Jan 26 22:35:53 GMT 2018 mod_name=Botania cf_meta_version=1.12.2 forge_version=14.23.1.2555 @@ -7,5 +7,5 @@ dir_repo=./ mc_mappings=snapshot_20171217 version=r1.10 dir_output=../Build Output/Botania/ +build_number=354 mc_version=1.12.2 -build_number=353 diff --git a/version/1.12.2.txt b/version/1.12.2.txt new file mode 100644 index 000000000..fb514936a --- /dev/null +++ b/version/1.12.2.txt @@ -0,0 +1 @@ +r1.10-353 \ No newline at end of file diff --git a/web/changelog.txt b/web/changelog.txt index 040393b2e..57b341378 100644 --- a/web/changelog.txt +++ b/web/changelog.txt @@ -1,3 +1,32 @@ +r1.10 353 +*Blazes spawned from a Fel Pumpkin now get their drops from a loot table. +*Changed a bunch of stuff internally that you won't really notice. +*Detector rails can now accept a signal from mana pool minecarts. +*Fixed a crash when unequipping active baubles. +*Fixed a crash while holding the Lexica Botania and the sneak key. +*Fixed Blaze Meshes turning into Blaze Powder instead of Blaze Rods. (TheWhiteWolves) +*Fixed Hopperhocks not sorting properly with quark variant chests. (quat) +*Fixed Loonium spawning creepers with infinitely long potion effects that are propagated to the player. +*Fixed mana pools with sparks constantly sending network packets if there's nothing going on. +*Fixed Mana Splitters and Manastars loading chunks when placed in chunk borders. +*Fixed some Portuguese Pavement double slabs having the wrong color. +*Fixed the animated torch not causing block updates in some cases. +*Fixed the config GUI being broken. +*Fixed the crafty crate textures for the 3x2 and 2x3 patterns being the same. (quat) +*Fixed the flugel tiara flight bar conflicting with the breath indicator while under the effect of a water breathing potion. +*Fixed the Hovering Hourglass sending a needless amount of network packets and causing needless chunk redraws. +*Fixed the lexica recipe pages for toggle and fork luminizer being switched. (quat) +*Fixed the Planestrider's Sash recipe not being shown properly. (TheWhiteWolves) +*Hid the helments of revealing from the recipe book since TC isn't here yet. +*Improved network usage by using vanilla block events where applicable. +*Made the Tainted Blood Pendant update the potion effect sooner to prevent possible network desync. +*Removed the tickable property from some tile entities for optimization. +*The Manastar now uses server side information. +*The Ring of Far Reach now uses the new forge reach attribute instead of being a massive hack. +*Updated TC interface references to the new lowercase mod ID in case it updates anytime soon. +*Updated the baubles dependency to the latest version, fixing crashes when used with it. +*[API] Pure Daisy recipe inputs can now be state sensitive. +*[API] Increased Version Number to 89. r1.10 352 *Another big round of fixes provided by williewillus *Fixed a division by zero crash when entering some entries with bad recipes. diff --git a/web/versions.ini b/web/versions.ini index 7aba36f8e..5ad92fb29 100644 --- a/web/versions.ini +++ b/web/versions.ini @@ -303,4 +303,5 @@ r1.10-348=1.12.1 r1.10-349=1.12.1 r1.10-350=1.12.1 r1.10-351=1.12.1 -r1.10-352=1.12.1 \ No newline at end of file +r1.10-352=1.12.1 +r1.10-353=1.12.2 \ No newline at end of file From 00d3dc3a47ed484d4c6e698b353f912eaf383f87 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Wed, 31 Jan 2018 11:02:22 -0600 Subject: [PATCH 12/16] Minor bugfixes on spawner mover --- .../botania/common/item/ItemSpawnerMover.java | 38 ++++++------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/src/main/java/vazkii/botania/common/item/ItemSpawnerMover.java b/src/main/java/vazkii/botania/common/item/ItemSpawnerMover.java index 689f756dd..fb34f50cf 100644 --- a/src/main/java/vazkii/botania/common/item/ItemSpawnerMover.java +++ b/src/main/java/vazkii/botania/common/item/ItemSpawnerMover.java @@ -21,6 +21,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; @@ -44,7 +45,6 @@ import java.util.List; public class ItemSpawnerMover extends ItemMod { public static final String TAG_SPAWNER = "spawner"; - private static final String TAG_PLACE_DELAY = "placeDelay"; public ItemSpawnerMover() { super(LibItemNames.SPAWNER_MOVER); @@ -76,14 +76,6 @@ public class ItemSpawnerMover extends ItemMod { return getEntityId(stack) != null; } - private static int getDelay(ItemStack stack) { - NBTTagCompound tag = stack.getTagCompound(); - if(tag != null) - return tag.getInteger(TAG_PLACE_DELAY); - - return 0; - } - @SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack stack, World world, List infoList, ITooltipFlag flags) { @@ -92,13 +84,6 @@ public class ItemSpawnerMover extends ItemMod { infoList.add(I18n.format("entity." + id + ".name")); } - @Override - public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { - NBTTagCompound tag = stack.getTagCompound(); - if(tag != null && tag.hasKey(TAG_PLACE_DELAY) && tag.getInteger(TAG_PLACE_DELAY) > 0) - tag.setInteger(TAG_PLACE_DELAY, tag.getInteger(TAG_PLACE_DELAY) - 1); - } - @Nonnull @Override public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float xOffset, float yOffset, float zOffset) { @@ -110,12 +95,12 @@ public class ItemSpawnerMover extends ItemMod { NBTTagCompound tag = new NBTTagCompound(); tag.setTag(TAG_SPAWNER, new NBTTagCompound()); te.writeToNBT(tag.getCompoundTag(TAG_SPAWNER)); - tag.setInteger(TAG_PLACE_DELAY, 20); + player.getCooldownTracker().setCooldown(this, 20); itemstack.setTagCompound(tag); world.setBlockToAir(pos); UseItemSuccessTrigger.INSTANCE.trigger((EntityPlayerMP) player, itemstack, (WorldServer) world, pos.getX(), pos.getY(), pos.getZ()); - } else { player.renderBrokenItemStack(itemstack); + } else { for(int i = 0; i < 50; i++) { float red = (float) Math.random(); float green = (float) Math.random(); @@ -126,7 +111,7 @@ public class ItemSpawnerMover extends ItemMod { return EnumActionResult.SUCCESS; } else return EnumActionResult.PASS; } else { - return getDelay(itemstack) <= 0 && placeBlock(itemstack, player, world, pos, side, xOffset, yOffset, zOffset) ? EnumActionResult.SUCCESS : EnumActionResult.PASS; + return placeBlock(itemstack, player, world, pos, side, xOffset, yOffset, zOffset) ? EnumActionResult.SUCCESS : EnumActionResult.PASS; } } @@ -167,16 +152,17 @@ public class ItemSpawnerMover extends ItemMod { return false; Block block = world.getBlockState(pos).getBlock(); - if(block.equals(Blocks.MOB_SPAWNER)) { + if(block == Blocks.MOB_SPAWNER) { TileEntity te = world.getTileEntity(pos); NBTTagCompound tag = stack.getTagCompound(); - if (tag.hasKey(TAG_SPAWNER)) + if (te instanceof TileEntityMobSpawner && tag.hasKey(TAG_SPAWNER)) { tag = tag.getCompoundTag(TAG_SPAWNER); - tag.setInteger("x", pos.getX()); - tag.setInteger("y", pos.getY()); - tag.setInteger("z", pos.getZ()); - te.readFromNBT(tag); - VanillaPacketDispatcher.dispatchTEToNearbyPlayers(world, pos); + tag.setInteger("x", pos.getX()); + tag.setInteger("y", pos.getY()); + tag.setInteger("z", pos.getZ()); + te.readFromNBT(tag); + VanillaPacketDispatcher.dispatchTEToNearbyPlayers(world, pos); + } } return true; From c4715df02f91045643f4534006f0f41c6d358fa0 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Thu, 8 Feb 2018 11:58:22 -0600 Subject: [PATCH 13/16] Fix JEI integration for floating magic flowers --- .../integration/jei/JEIBotaniaPlugin.java | 3 ++ .../SpecialFloatingFlowerWrapper.java | 35 +++++++++++++++++++ .../common/crafting/ModCraftingRecipes.java | 6 +++- .../recipe/SpecialFloatingFlowerRecipe.java | 11 ++++-- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 src/main/java/vazkii/botania/client/integration/jei/crafting/SpecialFloatingFlowerWrapper.java diff --git a/src/main/java/vazkii/botania/client/integration/jei/JEIBotaniaPlugin.java b/src/main/java/vazkii/botania/client/integration/jei/JEIBotaniaPlugin.java index abb1432a7..1c44fbd91 100644 --- a/src/main/java/vazkii/botania/client/integration/jei/JEIBotaniaPlugin.java +++ b/src/main/java/vazkii/botania/client/integration/jei/JEIBotaniaPlugin.java @@ -28,6 +28,7 @@ import vazkii.botania.api.state.enums.PoolVariant; import vazkii.botania.client.gui.crafting.ContainerCraftingHalo; import vazkii.botania.client.integration.jei.brewery.BreweryRecipeCategory; import vazkii.botania.client.integration.jei.brewery.BreweryRecipeWrapper; +import vazkii.botania.client.integration.jei.crafting.SpecialFloatingFlowerWrapper; import vazkii.botania.client.integration.jei.elventrade.ElvenTradeRecipeCategory; import vazkii.botania.client.integration.jei.elventrade.ElvenTradeRecipeWrapper; import vazkii.botania.client.integration.jei.manapool.ManaPoolRecipeCategory; @@ -39,6 +40,7 @@ import vazkii.botania.client.integration.jei.puredaisy.PureDaisyRecipeWrapper; import vazkii.botania.client.integration.jei.runicaltar.RunicAltarRecipeCategory; import vazkii.botania.client.integration.jei.runicaltar.RunicAltarRecipeWrapper; import vazkii.botania.common.block.ModBlocks; +import vazkii.botania.common.crafting.recipe.SpecialFloatingFlowerRecipe; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.item.block.ItemBlockSpecialFlower; @@ -73,6 +75,7 @@ public class JEIBotaniaPlugin implements IModPlugin { registry.handleRecipes(RecipePetals.class, PetalApothecaryRecipeWrapper::new, PetalApothecaryRecipeCategory.UID); registry.handleRecipes(RecipeElvenTrade.class, ElvenTradeRecipeWrapper::new, ElvenTradeRecipeCategory.UID); registry.handleRecipes(RecipeManaInfusion.class, ManaPoolRecipeWrapper::new, ManaPoolRecipeCategory.UID); + registry.handleRecipes(SpecialFloatingFlowerRecipe.class, SpecialFloatingFlowerWrapper::new, VanillaRecipeCategoryUid.CRAFTING); registry.addRecipes(BotaniaAPI.brewRecipes, BreweryRecipeCategory.UID); registry.addRecipes(BotaniaAPI.pureDaisyRecipes, PureDaisyRecipeCategory.UID); diff --git a/src/main/java/vazkii/botania/client/integration/jei/crafting/SpecialFloatingFlowerWrapper.java b/src/main/java/vazkii/botania/client/integration/jei/crafting/SpecialFloatingFlowerWrapper.java new file mode 100644 index 000000000..47b16eec1 --- /dev/null +++ b/src/main/java/vazkii/botania/client/integration/jei/crafting/SpecialFloatingFlowerWrapper.java @@ -0,0 +1,35 @@ +package vazkii.botania.client.integration.jei.crafting; + +import com.google.common.collect.ImmutableList; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.item.EnumDyeColor; +import net.minecraft.item.ItemStack; +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.common.block.ModBlocks; +import vazkii.botania.common.crafting.recipe.SpecialFloatingFlowerRecipe; +import vazkii.botania.common.item.block.ItemBlockSpecialFlower; + +import java.util.ArrayList; +import java.util.List; + +public class SpecialFloatingFlowerWrapper implements IRecipeWrapper { + private final List> inputs = new ArrayList<>(); + private final ItemStack output; + + public SpecialFloatingFlowerWrapper(SpecialFloatingFlowerRecipe recipe) { + inputs.add(ImmutableList.of(ItemBlockSpecialFlower.ofType(recipe.type))); + List normalFloaters = new ArrayList<>(); + for (EnumDyeColor color : EnumDyeColor.values()) { + normalFloaters.add(new ItemStack(ModBlocks.floatingFlower, 1, color.getMetadata())); + } + inputs.add(normalFloaters); + output = ItemBlockSpecialFlower.ofType(new ItemStack(ModBlocks.floatingSpecialFlower), recipe.type); + } + + @Override + public void getIngredients(IIngredients ingredients) { + ingredients.setInputLists(ItemStack.class, inputs); + ingredients.setOutput(ItemStack.class, output); + } +} diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index 662e023e8..a61ac37f5 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -20,6 +20,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.registries.IForgeRegistry; +import vazkii.botania.api.BotaniaAPI; import vazkii.botania.common.Botania; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.ModFluffBlocks; @@ -337,9 +338,12 @@ public final class ModCraftingRecipes { r.register(new ManaGunRemoveLensRecipe().setRegistryName(new ResourceLocation(LibMisc.MOD_ID, "mana_gun_remove_lens"))); r.register(new ManaGunClipRecipe().setRegistryName(new ResourceLocation(LibMisc.MOD_ID, "mana_gun_add_clip"))); r.register(new PhantomInkRecipe().setRegistryName(new ResourceLocation(LibMisc.MOD_ID, "phantom_ink"))); - r.register(new SpecialFloatingFlowerRecipe().setRegistryName(new ResourceLocation(LibMisc.MOD_ID, "special_floating_flower"))); r.register(new TerraPickTippingRecipe().setRegistryName(new ResourceLocation(LibMisc.MOD_ID, "terra_pick_tipping"))); + for (String s : BotaniaAPI.getAllSubTiles()) { + r.register(new SpecialFloatingFlowerRecipe(s).setRegistryName(new ResourceLocation(LibMisc.MOD_ID, "floating_" + s))); + } + for(int i = 0; i < 8; i++) { GameRegistry.addSmelting(new ItemStack(ModFluffBlocks.biomeStoneA, 1, i + 8), new ItemStack(ModFluffBlocks.biomeStoneA, 1, i), 0.1F); } diff --git a/src/main/java/vazkii/botania/common/crafting/recipe/SpecialFloatingFlowerRecipe.java b/src/main/java/vazkii/botania/common/crafting/recipe/SpecialFloatingFlowerRecipe.java index 540a17fcb..dd370716d 100644 --- a/src/main/java/vazkii/botania/common/crafting/recipe/SpecialFloatingFlowerRecipe.java +++ b/src/main/java/vazkii/botania/common/crafting/recipe/SpecialFloatingFlowerRecipe.java @@ -22,6 +22,11 @@ import vazkii.botania.common.item.block.ItemBlockSpecialFlower; import javax.annotation.Nonnull; public class SpecialFloatingFlowerRecipe extends IForgeRegistryEntry.Impl implements IRecipe { + public final String type; + + public SpecialFloatingFlowerRecipe(String type) { + this.type = type; + } @Override public boolean isDynamic() { @@ -39,7 +44,7 @@ public class SpecialFloatingFlowerRecipe extends IForgeRegistryEntry.Impl Date: Thu, 15 Feb 2018 00:51:06 -0500 Subject: [PATCH 14/16] Updating ISSUE_TEMPLATE.MD (#2558) * Added notice section, formatted with linebreaks Notice section on top give instructions directing people to the forums or reddit to post ideas as indicating by the contributing.md, because missing the contributing.md file is incredibly easy. I did it, my apologies to Vazkii and Willie. Figured out how to force blood line breaks in the markdown and addeed said line breaks at appropriate locations. Also added a tip at the top so people who post issues know how to do so, because I didn't. * Commented out the Notice section Because it works and means that even if someone forgets to delete the notice section, it still won't be seen! --- ISSUE_TEMPLATE.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 1e55eb73e..542fc544c 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,9 +1,19 @@ -Forge version: -Botania version: -Link to crash log: (please use a paste site such as [gist](https://gist.github.com/), do not attach the .txt or paste the log inline) + +# Version Information +Forge version: +Botania version: +# Further Information +Link to crash log: (please use a paste site such as [gist](https://gist.github.com/), do not attach the .txt or paste the log inline)\ Steps to reproduce: -1. +1. First step +2. Second step +3. etc... What I expected to happen: From 96843f31d7849c8db954401a6bf312183124776e Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Thu, 22 Feb 2018 22:50:09 +0000 Subject: [PATCH 15/16] Update contributors.properties --- contributors.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contributors.properties b/contributors.properties index d2e16ae2a..1a94f7b7d 100644 --- a/contributors.properties +++ b/contributors.properties @@ -93,3 +93,5 @@ aureiio=0 nightred=13 lukidwen=9 quirkyrose=10 +cynicalroses=6 +adenmck=5 From 8d6e5c6c8792a49103626c36dc0d6cbba79da618 Mon Sep 17 00:00:00 2001 From: PomeloBooks Date: Wed, 28 Feb 2018 00:04:53 +0800 Subject: [PATCH 16/16] Fix a typo. (#2569) --- src/main/resources/assets/botania/lang/zh_cn.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/botania/lang/zh_cn.lang b/src/main/resources/assets/botania/lang/zh_cn.lang index 404df7063..01e3416c8 100644 --- a/src/main/resources/assets/botania/lang/zh_cn.lang +++ b/src/main/resources/assets/botania/lang/zh_cn.lang @@ -530,7 +530,7 @@ advancement.botania:pollidisiacPickup.desc=做一个畜牧花,在空气中制 advancement.botania:brewPickup=オサナナブルー advancement.botania:brewPickup.desc=制作一个植物酿造台并用他酿造所有种类的药水 advancement.botania:terraformRodCraft=ワールドイズマイン -advancement.botania:terraformRodCraft.desc=制作一把泰拉高并用他改变世界地形 +advancement.botania:terraformRodCraft.desc=制作一把泰拉镐并用他改变世界地形 advancement.botania:bubbellPickup=深海少女 advancement.botania:bubbellPickup.desc=制作一株气泡铃来方便水下建筑 advancement.botania:luminizerRide=ワールズエンド ダンスホール