MC-Machinations / PaperTweaks

A better-performance replacement for the popular VanillaTweaks datapack collection.
GNU General Public License v3.0
141 stars 13 forks source link

(1.18) Cloud not create injector #48

Closed muckelba closed 2 years ago

muckelba commented 2 years ago

Hi, i've just downloaded the latest release to try it on my paper 1.18 Server. I get the following error at startup:


[21:41:26] [Server thread/INFO]: [VanillaTweaks] Enabling VanillaTweaks v0.2.0-SNAPSHOT
[21:41:26] [Server thread/INFO]: [VanillaTweaks] Thank you for using PaperTweaks/VanillaTweaks!
[21:41:26] [Server thread/INFO]: [VanillaTweaks] If you have any issues, please visit one of the following links for support:
[21:41:26] [Server thread/INFO]: [VanillaTweaks]   - https://discord.gg/invite/Np6Pcb78rr
[21:41:26] [Server thread/INFO]: [VanillaTweaks]   - https://github.com/MC-Machinations/VanillaTweaks/issues
[21:41:28] [Server thread/ERROR]: Error occurred while enabling VanillaTweaks v0.2.0-SNAPSHOT (Is it up to date?)
java.lang.RuntimeException: Could not create injector!
        at me.machinemaker.vanillatweaks.VanillaTweaks.onEnable(VanillaTweaks.java:136) ~[VanillaTweaks-Paper.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[paper-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.18.jar:git-Paper-22]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.18.jar:git-Paper-22]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:726) ~[paper-1.18.jar:git-Paper-22]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:501) ~[paper-1.18.jar:git-Paper-22]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:313) ~[paper-1.18.jar:git-Paper-22]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1201) ~[paper-1.18.jar:git-Paper-22]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.jar:git-Paper-22]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/ErrorInjectingConstructor]: ExceptionInInitializerError
  at GemVillagers.<init>(GemVillagers.java:51)
  at VanillaTweaks-Paper.jar//ModuleRegistry.lambda$configure$1(ModuleRegistry.java:64)
  while locating GemVillagers
  at VanillaTweaks-Paper.jar//ModuleRegistry.lambda$configure$0(ModuleRegistry.java:63)
  while locating ModuleBase annotated with @Element(setName=,uniqueId=52, type=MAPBINDER, keyType=String)
  at ModuleManager.<init>(ModuleManager.java:82)
      \_ for 2nd parameter moduleMap
  at VanillaTweaks-Paper.jar//ModuleRegistry.configure(ModuleRegistry.java:66)
  at VanillaTweaks.moduleManager(VanillaTweaks.java:69)
      \_ for field moduleManager
  at VanillaTweaks-Paper.jar//VanillaTweaks$1.configure(VanillaTweaks.java:121)

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================
Full classname legend:
======================
Element:                     "com.google.inject.internal.Element"
GemVillagers:                "me.machinemaker.vanillatweaks.modules.hermitcraft.gemvillagers.GemVillagers"
ModuleBase:                  "me.machinemaker.vanillatweaks.modules.ModuleBase"
ModuleManager:               "me.machinemaker.vanillatweaks.modules.ModuleManager"
ModuleRegistry:              "me.machinemaker.vanillatweaks.modules.ModuleRegistry"
VanillaTweaks:               "me.machinemaker.vanillatweaks.VanillaTweaks"
VanillaTweaks$1:             "me.machinemaker.vanillatweaks.VanillaTweaks$1"
========================
End of classname legend:
========================

        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:568) ~[?:?]
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:182) ~[?:?]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:87) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:69) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:59) ~[?:?]
        at me.machinemaker.vanillatweaks.VanillaTweaks.onEnable(VanillaTweaks.java:117) ~[VanillaTweaks-Paper.jar:?]
        ... 11 more
Caused by: java.lang.ExceptionInInitializerError
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:124) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291) ~[?:?]
        at com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:288) ~[?:?]
        at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:454) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:362) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:195) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:609) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:437) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:32) ~[?:?]
        at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322) ~[?:?]
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4593) ~[?:?]
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3593) ~[?:?]
        at me.machinemaker.vanillatweaks.modules.hermitcraft.gemvillagers.GemVillagers.<init>(GemVillagers.java:54) ~[VanillaTweaks-Paper.jar:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:120) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) ~[?:?]
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) ~[?:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[?:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[?:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[?:?]
        at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:60) ~[?:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[?:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[?:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[?:?]
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40) ~[?:?]
        at com.google.inject.internal.RealMapBinder$RealMapProvider.doProvision(RealMapBinder.java:794) ~[?:?]
        at com.google.inject.internal.RealMapBinder$RealMapProvider.doProvision(RealMapBinder.java:731) ~[?:?]
        at com.google.inject.internal.InternalProviderInstanceBindingImpl$Factory.get(InternalProviderInstanceBindingImpl.java:113) ~[?:?]
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40) ~[?:?]
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) ~[?:?]
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) ~[?:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[?:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[?:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[?:?]
        at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:50) ~[?:?]
        at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:146) ~[?:?]
        at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:101) ~[?:?]
        at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:245) ~[?:?]
        at com.google.inject.internal.Initializer.injectAll(Initializer.java:140) ~[?:?]
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180) ~[?:?]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:87) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:69) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:59) ~[?:?]
        at me.machinemaker.vanillatweaks.VanillaTweaks.onEnable(VanillaTweaks.java:117) ~[VanillaTweaks-Paper.jar:?]
        ... 11 more
Caused by: java.lang.IllegalStateException: Unable to find method setCustomName ([interface net.minecraft.network.chat.IChatBaseComponent]) in java.lang.Object.
        at me.machinemaker.vanillatweaks.utils.ReflectionUtils.getTypedMethod(ReflectionUtils.java:406) ~[VanillaTweaks-Paper.jar:?]
        at me.machinemaker.vanillatweaks.utils.ReflectionUtils.getMethod(ReflectionUtils.java:307) ~[VanillaTweaks-Paper.jar:?]
        at me.machinemaker.vanillatweaks.utils.ReflectionUtils.getTypedMethod(ReflectionUtils.java:405) ~[VanillaTweaks-Paper.jar:?]
        at me.machinemaker.vanillatweaks.utils.ReflectionUtils.getMethod(ReflectionUtils.java:307) ~[VanillaTweaks-Paper.jar:?]
        at me.machinemaker.vanillatweaks.modules.hermitcraft.gemvillagers.VillagerData.<clinit>(VillagerData.java:54) ~[VanillaTweaks-Paper.jar:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:124) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291) ~[?:?]
        at com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:288) ~[?:?]
        at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:454) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:362) ~[?:?]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:195) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:609) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:437) ~[?:?]
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:32) ~[?:?]
        at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322) ~[?:?]
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4593) ~[?:?]
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3593) ~[?:?]
        at me.machinemaker.vanillatweaks.modules.hermitcraft.gemvillagers.GemVillagers.<init>(GemVillagers.java:54) ~[VanillaTweaks-Paper.jar:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:120) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) ~[?:?]
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) ~[?:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[?:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[?:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[?:?]
        at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:60) ~[?:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[?:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[?:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[?:?]
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40) ~[?:?]
        at com.google.inject.internal.RealMapBinder$RealMapProvider.doProvision(RealMapBinder.java:794) ~[?:?]
        at com.google.inject.internal.RealMapBinder$RealMapProvider.doProvision(RealMapBinder.java:731) ~[?:?]
        at com.google.inject.internal.InternalProviderInstanceBindingImpl$Factory.get(InternalProviderInstanceBindingImpl.java:113) ~[?:?]
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40) ~[?:?]
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113) ~[?:?]
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) ~[?:?]
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) ~[?:?]
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[?:?]
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) ~[?:?]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) ~[?:?]
        at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:50) ~[?:?]
        at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:146) ~[?:?]
        at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:101) ~[?:?]
        at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:245) ~[?:?]
        at com.google.inject.internal.Initializer.injectAll(Initializer.java:140) ~[?:?]
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180) ~[?:?]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:87) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:69) ~[?:?]
        at com.google.inject.Guice.createInjector(Guice.java:59) ~[?:?]
        at me.machinemaker.vanillatweaks.VanillaTweaks.onEnable(VanillaTweaks.java:117) ~[VanillaTweaks-Paper.jar:?]
        ... 11 more
[21:41:28] [Server thread/INFO]: [VanillaTweaks] Disabling VanillaTweaks v0.2.0-SNAPSHOT
[21:41:28] [Server thread/INFO]: [VanillaTweaks] Disabled N/A modules````

Do you need any information to debug this issue?
Machine-Maker commented 2 years ago

Yeah, I haven't updated it yet for 1.18. Will do so shortly

Machine-Maker commented 2 years ago

Fixed by cf14652aa98c884233bedba43cac13ef56f2c6d4

And released here