mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 17:44:55 +00:00
Compare commits
5
Commits
4.9.12
...
4.9.14-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4ce528b2d | ||
|
|
d863b3c311 | ||
|
|
255a71f3a1 | ||
|
|
66019fe027 | ||
|
|
5b2a65d2aa |
No files matched your search
+3
-3
@@ -2,9 +2,9 @@
|
||||
|
||||
dependencies {
|
||||
api('curse.maven:cofh-lib-220333:2388748')
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta4:api')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.33-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.6.2:api')
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta6:api')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.35-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.7.0:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly('curse.maven:craftguide-75557:2459320')
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
|
||||
}
|
||||
|
||||
|
||||
@@ -52,4 +52,8 @@ public interface IIndividual extends INBTTagable {
|
||||
IIndividual copy();
|
||||
|
||||
boolean isPureBred(IChromosomeType chromosomeType);
|
||||
|
||||
void addLore(List<String> text);
|
||||
|
||||
void addDiscoveredBy(List<String> text);
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -65,6 +66,7 @@ import forestry.core.errors.EnumErrorCode;
|
||||
import forestry.core.genetics.Chromosome;
|
||||
import forestry.core.genetics.GenericRatings;
|
||||
import forestry.core.genetics.IndividualLiving;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.GeneticsUtil;
|
||||
import forestry.core.utils.Log;
|
||||
import forestry.core.utils.StringUtil;
|
||||
@@ -376,6 +378,36 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
return suitableBiomes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLore(List<String> text) {
|
||||
IAlleleBeeSpecies primary = genome.getPrimary();
|
||||
String descTokens[] = primary.getDescription().split("\\|");
|
||||
|
||||
if (descTokens.length > 0) {
|
||||
String speciesLore = descTokens[0];
|
||||
if (!speciesLore.isEmpty() && !speciesLore.contains("for.description") && Proxies.common.isCtrlDown()) {
|
||||
FontRenderer fontRenderer = Proxies.common.getClientInstance().fontRenderer;
|
||||
String formattedLore = EnumChatFormatting.GOLD + speciesLore;
|
||||
List<String> formattedLoreList = fontRenderer.listFormattedStringToWidth(formattedLore, 200);
|
||||
text.addAll(formattedLoreList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDiscoveredBy(List<String> text) {
|
||||
IAlleleBeeSpecies primary = genome.getPrimary();
|
||||
String descTokens[] = primary.getDescription().split("\\|");
|
||||
|
||||
if (descTokens.length > 2) {
|
||||
String discoveredBy = descTokens[2];
|
||||
if (!discoveredBy.isEmpty()) {
|
||||
text.add("");
|
||||
text.add("Discovered by " + EnumChatFormatting.ITALIC + discoveredBy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTooltip(List<String> list) {
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@@ -50,6 +51,7 @@ import forestry.arboriculture.genetics.alleles.AlleleFruit;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.genetics.Chromosome;
|
||||
import forestry.core.genetics.Individual;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.StringUtil;
|
||||
|
||||
public class Tree extends Individual implements ITree, IPlantable {
|
||||
@@ -298,6 +300,36 @@ public class Tree extends Individual implements ITree, IPlantable {
|
||||
return plantTypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLore(List<String> text) {
|
||||
IAlleleTreeSpecies primary = genome.getPrimary();
|
||||
String descTokens[] = primary.getDescription().split("\\|");
|
||||
|
||||
if (descTokens.length > 0) {
|
||||
String speciesLore = descTokens[0];
|
||||
if (!speciesLore.isEmpty() && !speciesLore.contains("for.description") && Proxies.common.isCtrlDown()) {
|
||||
FontRenderer fontRenderer = Proxies.common.getClientInstance().fontRenderer;
|
||||
String formattedLore = EnumChatFormatting.GOLD + speciesLore;
|
||||
List<String> formattedLoreList = fontRenderer.listFormattedStringToWidth(formattedLore, 200);
|
||||
text.addAll(formattedLoreList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDiscoveredBy(List<String> text) {
|
||||
IAlleleTreeSpecies primary = genome.getPrimary();
|
||||
String descTokens[] = primary.getDescription().split("\\|");
|
||||
|
||||
if (descTokens.length > 2) {
|
||||
String discoveredBy = descTokens[2];
|
||||
if (!discoveredBy.isEmpty()) {
|
||||
text.add("");
|
||||
text.add("Discovered by " + EnumChatFormatting.ITALIC + discoveredBy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTooltip(List<String> list) {
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.genetics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
@@ -79,4 +81,10 @@ public abstract class Individual implements IIndividual {
|
||||
return getGenome().getActiveAllele(chromosomeType).getUID()
|
||||
.equals(getGenome().getInactiveAllele(chromosomeType).getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLore(List<String> text) {}
|
||||
|
||||
@Override
|
||||
public void addDiscoveredBy(List<String> text) {}
|
||||
}
|
||||
@@ -72,6 +72,12 @@ public abstract class ItemGE extends ItemForestry {
|
||||
if (individual.isAnalyzed()) {
|
||||
if (Proxies.common.isShiftDown()) {
|
||||
individual.addTooltip(list);
|
||||
individual.addDiscoveredBy(list);
|
||||
if (Proxies.common.isCtrlDown()) {
|
||||
individual.addLore(list);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.ITALIC + "<" + StringUtil.localize("gui.tooltip.tml") + ">");
|
||||
}
|
||||
} else {
|
||||
list.add(EnumChatFormatting.ITALIC + "<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@ public class ProxyCommon {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isCtrlDown() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void playSoundFX(World world, int x, int y, int z, Block block) {
|
||||
Proxies.net.sendNetworkPacket(new PacketFXSignal(PacketFXSignal.SoundFXType.LEAF, x, y, z, block, 0), world);
|
||||
}
|
||||
|
||||
@@ -63,6 +63,11 @@ public class ProxyCommonClient extends ProxyCommon {
|
||||
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCtrlDown() {
|
||||
return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName(ItemStack itemstack) {
|
||||
return itemstack.getItem().getItemStackDisplayName(itemstack);
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -41,6 +42,7 @@ import forestry.api.lepidopterology.IEntityButterfly;
|
||||
import forestry.core.genetics.Chromosome;
|
||||
import forestry.core.genetics.GenericRatings;
|
||||
import forestry.core.genetics.IndividualLiving;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.StringUtil;
|
||||
|
||||
public class Butterfly extends IndividualLiving implements IButterfly {
|
||||
@@ -60,6 +62,36 @@ public class Butterfly extends IndividualLiving implements IButterfly {
|
||||
this.genome = genome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLore(List<String> text) {
|
||||
IAlleleButterflySpecies primary = genome.getPrimary();
|
||||
String descTokens[] = primary.getDescription().split("\\|");
|
||||
|
||||
if (descTokens.length > 0) {
|
||||
String speciesLore = descTokens[0];
|
||||
if (!speciesLore.isEmpty() && !speciesLore.contains("for.description") && Proxies.common.isCtrlDown()) {
|
||||
FontRenderer fontRenderer = Proxies.common.getClientInstance().fontRenderer;
|
||||
String formattedLore = EnumChatFormatting.GOLD + speciesLore;
|
||||
List<String> formattedLoreList = fontRenderer.listFormattedStringToWidth(formattedLore, 200);
|
||||
text.addAll(formattedLoreList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDiscoveredBy(List<String> text) {
|
||||
IAlleleButterflySpecies primary = genome.getPrimary();
|
||||
String descTokens[] = primary.getDescription().split("\\|");
|
||||
|
||||
if (descTokens.length > 2) {
|
||||
String discoveredBy = descTokens[2];
|
||||
if (!discoveredBy.isEmpty()) {
|
||||
text.add("");
|
||||
text.add("Discovered by " + EnumChatFormatting.ITALIC + discoveredBy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTooltip(List<String> list) {
|
||||
IAlleleButterflySpecies primary = genome.getPrimary();
|
||||
|
||||
@@ -335,6 +335,7 @@ for.gui.temperature=Temperatur
|
||||
for.gui.tolerance=Toleranz
|
||||
for.gui.temptol=Temp.Tol
|
||||
for.gui.tooltip.tmi=Drücke die Umschalttaste für mehr Infos.
|
||||
for.gui.tooltip.tml=Drücke die Steuerungstaste für mehr Geschichte.
|
||||
for.gui.triple=Dreifache
|
||||
for.gui.unknown=Unbekannt
|
||||
for.gui.warm=Warm
|
||||
|
||||
@@ -341,6 +341,7 @@ for.gui.temperature=Temperature
|
||||
for.gui.tolerance=Tolerance
|
||||
for.gui.temptol=Temperature Tol.
|
||||
for.gui.tooltip.tmi=Hold shift for details
|
||||
for.gui.tooltip.tml=Hold ctrl for lore
|
||||
for.gui.triple=Triple
|
||||
for.gui.unknown=Unknown genome
|
||||
for.gui.warm=Warm
|
||||
|
||||
@@ -244,6 +244,7 @@ gui.higher=Higher
|
||||
gui.highest=Highest
|
||||
gui.fecundated=Mated
|
||||
gui.tooltip.tmi=Hold shift for details
|
||||
gui.tooltip.tml=Hold ctrl for lore
|
||||
gui.worktable.clear=Click to clear Grid
|
||||
gui.escritoire.probe=Examine Specimens
|
||||
hints.beebiomes.tag=Choose your biome!
|
||||
|
||||
Reference in new issue
Block a user