
AkitaAttribute
Members-
Posts
20 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
AkitaAttribute's Achievements

Tree Puncher (2/8)
0
Reputation
-
OOB Exception when adding entity to world.
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
That worked. Had to modify the whole collection at once. Save it temporarily, then remove the original, modify, then add the modified all at once. I was getting the concurrent exception otherwise, and multi-drop mobs wouldn't drop anything. -
OOB Exception when adding entity to world.
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
I suppose you could tell me to do the GlowingItemEntity in the LivingDropsEvent, but I don't want to cancel that because it's doing other things that I don't want to modify. That sounds like a pain in the ass. -
OOB Exception when adding entity to world.
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
https://gist.github.com/AkitaAttribute/52e1a06ee0c54256f50d615884aadf6f New issues. So @Draco18s, LivingDropsEvent happens first. Which means that I can't run a check on the source of the dropped item to determine duration of the glow, and add that duration to the custom entity. The updated branch takes most of your comments into consideration. I tried to do a tracker for the brief moment I assume exists between LivingDrops and JoinedWorld events to pass the duration between them. This doesn't work, and I'm getting a crash that I thought I had resolved by putting the world.addEntity onto another thread. I'd love to hear input on what you think is the best solution for dealing with the duration between these two events. And more importantly, why I'm getting the ConcurrentModificationException -
OOB Exception when adding entity to world.
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
@Luis_ST Here ya go: https://gist.github.com/AkitaAttribute/b593ebb9c91ad70a7aa3be6a1d048543 -
Game crashes when trying to load modpack
AkitaAttribute replied to ExoticRaichu's topic in Support & Bug Reports
@ExoticRaichu, the logs kinda say to me that it might be a resource pack issue? Can you try removing that? -
how do i give effect when a player picks up a sword ?
AkitaAttribute replied to hypermorire's topic in Modder Support
Here is some base code to work with on "picking up" an item. You can look for attributes on the item picked up, and apply effects as you like. -
[Exception ticking world] - [Caused by: java.lang.ArrayIndexOutOfBoundsException: -1] Really hoping someone has seen this before. I'm probably doing something dumb (doing a lot dumb) that I just don't know is wrong when it comes to "world" stuff. My code: Main SRC Dir Subscribe Event where I'm replacing entities with custom ones: Line 247 Where I'm actually adding the entity to the world: Line 52 I know this is working because I've seen it in my world. After one working instance, the world hangs, and eventually crashes with the below log dump. Please don't harp on poor coding style (the threading for the world I would like to know if that's the issue), as this is a work in progress.
-
Version of forge?... More info bro.
-
ItemEntity version of LivingEvent.LivingUpdateEvent?
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
@Draco18s, that actually helped a lot. I was able to reference this past post: Post and find exactly what I needed. -
ItemEntity version of LivingEvent.LivingUpdateEvent?
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
I supposed I could override it, and make my own event. I was hoping to avoid that kind of work haha. Thanks for the suggestion. It kinda made me think about it more. I was hoping it already existed. I find some of your responses very... unhelpful... on this forum. So I wasn't ready to immediately dismiss that it may exist already. -
ItemEntity version of LivingEvent.LivingUpdateEvent?
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
The big difference I see is that: public void tick() { if (net.minecraftforge.common.ForgeHooks.onLivingUpdate(this)) return; the onLivingUpdate has a Forge Hook. Maybe there isn't a ItemEntity version of this? -
ItemEntity version of LivingEvent.LivingUpdateEvent?
AkitaAttribute replied to AkitaAttribute's topic in Modder Support
I'm trying to subscribe to the non-living entity version of LivingEvent.LivingUpdateEvent. Items floating after drop (their update ticks). Experience orbs (their update ticks). I'm not seeing events to subscribe to non-living entities. EDIT: The goal is to apply a change to them when they are created, then remove it after a certain amount of time is past. This works great when I can just do a quick check to see if the entity has the change already done, then run a check to see if it's time to remove. @SubscribeEvent public void onLivingEntityUpdate(LivingEvent.LivingUpdateEvent event) { if(event.getEntityLiving().isGlowing()) { Entity entity = event.getEntityLiving(); if (glowHelper.removeGlowing(entity)) { entity.setGlowing(false); messageAllPlayers("Attempted to remove glowing. [Glowing][" + entity.isGlowing() + "][UUID][" + entity.getUniqueID() + "]"); } } } -
ItemEntity version of LivingEvent.LivingUpdateEvent?
AkitaAttribute posted a topic in Modder Support
I don't see an event associated with this. I see under ItemEntity's "Tick" method that there is a if (getItem().onEntityItemUpdate(this)) return; Just like there is in the LivingUpdateEvent, however I'm not sure where it corresponds to an event. Inb4 "use your IDE", I did. ItemEvent has very few events branching from it, leading me to believe it's under some other name. Such as: default boolean onEntityItemUpdate(ItemEntity entity) { return getStack().getItem().onEntityItemUpdate(getStack(), entity); } Under the IForgeItemStack. But I honestly don't know how to subscribe to that. I feel like I'm in the right place, but I don't know the correct syntax. I looked on CurseForge for example mods, and although BetterDroppedItems seems like it'd modify this kind of behavior, it doesn't. (just wanted to show ambition rather than just posting for help on first sign of problem.) -
Line 223 does not appear to set glowing off. I've seen it work once. I don't have any kind of loop setting it to true though. https://github.com/AkitaAttribute/rpg-elements/blob/master/src/main/java/magicsixteen/rpgelements/RpgElements.java This class handles adding glowing, and determining if glowing needs to be removed. https://github.com/AkitaAttribute/rpg-elements/blob/master/src/main/java/magicsixteen/rpgelements/util/GlowHelper.java I'm honestly not sure why this isn't removing glowing. Maybe it's client/server difference? But I'm just playing on a local version of the game (ignore other server/client mistakes for now).