Jump to content

Flemmli97

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by Flemmli97

  1. so for around 2 weeks i am not getting a debug.log in any forge instances. the normal log file is fine. i even tried a clean installation of forge. looking at my file it seems the last debug.log i got was from the 24.6. i have no idea what the cause of this might be. the launcher i use is the vanilla launcher
  2. fixed the issue. it did had to to something with the mapping. the reason it didnt work is because i simply used the build jar from the dependency project which of course is obfuscated. needed to use a deobf version of the jar for it to work.
  3. it was the lib folder not libs as i was testing stuff. i know that libs auto adds jars. if you mean mcp yes, both projects have the same mapping
  4. I have the following mod: https://github.com/Flemmli97/FateUBW with the following dependency: https://github.com/Flemmli97/TenshiLib The Fate mod contains the following buildscript (modified as i didnt upload the dependency to curseforge yet): https://pastebin.com/gBypZSrr. It takes the build jar from my file system. When i try to build the project it throws errors like this: "EntityGaeBolg is not abstract and does not override abstract method writeEntityToNBT(NBTTagCompound) in Entity" Relevant classes: https://github.com/Flemmli97/FateUBW/blob/master/src/main/java/com/flemmli97/fatemod/common/entity/EntityGaeBolg.java EntityGaeBolg extends EntityProjectile from the dependency mod TenshiLib which does indeed override said method: https://github.com/Flemmli97/TenshiLib/blob/master/src/main/java/com/flemmli97/tenshilib/common/entity/EntityProjectile.java Judging from another error log: "EntityBabylonWeapon.java:62: error: abstract method entityInit() in Entity cannot be accessed directly" i think the methods of the super class EntityProjectile got lost but i dont know why it does this. Anyone have any ideas?
  5. I have an entity which a player can control via a gui. That entity is also a chunkloader so controlling becomes possible no matter where that entity will be. The gui also displays the entity with specific data e.g. if i tell the entity to stand still it would have a sitting animation which also should be shown in the gui. Now if the entity goes out of render distance its not available to the client anymore and thus the gui shows nothing too. Now all of the client-server sync happens in the EntityTracker but thats all hard coded. The factors of wether an entity should be added/removed to the client world is determined by the tracking distance, which you specify when you register your entity, and your render distance (EntityTrackerEntry#updatePlayerEntity). Is there any other way i can keep an entity always loaded on the client side?
  6. oh... ok then. thx. i was always wondering why then people are saying this. cause codewise it says no limit.
  7. So in 1.13 metadata wont be a thing anymore. To make updating easier for me i now wanting to convert my code to not use metadata. the thing is the expected item + block amount of my mod will probably be around 1000 so i am asking if its smart to do it now (1.12) already, where ids are limited.
  8. I have an entity which keeps the chunk its inside loaded and when it dies it should unload the chunk. To test if my code is working i set up a repeating command block with "say hi", spawned in the entity at the command block and then moved away from it (far enough of course). The log printed "hi" so the chunk loading works. But now if i want to unload the chunk (kill the entity) something strange happens. I put an log message inside onLivingUpdate so i can see if the entity is still ticking. Then the entity upon "killing" it is not immediately removed from the world, but like the enderdragon stays a while. The first thing i do in onDeathUpdate is unload the chunk the entity is in. The logger from the entity stops sending stuff so it seems the entity is unloaded. But the command block is continuing sending the message. How can the command block stay loaded, while the entity does not? the entity and command block is at the same spot and the entity is not moving from there either. Since the entity is immediately unloaded in onDeathUpdate and it cant get processed further so if i tp back the entity will of course still be there. Also tp to that spot and away fixes that issue. Now here the said code: The constructor of the entity (its private since its an abstract helper class) onLivingUpdate onDeathUpdate: and here the complete entity code: https://github.com/Flemmli97/FateUBW/blob/master/src/main/java/com/flemmli97/fatemod/common/entity/servant/EntityServant.java
  9. in theory i should be able to edit the players data file when the entity is saved to disk. that way i can save the chunk, where the entity is saved even after the player is gone
  10. So i have an entity, which when spawned a special way is "binded" to the player. Like a pet but the player can only have one of it. I save the reference to that entity in an capability and then i can manipulate that entity in various ways. That works fine. The issue i have is with saving/loading. I currently save the entitys uuid and then during load search for that uuid. if found i then sets the players data to that entity. however of course if the entity is in an unloaded chunk during the nbt read progress it wont find it and so fails to "rebind" that entity to the player. I also do the same progress from the entity side (save player uuid and search for player) so then when the entity loads it does get rebind to the player. however during the time when the entity is unloaded the data in the capability is of course null so i cant do anything to the entity. is there ways to manipulate unloaded entitys (like tp them to you)? is it smart to save the chunk, the entity is saved and temporarily load that chunk to do stuff?
  11. oh, didnt think of that. yes that worked perfectly
  12. Im trying to disable an entities ai under certain circumstances. As of now i tried to do it with potions. i do not want to do entity#setNoAI as that also disables general movement of it (means it floats in midair and stuff). EntityLiving#tasks has a control flag but due to call order even if i set it in my potion it gets cancelled (or maybe i did it wrong). Is there any way to disable the execution of the ai from an entity? This is my current potion class:
  13. ok. what about this then? i have a list of blockpos that i update daily (so i dont have to use ticking tiles). its not a woldsaveddata and since the client doesnt know about it it should be fine? (one instance of the list is created for each world(dimension))
  14. I have a WorldSavedData which I have a static field for that gets initialized during the WorldEvent.Load. This saves me for example stuff like client-server sync. Is there a downside to this or something else i am missing if i do it this way?
  15. thats why before i place a block i test wether the chunk is loaded and wether it will load neighbor chunks. it seems not to work in 100% of all cases though.
  16. Hello. Currently i am trying to add structures via schematics/nbt to the world. Since the structures aren't chunk sized i would get the "cascading worldgen lag" issue if i just add them to the world. I tried looking into how minecraft does it but it was really confusing for me so i wrote my own handling instead. For that i took this approach: I first search for a position, where the structure can spaw, save it into a WorldSavedData instance and then try generating the structure. To make sure the structure doesn't go into unloaded chunk everytime before a block is placed i check for the neighbor blocks, if they are in loaded chunk via world.isChunkGeneratedAt(pos). if they are, i save that chunk so later, when that chunk gets loaded i generate that chunks part of the structure. Somehow though that check isn't completely good since i'm still occasionally getting that log. Am i missing something there? The project is on github: https://github.com/Flemmli97/RuneCraftory/tree/master/src/main/java/com/flemmli97/runecraftory/common/world
  17. I have implemented a custom crafting system. To actually craft items you have to put a recipe item containing the recipe into the crafting table. how can i cycle through all the possible recipe from that item like in jei? (everything works: crafting, gui, tileentity and render) i only have problems with recipe where i ignore the metadata as i used the oredict wildcard value. i could in theory put the "max" metadata into the item class itself so when the incrementing number (for rendering the item + meta) in the gui render hits that it starts at 0 again but i feel like there should be a better way, like a way to check wether an item has a registered model or something. as it is now its something like this (ignore the exact calculation of displaying the item.): https://pastebin.com/Gw9VLxpz edit: figured out the missing model check, but for future references: is there a way to check for relevant items e.g.: using the ItemDye in recipe ignoring metadata (thus using the oredict wildcard) and only cycle through all available dyes and not make the metadata go past it without hardcoding it for every single item i want to use. (not using the oredictionary entries for that item, which works, but the item itself)
  18. update: i do think i have to use tile entities since i also want to make it "time-skip" combatible (sleeping).
  19. @diesieben07 update in the sense of changing the block to another. @Draco18s thx, ill look more into scheduledBlockUpdate
  20. What are the ways to do a block update? I have a block that need a change every minecraft day. i know of setTickRandomly() or using ticking tile entity but the first one is not something i have in mind and i really dont like ticking tile entities specially since the block updates so less frequent and there might be not few of them (its something like a regenerating ore). I thought of making some kind of list, subscribe to a world tick event and then when time is right update the list. but can blocks even be updated in unloaded chunks? i do have a way using random tick in mind though.
  21. i was thinking more of compability but i now have that problem solved too. that was actually the only reason why i asked.
  22. yeah ik, but the thing is: it wont just be a shifted health system where i add some 0 behind. i will be using the whole scale (weapons can do 1 to 10k damage etc.). well, based off your suggestion i now have an idea to do it easily thx. the only problem with that are now that health displaying mods will be useless
×
×
  • Create New...

Important Information

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