Jump to content

Recommended Posts

Posted

Hey :)

 

The last few days I tried to find a way to replace a whole (MC) class, but till now I don't have an "end"-solution :c

I thought about copying the new class in the mc jar and deleting the original, but I didn't made it yet (and not fully know how to do so) :/

 

My questions are:

- Is this a good way to do that?

- Are there better/easier ways?

 

~Jango

Posted

This isn't possible.

 

What are you trying to achieve? There's almost certainly a way to do it without needing to replace a whole class.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)

I need to replace the ModelBiped class, because I want to add something to the constructor and the render() method there, and there aren't any events from forge :/

Edited by Jango
spelling
Posted

What's your overall goal? Tell me what you want to do (in terms of what the player will see/do), not how you want to do it.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
3 minutes ago, Jango said:

I want to add some cosmetics to the game

 

You can probably achieve this using RenderLivingEvent.Pre/Post or by adding a LayerRenderer to the Render.

 

Botania renders its baubles and other items with this LayerRenderer. As an example, the cosmetic baubles are rendered by this method.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Thanks for your help, I made it work using a new layer :)

But there is another thing I wanted to change by modifying a mc class. 

What I want to do: Editing the sword hit animation in the ItemRenderer class (One case in a switch statement in the 'renderItemInFirstPerson' method)

But I don't know how I can edit this without replacing the class and as far as I checked the class isn't there any event or something smiliar :/

Posted

So, I want to change it once (while starting eg.), and I want to change the sword blockhit animation (in ItemRenderer class, 'renderItemInFirstPerson' method, 4th switch case statement). My goal is to bring 1.7 animation back in 1.8.

Posted (edited)

So I thougt about it and had the idea that I maybe can replace the itemRenderer field in the Minecraft class using reflections. I created a new Class which extends ItemRenderer and replaced the field in MC successfully. But the problem is now that my changes aren't applied (renderItemInFirstPerson-Method which I've overrided) and I don't know why, because when I check whether the Minecraft.getMinecraft.getItemRenderer() is an instance of my own, new ItemRenderer it returns true :/ Do you have an idea why?

 

Edit: I now got it, so you have to change the itemRenderer in EntityRenderer, too.

Edited by Jango
Posted

The last thing I need is a way to edit the 'sendClickBlockToController' method in the Minecraft class

Is there an Event or something like that which I can use to change it?

Posted
2 minutes ago, diesieben07 said:

Please stop talking terms of "I need to change method X", please formulate your actual goals, i.e. "I would like the player to no longer be able to right-click wooden doors" (or something).

Okey, sorry :/

 

I want the player being able to "blockhit" by holding the rightclick-button on the mouse when he've been holding the leftclick-button.

Posted (edited)

In this video: after 2min 15sek you can see some blockhits (sry, I haven't found an better example)

 

Edited by Jango
Posted (edited)

Thanks for your suggestion, I don't got it yet but I'll keep on trying :)

PS: I definitly don't support bugs or similar stuff,  but many people like this animation (me, too), so I want to bring it in back in 1.8

Edited by Jango

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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