mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Added the Bergamute
This commit is contained in:
26 files changed
+447
-258
No files matched your search
@@ -52,6 +52,14 @@ public class SubTileEntity {
|
||||
public static final String TAG_TYPE = "type";
|
||||
public static final String TAG_TICKS_EXISTED = "ticksExisted";
|
||||
|
||||
public final BlockPos getPos() {
|
||||
return supertile.getPos();
|
||||
}
|
||||
|
||||
public final World getWorld() {
|
||||
return supertile.getWorld();
|
||||
}
|
||||
|
||||
public void setSupertile(TileEntity tile) {
|
||||
supertile = tile;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.awt.*;
|
||||
*/
|
||||
public class SubTileFunctional extends SubTileEntity {
|
||||
|
||||
public static final int RANGE = 10;
|
||||
public static final int LINK_RANGE = 10;
|
||||
|
||||
private static final String TAG_MANA = "mana";
|
||||
|
||||
@@ -117,7 +117,7 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
|
||||
int size = network.getAllPoolsInWorld(supertile.getWorld()).size();
|
||||
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
|
||||
linkedPool = network.getClosestPool(supertile.getPos(), supertile.getWorld(), RANGE);
|
||||
linkedPool = network.getClosestPool(supertile.getPos(), supertile.getWorld(), LINK_RANGE);
|
||||
sizeLastCheck = size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ import java.util.List;
|
||||
*/
|
||||
public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
public static final int RANGE = 6;
|
||||
public static final int LINK_RANGE = 6;
|
||||
|
||||
private static final String TAG_MANA = "mana";
|
||||
|
||||
@@ -142,7 +142,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
|
||||
int size = network.getAllCollectorsInWorld(supertile.getWorld()).size();
|
||||
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
|
||||
linkedCollector = network.getClosestCollector(supertile.getPos(), supertile.getWorld(), RANGE);
|
||||
linkedCollector = network.getClosestCollector(supertile.getPos(), supertile.getWorld(), LINK_RANGE);
|
||||
sizeLastCheck = size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ import vazkii.botania.common.block.subtile.SubTileManastar;
|
||||
import vazkii.botania.common.block.subtile.SubTilePureDaisy;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileAgricarnation;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBellethorn;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBergamute;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBubbell;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileClayconia;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileDaffomill;
|
||||
@@ -277,6 +278,7 @@ public final class ModelHandler {
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileBubbell.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_BUBBELL + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileSolegnolia.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileSolegnolia.Mini.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA + "Chibi"));
|
||||
BotaniaAPIClient.registerSubtileModel(SubTileBergamute.class, new ModelResourceLocation("botania:" + LibBlockNames.SUBTILE_SOLEGNOLIA)); // todo model
|
||||
}
|
||||
|
||||
private static void registerStandardBlocks() {
|
||||
|
||||
@@ -106,6 +106,7 @@ import vazkii.botania.client.render.tile.RenderTileTeruTeruBozu;
|
||||
import vazkii.botania.client.render.tile.RenderTileTinyPotato;
|
||||
import vazkii.botania.client.render.world.SkyblockRenderEvents;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.subtile.functional.BergamuteEventHandler;
|
||||
import vazkii.botania.common.block.tile.TileAlfPortal;
|
||||
import vazkii.botania.common.block.tile.TileAltar;
|
||||
import vazkii.botania.common.block.tile.TileAvatar;
|
||||
@@ -211,6 +212,7 @@ public class ClientProxy extends CommonProxy {
|
||||
MinecraftForge.EVENT_BUS.register(new SkyblockRenderEvents());
|
||||
MinecraftForge.EVENT_BUS.register(new RenderLexicon());
|
||||
MinecraftForge.EVENT_BUS.register(new BossBarHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new BergamuteEventHandler());
|
||||
|
||||
if(ConfigHandler.useAdaptativeConfig)
|
||||
MinecraftForge.EVENT_BUS.register(new AdaptorNotifier());
|
||||
|
||||
@@ -28,7 +28,7 @@ import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonBack;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonInvisible;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonPage;
|
||||
import vazkii.botania.common.lexicon.DLexiconEntry;
|
||||
import vazkii.botania.common.lexicon.DogLexiconEntry;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -160,7 +160,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
if(entry == tutEntry)
|
||||
tutPage = page;
|
||||
|
||||
if(entry instanceof DLexiconEntry)
|
||||
if(entry instanceof DogLexiconEntry)
|
||||
button.dog = true;
|
||||
} else button.displayString = "";
|
||||
}
|
||||
|
||||
@@ -114,13 +114,13 @@ public class BlockSpecialFlower extends BlockFlower implements ISpecialFlower, I
|
||||
LibBlockNames.SUBTILE_VINCULOTUS,
|
||||
LibBlockNames.SUBTILE_SPECTRANTHEMUM,
|
||||
LibBlockNames.SUBTILE_BUBBELL,
|
||||
LibBlockNames.SUBTILE_SOLEGNOLIA));
|
||||
LibBlockNames.SUBTILE_SOLEGNOLIA,
|
||||
LibBlockNames.SUBTILE_BERGAMUTE));
|
||||
}
|
||||
|
||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.3, 0, 0.3, 0.8, 1, 0.8);
|
||||
|
||||
protected BlockSpecialFlower() {
|
||||
super();
|
||||
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.SPECIAL_FLOWER));
|
||||
GameRegistry.register(new ItemBlockSpecialFlower(this), getRegistryName());
|
||||
setUnlocalizedName(LibBlockNames.SPECIAL_FLOWER);
|
||||
|
||||
@@ -84,6 +84,7 @@ import vazkii.botania.common.block.subtile.SubTileManastar;
|
||||
import vazkii.botania.common.block.subtile.SubTilePureDaisy;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileAgricarnation;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBellethorn;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBergamute;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBubbell;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileClayconia;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileDaffomill;
|
||||
@@ -507,6 +508,7 @@ public final class ModBlocks {
|
||||
registerSubTileWithMini(LibBlockNames.SUBTILE_MARIMORPHOSIS, SubTileMarimorphosis.class);
|
||||
registerSubTileWithMini(LibBlockNames.SUBTILE_BUBBELL, SubTileBubbell.class);
|
||||
registerSubTileWithMini(LibBlockNames.SUBTILE_SOLEGNOLIA, SubTileSolegnolia.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_BERGAMUTE, SubTileBergamute.class);
|
||||
}
|
||||
|
||||
public static void registerMultiparts() {
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.Sound;
|
||||
import net.minecraft.client.audio.SoundEventAccessor;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraftforge.client.event.sound.PlaySoundEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class BergamuteEventHandler {
|
||||
private static final Random RAND = new Random();
|
||||
private static final float MULTIPLIER = 0.1F;
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onSoundEvent(PlaySoundEvent evt) {
|
||||
ISound sound = evt.getResultSound();
|
||||
|
||||
if (sound != null && shouldSilence(sound.getCategory())) {
|
||||
SubTileBergamute berg = SubTileBergamute.getBergamuteNearby(sound.getXPosF(), sound.getYPosF(), sound.getZPosF());
|
||||
|
||||
if (berg != null) {
|
||||
evt.setResultSound(new WrappedSound(sound, MULTIPLIER));
|
||||
|
||||
if (RAND.nextBoolean()) {
|
||||
Color color = new Color(berg.getColor());
|
||||
BotaniaAPI.internalHandler.sparkleFX(berg.getWorld(), berg.getPos().getX() + 0.3 + Math.random() * 0.5, berg.getPos().getY() + 0.5 + Math.random() * 0.5, berg.getPos().getZ() + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean shouldSilence(SoundCategory category) {
|
||||
return category != SoundCategory.VOICE && category != SoundCategory.MUSIC;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static class WrappedSound implements ISound {
|
||||
|
||||
private final ISound compose;
|
||||
private final float volMult;
|
||||
|
||||
private WrappedSound(ISound toWrap, float volMult) {
|
||||
this.compose = toWrap;
|
||||
this.volMult = volMult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getVolume() {
|
||||
return compose.getVolume() * volMult;
|
||||
}
|
||||
|
||||
@Nonnull @Override public ResourceLocation getSoundLocation() { return compose.getSoundLocation(); }
|
||||
@Nullable @Override public SoundEventAccessor createAccessor(SoundHandler handler) { return compose.createAccessor(handler); }
|
||||
@Nonnull @Override public Sound getSound() {
|
||||
return compose.getSound();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public SoundCategory getCategory() {
|
||||
return compose.getCategory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRepeat() {
|
||||
return compose.canRepeat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRepeatDelay() {
|
||||
return compose.getRepeatDelay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getPitch() {
|
||||
return compose.getPitch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getXPosF() {
|
||||
return compose.getXPosF();
|
||||
}
|
||||
@Override public float getYPosF() { return compose.getYPosF(); }
|
||||
@Override public float getZPosF() { return compose.getZPosF(); }
|
||||
@Nonnull @Override public AttenuationType getAttenuationType() { return compose.getAttenuationType(); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
public class SubTileBergamute extends SubTileFunctional {
|
||||
private static final int RANGE = 4;
|
||||
private static final Set<SubTileBergamute> existingFlowers = Collections.newSetFromMap(new WeakHashMap<>());
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if (supertile.getWorld().isRemote) {
|
||||
if(!existingFlowers.contains(this)) {
|
||||
existingFlowers.add(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// todo seems expensive when we have lots of sounds cache maybe?
|
||||
protected static SubTileBergamute getBergamuteNearby(float x, float y, float z) {
|
||||
return existingFlowers.stream()
|
||||
.filter(f -> f.redstoneSignal == 0)
|
||||
.filter(f -> f.supertile.getWorld().getTileEntity(f.supertile.getPos()) == f.supertile)
|
||||
.filter(f -> f.supertile.getDistanceSq(x, y, z) <= RANGE * RANGE)
|
||||
.findAny().orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x1FCBFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadiusDescriptor getRadius() {
|
||||
return new RadiusDescriptor.Circle(toBlockPos(), RANGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.bergamute;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -75,6 +75,7 @@ public final class ModPetalRecipes {
|
||||
public static RecipePetals marimorphosisRecipe;
|
||||
public static RecipePetals bubbellRecipe;
|
||||
public static RecipePetals solegnoliaRecipe;
|
||||
public static RecipePetals bergamuteRecipe;
|
||||
|
||||
public static void init() {
|
||||
pureDaisyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY), white, white, white, white);
|
||||
@@ -125,6 +126,7 @@ public final class ModPetalRecipes {
|
||||
marimorphosisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MARIMORPHOSIS), gray, yellow, green, red, runeEarth, runeFire, redstoneRoot);
|
||||
bubbellRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BUBBELL), cyan, cyan, lightBlue, lightBlue, blue, blue, runeWater, runeSummer, pixieDust);
|
||||
solegnoliaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SOLEGNOLIA), brown, brown, red, blue, redstoneRoot);
|
||||
bergamuteRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BERGAMUTE), orange, green, green, redstoneRoot); // todo temporary
|
||||
|
||||
ItemStack stack = new ItemStack(Items.SKULL, 1, 3);
|
||||
ItemNBTHelper.setString(stack, "SkullOwner", "Vazkii");
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ItemObedienceStick extends ItemMod {
|
||||
if(tileAt != null && (tileAt instanceof IManaPool || tileAt instanceof IManaCollector)) {
|
||||
boolean pool = tileAt instanceof IManaPool;
|
||||
Actuator act = pool ? Actuator.functionalActuator : Actuator.generatingActuator;
|
||||
int range = pool ? SubTileFunctional.RANGE : SubTileGenerating.RANGE;
|
||||
int range = pool ? SubTileFunctional.LINK_RANGE : SubTileGenerating.LINK_RANGE;
|
||||
|
||||
for(int i = -range; i < range + 1; i++)
|
||||
for(int j = -range; j < range + 1; j++)
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package vazkii.botania.common.lexicon;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
|
||||
public class ALexiconEntry extends BLexiconEntry {
|
||||
public class AlfheimLexiconEntry extends BasicLexiconEntry {
|
||||
|
||||
public ALexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
public AlfheimLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
super(unlocalizedName, category);
|
||||
setKnowledgeType(BotaniaAPI.elvenKnowledge);
|
||||
}
|
||||
+3
-3
@@ -18,9 +18,9 @@ import vazkii.botania.api.lexicon.LexiconPage;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BLexiconEntry extends LexiconEntry {
|
||||
public class BasicLexiconEntry extends LexiconEntry {
|
||||
|
||||
public BLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
public BasicLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
super(unlocalizedName, category);
|
||||
BotaniaAPI.addEntry(this, category);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class BLexiconEntry extends LexiconEntry {
|
||||
|
||||
@Override
|
||||
public int compareTo(@Nonnull LexiconEntry o) {
|
||||
return o instanceof WLexiconEntry ? 1 : super.compareTo(o);
|
||||
return o instanceof WelcomeLexiconEntry ? 1 : super.compareTo(o);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -14,11 +14,11 @@ import vazkii.botania.api.lexicon.IAddonEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class CLexiconEntry extends BLexiconEntry implements IAddonEntry {
|
||||
public class CompatLexiconEntry extends BasicLexiconEntry implements IAddonEntry {
|
||||
|
||||
final String mod;
|
||||
|
||||
public CLexiconEntry(String unlocalizedName, LexiconCategory category, String mod) {
|
||||
public CompatLexiconEntry(String unlocalizedName, LexiconCategory category, String mod) {
|
||||
super(unlocalizedName, category);
|
||||
this.mod = mod;
|
||||
}
|
||||
+2
-2
@@ -15,9 +15,9 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.client.core.handler.PersistentVariableHelper;
|
||||
|
||||
public class DLexiconEntry extends BLexiconEntry {
|
||||
public class DogLexiconEntry extends BasicLexiconEntry {
|
||||
|
||||
public DLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
public DogLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
super(unlocalizedName, category);
|
||||
}
|
||||
|
||||
+2
-2
@@ -12,9 +12,9 @@ package vazkii.botania.common.lexicon;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
|
||||
public class HLexiconEntry extends ALexiconEntry {
|
||||
public class HeadLexiconEntry extends AlfheimLexiconEntry {
|
||||
|
||||
public HLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
public HeadLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
super(unlocalizedName, category);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -18,11 +18,11 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
|
||||
public class RLexiconEntry extends BLexiconEntry {
|
||||
public class RelicLexiconEntry extends BasicLexiconEntry {
|
||||
|
||||
final Achievement a;
|
||||
|
||||
public RLexiconEntry(String unlocalizedName, LexiconCategory category, Achievement a) {
|
||||
public RelicLexiconEntry(String unlocalizedName, LexiconCategory category, Achievement a) {
|
||||
super(unlocalizedName, category);
|
||||
setKnowledgeType(BotaniaAPI.relicKnowledge);
|
||||
this.a = a;
|
||||
+2
-2
@@ -16,9 +16,9 @@ import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.lexicon.page.PageTutorial;
|
||||
import vazkii.botania.common.lib.LibLexicon;
|
||||
|
||||
public class TLexiconEntry extends BLexiconEntry {
|
||||
public class TutLexiconEntry extends BasicLexiconEntry {
|
||||
|
||||
public TLexiconEntry() {
|
||||
public TutLexiconEntry() {
|
||||
super(LibLexicon.BASICS_TUTORIAL, BotaniaAPI.categoryBasics);
|
||||
setPriority();
|
||||
setIcon(new ItemStack(Items.BOOK));
|
||||
@@ -13,7 +13,7 @@ package vazkii.botania.common.lexicon;
|
||||
import vazkii.botania.api.lexicon.IAddonEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
|
||||
public class WIPLexiconEntry extends BLexiconEntry implements IAddonEntry {
|
||||
public class WIPLexiconEntry extends BasicLexiconEntry implements IAddonEntry {
|
||||
|
||||
public WIPLexiconEntry(String unlocalizedName, LexiconCategory category) {
|
||||
super(unlocalizedName, category);
|
||||
|
||||
+2
-2
@@ -20,11 +20,11 @@ import vazkii.botania.common.lib.LibLexicon;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class WLexiconEntry extends BLexiconEntry {
|
||||
public class WelcomeLexiconEntry extends BasicLexiconEntry {
|
||||
|
||||
private static final int PAGES = 7;
|
||||
|
||||
public WLexiconEntry() {
|
||||
public WelcomeLexiconEntry() {
|
||||
super(LibLexicon.BASICS_WELCOME, BotaniaAPI.categoryBasics);
|
||||
setPriority();
|
||||
setIcon(new ItemStack(ModItems.cosmetic, 1, 31));
|
||||
@@ -117,13 +117,12 @@ public class PageText extends LexiconPage {
|
||||
font.setUnicodeFlag(unicode);
|
||||
}
|
||||
|
||||
public static String getControlCodes(String s) {
|
||||
private static String getControlCodes(String s) {
|
||||
String controls = s.replaceAll("(?<!\u00a7)(.)", "");
|
||||
String wiped = controls.replaceAll(".*r", "r");
|
||||
return wiped;
|
||||
return controls.replaceAll(".*r", "r");
|
||||
}
|
||||
|
||||
public static String toControlCodes(String s) {
|
||||
private static String toControlCodes(String s) {
|
||||
return s.replaceAll(".", "\u00a7$0");
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ public final class LibBlockNames {
|
||||
public static final String SUBTILE_RAFFLOWSIA = "rafflowsia";
|
||||
|
||||
public static final String SUBTILE_BELLETHORN = "bellethorn";
|
||||
public static final String SUBTILE_BERGAMUTE = "bergamute";
|
||||
public static final String SUBTILE_DREADTHORN = "dreadthorn";
|
||||
public static final String SUBTILE_HEISEI_DREAM = "heiseiDream";
|
||||
public static final String SUBTILE_TIGERSEYE = "tigerseye";
|
||||
|
||||
@@ -90,6 +90,7 @@ public final class LibLexicon {
|
||||
public static final String FFLOWER_MARIMORPHOSIS = "marimorphosis";
|
||||
public static final String FFLOWER_BUBBELL = "bubbell";
|
||||
public static final String FFLOWER_SOLEGNOLIA = "solegnolia";
|
||||
public static final String FFLOWER_BERGAMUTE = "bergamute";
|
||||
|
||||
public static final String GFLOWER_INTRO = "gIntro";
|
||||
public static final String GFLOWER_PASSIVE_GENERATION = "passiveGen";
|
||||
|
||||
Reference in new issue
Block a user