Jump to content

Warix

Forge Modder
  • Posts

    46
  • Joined

  • Last visited

Everything posted by Warix

  1. Isn't that function only called when the armor is on player? If yes, then I can't check if a player is wearing the armor because it won't be called.
  2. How should i check if a player has put the armor on/off because there are a lot of ways to do it.
  3. Hello, I have an armor, and it's special ability should be flying when you wear it, so i made a check in the entity update event and if you are wearing a full set, player.capabilities.allowFlying is set to true, and if you are not it's set to false except if you are in the creative mode. It works, but the problem is , it might make a conflict with other mods. If they want to set that to true, then my mod will set it to false because the player is not wearing the armor. Is there a solution for this , or I will have to remake vanilla flying?
  4. I found the error, it was not my code's fault, for some reason there was only 256mb allocated for minecraft so that's why it was lagging. I added these arguments for JVM: -Xms512m -Xms1024m and then it worked fine.
  5. Hello , I started working on my mod after a few weeks break and now i updated forge and everything and now i have fps drop, screen is freezing every few seconds, and i don't know what's causing it, I tried removing all my events and it didnt help , but what helped is reducing view distance to 2 , when i set it to 8 it's dropping fps but on 16 it freezes. And i know it's probably not my pc because when i try it in vanilla i can play normally even on 32 chunks view distance. You can see my mod's source code here
  6. Hello, i get this error when i try to run Server. But when i run client it runs without crash. I don't know what the problem is but from what i see render is called on server side but i don't know from where , if you need some part of the source code i will post it. Crash reports: https://gist.github.com/Po2kkz/6da52df60c2568222ff6 https://gist.github.com/Po2kkz/349ba4454dffcb232af0
  7. Hello, I need to make an effect to look like light explosion, I was thinking to make an entity with spehere model, and to render it so it scales its size fast, so it looks like its exploding. But I don't know how to make a sphere.
  8. Also how can I make my custom AI work if I disable all other this way. Because i will need it for another item , I will need it to disable all current entities AI and add my own.
  9. Ok, but i wasn't , i'm doing this from event and for all entities(including vanilla).
  10. Thanks that worked . Only that method was protected so i had to use this code directly. event.target.getDataWatcher().updateObject(15, Byte.valueOf((byte)(1)));
  11. Hello i need to make vanilla entities not move when they have specific extended property on them. I tried with removing AI (cleared tasks and targetTasks lists) but that doesn't work for all ( e.g. bats have their own code for moving around). I was thinking of setting entity's position to fixed location from update entity event but that isn't good solution and its also acting weird.
  12. It looks like 2 entities spawned at same location so it looks brighter.
  13. I tried like this: But it didn't work.
  14. Hello , when i try to summon particle it doesn't show up. I tried with different particles but none work, also i checked coordinates and they were ok. So i don't really understand what is problem here. Code where I spawn them: I also tried from client side events and it didn't work there too. But sound works, so that code gets executed too.
  15. Thank you for explanations . It all works now.
  16. I'm still new to modding, so i don't really understand how world and client side work.How do i know which code run on which side ? Also from what i understood i have to send nbt data of entity that player start tracking to its client? I tried that and i don't know how to access that entity on client side. my packet code:
  17. I just changed what you said: IEEP: Rendering: Setting data: Registering on entity construction:
  18. Nothing has changed, it still doesn't save it.
  19. IEEP: Rendering: Entity constructing: Setting data:
  20. I did it all and it works, only properties are not saved after I leave game and come again.
  21. I know that, but i don't know how to make it blue.
  22. Hello, i need to change look of texture ( change its color ) , eg. when i right click with some item on mob it will make it blue. Any clue how to do this? Besides making custom entity with different texture and replacing it with existing entity. Something like this ( i done it with replacing and custom textures , but i need it other way) http://s18.postimg.org/95r39k115/2015_08_25_19_53_17.png[/img]
  23. Hello, i have rocket launcher and when i want it to shoot i made it to spawn entity, and that rocket launcher is riding entity, when that entity attacks something rocket launcher will spawn rocket. I made all that but now i need to make that rocket to go on entity that entity what rocket launcher is ridding is attacking. (basically if rocket launcher rides wolf and wolf starts to attack sheep , rocket will spawn where rocket launcher is) . I tried to move rocket with motionX and others, but i just can't get it right, I'm not sure if there are other simpler ways to attack with flying entity. Rocket is extending EntityFlying ( I can change it if there is easier way to do it).
  24. Thanks, also if somebody doesn't know how to convert degrees to radians you do it like this: int degrees = 90,radians; degrees / (180/Math.PI) = radians;
  25. Hello, when i try to rotate part of model of entity for 90°, it rotates for about 15° i think. i rotate it in model class. model code (before rotation): Model code with rotation: Render code: Before rotation: http://orig03.deviantart.net/50f2/f/2015/249/0/4/2015_09_06_17_20_14_by_warix3-d98l8dn.png[/img] After rotation: http://orig08.deviantart.net/19cf/f/2015/249/a/9/2015_09_06_17_18_59_by_warix3-d98l8el.png[/img]
×
×
  • Create New...

Important Information

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