mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Merge pull request #2986 from Hubry/tags
Some minor tag handling cleanup
This commit is contained in:
15 files changed
+224
-163
No files matched your search
@@ -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<AbstractCli
|
||||
public static final Map<String, ItemStack> flowerMap = new HashMap<>();
|
||||
private static boolean startedLoading = false;
|
||||
|
||||
private static final Tag<Item> FLOWERS = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "special_flowers"));
|
||||
private static final ImmutableMap<String, String> LEGACY_FLOWER_NAMES = ImmutableMap.<String, String>builder()
|
||||
.put("puredaisy", LibBlockNames.SUBTILE_PUREDAISY.getPath())
|
||||
.put("fallenkanade", LibBlockNames.SUBTILE_FALLEN_KANADE.getPath())
|
||||
@@ -121,7 +117,7 @@ public final class ContributorFancinessHandler extends LayerRenderer<AbstractCli
|
||||
String rawName = value.toLowerCase(Locale.ROOT);
|
||||
String flowerName = LEGACY_FLOWER_NAMES.getOrDefault(rawName, rawName);
|
||||
|
||||
Item item = FLOWERS.getAllElements().stream()
|
||||
Item item = ModTags.Items.SPECIAL_FLOWERS.getAllElements().stream()
|
||||
.filter(flower -> flower.getRegistryName().getPath().equals(flowerName))
|
||||
.findFirst().orElse(Items.POPPY);
|
||||
flowerMap.put(key, new ItemStack(item));
|
||||
|
||||
@@ -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<Block> 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);
|
||||
|
||||
|
||||
@@ -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<Item> 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);
|
||||
|
||||
@@ -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<Block> 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 {
|
||||
|
||||
@@ -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)));
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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)));
|
||||
|
||||
|
||||
@@ -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<Block> BLACKLIST = new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "gaia_break_blacklist"));
|
||||
private static final Tag<Block> BLACKLIST = ModTags.Blocks.GAIA_BREAK_BLACKLIST;
|
||||
|
||||
private static final DataParameter<Integer> INVUL_TIME = EntityDataManager.createKey(EntityDoppleganger.class, DataSerializers.VARINT);
|
||||
|
||||
|
||||
@@ -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<Item> GENERATING = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "generating_special_flowers"));
|
||||
private static final Tag<Item> FUNCTIONAL = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "functional_special_flowers"));
|
||||
private static final Tag<Item> MISC = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "misc_special_flowers"));
|
||||
private static final Tag<Item> GENERATING = ModTags.Items.GENERATING_SPECIAL_FLOWERS;
|
||||
private static final Tag<Item> FUNCTIONAL = ModTags.Items.FUNCTIONAL_SPECIAL_FLOWERS;
|
||||
private static final Tag<Item> MISC = ModTags.Items.MISC_SPECIAL_FLOWERS;
|
||||
|
||||
public ItemBlockSpecialFlower(Block block1, Properties props) {
|
||||
super(block1, props);
|
||||
|
||||
@@ -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<Item> BLACKLIST = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "magnet_ring_blacklist"));
|
||||
private static final Tag<Block> 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;
|
||||
|
||||
+4
-11
@@ -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<Item> DISPOSABLE = new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "disposable"));
|
||||
private static final Tag<Item> 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());
|
||||
}
|
||||
}
|
||||
@@ -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<EntityType<?>> BLACKLIST = new EntityTypeTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, "shaded_mesa_blacklist"));
|
||||
private static final Tag<EntityType<?>> BLACKLIST = ModTags.Entities.SHADED_MESA_BLACKLIST;
|
||||
private static final float RANGE = 3F;
|
||||
private static final int COST = 2;
|
||||
|
||||
|
||||
@@ -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<Block> 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<BlockPos> airBlocks = new ArrayList<>();
|
||||
|
||||
for(Direction dir : MathHelper.HORIZONTALS) {
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
/**
|
||||
* This class was created by <Hubry>. 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<Item> DUSTS_MANA = forgeTag("dusts/mana");
|
||||
|
||||
public static final Tag<Item> GEMS_DRAGONSTONE = forgeTag("gems/dragonstone");
|
||||
public static final Tag<Item> GEMS_MANA_DIAMOND = forgeTag("gems/mana_diamond");
|
||||
|
||||
public static final Tag<Item> INGOTS_ELEMENTIUM = forgeTag("ingots/elementium");
|
||||
public static final Tag<Item> INGOTS_MANASTEEL = forgeTag("ingots/manasteel");
|
||||
public static final Tag<Item> INGOTS_TERRASTEEL = forgeTag("ingots/terrasteel");
|
||||
|
||||
public static final Tag<Item> NUGGETS_ELEMENTIUM = forgeTag("nuggets/elementium");
|
||||
public static final Tag<Item> NUGGETS_MANASTEEL = forgeTag("nuggets/manasteel");
|
||||
public static final Tag<Item> NUGGETS_TERRASTEEL = forgeTag("nuggets/terrasteel");
|
||||
|
||||
public static final Tag<Item> MYSTICAL_FLOWERS = tag("mystical_flowers");
|
||||
|
||||
public static final Tag<Item> SPECIAL_FLOWERS = tag("special_flowers");
|
||||
public static final Tag<Item> MINI_FLOWERS = tag("mini_flowers");
|
||||
public static final Tag<Item> MISC_SPECIAL_FLOWERS = tag("misc_special_flowers");
|
||||
public static final Tag<Item> FUNCTIONAL_SPECIAL_FLOWERS = tag("functional_special_flowers");
|
||||
public static final Tag<Item> GENERATING_SPECIAL_FLOWERS = tag("generating_special_flowers");
|
||||
|
||||
public static final Tag<Item> FLOATING_FLOWERS = tag("floating_flowers");
|
||||
public static final Tag<Item> MUNDANE_FLOATING_FLOWERS = tag("mundane_floating_flowers");
|
||||
public static final Tag<Item> SPECIAL_FLOATING_FLOWERS = tag("special_floating_flowers");
|
||||
|
||||
public static final Tag<Item> LENS = tag("lens");
|
||||
public static final Tag<Item> LIVINGROCK = tag("livingrock");
|
||||
public static final Tag<Item> LIVINGWOOD = tag("livingwood");
|
||||
|
||||
public static final Tag<Item> MAGNET_RING_BLACKLIST = tag("magnet_ring_blacklist");
|
||||
public static final Tag<Item> LOONIUM_BLACKLIST = tag("loonium_blacklist");
|
||||
|
||||
public static final Tag<Item> DISPOSABLE = tag("disposable");
|
||||
public static final Tag<Item> SEMI_DISPOSABLE = tag("semi_disposable");
|
||||
|
||||
public static final Tag<Item> FLOWERS = tag("flowers");
|
||||
|
||||
public static final Tag<Item> FLOWERS_BLACK = tag("flowers/black");
|
||||
public static final Tag<Item> FLOWERS_BLUE = tag("flowers/blue");
|
||||
public static final Tag<Item> FLOWERS_BROWN = tag("flowers/brown");
|
||||
public static final Tag<Item> FLOWERS_CYAN = tag("flowers/cyan");
|
||||
public static final Tag<Item> FLOWERS_GRAY = tag("flowers/gray");
|
||||
public static final Tag<Item> FLOWERS_GREEN = tag("flowers/green");
|
||||
public static final Tag<Item> FLOWERS_LIGHT_BLUE = tag("flowers/light_blue");
|
||||
public static final Tag<Item> FLOWERS_LIGHT_GRAY = tag("flowers/light_gray");
|
||||
public static final Tag<Item> FLOWERS_LIME = tag("flowers/lime");
|
||||
public static final Tag<Item> FLOWERS_MAGENTA = tag("flowers/magenta");
|
||||
public static final Tag<Item> FLOWERS_ORANGE = tag("flowers/orange");
|
||||
public static final Tag<Item> FLOWERS_PINK = tag("flowers/pink");
|
||||
public static final Tag<Item> FLOWERS_PURPLE = tag("flowers/purple");
|
||||
public static final Tag<Item> FLOWERS_RED = tag("flowers/red");
|
||||
public static final Tag<Item> FLOWERS_WHITE = tag("flowers/white");
|
||||
public static final Tag<Item> FLOWERS_YELLOW = tag("flowers/yellow");
|
||||
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_BLACK = tag("double_flowers/black");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_BLUE = tag("double_flowers/blue");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_BROWN = tag("double_flowers/brown");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_CYAN = tag("double_flowers/cyan");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_GRAY = tag("double_flowers/gray");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_GREEN = tag("double_flowers/green");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_LIGHT_BLUE = tag("double_flowers/light_blue");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_LIGHT_GRAY = tag("double_flowers/light_gray");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_LIME = tag("double_flowers/lime");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_MAGENTA = tag("double_flowers/magenta");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_ORANGE = tag("double_flowers/orange");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_PINK = tag("double_flowers/pink");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_PURPLE = tag("double_flowers/purple");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_RED = tag("double_flowers/red");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_WHITE = tag("double_flowers/white");
|
||||
public static final Tag<Item> DOUBLE_FLOWERS_YELLOW = tag("double_flowers/yellow");
|
||||
|
||||
public static final Tag<Item> PETALS = tag("petals");
|
||||
|
||||
public static final Tag<Item> PETALS_BLACK = tag("petals/black");
|
||||
public static final Tag<Item> PETALS_BLUE = tag("petals/blue");
|
||||
public static final Tag<Item> PETALS_BROWN = tag("petals/brown");
|
||||
public static final Tag<Item> PETALS_CYAN = tag("petals/cyan");
|
||||
public static final Tag<Item> PETALS_GRAY = tag("petals/gray");
|
||||
public static final Tag<Item> PETALS_GREEN = tag("petals/green");
|
||||
public static final Tag<Item> PETALS_LIGHT_BLUE = tag("petals/light_blue");
|
||||
public static final Tag<Item> PETALS_LIGHT_GRAY = tag("petals/light_gray");
|
||||
public static final Tag<Item> PETALS_LIME = tag("petals/lime");
|
||||
public static final Tag<Item> PETALS_MAGENTA = tag("petals/magenta");
|
||||
public static final Tag<Item> PETALS_ORANGE = tag("petals/orange");
|
||||
public static final Tag<Item> PETALS_PINK = tag("petals/pink");
|
||||
public static final Tag<Item> PETALS_PURPLE = tag("petals/purple");
|
||||
public static final Tag<Item> PETALS_RED = tag("petals/red");
|
||||
public static final Tag<Item> PETALS_WHITE = tag("petals/white");
|
||||
public static final Tag<Item> PETALS_YELLOW = tag("petals/yellow");
|
||||
|
||||
public static final Tag<Item> RUNES = tag("runes");
|
||||
|
||||
public static final Tag<Item> RUNES_AIR = tag("runes/air");
|
||||
public static final Tag<Item> RUNES_AUTUMN = tag("runes/autumn");
|
||||
public static final Tag<Item> RUNES_EARTH = tag("runes/earth");
|
||||
public static final Tag<Item> RUNES_ENVY = tag("runes/envy");
|
||||
public static final Tag<Item> RUNES_FIRE = tag("runes/fire");
|
||||
public static final Tag<Item> RUNES_GLUTTONY = tag("runes/gluttony");
|
||||
public static final Tag<Item> RUNES_GREED = tag("runes/greed");
|
||||
public static final Tag<Item> RUNES_LUST = tag("runes/lust");
|
||||
public static final Tag<Item> RUNES_MANA = tag("runes/mana");
|
||||
public static final Tag<Item> RUNES_PRIDE = tag("runes/pride");
|
||||
public static final Tag<Item> RUNES_SLOTH = tag("runes/sloth");
|
||||
public static final Tag<Item> RUNES_SPRING = tag("runes/spring");
|
||||
public static final Tag<Item> RUNES_SUMMER = tag("runes/summer");
|
||||
public static final Tag<Item> RUNES_WATER = tag("runes/water");
|
||||
public static final Tag<Item> RUNES_WINTER = tag("runes/winter");
|
||||
public static final Tag<Item> RUNES_WRATH = tag("runes/wrath");
|
||||
|
||||
private static Tag<Item> tag(String name) {
|
||||
return new ItemTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
}
|
||||
|
||||
private static Tag<Item> forgeTag(String name) {
|
||||
return new ItemTags.Wrapper(new ResourceLocation("forge", name));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Blocks {
|
||||
public static final Tag<Block> MYSTICAL_FLOWERS = tag("mystical_flowers");
|
||||
|
||||
public static final Tag<Block> SPECIAL_FLOWERS = tag("special_flowers");
|
||||
public static final Tag<Block> MINI_FLOWERS = tag("mini_flowers");
|
||||
public static final Tag<Block> MISC_SPECIAL_FLOWERS = tag("misc_special_flowers");
|
||||
public static final Tag<Block> FUNCTIONAL_SPECIAL_FLOWERS = tag("functional_special_flowers");
|
||||
public static final Tag<Block> GENERATING_SPECIAL_FLOWERS = tag("generating_special_flowers");
|
||||
|
||||
public static final Tag<Block> FLOATING_FLOWERS = tag("floating_flowers");
|
||||
public static final Tag<Block> MUNDANE_FLOATING_FLOWERS = tag("mundane_floating_flowers");
|
||||
public static final Tag<Block> SPECIAL_FLOATING_FLOWERS = tag("special_floating_flowers");
|
||||
|
||||
public static final Tag<Block> LIVINGROCK = tag("livingrock");
|
||||
public static final Tag<Block> LIVINGWOOD = tag("livingwood");
|
||||
|
||||
public static final Tag<Block> GAIA_BREAK_BLACKLIST = tag("gaia_break_blacklist");
|
||||
public static final Tag<Block> MAGNET_RING_BLACKLIST = tag("magnet_ring_blacklist");
|
||||
|
||||
public static final Tag<Block> PEBBLE_SOURCES = tag("pebble_sources");
|
||||
public static final Tag<Block> TERRAFORMABLE = tag("terraformable");
|
||||
|
||||
private static Tag<Block> tag(String name) {
|
||||
return new BlockTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Entities {
|
||||
public static final Tag<EntityType<?>> SHADED_MESA_BLACKLIST = tag("shaded_mesa_blacklist");
|
||||
|
||||
private static Tag<EntityType<?>> tag(String name) {
|
||||
return new EntityTypeTags.Wrapper(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<Block> 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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user