Jump to content

[1.6.4]Entity become invisible after a method is called.


Recommended Posts

Posted

Hello ! I have a little problem, and I'd like if someone was able to help me with it.

 

Basically, I have an entity that acts like a boomerang. It goes well for the first half : I throw it, it goes in the direction it should be going, and whenever it hits the limit distance, or collide, it becomes invisible.

 

I guess this comes from the "returnToOwner();" method, since whenever it is called, the entity get invisible.

 

 

Here are my codes :

 

 

 

Item class :

https://github.com/Gugu42/RatchetAndClankMod/blob/master/com/gugu42/rcmod/items/ItemOmniWrench3000.java

 

Entity class :

https://github.com/Gugu42/RatchetAndClankMod/blob/master/com/gugu42/rcmod/entity/projectiles/EntityWrenchThrown.java

 

Render class :

https://github.com/Gugu42/RatchetAndClankMod/blob/master/com/gugu42/rcmod/render/RenderThrownWrench.java

 

Also, if I remove the line if(!par2World.isRemote) in my Item class, I see a bug :

When I throw the item, I see it two times, and when it collides / must return to me, one gets invisible, and the other stays visible. However, the one I see working well is just a render, and it does not make the action, while the semi-working one breaks the crate etc...

 

I really can't find out what the problem is. Thanks for the help you can give me.

Posted

One observation is that the way you have this written it will call return to owner every tick after it reaches the timer.  Might be on purpose, but can't tell.

 

My guess at your problem is that ther is no owner.

 

You need to ad some log points in the code and watch for certain parts if the code to happen.  That will find it.

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

Making it return to the owner is simply so it knows where to go every tick.

 

What happens is that when it gets to the point of returning, it determines the position it is going to go.

However, if the owner move, it will still go to the point the owner was when it started returning.

 

I'm simply updating the place it's going to every tick.

 

Also, I checked, there is an owner.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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