Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ASM ERR java.lang.ClassNotFoundException: net.minecraft.util.math.BlockPos

Featured Replies

Posted

So I got the I replaced the method for ItemStack#onItemUse() but, it appears that it is refusing to load the blockpos class or something. 

New Method:
https://pastebin.com/fWSaQbfK


Repository:

https://github.com/jredfox/evilnotchlib/blob/master/src/main/java/com/EvilNotch/lib/asm/Transformer.java

Why do I need asm to fire a forge event: because forge doesn't fire a block place event for client side and my mod silkspawners needs it but, in the past I was replacing the block the improper way rather then patching a class to fire for every block placement. So no ASM isn't an option since said forge event doesn't exist for the client side so I made one.

I don't understand the error since the class blockpos is already in the code to begin with proper imports. I tried manually loading the class before doing anything else both the ob and deob class for ob and it didn't work same error

Edited by jredfox

  On 7/30/2018 at 5:19 AM, jredfox said:

Why do I need asm to fire a forge event: because forge doesn't fire a block place event for client side and my mod silkspawners needs it but, in the past I was replacing the block the improper way rather then patching a class to fire for every block placement. So no ASM isn't an option since said forge event doesn't exist for the client side so I made one.

Why do you need a client side block place event?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
  On 7/30/2018 at 5:23 AM, Animefan8888 said:

Why do you need a client side block place event?

for client side particles and tile entity render sync so it doesn't render wrong for the first couple ticks. Also it's a nice event to have that I want implemented

packets are too slow already tried sync needs to happen when the client thinks it should

If I switched my asm to ItemBlock class it would work since BlockPos by then is loaded but, forge had their method there for a reason because then modders could accidentally override forge and block place event would never fire. So they do it on the itemstack level and that's also what I would like to do.

Edited by jredfox

  On 7/30/2018 at 5:24 AM, jredfox said:

Also it's a nice event to have that I want implemented

Then submit the event to forge on github.

  On 7/30/2018 at 5:24 AM, jredfox said:

for client side particles and tile entity render sync so it doesn't render wrong for the first couple ticks.

You could just send a packet updating the client.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
  On 7/30/2018 at 5:26 AM, Animefan8888 said:

Then submit the event to forge on github.

You could just send a packet updating the client.

packets could take 100ms+ over the network that's the equivalent to 2-5 ticks event needs to happen exactly when the client does their method. No delay is acceptable or it renders wrong.

for example in silkspawners placing a spawner with your idea would resault in 0.2-0.5+seconds of rendering pig I need it to render creeper instantly if it's a creeper. Plus this is what vanilla already does and I am trying to avoid it need a client sync to happen instantly when it has the data which is the same tick it places it

What I need to know is why it can't find the block pos class? the code worked for replacing every single other method except for the itemstack class

Edited by jredfox

  On 7/30/2018 at 5:28 AM, jredfox said:

packets could take 100ms+ over the network that's the equivalent to 2-5 ticks event needs to happen exactly when the client does their method. No delay is acceptable or it renders wrong.

After looking at your silkspawners mod on github it turns out you have your own mob spawner block that can modify what you want on the client in the onItemUse method.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
  On 7/30/2018 at 5:32 AM, Animefan8888 said:

After looking at your silkspawners mod on github it turns out you have your own mob spawner block that can modify what you want on the client in the onItemUse method.

cannot as it doesn't work with modded blocks. my mod supports any block with the instanceof tile entity spawner on server side I am trying to fix client sync here.

I can't do that since the asm is throwing an error of blockpos not found during runtime. I need to know what I am doing wrong?

Edited by jredfox

  On 7/30/2018 at 5:36 AM, jredfox said:

cannot as it doesn't work with modded blocks.

You're doing it for your block, not others mods.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Locked.

JRed you are consistently coming around asking for help with your fucking coremod that I'm fairly sure every member of staff has asked you to stop using, yet you insist on hacking the shit out of everything because you think you know better yet you refuse to prove that your way is better by contributing to Forge directly.

I will say this again, if you are having trouble with making a coremod maybe you shouldn't be hacking the shit out of other people's code.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Reveal hidden contents

 

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.