Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hunters and vampires don't show up on journeymap #190

Closed
macks2008 opened this issue Jun 19, 2017 · 31 comments
Closed

hunters and vampires don't show up on journeymap #190

macks2008 opened this issue Jun 19, 2017 · 31 comments

Comments

@macks2008
Copy link

macks2008 commented Jun 19, 2017

Versions

  • Minecraft: 1.10.2
  • Forge: build 2185
  • Vampirism: 1.1.2
  • JourneyMap 5.4.6

Issue Description

vampires and hunters do not show on my preferred minimap, JourneyMap. I realize this might be intentional to make inter-faction combat harder, but if it is, it should be optional.

Reproduce Steps

It may have something to do with the server I am playing on running SpongeForge, but if it is, it's still my responsibility to report since it's my own server.
Otherwise, as far as I know, the only reproduction step to see the issue in action is install JourneyMap 5.4.6 and Vampirism. then walk up to a hunter or vampire and check the minimap

Additional Information

@maxanier
Copy link
Member

This is not intentional by Vampirism.

Does this affect singleplayer as well? I remember some there were some settings required server side to allow mobs to be shown (not sure which minimap mod it was).

Are they not showing up at all or is a generic icon showing?

To show the actual icons, some work is needed: http://journeymap.info/Custom_Mob_Icon_Sets
You can either wait until I find time for this, or create a folder with the correctly named and cut mob faces yourself and send it to me.

@macks2008
Copy link
Author

not sure. Let me check

@macks2008
Copy link
Author

@maxanier yes it affects a single player. As far as the settings to show mobs, these appear to already enabled, as I can see other mobs, both hostile and passive.

@macks2008
Copy link
Author

they are not showing up at all. I don't even see a dot

@maxanier
Copy link
Member

If mobs of other mods are showing, but Vampirism's ones are not showing, there must be a strange bug. I will contact the author of JourneyMap maybe he has an idea

@maxanier
Copy link
Member

I've talked to the creator of JourneyMap. This problem is caused by the fact that Vampirism's entities are codewise different from Vanilla mobs (as they are neither always a hostile mob nor a friendly animal).
There currently seems no way of solving this issue as JourneyMap does not provide an API.
Only workaround would be to look for a different Minimap (which either works differently or has an API)

@macks2008
Copy link
Author

macks2008 commented Jun 23, 2017

@maxanier well maybe you can borrow from vanilla's playbook. Spiders have a similar functionality. I'm not sure how they do it exactly, but maybe you could try to figure it out next time you find yourself rewriting a significant portion of your entity code? In the meantime, could you give me a link to the issue so I can see if I can talk JM's author into extending an API or otherwise trying to help the issue? Personally, I don't understand why they wouldn't be displayed if JM were programmed to display all "living" entities (you apparently consider vampires living enough to not be considered "undead" for the purpose of instant health/damage potions, something I disagree with by the way), and I don't understand why JM wouldn't do that way already (I can't think of a vanilla living entity that isn't displayed), so that kind of has me scratching my head as to which of you dropped the ball there... though I suspect it's JM

@maxanier
Copy link
Member

maxanier commented Jun 23, 2017

Did not create an issue, but talked to him on his Discord.

I will try to explain the entity problem (not sure how familiar you are with programming):
There are different codewise types of entities in the game, some implement IMob others are IAnimal.
JM only checks for IMob, EntityVillager, EntityAnimal and a few more, but the only relevant here might be IMob.
All vanilla hostile enemies (including Spiders) include this (or maybe IBoss).
Any creature implementing this is considered hostile and therefore affected by anything (modded) that should protect the player, e.g. turrets, combat minions, special magic stuff ...
While this is wanted in some situations (you are a hunter and there is a vampire), it's unwanted in others (you are a hunter and have hunters that protect your base or you want to level up with one of them).

Thereby I did decide to not make them IMobs. This solution is far from perfect, but I did not find something better yet.

One solution for your problem might be, JM creating a interface that other mods could copy to their code and implement it for creatures that should be displayed, but are neither of the classes above.
Alternatively, he could check the class name or entity name (in addition to IMob etc.) and make those configurable.

@macks2008
Copy link
Author

I'm familiar enough with programming to understand class inheritance, so I understand what you said. It still doesn't change the fact that, as far as I understand, there is no reason JM should not be displaying anything that's considered a "living" entity. I'm not sure the exact details about what's considered "living" and what's not, but if I'm not mistaken, it's a superclass to IMob and the other vanilla classes you mentioned.... and I'm pretty sure Minecarts are not considered living 😛. If I'm correct, perhaps you should change your code to inherit from that if it doesn't already, and if it does, then JM needs to fix its shit

@maxanier
Copy link
Member

maxanier commented Jun 23, 2017

I'm extending a class that clearly states that it is a living entity (EntityCreature). Many mods respect that and consider Vampirism mods as living entities.
However, @techbrew-mc said he had problems with displaying all EntityCreatures, because some (stupid?) mod authors used subclasses of this as dummies for something (not sure how exactly), which would then show up on the map even though they were not visible(?) in the world.

@macks2008
Copy link
Author

ah, well that's unfortunate...

@macks2008
Copy link
Author

I guess I'll just deal with it for now, and then use a different minimap when I rebuild the modpack (which I was planning on doing anyway)

@macks2008
Copy link
Author

@maxanier something you may have missed on the Discord, as it appears you had already left the server:
"techbrew - Last Thursday at 6:38 PM
I mean, IMob is literally an empty interface -- shouldn't be too much trouble, @maxanier 😃"
is he wrong, or do you just not feel like worrying about a mini map compatibility issue? because I've been thinking, and I would really prefer not switching to a different minimap as well known and familiar as JM is... so it kind of sucks that it's not completely compatible. On the other hand, I do understand not wanting to fix an issue that's a simple matter of "I can't see where something is on the map"

at any rate, I'm going to see if I can talk TechBrew into adding a more compatibility-friendly means of making entities visible on the map, such as an API as you suggested, Maybe he could at least add a blacklist/whitelist config which would allow people to manually add entities by un-localized name.

IDK, but there's got to be a mutually agreeable solution somewhere here

@mysticdrew
Copy link

mysticdrew commented Jun 24, 2017

We have an API.. @maxanier
https://minecraft.curseforge.com/projects/journeymap-api
https://bitbucket.org/TeamJM/journeymap-api

You can draw things on the map with the api.

@techbrew-mc
Copy link

I don't think the JM API is called for in this case. Simply add "implements IMob" to the class declaration and you're covered.

@maxanier
Copy link
Member

maxanier commented Jun 25, 2017

Any creature implementing this (IMob) is considered hostile and therefore affected by anything (modded) that should protect the player, e.g. turrets, combat minions, special magic stuff ...
While this is wanted in some situations (you are a hunter and there is a vampire), it's unwanted in others (you are a hunter and have hunters that protect your base or you want to level up with one of them).
Therfore I did decide to not make them IMobs. This solution is far from perfect, but I did not find something better yet.

Maybe I will try to suggest/PR some kind of isHostileTo method into Forge, but I don't think this will be successful.

One posibility might be to add some kind of "IEntityToShow" interface (empty) to the API, which I can then add to my classes (and let FML strip it if JM is not installed), but I can understand if you do not like this idea.

@maxanier
Copy link
Member

Oh, I just found out there is a IAnimals interface in Minecraft. IMob and apparently all other relevant entities implement this.
Since this is not implemented by EntityCreature there should not be the same issue. So maybe you can display all entities implementing this, @techbrew-mc, and I will add it to all my entities.

@maxanier maxanier reopened this Jun 25, 2017
@maxanier maxanier removed the wontfix label Jun 25, 2017
@techbrew-mc
Copy link

IAnimal is also supported by JM. The isHostile() method on EntityCreature is checked to determine whether to show the creature as passive or hostile on the mob radar.

@maxanier
Copy link
Member

Ok, then I'm sorry, I always assumed that IAnimals was reserved for animals, so I didn't really think about it when you said that JM supports it.
But since IAnimals seems to be implemented by any kind of living entity, I will simply add that to my entities.

However, I'm not sure which EntityCreature#isHostile() method you are referring to (can't find any at MC 1.11)

@techbrew-mc
Copy link

I am on my phone and AFK, sorry, was going from memory. It might be just a field, or on EntityLivingCreature.

@maxanier
Copy link
Member

ok, np

@mysticdrew
Copy link

Looks like we just check if the entity's attack target is the player to see if it is hostile. It is not a method on any entity class.

@techbrew-mc
Copy link

Yeah, I could well be remembering something from MC 1.0 or anything since. It's been abstracted in JM code for a long time. Thanks Mystic.

@maxanier
Copy link
Member

Thx, that works perfectly

@maxanier
Copy link
Member

maxanier commented Jun 26, 2017

@techbrew-mc I've added the IAnimals interface to all my entities. But they still do not show up, while all vanilla entities show up. (Edit: Using JM 1.11.2 4.3.5.277)
Do I have to activate a special setting to make them show? Or are you share JM looks for IAnimals and not just EntityAnimal?

maxanier added a commit that referenced this issue Jun 26, 2017
Fixed creature types

(cherry picked from commit e962b12)
maxanier added a commit that referenced this issue Jun 26, 2017
Fixed creature types

(cherry picked from commit e962b12)

(cherry picked from commit ed11637)
@maxanier
Copy link
Member

If you need a test mod, the latest 1.11 beta of Vampirism includes these changes: https://minecraft.curseforge.com/projects/vampirism-become-a-vampire/files/2443231

@maxanier
Copy link
Member

@macks2008 Did you use JourneyMap and Vampirism together lately.
All Vampirism mobs are implementing IAnimals since last July now.

@maxanier
Copy link
Member

Going to close this.
In SP this should work acceptable.
On servers I am not sure what the current situation is, but I didn't hear any complaints lately

I added a wiki entry to summarize this issue
https://github.com/TeamLapen/Vampirism/wiki/IMob-issue

@macks2008
Copy link
Author

macks2008 commented Sep 20, 2020

hi, I actually started using these mods together again recently on Minecraft 1.15.

as you said, It seems to work okay in single player, but on my server it's still not showing the IMobs on journeymap. I would understand if they didn't show as hostile (since factions kind of blur that line), but I wish they at least showed a gray dot like passive mobs do.

also worth noting (though this might belong in a separate issue), the mobs have unlocalized names when examined with HWYLA/WAWLA or when something like Neat is used to display their entity name. Most notably, it shows when killed by one of them
image

maxanier added a commit that referenced this issue Sep 21, 2020
Maybe they will show up on JourneyMap now #190
@maxanier
Copy link
Member

I have marked vampires and hunters as INPC according to JourneyMap Wiki that should make them show up. (Maybe hostile, maybe not).
Probably only Vampirismm 1.7+ though

@macks2008
Copy link
Author

ok, not sure when I will get around to updating but I'll definitely let you know if it didn't work 😉

maxanier added a commit to maxanier/Vampirism that referenced this issue Oct 23, 2020
…apen#190

Fixed creature types

(cherry picked from commit e962b12)

(cherry picked from commit 1c0d78a)
maxanier added a commit to maxanier/Vampirism that referenced this issue Oct 23, 2020
Maybe they will show up on JourneyMap now TeamLapen#190
maxanier added a commit that referenced this issue Nov 6, 2020
Maybe they will show up on JourneyMap now #190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants