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

is it possible to do that without a coremod?

 

i currently use a way where it registers a nearly empty entity (other than the changed hitbox) that extends into the original one, which then replaces the original entity and deletes it, which works, but is incompatible with other mods that refer to that mob (because when entitycreeper becomes something like modid.entitycreeperX they can no longer affect it since it doesn't match what they look for).

 

so i'd be interested to know if there's a way to change the hitbox without actually replacing the entity with a modded one or using any coremods.

 

another thing i'd be interested in is if there's a way to suppress particles, such as blaze's smoke without modifying their base code, or doing the thing above.

The bounding box is set by the setSize() method but that is protected so not accessible from different package. 

 

However, the setSize() just updates the boundingBox (which has maxX, maxY, etc. fields).  The bounding box is public, so theoretically you can access it directly, but it is also final so I'm not sure if it is editable after it is is initialized (my Java knowledge on this is a bit sketchy).  I've heard that you can only change a final field in the constructor, but the Entity class sets it to all 0s in the constructor so I don't really understand how classes that extend it can change it later, but I guess they also do it in the constructor.  Anyway, you should see if you can change the boundingBox directly, but I suspect you can't unless you're doing it in the constructor of a class that extends Entity.

 

So I think the answer is to use Java reflection.  I think it should work because it is a non-static field, and I believe final fields are editable with reflection if they are non-static.  So try that.  Reflection isn't really that hard to do.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.