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.

Featured Replies

Posted

Hello guys. I have a quick and simple question. How can I remove a method from an entity class without directly editing it? For example removing the sounds from a creeper.

 

Should I give a better explanation, or do you know what I mean? If you do, can you help me, and how would I do this?

 

~bl4ckscor3

↑↑↑↑↑↑↑↑↑↑ Click it please? :3 ↑↑↑↑↑↑↑↑↑↑

  • Author

But where do I put the PlaySoundAtEntityEvent?? In the main class? Yes, I do. I read the help document of ASM and I didn't know what to do. I'm currently starting with Java, so some more hints of what to do would be cool :)

↑↑↑↑↑↑↑↑↑↑ Click it please? :3 ↑↑↑↑↑↑↑↑↑↑

just check that the entity is a creeper and cancel the event is so ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

I know got this code:

package tests;

import net.minecraft.entity.Entity;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.PlaySoundAtEntityEvent;

public class PlayCreeperSounds 
{
@ForgeSubscribe
public void playCreeperSounds(PlaySoundAtEntityEvent event)
{
	Entity entity = event.entity;

	if(entity.entityId == 50)
	{
		if(event.isCancelable())
		{
			event.setCanceled(true);
		}
	}
}
}

But it doesn't work (according to SPC, the entityId of the creeper is 50

↑↑↑↑↑↑↑↑↑↑ Click it please? :3 ↑↑↑↑↑↑↑↑↑↑

google how to use the  instanceof  keyword, itll you GREATLY

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

dont forget to hit the thank you button

 

btw entity.entityID is a unique id for every entity, meaning maybe a creeper has entityid 50 but another could have 156

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.