Jump to content

Recommended Posts

Posted

Hi i have a problem the EntityEvent.Size Event work not right

when i sit on a entity work it not any more i hope forge can fix this in the next version :)

 

Code:

        @SubscribeEvent
        public void renderPlayerPre(EntityEvent.Size size) {
            if (((event.getEntity().getRidingEntity()) instanceof RocketEntity.CustomEntity)) {
            size.setNewEyeHeight(1f);
            }
        }

Posted (edited)

Define doesn't work please, also why you call your handler "renderPlayerPre" if you are listening to the EntityEvent.Size event? The code above shouldn't even compile, where did you define "event"? You probably meant to use "size" there. One last thing, the Size event is fired also in the constructor of the Entity, where it is unlikely a riding entity already exists..you can easily check that by logging something to the console inside the if statement and check if the message appears or not

Edited by Beethoven92

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Posted
7 minutes ago, Beethoven92 said:

Define doesn't work please, also why you call your handler "renderPlayerPre" if you are listening to the EntityEvent.Size event? The code above shouldn't even compile, where did you define "event"? You probably meant to use "size" there. One last thing, the Size event is fired also in the constructor of the Entity, where it is unlikely a riding entity already exist..you can easily check that by logging something to the console inside the if statement and check if the message appears or not

i have check it already in the console when i leave the entity is it for 1 tick workingand then not any more (only when i check if the player ridding) you can try it self then see you it and without if player ridding a entity is it working. i hope you can help me :)

 

Posted
5 minutes ago, diesieben07 said:

Stop using MCreator and learn basic Java.

i dont use MCreator lol, this workspace based only on a mcreator workspace but the code is from me and i self use Intellij, (is a old workspace, and i have already change the program)

pls help :/ (i dont a MCshit user)

Posted
1 minute ago, diesieben07 said:

Post a Git repo of your mod.

why should i do that? (and btw my github is private) and this is not my problem, pls help only :D

Posted
1 minute ago, diesieben07 said:

but the forge event is dead can you pls help me now or hate you me now because i use mcreator ( yea ok i use mcreator but i use many custom codding) and why i lying because when i say i use Mcreator then help you me not any more :/

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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