mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 21:57:40 +00:00
ScriptEntity:
-Added setInvisible, setSneaking, setSprinting, and getUniqueID() functions. ScriptLivingBase: -Added getLookVec() function ScriptPlayer: -Added stopUsingItem(), clearItemInUse(), playSound(name,volume,pitch), mountEntity(entity), dropOneItem(shouldDropStack), canHarvestBlock(block), interactWith(entity) functions
This commit is contained in:
1 parent
8db16459df
commit
d41b3b7a7e
3 files changed
+50
-4
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -17,10 +18,7 @@ import noppes.npcs.constants.EnumQuestType;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
import noppes.npcs.controllers.*;
|
||||
import noppes.npcs.entity.EntityDialogNpc;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.ScriptItemStack;
|
||||
import noppes.npcs.scripted.ScriptPixelmonPlayerData;
|
||||
import noppes.npcs.scripted.*;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
import noppes.npcs.scripted.event.FactionEvent;
|
||||
import noppes.npcs.scripted.gui.ScriptGui;
|
||||
@@ -364,6 +362,34 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
public void swingHand(){
|
||||
NoppesUtilPlayer.swingPlayerArm(player);
|
||||
}
|
||||
|
||||
public void stopUsingItem(){
|
||||
player.stopUsingItem();
|
||||
}
|
||||
|
||||
public void clearItemInUse(){
|
||||
player.clearItemInUse();
|
||||
}
|
||||
|
||||
public void playSound(String name, float volume, float pitch){
|
||||
player.playSound(name, volume, pitch);
|
||||
}
|
||||
|
||||
public void mountEntity(Entity ridingEntity){
|
||||
player.mountEntity(ridingEntity);
|
||||
}
|
||||
|
||||
public ScriptEntity dropOneItem(boolean dropStack){
|
||||
return new ScriptEntity(player.dropOneItem(dropStack));
|
||||
}
|
||||
|
||||
public boolean canHarvestBlock(ScriptBlock block){
|
||||
return player.canHarvestBlock(block.getMCBlock());
|
||||
}
|
||||
|
||||
public boolean interactWith(ScriptEntity entity){
|
||||
return player.interactWith(entity.getMCEntity());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param achievement The achievement id. For a complete list see http://minecraft.gamepedia.com/Achievements
|
||||
|
||||
Reference in new issue
Block a user