diff --git a/build.gradle b/build.gradle index df5042d98..c26afbcb1 100644 --- a/build.gradle +++ b/build.gradle @@ -98,8 +98,8 @@ dependencies { compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.11:api") runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.11") - compileOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.14.4-0.25:api") - runtimeOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.14.4-0.25") + compileOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.14.4-1.0.2:api") + runtimeOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.14.4-1.0.2") //deobfCompile "thaumcraft:Thaumcraft:1.12.2:6.1.BETA26" //and a bit more for SCP diff --git a/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java b/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java index c5fe75ee5..8b1e78cb6 100644 --- a/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/ContributorFancinessHandler.java @@ -27,17 +27,14 @@ import net.minecraft.item.DyeColor; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; import net.minecraft.util.DefaultUncaughtExceptionHandler; -import net.minecraft.util.ResourceLocation; import vazkii.botania.api.item.AccessoryRenderHelper; import vazkii.botania.client.core.helper.IconHelper; import vazkii.botania.client.core.helper.ShaderHelper; import vazkii.botania.common.Botania; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.lib.LibBlockNames; -import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import javax.annotation.Nonnull; import java.io.IOException; @@ -53,7 +50,6 @@ public final class ContributorFancinessHandler extends LayerRenderer flowerMap = new HashMap<>(); private static boolean startedLoading = false; - private static final Tag FLOWERS = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "special_flowers")); private static final ImmutableMap LEGACY_FLOWER_NAMES = ImmutableMap.builder() .put("puredaisy", LibBlockNames.SUBTILE_PUREDAISY.getPath()) .put("fallenkanade", LibBlockNames.SUBTILE_FALLEN_KANADE.getPath()) @@ -121,7 +117,7 @@ public final class ContributorFancinessHandler extends LayerRenderer flower.getRegistryName().getPath().equals(flowerName)) .findFirst().orElse(Items.POPPY); flowerMap.put(key, new ItemStack(item)); diff --git a/src/main/java/vazkii/botania/common/Botania.java b/src/main/java/vazkii/botania/common/Botania.java index 024f56dcc..b395c57e4 100644 --- a/src/main/java/vazkii/botania/common/Botania.java +++ b/src/main/java/vazkii/botania/common/Botania.java @@ -66,6 +66,7 @@ import vazkii.botania.common.core.proxy.ServerProxy; import vazkii.botania.common.crafting.FluxfieldCondition; import vazkii.botania.common.crafting.ReloadListener; import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import vazkii.botania.common.network.PacketHandler; import vazkii.botania.common.world.ModFeatures; import vazkii.botania.common.world.SkyblockWorldEvents; @@ -210,14 +211,13 @@ public class Botania { "___________", } }; - Tag mysticalFlowers = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "mystical_flowers")); mb = PatchouliAPI.instance.makeMultiblock( pat, 'P', ModBlocks.manaPylon, 'L', Blocks.LAPIS_BLOCK, 'B', Blocks.OBSIDIAN, '0', Blocks.OBSIDIAN, - 'F', StateMatcher.fromPredicate(ModBlocks.whiteFlower, state -> state.getBlock().isIn(mysticalFlowers)) + 'F', StateMatcher.fromPredicate(ModBlocks.whiteFlower, state -> state.getBlock().isIn(ModTags.Blocks.MYSTICAL_FLOWERS)) ); PatchouliAPI.instance.registerMultiblock(ModBlocks.enchanter.getRegistryName(), mb); diff --git a/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileLoonuim.java b/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileLoonuim.java index 05b9cd2f5..380b4d259 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileLoonuim.java +++ b/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileLoonuim.java @@ -14,34 +14,23 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.LivingEntity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.SpawnReason; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.monster.CaveSpiderEntity; import net.minecraft.entity.monster.CreeperEntity; import net.minecraft.entity.monster.EndermanEntity; -import net.minecraft.entity.monster.EndermanEntity; import net.minecraft.entity.monster.HuskEntity; import net.minecraft.entity.monster.MonsterEntity; import net.minecraft.entity.monster.SkeletonEntity; import net.minecraft.entity.monster.SpiderEntity; import net.minecraft.entity.monster.StrayEntity; import net.minecraft.entity.monster.ZombieEntity; -import net.minecraft.entity.monster.MonsterEntity; -import net.minecraft.entity.monster.SkeletonEntity; -import net.minecraft.entity.monster.ZombieEntity; import net.minecraft.nbt.CompoundNBT; import net.minecraft.potion.EffectInstance; import net.minecraft.potion.Effects; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.potion.EffectInstance; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; @@ -49,7 +38,6 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import net.minecraft.world.storage.loot.LootContext; -import net.minecraft.world.storage.loot.LootParameterSet; import net.minecraft.world.storage.loot.LootParameterSets; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.eventbus.api.EventPriority; @@ -59,9 +47,9 @@ import net.minecraftforge.registries.ObjectHolder; import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.subtile.RadiusDescriptor; import vazkii.botania.api.subtile.TileEntityFunctionalFlower; -import vazkii.botania.common.block.ModSubtiles; import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import java.util.Collections; import java.util.List; @@ -76,7 +64,6 @@ public class SubTileLoonuim extends TileEntityFunctionalFlower { private static final int RANGE = 5; private static final String TAG_LOOT_TABLE = "lootTable"; private static final String TAG_ITEMSTACK_TO_DROP = "botania:looniumItemStackToDrop"; - private static final Tag BLACKLIST = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "loonium_blacklist")); private ResourceLocation lootTable = new ResourceLocation("minecraft", "chests/simple_dungeon"); @@ -103,7 +90,7 @@ public class SubTileLoonuim extends TileEntityFunctionalFlower { Collections.shuffle(stacks); stack = stacks.get(0); } - } while(stack.isEmpty() || BLACKLIST.contains(stack.getItem())); + } while(stack.isEmpty() || ModTags.Items.LOONIUM_BLACKLIST.contains(stack.getItem())); int bound = RANGE * 2 + 1; int xp = getPos().getX() - RANGE + rand.nextInt(bound); diff --git a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java index 22bbcad4b..4b9baff0e 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java +++ b/src/main/java/vazkii/botania/common/block/subtile/generating/SubTileRafflowsia.java @@ -15,10 +15,6 @@ import net.minecraft.block.BlockState; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.Tag; -import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; @@ -28,11 +24,11 @@ import net.minecraftforge.registries.ObjectHolder; import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.subtile.RadiusDescriptor; import vazkii.botania.api.subtile.TileEntityGeneratingFlower; -import vazkii.botania.api.subtile.TileEntitySpecialFlower; import vazkii.botania.common.block.ModSubtiles; import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import javax.annotation.Nullable; import java.util.List; @@ -43,7 +39,6 @@ public class SubTileRafflowsia extends TileEntityGeneratingFlower { private static final String TAG_LAST_FLOWER = "lastFlower"; private static final String TAG_LAST_FLOWER_TIMES = "lastFlowerTimes"; - private static final Tag SPECIAL_FLOWERS = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "special_flowers")); @Nullable private Block lastFlower; @@ -68,7 +63,7 @@ public class SubTileRafflowsia extends TileEntityGeneratingFlower { BlockPos pos = getPos().add(i - RANGE, j - RANGE, k - RANGE); BlockState state = getWorld().getBlockState(pos); - if(state.isIn(SPECIAL_FLOWERS) && state.getBlock() != ModSubtiles.rafflowsia) { + if(state.isIn(ModTags.Blocks.SPECIAL_FLOWERS) && state.getBlock() != ModSubtiles.rafflowsia) { if(state.getBlock() == lastFlower) lastFlowerTimes++; else { diff --git a/src/main/java/vazkii/botania/common/crafting/ModElvenTradeRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModElvenTradeRecipes.java index 438ec2819..96554ac4f 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModElvenTradeRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModElvenTradeRecipes.java @@ -1,25 +1,17 @@ package vazkii.botania.common.crafting; import net.minecraft.block.Blocks; -import net.minecraft.block.Blocks; -import net.minecraft.item.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.item.crafting.Ingredient; -import net.minecraft.tags.ItemTags; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import vazkii.botania.api.BotaniaAPI; import vazkii.botania.api.recipe.RecipeElvenTrade; import vazkii.botania.api.recipe.RegisterRecipesEvent; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.lib.LibMisc; -import vazkii.botania.common.lib.LibOreDict; - -import java.util.ArrayList; -import java.util.List; +import vazkii.botania.common.lib.ModTags; import static vazkii.botania.common.lib.ResourceLocationHelper.prefix; @@ -28,11 +20,11 @@ public class ModElvenTradeRecipes { @SubscribeEvent public static void register(RegisterRecipesEvent evt) { - Ingredient livingwood = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "livingwood"))); + Ingredient livingwood = Ingredient.fromTag(ModTags.Items.LIVINGWOOD); evt.elvenTrade().accept(new RecipeElvenTrade(prefix("dreamwood"), new ItemStack(ModBlocks.dreamwood), livingwood)); - Ingredient manaDiamond = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation("forge", "gems/mana_diamond"))); - Ingredient manaSteel = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation("forge", "ingots/manasteel"))); + Ingredient manaDiamond = Ingredient.fromTag(ModTags.Items.GEMS_MANA_DIAMOND); + Ingredient manaSteel = Ingredient.fromTag(ModTags.Items.INGOTS_MANASTEEL); evt.elvenTrade().accept(new RecipeElvenTrade(prefix("elementium"), new ItemStack(ModItems.elementium), manaSteel, manaSteel)); evt.elvenTrade().accept(new RecipeElvenTrade(prefix("elementium_block"), new ItemStack(ModBlocks.elementiumBlock), Ingredient.fromItems(ModBlocks.manasteelBlock), Ingredient.fromItems(ModBlocks.manasteelBlock))); diff --git a/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java index f31755557..96d4b4f30 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModPetalRecipes.java @@ -10,8 +10,6 @@ */ package vazkii.botania.common.crafting; -import net.minecraft.item.Item; -import net.minecraft.item.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.item.crafting.Ingredient; @@ -20,7 +18,6 @@ import net.minecraft.util.IItemProvider; import net.minecraft.util.ResourceLocation; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import vazkii.botania.api.BotaniaAPI; import vazkii.botania.api.recipe.RecipePetals; import vazkii.botania.api.recipe.RegisterRecipesEvent; import vazkii.botania.common.Botania; @@ -28,8 +25,6 @@ import vazkii.botania.common.block.ModSubtiles; import vazkii.botania.common.core.handler.ConfigHandler; import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.item.ModItems; -import vazkii.botania.common.item.block.ItemBlockSpecialFlower; -import vazkii.botania.common.lib.LibBlockNames; import vazkii.botania.common.lib.LibMisc; import java.util.Arrays; @@ -38,50 +33,6 @@ import static vazkii.botania.common.lib.ResourceLocationHelper.prefix; @Mod.EventBusSubscriber(modid = LibMisc.MOD_ID) public final class ModPetalRecipes { - public static RecipePetals pureDaisyRecipe; - public static RecipePetals manastarRecipe; - - public static RecipePetals endoflameRecipe; - public static RecipePetals hydroangeasRecipe; - public static RecipePetals thermalilyRecipe; - public static RecipePetals arcaneRoseRecipe; - public static RecipePetals munchdewRecipe; - public static RecipePetals entropinnyumRecipe; - public static RecipePetals kekimurusRecipe; - public static RecipePetals gourmaryllisRecipe; - public static RecipePetals narslimmusRecipe; - public static RecipePetals spectrolusRecipe; - public static RecipePetals rafflowsiaRecipe; - public static RecipePetals shulkMeNotRecipe; - public static RecipePetals dandelifeonRecipe; - - public static RecipePetals jadedAmaranthusRecipe; - public static RecipePetals bellethorneRecipe; - public static RecipePetals dreadthorneRecipe; - public static RecipePetals heiseiDreamRecipe; - public static RecipePetals tigerseyeRecipe; - public static RecipePetals orechidRecipe; - public static RecipePetals orechidIgnemRecipe; - public static RecipePetals fallenKanadeRecipe; - public static RecipePetals exoflameRecipe; - public static RecipePetals agricarnationRecipe; - public static RecipePetals hopperhockRecipe; - public static RecipePetals tangleberrieRecipe; - public static RecipePetals jiyuuliaRecipe; - public static RecipePetals rannuncarpusRecipe; - public static RecipePetals hyacidusRecipe; - public static RecipePetals pollidisiacRecipe; - public static RecipePetals clayconiaRecipe; - public static RecipePetals looniumRecipe; - public static RecipePetals daffomillRecipe; - public static RecipePetals vinculotusRecipe; - public static RecipePetals spectranthemumRecipe; - public static RecipePetals medumoneRecipe; - public static RecipePetals marimorphosisRecipe; - public static RecipePetals bubbellRecipe; - public static RecipePetals solegnoliaRecipe; - public static RecipePetals bergamuteRecipe; - @SubscribeEvent public static void register(RegisterRecipesEvent evt) { Ingredient white = tagIngr("petals/white"); diff --git a/src/main/java/vazkii/botania/common/crafting/ModRuneRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModRuneRecipes.java index b81b74115..b14646aff 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModRuneRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModRuneRecipes.java @@ -24,6 +24,7 @@ import vazkii.botania.api.recipe.RegisterRecipesEvent; import vazkii.botania.common.crafting.recipe.HeadRecipe; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import static vazkii.botania.common.lib.ResourceLocationHelper.prefix; @@ -37,9 +38,9 @@ public final class ModRuneRecipes { final int costTier2 = 8000; final int costTier3 = 12000; - Ingredient manaSteel = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation("forge", "ingots/manasteel"))); - Ingredient manaDiamond = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation("forge", "gems/mana_diamond"))); - Ingredient manaPowder = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation("forge", "dusts/mana"))); + Ingredient manaSteel = Ingredient.fromTag(ModTags.Items.INGOTS_MANASTEEL); + Ingredient manaDiamond = Ingredient.fromTag(ModTags.Items.GEMS_MANA_DIAMOND); + Ingredient manaPowder = Ingredient.fromTag(ModTags.Items.DUSTS_MANA); evt.runeAltar().accept(new RecipeRuneAltar(prefix("water"), new ItemStack(ModItems.runeWater, 2), costTier1, manaPowder, manaSteel, Ingredient.fromItems(Items.BONE_MEAL), Ingredient.fromItems(Blocks.SUGAR_CANE), Ingredient.fromItems(Items.FISHING_ROD))); evt.runeAltar().accept(new RecipeRuneAltar(prefix("fire"), new ItemStack(ModItems.runeFire, 2), costTier1, manaPowder, manaSteel, Ingredient.fromItems(Items.NETHER_BRICK), Ingredient.fromItems(Items.GUNPOWDER), Ingredient.fromItems(Items.NETHER_WART))); @@ -49,10 +50,10 @@ public final class ModRuneRecipes { evt.runeAltar().accept(new RecipeRuneAltar(prefix("air"), new ItemStack(ModItems.runeAir, 2), costTier1, manaPowder, manaSteel, Ingredient.fromTag(ItemTags.CARPETS), Ingredient.fromItems(Items.FEATHER), Ingredient.fromItems(Items.STRING))); - Ingredient fire = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/fire"))); - Ingredient water = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/water"))); - Ingredient earth = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/earth"))); - Ingredient air = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/air"))); + Ingredient fire = Ingredient.fromTag(ModTags.Items.RUNES_FIRE); + Ingredient water = Ingredient.fromTag(ModTags.Items.RUNES_WATER); + Ingredient earth = Ingredient.fromTag(ModTags.Items.RUNES_EARTH); + Ingredient air = Ingredient.fromTag(ModTags.Items.RUNES_AIR); Ingredient sapling = Ingredient.fromTag(ItemTags.SAPLINGS); Ingredient leaves = Ingredient.fromTag(ItemTags.LEAVES); @@ -63,10 +64,10 @@ public final class ModRuneRecipes { evt.runeAltar().accept(new RecipeRuneAltar(prefix("winter"), new ItemStack(ModItems.runeWinter), costTier2, water, earth, Ingredient.fromItems(Blocks.SNOW), Ingredient.fromItems(Blocks.SNOW), Ingredient.fromTag(ItemTags.WOOL), Ingredient.fromItems(Blocks.CAKE))); - Ingredient spring = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/spring"))); - Ingredient summer = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/summer"))); - Ingredient autumn = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/autumn"))); - Ingredient winter = Ingredient.fromTag(new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "runes/winter"))); + Ingredient spring = Ingredient.fromTag(ModTags.Items.RUNES_SPRING); + Ingredient summer = Ingredient.fromTag(ModTags.Items.RUNES_SUMMER); + Ingredient autumn = Ingredient.fromTag(ModTags.Items.RUNES_AUTUMN); + Ingredient winter = Ingredient.fromTag(ModTags.Items.RUNES_WINTER); evt.runeAltar().accept(new RecipeRuneAltar(prefix("mana"), new ItemStack(ModItems.runeMana), costTier2, manaSteel, manaSteel, manaSteel, manaSteel, manaSteel, Ingredient.fromItems(ModItems.manaPearl))); diff --git a/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java b/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java index e25da74fb..8794911bb 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java +++ b/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java @@ -82,6 +82,7 @@ import vazkii.botania.common.core.handler.ModSounds; import vazkii.botania.common.core.helper.Vector3; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import vazkii.botania.common.network.PacketBotaniaEffect; import vazkii.botania.common.network.PacketHandler; @@ -121,7 +122,7 @@ public class EntityDoppleganger extends MobEntity implements IBotaniaBoss, IEnti private static final String TAG_MOB_SPAWN_TICKS = "mobSpawnTicks"; private static final String TAG_HARD_MODE = "hardMode"; private static final String TAG_PLAYER_COUNT = "playerCount"; - private static final Tag BLACKLIST = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "gaia_break_blacklist")); + private static final Tag BLACKLIST = ModTags.Blocks.GAIA_BREAK_BLACKLIST; private static final DataParameter INVUL_TIME = EntityDataManager.createKey(EntityDoppleganger.class, DataSerializers.VARINT); diff --git a/src/main/java/vazkii/botania/common/integration/curios/CurioIntegration.java b/src/main/java/vazkii/botania/common/integration/curios/CurioIntegration.java index eec2ac1ec..8c5676212 100644 --- a/src/main/java/vazkii/botania/common/integration/curios/CurioIntegration.java +++ b/src/main/java/vazkii/botania/common/integration/curios/CurioIntegration.java @@ -53,7 +53,7 @@ public class CurioIntegration extends EquipmentHandler { InterModComms.sendTo("curios", CuriosAPI.IMC.REGISTER_TYPE, () -> new CurioIMCMessage("belt")); InterModComms.sendTo("curios", CuriosAPI.IMC.REGISTER_TYPE, () -> new CurioIMCMessage("body")); InterModComms.sendTo("curios", CuriosAPI.IMC.REGISTER_TYPE, () -> new CurioIMCMessage("head")); - InterModComms.sendTo("curios", CuriosAPI.IMC.REGISTER_TYPE, () -> new CurioIMCMessage("trinket")); + InterModComms.sendTo("curios", CuriosAPI.IMC.REGISTER_TYPE, () -> new CurioIMCMessage("necklace")); } @Override diff --git a/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java b/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java index db33075e8..75a31e1b5 100644 --- a/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java +++ b/src/main/java/vazkii/botania/common/item/block/ItemBlockSpecialFlower.java @@ -11,44 +11,30 @@ package vazkii.botania.common.item.block; import net.minecraft.block.Block; -import net.minecraft.block.BlockState; import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.tags.ItemTags; import net.minecraft.tags.Tag; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.world.World; -import net.minecraftforge.event.entity.player.EntityItemPickupEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import vazkii.botania.api.BotaniaAPI; -import vazkii.botania.api.lexicon.IRecipeKeyProvider; -import vazkii.botania.api.subtile.TileEntitySpecialFlower; +import net.minecraftforge.fml.common.Mod; import vazkii.botania.common.Botania; -import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.core.handler.ConfigHandler; -import vazkii.botania.common.core.helper.ItemNBTHelper; -import vazkii.botania.common.core.helper.PlayerHelper; import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import javax.annotation.Nonnull; import java.util.List; @Mod.EventBusSubscriber(modid = LibMisc.MOD_ID) public class ItemBlockSpecialFlower extends ItemBlockMod { - private static final Tag GENERATING = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "generating_special_flowers")); - private static final Tag FUNCTIONAL = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "functional_special_flowers")); - private static final Tag MISC = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "misc_special_flowers")); + private static final Tag GENERATING = ModTags.Items.GENERATING_SPECIAL_FLOWERS; + private static final Tag FUNCTIONAL = ModTags.Items.FUNCTIONAL_SPECIAL_FLOWERS; + private static final Tag MISC = ModTags.Items.MISC_SPECIAL_FLOWERS; public ItemBlockSpecialFlower(Block block1, Properties props) { super(block1, props); diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java index 362430932..fc5e3dfb5 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemMagnetRing.java @@ -10,14 +10,9 @@ */ package vazkii.botania.common.item.equipment.bauble; -import net.minecraft.block.Block; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ItemEntity; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; @@ -32,7 +27,7 @@ import vazkii.botania.common.core.handler.EquipmentHandler; import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.core.helper.MathHelper; import vazkii.botania.common.core.helper.Vector3; -import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import java.util.List; @@ -40,9 +35,6 @@ public class ItemMagnetRing extends ItemBauble { private static final String TAG_COOLDOWN = "cooldown"; - private static final Tag BLACKLIST = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "magnet_ring_blacklist")); - private static final Tag BLOCK_BLACKLIST = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "magnet_ring_blacklist")); - private final int range; public ItemMagnetRing(Properties props) { @@ -111,15 +103,15 @@ public class ItemMagnetRing extends ItemBauble { return false; ItemStack stack = item.getItem(); - if(stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || BLACKLIST.contains(stack.getItem())) + if(stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || ModTags.Items.MAGNET_RING_BLACKLIST.contains(stack.getItem())) return false; BlockPos pos = new BlockPos(item); - if(BLOCK_BLACKLIST.contains(item.world.getBlockState(pos).getBlock())) + if(ModTags.Blocks.MAGNET_RING_BLACKLIST.contains(item.world.getBlockState(pos).getBlock())) return false; - if(BLOCK_BLACKLIST.contains(item.world.getBlockState(pos.down()).getBlock())) + if(ModTags.Blocks.MAGNET_RING_BLACKLIST.contains(item.world.getBlockState(pos.down()).getBlock())) return false; return true; diff --git a/src/main/java/vazkii/botania/common/item/equipment/tool/elementium/ItemElementiumPick.java b/src/main/java/vazkii/botania/common/item/equipment/tool/elementium/ItemElementiumPick.java index de0a2f4de..fb69aaab5 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/tool/elementium/ItemElementiumPick.java +++ b/src/main/java/vazkii/botania/common/item/equipment/tool/elementium/ItemElementiumPick.java @@ -1,18 +1,14 @@ package vazkii.botania.common.item.equipment.tool.elementium; import net.minecraft.block.Block; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; import vazkii.botania.api.BotaniaAPI; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelPick; import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraPick; -import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; public class ItemElementiumPick extends ItemManasteelPick { @@ -31,21 +27,18 @@ public class ItemElementiumPick extends ItemManasteelPick { } } - private static final Tag DISPOSABLE = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "disposable")); - private static final Tag SEMI_DISPOSABLE = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "semi_disposable")); - public static boolean isDisposable(Block block) { - return DISPOSABLE.contains(block.asItem()); + return ModTags.Items.DISPOSABLE.contains(block.asItem()); } private static boolean isDisposable(ItemStack stack) { if(stack.isEmpty()) return false; - return DISPOSABLE.contains(stack.getItem()); + return ModTags.Items.DISPOSABLE.contains(stack.getItem()); } private static boolean isSemiDisposable(ItemStack stack) { - return SEMI_DISPOSABLE.contains(stack.getItem()); + return ModTags.Items.SEMI_DISPOSABLE.contains(stack.getItem()); } } diff --git a/src/main/java/vazkii/botania/common/item/rod/ItemGravityRod.java b/src/main/java/vazkii/botania/common/item/rod/ItemGravityRod.java index 2e7fd79d2..fa1700b34 100644 --- a/src/main/java/vazkii/botania/common/item/rod/ItemGravityRod.java +++ b/src/main/java/vazkii/botania/common/item/rod/ItemGravityRod.java @@ -15,15 +15,13 @@ import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; import net.minecraft.potion.EffectInstance; import net.minecraft.potion.Effects; -import net.minecraft.item.ItemStack; -import net.minecraft.tags.EntityTypeTags; import net.minecraft.tags.Tag; import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.world.World; import vazkii.botania.api.item.IManaProficiencyArmor; @@ -36,14 +34,14 @@ import vazkii.botania.common.core.helper.Vector3; import vazkii.botania.common.entity.EntityThrownItem; import vazkii.botania.common.item.ItemMod; import vazkii.botania.common.item.ModItems; -import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; public class ItemGravityRod extends ItemMod implements IManaUsingItem { - private static final Tag> BLACKLIST = new EntityTypeTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "shaded_mesa_blacklist")); + private static final Tag> BLACKLIST = ModTags.Entities.SHADED_MESA_BLACKLIST; private static final float RANGE = 3F; private static final int COST = 2; diff --git a/src/main/java/vazkii/botania/common/item/rod/ItemTerraformRod.java b/src/main/java/vazkii/botania/common/item/rod/ItemTerraformRod.java index 1a4a7b2a9..961deef5d 100644 --- a/src/main/java/vazkii/botania/common/item/rod/ItemTerraformRod.java +++ b/src/main/java/vazkii/botania/common/item/rod/ItemTerraformRod.java @@ -23,11 +23,8 @@ import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.SoundEvents; import net.minecraft.item.ItemStack; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.Tag; import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResultType; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -39,14 +36,13 @@ import vazkii.botania.api.subtile.ISpecialFlower; import vazkii.botania.client.fx.SparkleParticleData; import vazkii.botania.common.core.helper.MathHelper; import vazkii.botania.common.item.ItemMod; -import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; public class ItemTerraformRod extends ItemMod implements IManaUsingItem, IBlockProvider { - private static final Tag TERRAFORMABLE = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "terraformable")); private static final int COST_PER = 55; // todo 1.13 migrate rest of these @@ -106,7 +102,7 @@ public class ItemTerraformRod extends ItemMod implements IManaUsingItem, IBlockP if(state.isAir(world, pos)) continue; - if(TERRAFORMABLE.contains(state.getBlock())) { + if(ModTags.Blocks.TERRAFORMABLE.contains(state.getBlock())) { List airBlocks = new ArrayList<>(); for(Direction dir : MathHelper.HORIZONTALS) { diff --git a/src/main/java/vazkii/botania/common/lib/ModTags.java b/src/main/java/vazkii/botania/common/lib/ModTags.java new file mode 100644 index 000000000..376c3901b --- /dev/null +++ b/src/main/java/vazkii/botania/common/lib/ModTags.java @@ -0,0 +1,177 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under the + * Botania License: http://botaniamod.net/license.php + * + * File Created @ [Oct 06 2019, 8:12 PM (GMT)] + */ +package vazkii.botania.common.lib; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityType; +import net.minecraft.item.Item; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.EntityTypeTags; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.Tag; +import net.minecraft.util.ResourceLocation; + +public class ModTags { + public static class Items { + public static final Tag DUSTS_MANA = forgeTag("dusts/mana"); + + public static final Tag GEMS_DRAGONSTONE = forgeTag("gems/dragonstone"); + public static final Tag GEMS_MANA_DIAMOND = forgeTag("gems/mana_diamond"); + + public static final Tag INGOTS_ELEMENTIUM = forgeTag("ingots/elementium"); + public static final Tag INGOTS_MANASTEEL = forgeTag("ingots/manasteel"); + public static final Tag INGOTS_TERRASTEEL = forgeTag("ingots/terrasteel"); + + public static final Tag NUGGETS_ELEMENTIUM = forgeTag("nuggets/elementium"); + public static final Tag NUGGETS_MANASTEEL = forgeTag("nuggets/manasteel"); + public static final Tag NUGGETS_TERRASTEEL = forgeTag("nuggets/terrasteel"); + + public static final Tag MYSTICAL_FLOWERS = tag("mystical_flowers"); + + public static final Tag SPECIAL_FLOWERS = tag("special_flowers"); + public static final Tag MINI_FLOWERS = tag("mini_flowers"); + public static final Tag MISC_SPECIAL_FLOWERS = tag("misc_special_flowers"); + public static final Tag FUNCTIONAL_SPECIAL_FLOWERS = tag("functional_special_flowers"); + public static final Tag GENERATING_SPECIAL_FLOWERS = tag("generating_special_flowers"); + + public static final Tag FLOATING_FLOWERS = tag("floating_flowers"); + public static final Tag MUNDANE_FLOATING_FLOWERS = tag("mundane_floating_flowers"); + public static final Tag SPECIAL_FLOATING_FLOWERS = tag("special_floating_flowers"); + + public static final Tag LENS = tag("lens"); + public static final Tag LIVINGROCK = tag("livingrock"); + public static final Tag LIVINGWOOD = tag("livingwood"); + + public static final Tag MAGNET_RING_BLACKLIST = tag("magnet_ring_blacklist"); + public static final Tag LOONIUM_BLACKLIST = tag("loonium_blacklist"); + + public static final Tag DISPOSABLE = tag("disposable"); + public static final Tag SEMI_DISPOSABLE = tag("semi_disposable"); + + public static final Tag FLOWERS = tag("flowers"); + + public static final Tag FLOWERS_BLACK = tag("flowers/black"); + public static final Tag FLOWERS_BLUE = tag("flowers/blue"); + public static final Tag FLOWERS_BROWN = tag("flowers/brown"); + public static final Tag FLOWERS_CYAN = tag("flowers/cyan"); + public static final Tag FLOWERS_GRAY = tag("flowers/gray"); + public static final Tag FLOWERS_GREEN = tag("flowers/green"); + public static final Tag FLOWERS_LIGHT_BLUE = tag("flowers/light_blue"); + public static final Tag FLOWERS_LIGHT_GRAY = tag("flowers/light_gray"); + public static final Tag FLOWERS_LIME = tag("flowers/lime"); + public static final Tag FLOWERS_MAGENTA = tag("flowers/magenta"); + public static final Tag FLOWERS_ORANGE = tag("flowers/orange"); + public static final Tag FLOWERS_PINK = tag("flowers/pink"); + public static final Tag FLOWERS_PURPLE = tag("flowers/purple"); + public static final Tag FLOWERS_RED = tag("flowers/red"); + public static final Tag FLOWERS_WHITE = tag("flowers/white"); + public static final Tag FLOWERS_YELLOW = tag("flowers/yellow"); + + public static final Tag DOUBLE_FLOWERS_BLACK = tag("double_flowers/black"); + public static final Tag DOUBLE_FLOWERS_BLUE = tag("double_flowers/blue"); + public static final Tag DOUBLE_FLOWERS_BROWN = tag("double_flowers/brown"); + public static final Tag DOUBLE_FLOWERS_CYAN = tag("double_flowers/cyan"); + public static final Tag DOUBLE_FLOWERS_GRAY = tag("double_flowers/gray"); + public static final Tag DOUBLE_FLOWERS_GREEN = tag("double_flowers/green"); + public static final Tag DOUBLE_FLOWERS_LIGHT_BLUE = tag("double_flowers/light_blue"); + public static final Tag DOUBLE_FLOWERS_LIGHT_GRAY = tag("double_flowers/light_gray"); + public static final Tag DOUBLE_FLOWERS_LIME = tag("double_flowers/lime"); + public static final Tag DOUBLE_FLOWERS_MAGENTA = tag("double_flowers/magenta"); + public static final Tag DOUBLE_FLOWERS_ORANGE = tag("double_flowers/orange"); + public static final Tag DOUBLE_FLOWERS_PINK = tag("double_flowers/pink"); + public static final Tag DOUBLE_FLOWERS_PURPLE = tag("double_flowers/purple"); + public static final Tag DOUBLE_FLOWERS_RED = tag("double_flowers/red"); + public static final Tag DOUBLE_FLOWERS_WHITE = tag("double_flowers/white"); + public static final Tag DOUBLE_FLOWERS_YELLOW = tag("double_flowers/yellow"); + + public static final Tag PETALS = tag("petals"); + + public static final Tag PETALS_BLACK = tag("petals/black"); + public static final Tag PETALS_BLUE = tag("petals/blue"); + public static final Tag PETALS_BROWN = tag("petals/brown"); + public static final Tag PETALS_CYAN = tag("petals/cyan"); + public static final Tag PETALS_GRAY = tag("petals/gray"); + public static final Tag PETALS_GREEN = tag("petals/green"); + public static final Tag PETALS_LIGHT_BLUE = tag("petals/light_blue"); + public static final Tag PETALS_LIGHT_GRAY = tag("petals/light_gray"); + public static final Tag PETALS_LIME = tag("petals/lime"); + public static final Tag PETALS_MAGENTA = tag("petals/magenta"); + public static final Tag PETALS_ORANGE = tag("petals/orange"); + public static final Tag PETALS_PINK = tag("petals/pink"); + public static final Tag PETALS_PURPLE = tag("petals/purple"); + public static final Tag PETALS_RED = tag("petals/red"); + public static final Tag PETALS_WHITE = tag("petals/white"); + public static final Tag PETALS_YELLOW = tag("petals/yellow"); + + public static final Tag RUNES = tag("runes"); + + public static final Tag RUNES_AIR = tag("runes/air"); + public static final Tag RUNES_AUTUMN = tag("runes/autumn"); + public static final Tag RUNES_EARTH = tag("runes/earth"); + public static final Tag RUNES_ENVY = tag("runes/envy"); + public static final Tag RUNES_FIRE = tag("runes/fire"); + public static final Tag RUNES_GLUTTONY = tag("runes/gluttony"); + public static final Tag RUNES_GREED = tag("runes/greed"); + public static final Tag RUNES_LUST = tag("runes/lust"); + public static final Tag RUNES_MANA = tag("runes/mana"); + public static final Tag RUNES_PRIDE = tag("runes/pride"); + public static final Tag RUNES_SLOTH = tag("runes/sloth"); + public static final Tag RUNES_SPRING = tag("runes/spring"); + public static final Tag RUNES_SUMMER = tag("runes/summer"); + public static final Tag RUNES_WATER = tag("runes/water"); + public static final Tag RUNES_WINTER = tag("runes/winter"); + public static final Tag RUNES_WRATH = tag("runes/wrath"); + + private static Tag tag(String name) { + return new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, name)); + } + + private static Tag forgeTag(String name) { + return new ItemTags.Wrapper(new ResourceLocation("forge", name)); + } + } + + public static class Blocks { + public static final Tag MYSTICAL_FLOWERS = tag("mystical_flowers"); + + public static final Tag SPECIAL_FLOWERS = tag("special_flowers"); + public static final Tag MINI_FLOWERS = tag("mini_flowers"); + public static final Tag MISC_SPECIAL_FLOWERS = tag("misc_special_flowers"); + public static final Tag FUNCTIONAL_SPECIAL_FLOWERS = tag("functional_special_flowers"); + public static final Tag GENERATING_SPECIAL_FLOWERS = tag("generating_special_flowers"); + + public static final Tag FLOATING_FLOWERS = tag("floating_flowers"); + public static final Tag MUNDANE_FLOATING_FLOWERS = tag("mundane_floating_flowers"); + public static final Tag SPECIAL_FLOATING_FLOWERS = tag("special_floating_flowers"); + + public static final Tag LIVINGROCK = tag("livingrock"); + public static final Tag LIVINGWOOD = tag("livingwood"); + + public static final Tag GAIA_BREAK_BLACKLIST = tag("gaia_break_blacklist"); + public static final Tag MAGNET_RING_BLACKLIST = tag("magnet_ring_blacklist"); + + public static final Tag PEBBLE_SOURCES = tag("pebble_sources"); + public static final Tag TERRAFORMABLE = tag("terraformable"); + + private static Tag tag(String name) { + return new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, name)); + } + } + + public static class Entities { + public static final Tag> SHADED_MESA_BLACKLIST = tag("shaded_mesa_blacklist"); + + private static Tag> tag(String name) { + return new EntityTypeTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, name)); + } + } +} + diff --git a/src/main/java/vazkii/botania/common/world/SkyblockWorldEvents.java b/src/main/java/vazkii/botania/common/world/SkyblockWorldEvents.java index d173852a8..41dcc2a73 100644 --- a/src/main/java/vazkii/botania/common/world/SkyblockWorldEvents.java +++ b/src/main/java/vazkii/botania/common/world/SkyblockWorldEvents.java @@ -20,10 +20,7 @@ import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.Tag; import net.minecraft.util.ActionResultType; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceContext; @@ -41,7 +38,7 @@ import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.tile.TileManaFlame; import vazkii.botania.common.item.ModItems; import vazkii.botania.common.item.equipment.tool.ToolCommons; -import vazkii.botania.common.lib.LibMisc; +import vazkii.botania.common.lib.ModTags; import java.awt.Color; @@ -54,7 +51,6 @@ public final class SkyblockWorldEvents { private static final String TAG_ISLAND_X = "Botania-IslandX"; private static final String TAG_ISLAND_Y = "Botania-IslandY"; private static final String TAG_ISLAND_Z = "Botania-IslandZ"; - private static final Tag PEBBLE_SOURCES = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "pebble_sources")); @SubscribeEvent public static void onPlayerUpdate(LivingUpdateEvent event) { @@ -94,7 +90,7 @@ public final class SkyblockWorldEvents { BlockState state = event.getWorld().getBlockState(event.getPos()); Block block = state.getBlock(); - if(PEBBLE_SOURCES.contains(block)) { + if(ModTags.Blocks.PEBBLE_SOURCES.contains(block)) { SoundType st = state.getSoundType(event.getWorld(), event.getPos(), player); player.playSound(st.getBreakSound(), st.getVolume() * 0.4F, st.getPitch() + (float) (Math.random() * 0.2 - 0.1)); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 99c139e2c..9d52028a6 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -30,6 +30,6 @@ Botania is a mod that adds nature magic to Minecraft [[dependencies.botania]] modId="curios" mandatory=true - versionRange="[FORGE-1.14.4-0.25,)" + versionRange="[FORGE-1.14.4-1.0.2,)" ordering="AFTER" side="BOTH" \ No newline at end of file diff --git a/src/main/resources/data/curios/tags/items/charm.json b/src/main/resources/data/curios/tags/items/charm.json index 816c7c5e2..ef3c3701f 100644 --- a/src/main/resources/data/curios/tags/items/charm.json +++ b/src/main/resources/data/curios/tags/items/charm.json @@ -1,15 +1,9 @@ { "replace": false, "values": [ - "botania:blood_pendant", - "botania:cloud_pendant", "botania:diva_charm", "botania:goddess_charm", - "botania:ice_pendant", - "botania:lava_pendant", "botania:monocle", - "botania:super_cloud_pendant", - "botania:super_lava_pendant", "botania:tiny_planet" ] } \ No newline at end of file diff --git a/src/main/resources/data/curios/tags/items/trinket.json b/src/main/resources/data/curios/tags/items/curio.json similarity index 97% rename from src/main/resources/data/curios/tags/items/trinket.json rename to src/main/resources/data/curios/tags/items/curio.json index 39ee3b541..65d113ec1 100644 --- a/src/main/resources/data/curios/tags/items/trinket.json +++ b/src/main/resources/data/curios/tags/items/curio.json @@ -1,38 +1,38 @@ -{ - "replace": false, - "values": [ - "botania:cosmetic_black_bowtie", - "botania:cosmetic_black_tie", - "botania:cosmetic_red_glasses", - "botania:cosmetic_puffy_scarf", - "botania:cosmetic_engineer_goggles", - "botania:cosmetic_eyepatch", - "botania:cosmetic_wicked_eyepatch", - "botania:cosmetic_red_ribbons", - "botania:cosmetic_pink_flower_bud", - "botania:cosmetic_polka_dotted_bows", - "botania:cosmetic_blue_butterfly", - "botania:cosmetic_cat_ears", - "botania:cosmetic_witch_pin", - "botania:cosmetic_devil_tail", - "botania:cosmetic_kamui_eye", - "botania:cosmetic_googly_eyes", - "botania:cosmetic_four_leaf_clover", - "botania:cosmetic_clock_eye", - "botania:cosmetic_unicorn_horn", - "botania:cosmetic_devil_horns", - "botania:cosmetic_hyper_plus", - "botania:cosmetic_botanist_emblem", - "botania:cosmetic_ancient_mask", - "botania:cosmetic_eerie_mask", - "botania:cosmetic_alien_antenna", - "botania:cosmetic_anaglyph_glasses", - "botania:cosmetic_orange_shades", - "botania:cosmetic_groucho_glasses", - "botania:cosmetic_thick_eyebrows", - "botania:cosmetic_lusitanic_shield", - "botania:cosmetic_tiny_potato_mask", - "botania:cosmetic_questgiver_mark", - "botania:cosmetic_thinking_hand" - ] +{ + "replace": false, + "values": [ + "botania:cosmetic_black_bowtie", + "botania:cosmetic_black_tie", + "botania:cosmetic_red_glasses", + "botania:cosmetic_puffy_scarf", + "botania:cosmetic_engineer_goggles", + "botania:cosmetic_eyepatch", + "botania:cosmetic_wicked_eyepatch", + "botania:cosmetic_red_ribbons", + "botania:cosmetic_pink_flower_bud", + "botania:cosmetic_polka_dotted_bows", + "botania:cosmetic_blue_butterfly", + "botania:cosmetic_cat_ears", + "botania:cosmetic_witch_pin", + "botania:cosmetic_devil_tail", + "botania:cosmetic_kamui_eye", + "botania:cosmetic_googly_eyes", + "botania:cosmetic_four_leaf_clover", + "botania:cosmetic_clock_eye", + "botania:cosmetic_unicorn_horn", + "botania:cosmetic_devil_horns", + "botania:cosmetic_hyper_plus", + "botania:cosmetic_botanist_emblem", + "botania:cosmetic_ancient_mask", + "botania:cosmetic_eerie_mask", + "botania:cosmetic_alien_antenna", + "botania:cosmetic_anaglyph_glasses", + "botania:cosmetic_orange_shades", + "botania:cosmetic_groucho_glasses", + "botania:cosmetic_thick_eyebrows", + "botania:cosmetic_lusitanic_shield", + "botania:cosmetic_tiny_potato_mask", + "botania:cosmetic_questgiver_mark", + "botania:cosmetic_thinking_hand" + ] } \ No newline at end of file diff --git a/src/main/resources/data/curios/tags/items/necklace.json b/src/main/resources/data/curios/tags/items/necklace.json new file mode 100644 index 000000000..be3c43046 --- /dev/null +++ b/src/main/resources/data/curios/tags/items/necklace.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "botania:blood_pendant", + "botania:cloud_pendant", + "botania:ice_pendant", + "botania:lava_pendant", + "botania:super_cloud_pendant", + "botania:super_lava_pendant" + ] +} \ No newline at end of file