Skip to content

Instantly share code, notes, and snippets.

View windy1's full-sized avatar
💭
Why do booleans make good finger food? Because they're only a byte 😂

Walker Crouse windy1

💭
Why do booleans make good finger food? Because they're only a byte 😂
View GitHub Profile
package org.spongepowered.ore.config;
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ConfigurationOptions;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.hocon.HoconConfigurationLoader;
import ninja.leaping.configurate.loader.ConfigurationLoader;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializerCollection;
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializers;

Keybase proof

I hereby claim:

  • I am windy1 on github.
  • I am windy (https://keybase.io/windy) on keybase.
  • I have a public key whose fingerprint is 419D 3C6A C231 71DB 8891 670B DE78 987D 4156 D358

To claim this, I am signing this object:

private boolean isItemStackEqual(ItemStack other)
{
return this.stackSize != other.stackSize ? false : (this.item != other.item ? false : (this.itemDamage != other.itemDamage ? false : (this.stackTagCompound == null && other.stackTagCompound != null ? false : this.stackTagCompound == null || this.stackTagCompound.equals(other.stackTagCompound))));
}
TextTemplate.of(Text.of(translation1), " foo bar baz", Text.of(translation2));
Dictionary dict = ... // some dictionary a plugin has created
Translation t = new Translation("key", dict); // now a concrete class
Text.of(t, ...);
@Override
protected TextComponentBase createComponent() {
String trans = this.translation.get(); // Gets the translation from internal dictionary (settable, defaults to MC dict)
if (trans.equals(this.translation.getId()) {
return new TextComponentTranslation(this.translation.getId(), unwrapArguments(this.arguments));
}
// return the already translated text here
return //whatever idk the proper mc class for this
}
package db
import com.github.tminglei.slickpg._
import ore.Colors
import ore.Colors.Color
import ore.permission.role.RoleTypes
import ore.permission.role.RoleTypes.RoleType
import ore.project.Categories.Category
import ore.project.FlagReasons.FlagReason
import ore.project.{Categories, FlagReasons}
val allChannels = project.channels.seq
var visibleNames: Option[Array[String]] = channels.map(_.toLowerCase.split(','))
val visible: Option[Array[Channel]] = visibleNames.map(_ map { name =>
allChannels.find(_.name.equalsIgnoreCase(name)).get
})
val visibleIds: Array[Int] = visible.map(_.map(_.id.get)).getOrElse(allChannels.map(_.id.get).toArray)
val versions = project.versions.sorted(_.channelId inSetBind visibleIds, _.createdAt.desc, Version.InitialLoad)
if (visibleNames.equals(allChannels.map(_.name.toLowerCase))) visibleNames = None
[23:55:25] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:12]: java.lang.reflect.InvocationTargetException
[23:55:25] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:12]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:55:25] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:12]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[23:55:25] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:12]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:55:25] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:12]: at java.lang.reflect.Method.invoke(Method.java:497)
[23:55:25] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:12]: at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:43)
[23:55:25] [