mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 20:52:36 +00:00
Added several more functions to pre-existing classes:
-Spawner, Transport, Healer, Guard, Bard jobs received more functions. -Added more functions to the transporter role. -IRole: Added getNpc() function. -IAnimal, IEntityLiving, and IEntityLivingBase received more functions from their MC counterparts. -Nearly every function with that takes position/vector parameters now has an equivalent with IPos as a parameter instead.
This commit is contained in:
1 parent
112e82a09d
commit
e9a8f8cebc
51 files changed
+1025
-227
No files matched your search
@@ -12,6 +12,7 @@ import noppes.npcs.controllers.data.PlayerTransportData;
|
||||
import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.controllers.data.TransportLocation;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.interfaces.handler.data.ITransportLocation;
|
||||
|
||||
public class RoleTransporter extends RoleInterface{
|
||||
|
||||
@@ -77,12 +78,12 @@ public class RoleTransporter extends RoleInterface{
|
||||
}
|
||||
}
|
||||
|
||||
private void unlock(EntityPlayer player, TransportLocation loc){
|
||||
public void unlock(EntityPlayer player, ITransportLocation loc){
|
||||
PlayerTransportData data = PlayerDataController.instance.getPlayerData(player).transportData;
|
||||
if(data.transports.contains(transportId))
|
||||
return;
|
||||
data.transports.add(transportId);
|
||||
player.addChatMessage(new ChatComponentTranslation("transporter.unlock", loc.name));
|
||||
player.addChatMessage(new ChatComponentTranslation("transporter.unlock", loc.getName()));
|
||||
}
|
||||
public TransportLocation getLocation(){
|
||||
if(npc.isRemote())
|
||||
@@ -94,9 +95,9 @@ public class RoleTransporter extends RoleInterface{
|
||||
return loc != null && loc.id == transportId;
|
||||
}
|
||||
|
||||
public void setTransport(TransportLocation location) {
|
||||
transportId = location.id;
|
||||
name = location.name;
|
||||
public void setTransport(ITransportLocation location) {
|
||||
transportId = location.getId();
|
||||
name = location.getName();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user