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: 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/contributors.properties b/contributors.properties index dd1648c20..1a94f7b7d 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 @@ -92,3 +92,6 @@ xeanwolf20=11 aureiio=0 nightred=13 lukidwen=9 +quirkyrose=10 +cynicalroses=6 +adenmck=5 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/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/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/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/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/TileHourglass.java b/src/main/java/vazkii/botania/common/block/tile/TileHourglass.java index 33d837186..25c0021c8 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.manaPowder; + } @Override public void update() { int totalTime = getTotalTime(); - ItemStack dustStack = itemHandler.getStackInSlot(0); - dust = !dustStack.isEmpty() && dustStack.getItem() == ModItems.manaPowder; + 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(); 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); + } } } } 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/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; diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index cdee4dd0f..6ae7bca93 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; @@ -338,9 +339,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 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; 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 195ce0c44..77ae2e1d9 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() { diff --git a/src/main/java/vazkii/botania/common/lib/LibMisc.java b/src/main/java/vazkii/botania/common/lib/LibMisc.java index dd98b73a9..83a953c75 100644 --- a/src/main/java/vazkii/botania/common/lib/LibMisc.java +++ b/src/main/java/vazkii/botania/common/lib/LibMisc.java @@ -17,8 +17,8 @@ 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 int DATA_VERSION = 1; + public static final String DEPENDENCIES = "required-after:baubles@[1.5.2,);after:thaumcraft"; // Network Contants public static final String NETWORK_CHANNEL = MOD_ID; 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/lang/zh_cn.lang b/src/main/resources/assets/botania/lang/zh_cn.lang index 95c319a5a..86b13570d 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=ワールズエンド ダンスホール 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 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 0d6535231..3230b7e0d 100644 Binary files a/src/main/resources/assets/botania/textures/blocks/crate_crafty_pattern_6.png and b/src/main/resources/assets/botania/textures/blocks/crate_crafty_pattern_6.png differ 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/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.

  • 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