Skip to content

Instantly share code, notes, and snippets.

View darkevilmac's full-sized avatar
jarva

Benjamin K darkevilmac

jarva
View GitHub Profile
[15:38:53] [Client thread/INFO]: [STDERR]: java.lang.invoke.WrongMethodTypeException: cannot convert MethodHandle()Map to (Object)Object
[15:38:53] [Client thread/INFO]: [STDERR]: at java.lang.invoke.MethodHandle.asTypeUncached(MethodHandle.java:775)
[15:38:53] [Client thread/INFO]: [STDERR]: at java.lang.invoke.MethodHandle.asType(MethodHandle.java:761)
[15:38:53] [Client thread/INFO]: [STDERR]: at java.lang.invoke.Invokers.checkGenericType(Invokers.java:321)
[15:38:53] [Client thread/INFO]: [STDERR]: at com.elytradev.concrete.reflect.accessor.MethodHandlesAccessor.get(MethodHandlesAccessor.java:39)
[15:38:53] [Client thread/INFO]: [STDERR]: at com.elytradev.concrete.resgen.SimpleResourcePack.getItemModel(SimpleResourcePack.java:198)
[15:38:53] [Client thread/INFO]: [STDERR]: at com.elytradev.concrete.resgen.SimpleResourcePack.getInputStreamByName(SimpleResourcePack.java:144)
[15:38:53] [Client thread/INFO]: [STDERR]: at net.minecraft.client.resources.AbstractResourcePack.getInputStream(AbstractResour
@darkevilmac
darkevilmac / MessageConcept.java
Created April 23, 2018 21:38
dank ass boolean compression
public void toBytes(Message msg, ByteBuf target) {
List<MessageField> booleanFields = messageFields.stream()
.filter(mf -> mf.getType() == Boolean.class).sorted(
Comparator.comparing(o -> o.getField().getName())).collect(Collectors.toList());
if (!booleanFields.isEmpty()) {
byte currentByte = 0x00000000;
int byteIndex = 0;
for (int i = 0; i < booleanFields.size(); i++) {
if (i == 8) {