mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
bland mode
This commit is contained in:
parent
c9828562b8
commit
c00f2c812f
2 changed files with 20 additions and 1 deletions
|
@ -50,7 +50,8 @@ public enum ConfigBoolValues{
|
|||
|
||||
LASER_RELAY_LOSS("Laser Relay Energy Loss", ConfigCategories.MACHINE_VALUES, true, "If Energy Laser Relays should have energy loss"),
|
||||
|
||||
SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)");
|
||||
SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)"),
|
||||
MOST_BLAND_PERSON_EVER("No Colored Item Names", ConfigCategories.OTHER, false, "If you want to be really boring and lame, you can turn on this setting to disable colored names on Actually Additions items. Because why would you want things to look pretty anyways, right?");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -30,6 +30,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
|
@ -40,6 +41,8 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ClientEvents{
|
||||
|
||||
|
@ -130,6 +133,21 @@ public class ClientEvents{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Be da bland
|
||||
if(ConfigBoolValues.MOST_BLAND_PERSON_EVER.isEnabled()){
|
||||
ItemStack stack = event.getItemStack();
|
||||
if(StackUtil.isValid(stack)){
|
||||
ResourceLocation regName = stack.getItem().getRegistryName();
|
||||
if(regName != null){
|
||||
if(regName.toString().toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID)){
|
||||
if(event.getToolTip().size() > 0){
|
||||
event.getToolTip().set(0, TextFormatting.RESET+event.getToolTip().get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
Loading…
Reference in a new issue