Jump to content

[1.15.2] Cannot use my registered entity types


Triphion

Recommended Posts

I have registered my entities using Deferred registries and it has been working fine until I tried to create a boss-summoning item. I have tried to use vanilla entities instead of my own entities and they work. But apparently, my own entities are being registered AFTER I register my items and blocks, but this should not be the case since I register my entities BEFORE my items and blocks. 

The error message states:

Quote

Encountered and error during the load_registries event phase. 

Registry Object not present. 

Which to me states that it cannot grab the entity since it hasn't been registered yet. 

		instance = this;
		
		final IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();
		
		modBus.addListener(this::commonSetup);
		modBus.addListener(this::clientSetup);
		
		EtauricEntities.ENTITIES.register(modBus);
		
		EtauricItems.ITEMS.register(modBus);
		EtauricBlocks.BLOCKS.register(modBus);
		
		EtauricBiomes.BIOMES.register(modBus);
		
		MinecraftForge.EVENT_BUS.register(this);

This is my Main Class. 

	public static final RegistryObject<Item> TERROR_FEEDER = ITEMS.register("terror_feeder", () -> new BossItem(new BossItem.BossProperties().setBoss(EtauricEntities.CHUPNUT.get()).setTooltip("A food source for a special water beast...")));

And this is the Item i'm trying to get to work. 

public class BossItem extends Item
{
	private final String tooltip;
	private final EntityType<? extends LivingEntity> boss;
	
	public BossItem(BossItem.BossProperties properties) 
	{
		super(properties.group(ItemGroup.MISC).maxStackSize(1));
		this.boss = properties.boss;
		this.tooltip = properties.toolTip;
	}
	
	@Override
	public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) 
	{
		if (this.tooltip != null) 
		{
			tooltip.add(new StringTextComponent("\u00A7e" + this.tooltip + "\u00A7e"));
		}
		
		tooltip.add(new StringTextComponent("\u00A76" + "Use this to summon " + this.boss.getName() + "\u00A76"));
	}
	
	public static class BossProperties extends Item.Properties
	{
		private String toolTip;
		private EntityType<? extends LivingEntity> boss;
		
		public BossItem.BossProperties setBoss(EntityType<? extends LivingEntity> boss) 
		{
			this.boss = boss;
			
			return this;
		}
		
		public BossItem.BossProperties setTooltip(String toolTip)
		{
			this.toolTip = toolTip;
			
			return this;
		}
	}
}

And lastly, this is the BossItem class. 

Edited by Triphion
Link to comment
Share on other sites

2 minutes ago, Triphion said:

But apparently, my own entities are being registered AFTER I register my items and blocks, but this should not be the case since I register my entities BEFORE my items and blocks. 

The registry order is always first blocks, then items, then everything else in arbitrary order. You cannot rely on the order of registry events.

 

Store the RegistryObject (or just a Supplier, which RegistryObject implements) instead of the direct EntityType.

Link to comment
Share on other sites

2 minutes ago, Triphion said:

EtauricEntities.ENTITIES.register(modBus);

EtauricItems.ITEMS.register(modBus);

EtauricBlocks.BLOCKS.register(modBus);

This is not actually registering stuff, so the order does not matter. This is registering the DeferredRegisters to the event bus, so that it can register your RegistryObjects at the correct time.

The only guarantee at this time for registration is that blocks are always first, items second, everything else in an assumed random order afterwards.

 

I have not tried doing anything like you are yet, but I would imagine that it will involve the use of a supplier to provide your entity type.

Link to comment
Share on other sites

Why doesn't this work? 

	public static final RegistryObject<Item> TERROR_FEEDER = ITEMS.register("terror_feeder", () -> new BossItem(new BossItem.BossProperties().setBoss(EtauricEntities.CHUPNUT).setTooltip("A food source for a special water beast...")));

It won't work unless i specifically say that the <?> entity is an entity chupnut...

		public BossItem.BossProperties setBoss(RegistryObject<EntityType<? extends LivingEntity>> boss) 
		{
			this.boss = boss.get();
			
			return this;
		}

I assume that this is what you meant by that?

47 minutes ago, diesieben07 said:

Store the RegistryObject (or just a Supplier, which RegistryObject implements) instead of the direct EntityType.

Edited by Triphion
Link to comment
Share on other sites

4 minutes ago, diesieben07 said:

Which errors? Where exactly?

Quote

The method setBoss(EntityType<? extends LivingEntity>) in the type BossItem.BossProperties is not applicable for the arguments (RegistryObject<EntityType<ChupnutEntity>>)

Quote

The method setBoss(RegistryObject<EntityType<? extends LivingEntity>>) in the type BossItem.BossProperties is not applicable for the arguments (RegistryObject<EntityType<ChupnutEntity>>)

On the setBoss method. 

And then it gives me 3 "quick fixes" that all involves I change either the chupnut to livingentity or that the method parameter be changed to chupnutentity. 

Edited by Triphion
Link to comment
Share on other sites

Generics are invariant by default. So if you want a RegistryObject<something> you need to pass exactly a RegistryObject<something>, not e.g. a RegistryObject<subclass of something>.

If you want to allow subclasses, you need to use RegistryObject<? extends something>. In your case: RegistryObject<? extends EntityType<? extends LivingEntity>>.

 

Yes, Java generics suck. Use Kotlin if it really bothers you.

Link to comment
Share on other sites

3 minutes ago, diesieben07 said:

Generics are invariant by default. So if you want a RegistryObject<something> you need to pass exactly a RegistryObject<something>, not e.g. a RegistryObject<subclass of something>.

If you want to allow subclasses, you need to use RegistryObject<? extends something>. In your case: RegistryObject<? extends EntityType<? extends LivingEntity>>.

 

Yes, Java generics suck. Use Kotlin if it really bothers you.

Wow. Thanks for telling me, that would have been a great pain for me to figure out by my own. Still, the registry_object is not present remains. This is my current code:

	public static final RegistryObject<Item> TERROR_FEEDER = ITEMS.register("terror_feeder", () -> new BossItem(new BossItem.BossProperties().setBoss(EtauricEntities.CHUPNUT).setTooltip("A food source for a special water beast...")));

Item register. 

public class BossItem extends Item
{
	private final String tooltip;
	private final EntityType<? extends LivingEntity> boss;
	
	public BossItem(BossItem.BossProperties properties) 
	{
		super(properties.group(ItemGroup.MISC).maxStackSize(1));
		this.boss = properties.boss;
		this.tooltip = properties.toolTip;
	}
	
	@Override
	public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) 
	{
		if (this.tooltip != null) 
		{
			tooltip.add(new StringTextComponent("\u00A7e" + this.tooltip + "\u00A7e"));
		}
		
		tooltip.add(new StringTextComponent("\u00A76" + "Use this to summon " + this.boss.getName().getString() + "\u00A76"));
	}
	
	public static class BossProperties extends Item.Properties
	{
		private String toolTip;
		private EntityType<? extends LivingEntity> boss;
		
		public BossItem.BossProperties setBoss(EntityType<? extends LivingEntity> boss) 
		{
			this.boss = boss;
			
			return this;
		}
		
		public BossItem.BossProperties setBoss(RegistryObject<? extends EntityType<? extends LivingEntity>> boss) 
		{
			this.boss = boss.get();
			
			return this;
		}
		
		public BossItem.BossProperties setTooltip(String toolTip)
		{
			this.toolTip = toolTip;
			
			return this;
		}
	}
}

The BossItem. 

Did I do it the way you told me? 

Link to comment
Share on other sites

3 minutes ago, diesieben07 said:

You are still directly using EntityType. You must use the registry object.

Oh. Well, how would i do that? The registry objects and the suppliers are really new to me so I haven't really figured out how to use them. 

	public static final RegistryObject<Item> TERROR_FEEDER = ITEMS.register("terror_feeder", () -> new BossItem(new BossItem.BossProperties().setBoss(EtauricEntities.CHUPNUT).setTooltip("A food source for a special water beast...")));
RegistryObject<EntityType<EtauricEntities.CHUPNUT>>

This is obviously wrong as i've experienced...

Link to comment
Share on other sites

11 minutes ago, Triphion said:

public BossItem.BossProperties setBoss(RegistryObject<? extends EntityType<? extends LivingEntity>> boss) { this.boss = boss.get(); return this; }

This is your issue. Store the RegistryObject here, instead of calling get immediately.

Link to comment
Share on other sites

38 minutes ago, diesieben07 said:

This is your issue. Store the RegistryObject here, instead of calling get immediately.

I'm sorry, I don't think I follow. If I were to store it like so:

		public BossItem.BossProperties setBoss(RegistryObject<? extends EntityType<? extends LivingEntity>> boss) 
		{
			this.boss = boss;
			
			return this;
		}

I have to remove this:

		private EntityType<? extends LivingEntity> boss;
		
		public BossItem.BossProperties setBoss(EntityType<? extends LivingEntity> boss) 
		{
			this.boss = boss;
			
			return this;
		}

And change this: 

		private EntityType<? extends LivingEntity> boss;

To this: 

		private RegistryObject<? extends EntityType<? extends LivingEntity>> boss;

And that would mean, that if I wanted to use this to spawn some other vanilla creature, it wouldn't work. 

Or am I wrong here? 

 

EDIT: It does work, but this does not support vanilla creatures. Do I have to create a second BossItem that does work with vanilla, or is there a way for both methods to coexist in the same BossItem?

Edited by Triphion
Link to comment
Share on other sites

1 hour ago, diesieben07 said:

Of course it would, you can pass in whatever RegistryObject you want here.

Oh? Then how would I pass in a vanilla creature? Since the vanilla creatures are EntityTypes, I don't know how to do that. 

Edited by Triphion
Link to comment
Share on other sites

RegistryObject.of(resourceLocation-of-entitytype, ForgeRegistries.ENTITY);

If you change it to receive a Supplier<? extends EntityType<? extends LivingEntity>> instead of having to be a RegistryObject, then you could pass in the vanilla types as () -> VANILLA_TYPE.

 

You could change your existing method to create the registry object or supplier and pass it into the other method.

Edited by Alpvax
Link to comment
Share on other sites

33 minutes ago, Alpvax said:

RegistryObject.of(resourceLocation-of-entitytype, ForgeRegistries.ENTITY);

If you change it to receive a Supplier<? extends EntityType<? extends LivingEntity>> instead of having to be a RegistryObject, then you could pass in the vanilla types as () -> VANILLA_TYPE.

 

You could change your existing method to create the registry object or supplier and pass it into the other method.

Thank you! I changed it to a Supplier instead. I'm gonna have to learn how to use these systems so that I can use them more efficiently in the future.

Case solved! 

Edited by Triphion
Link to comment
Share on other sites

14 hours ago, diesieben07 said:

If you use RegistryObject it will, that is the point of RegistryObject.

Yes, but with that approach being a supplier, I am correct in thinking that it won't? Would using the delegate fix it, or is a RegistryObject the correct approach?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Fixed it, was calling scale before drawing everything else!
    • Hi, I wanted to find the entity the player is looking at. Thanks
    • I was using forge 1..18.2 (40.2.4) with many mods, just added few mods and it's not working for now   org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) ~[modlauncher-9.1.3.jar:9.1.3+9.1.3+main.9b69c82a] {}     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-1.0.8.jar:?] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}     at net.minecraft.client.renderer.block.BlockRenderDispatcher.<init>(BlockRenderDispatcher.java:50) ~[client-1.18.2-20220404.173914-srg.jar%23126!/:?] {re:mixin,xf:OptiFine:default,re:classloading,xf:OptiFine:default,pl:mixin:APP:farmersdelight.mixins.json:HideBlockBreakProgressMixin,pl:mixin:A}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:501) ~[client-1.18.2-20220404.173914-srg.jar%23126!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:APP:create.mixins.json:client.WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:169) ~[client-1.18.2-20220404.173914-srg.jar%23126!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.2.4.jar%2318!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {} Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [valhelsia_core.mixins.json:client.ModelBlockRendererMixin] from phase [DEFAULT] in config [valhelsia_core.mixins.json] FAILED during APPLY     at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:636) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:588) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     ... 29 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @ModifyVariable annotation on valhelsia_renderModelFaceFlat could not find any targets matching 'Lnet/minecraft/client/renderer/block/ModelBlockRenderer;m_111001_(Lnet/minecraft/world/level/BlockAndTintGetter;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;IIZLcom/mojang/blaze3d/vertex/PoseStack;Lcom/mojang/blaze3d/vertex/VertexConsumer;Ljava/util/List;Ljava/util/BitSet;)V' in net.minecraft.client.renderer.block.ModelBlockRenderer. Using refmap valhelsia_core.refmap.json [PREINJECT Applicator Phase -> valhelsia_core.mixins.json:client.ModelBlockRendererMixin -> Prepare Injections ->  -> localvar$zoa000$valhelsia_renderModelFaceFlat(ILnet/minecraft/world/level/BlockAndTintGetter;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;)I -> Parse]     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.validateTargets(InjectionInfo.java:656) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findTargets(InjectionInfo.java:587) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:330) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:316) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:308) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.ModifyVariableInjectionInfo.<init>(ModifyVariableInjectionInfo.java:45) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     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 org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:149) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:708) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1311) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1042) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     ... 29 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] {}     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) ~[modlauncher-9.1.3.jar:9.1.3+9.1.3+main.9b69c82a] {}     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-9.1.3.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-1.0.8.jar:?] {}     at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-1.0.8.jar:?] {}     at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}     at net.minecraft.client.renderer.block.BlockRenderDispatcher.<init>(BlockRenderDispatcher.java:50) ~[client-1.18.2-20220404.173914-srg.jar%23126!/:?] {re:mixin,xf:OptiFine:default,re:classloading,xf:OptiFine:default,pl:mixin:APP:farmersdelight.mixins.json:HideBlockBreakProgressMixin,pl:mixin:A}     at net.minecraft.client.Minecraft.<init>(Minecraft.java:501) ~[client-1.18.2-20220404.173914-srg.jar%23126!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:bookshelf.common.mixins.json:client.AccessorMinecraft,pl:mixin:APP:blueprint.mixins.json:client.MinecraftMixin,pl:mixin:APP:ars_nouveau.mixins.json:light.ClientMixin,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:iceberg.mixins.json:MinecraftMixin,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:APP:create.mixins.json:client.WindowResizeMixin,pl:mixin:APP:ars_nouveau.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}   mods list : abnormals_delight-1.18.2-3.0.2.jar alexsabnormalities-1.2.3.jar alexsdelight-1.18.2-1.3.3.jar alexsmobs-1.18.6.jar Apotheosis-1.18.2-5.8.0.jar appleskin-forge-mc1.18.2-2.4.1.jar aquamirae-5.api10.jar ars_creo-1.18.2-2.2.0.jar ars_elemental-1.18.2-0.4.9.9.jar ars_instrumentum-1.18.2-2.4.2.jar ars_nouveau-1.18.2-2.9.0.jar blockui-1.18.2-0.0.71-ALPHA.jar blueprint-1.18.2-5.5.0.jar Bookshelf-Forge-1.18.2-13.3.56.jar born_in_chaos_[Forge]1.18.2_1.13.jar carryon-1.18.2-1.17.1.11.jar citadel-1.11.3-1.18.2.jar Clumps-forge-1.18.2-8.0.0+17.jar CNB-1.18.2-1.5.3.jar create-1.18.2-0.5.1.b.jar curios-forge-1.18.2-5.0.9.0.jar Delightful-1.18.2-2.6.jar domum_ornamentum-1.18.2-1.0.50-ALPHA-universal.jar Droplight-1.18.2-forge-1.0.7.jar DungeonsArise-1.18.2-2.1.52-release.jar EnchantmentDescriptions-Forge-1.18.2-10.0.12.jar FarmersDelight-1.18.2-1.2.1.jar flywheel-forge-1.18.2-0.6.8.a.jar forbidden_arcanus-1.18.2-2.1.2.jar GatewaysToEternity-1.18.2-2.3.0.jar geckolib-forge-1.18-3.0.57.jar Goblins_Dungeons_1.0.8.jar Highlighter-1.18.1-1.1.2.jar iceandfire-2.1.12-1.18.2-beta2.jar Iceberg-1.18.2-forge-1.0.49.jar illageandspillage-1.18.2-1.1.3.jar incubation-1.18.2-2.0.2.jar Jade-1.18.2-forge-5.3.0.jar JadeAddons-1.18.2-forge-2.5.0.jar jei-1.18.2-forge-10.2.1.1004.jar largemeals-1.18.2-2.0.jar LegendaryTooltips-1.18.2-1.3.1.jar list.txt L_Enders Cataclysm-0.51-changed Them -1.18.2.jar MaxHealthFix-Forge-1.18.2-5.0.1.jar minecolonies-1.18.2-1.0.966-RELEASE.jar MouseTweaks-forge-mc1.18-2.21.jar multi-piston-1.18.2-1.2.15-ALPHA.jar obscure_api-10.jar Oh_The_Biomes_You'll_Go-forge-1.18.2-1.4.7.jar overweightfarming-1.18.2-1.6.0-forge.jar Patchouli-1.18.2-71.1.jar Placebo-1.18.2-6.6.7.jar preview_OptiFine_1.18.2_HD_U_H9_pre3.jar Prism-1.18.2-1.0.1.jar rottencreatures-forge-1.18.2-1.0.0.jar scannable-1.18.2-forge-1.7.6+135af8a.jar sophisticatedbackpacks-1.18.2-3.18.52.846.jar sophisticatedcore-1.18.2-0.5.68.310.jar stalwart-dungeons-1.18.2-1.2.8.jar structurize-1.18.2-1.0.448-ALPHA.jar takesapillage-1.0.3-1.18.2.jar TerraBlender-forge-1.18.2-1.2.0.126.jar tombstone-7.6.5-1.18.2.jar upgrade_aquatic-1.18.2-4.0.0.jar valhelsia_core-forge-1.18.2-0.4.0.jar XaerosWorldMap_1.30.3_Forge_1.18.2.jar YungsApi-1.18.2-Forge-2.2.9.jar YungsBetterDesertTemples-1.18.2-Forge-1.3.1.jar YungsBetterDungeons-1.18.2-Forge-2.1.0.jar YungsBetterMineshafts-1.18.2-Forge-2.2.jar YungsBetterOceanMonuments-1.18.2-Forge-1.0.3.jar YungsBetterStrongholds-1.18.2-Forge-2.1.1.jar   I heard that you guys are the best in minecraft thx very much
    • How do I scale gui elements without scaling everything? When i tried matrices.scale(scale, scale, scale), it scaled the whole gui.
    • I'd recommend using (stack.getEquipmentSlot() == EquipmentSlot.CHEST) instead. All you need to do is check if it's the correct slot, not if the stacks are equal. Also it isn't necessary to do this every tick. Although the logic of the IF statement is pretty simple, Minecraft does a lot of stuff when adding potion effects (mainly syncing the player data). Every 5 ticks or so would be good enough, which you can do by checking if (player.tickCount % 5 == 0).
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.