Closed nadecancode closed 5 years ago
I would like to use it on my practice server or some pvp servers. Nobody would use 1.13 as pvp server right lol.
I've looked into this in the past. 1.7 doesn't support holograms the way I implemented them (as ArmorStands were introduced in 1.8). I'll see what I can do for you.
Note: Looks like the Minecraft development team remapped its utilities from net.minecraft.util.*
to the more appropriate packages (com.mojang.*
and io.netty.*
).
well just use interfaces or reflections
You can do similar things as Holographic Displays Use horses to show up
NPCs do spawn in 1.7.10 now. I still need to re-implement interaction support. I might have to redo a whole bunch of the library to make TinyProtocol work for the separate versions.
As for now, I'm thinking of making the NPC title support single-line only (up to 32 chars). Using horses to make holograms just seems like a lot of redundant work. Perhaps I'll implement it in the future.
If anyone is thinking of making a PR for this, hit me up.
A preview of the 1.7.10 NPCs:
The issue is not making TinyProtocol compatible with 1.7.10, the issue lies within NPCLib as it automatically assumes the utilities are in com.mojang.*
and io.netty.*
, instead of net.minecraft.util.*
.
So just use this tinyprotocol in your 1.7.10 module. I believe there are some ways to do it.
Also I guess you can do that with reflection. I doubt that there would be some big differences between certain methods across netty versions. Basically the game profiles are exactly same, and as well in NGXDEV's Protocol Wrapper (which was provided above named AntiCheat-Base), he implemented the WrappedGameProfile class to make sure the game profile works for multiple versions.
Finally found some time to make this update. I still need to do some refactoring in order to clean up some of the code.
1.7.10 NPCs also don't allow for multi-line text (yet). Perhaps I'll implement that in the future also.
Need to find a way to make Travis CI work with the 1.7.10 jar, it keeps giving false fails.
Support for 1.7.10 has been added.
You can see the release notes (and download files) here: https://github.com/JitseB/NPCLib/releases/tag/v1.4
I cant create npcs on 1.7.10 with your examples.
My code: `import net.jitse.npclib.NPCLib; import net.jitse.npclib.api.NPC; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerToggleSneakEvent; import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin implements Listener {
private NPCLib npclib;
@Override
public void onEnable() {
this.npclib = new NPCLib(this);
getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
if (event.isSneaking()) {
return;
}
NPC npc = npclib.createNPC();
npc.create(event.getPlayer().getLocation());
npc.show(event.getPlayer());
}
} `
I have only Main class.
sorry, i fixed it
Hello, so, I wanted to report a problem in 1.7, I can create the NPC, however, when I enter 1.7, the name of the npc is not as I left it, it is like [NPC]
Could you provide a reason as to why you’d like support for 1.7.10 to be added? It seems rather unnecessary to add support for a version which’s base version is 5 years old.