mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
First pass: Restore GoG, clean up some lexicon stuff
This commit is contained in:
1 parent
a641aed1b2
commit
da5918e46c
45 files changed
+484
-165
No files matched your search
@@ -122,7 +122,7 @@ public class RenderLexicon {
|
||||
|
||||
GlStateManager.translatef(0F, 10F, 0F);
|
||||
GlStateManager.scalef(0.6F, 0.6F, 0.6F);
|
||||
font.drawString(TextFormatting.ITALIC + "" + TextFormatting.BOLD + I18n.format("botaniamisc.edition", ItemLexicon.getEdition()), 0, 0, 0xA07100);
|
||||
font.drawString(TextFormatting.ITALIC + "" + TextFormatting.BOLD + ItemLexicon.getEdition(), 0, 0, 0xA07100);
|
||||
|
||||
if(quote == -1)
|
||||
quote = mc.world.rand.nextInt(QUOTES.length);
|
||||
|
||||
@@ -98,14 +98,8 @@ public class ItemLexicon extends ItemMod implements IElvenItem {
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, stack);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static String getEdition() {
|
||||
String version = getBook().version;
|
||||
try {
|
||||
return MathHelper.numberToOrdinal(Integer.parseInt(version));
|
||||
} catch (NumberFormatException e) {
|
||||
return I18n.format("botaniamisc.devEdition");
|
||||
}
|
||||
return getBook().contents.getSubtitle();
|
||||
}
|
||||
|
||||
public static ITextComponent getTitle(ItemStack stack) {
|
||||
|
||||
@@ -57,6 +57,8 @@ public class ModTags {
|
||||
public static final Tag<Item> DISPOSABLE = tag("disposable");
|
||||
public static final Tag<Item> SEMI_DISPOSABLE = tag("semi_disposable");
|
||||
|
||||
public static final Tag<Item> DYES = tag("dyes");
|
||||
|
||||
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");
|
||||
|
||||
@@ -2,11 +2,17 @@ package vazkii.botania.data;
|
||||
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.ItemTagsProvider;
|
||||
import net.minecraft.item.DyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tags.Tag;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.ModTags;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
||||
public class ItemTagProvider extends ItemTagsProvider {
|
||||
public ItemTagProvider(DataGenerator generatorIn) {
|
||||
@@ -25,6 +31,9 @@ public class ItemTagProvider extends ItemTagsProvider {
|
||||
this.copy(ModTags.Blocks.FLOATING_FLOWERS, ModTags.Items.FLOATING_FLOWERS);
|
||||
this.copy(ModTags.Blocks.DOUBLE_MYSTICAL_FLOWERS, ModTags.Items.DOUBLE_MYSTICAL_FLOWERS);
|
||||
this.copy(ModTags.Blocks.MYSTICAL_FLOWERS, ModTags.Items.MYSTICAL_FLOWERS);
|
||||
|
||||
Tag.Builder<Item> builder = getBuilder(ModTags.Items.DYES);
|
||||
Arrays.stream(DyeColor.values()).map(ModItems::getDye).sorted(Comparator.comparing(Item::getRegistryName)).forEach(builder::add);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
Reference in new issue
Block a user