mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-24 14:41:18 -09:00
change death type for the guns
This commit is contained in:
parent
c2a7bab6dc
commit
3d3de34e26
@ -53,12 +53,12 @@
|
|||||||
}
|
}
|
||||||
ModAPI.reflect.prototypeStack(itemClass, nmi_ItemPistol);
|
ModAPI.reflect.prototypeStack(itemClass, nmi_ItemPistol);
|
||||||
nmi_ItemPistol.prototype.$onItemRightClick = function ($itemstack, $world, $player) {
|
nmi_ItemPistol.prototype.$onItemRightClick = function ($itemstack, $world, $player) {
|
||||||
var magic = ModAPI.reflect.getClassByName("DamageSource").staticVariables.magic;
|
var cactus = ModAPI.reflect.getClassByName("DamageSource").staticVariables.cactus;
|
||||||
var world = ModAPI.util.wrap($world);
|
var world = ModAPI.util.wrap($world);
|
||||||
var entityplayer = ModAPI.util.wrap($player);
|
var entityplayer = ModAPI.util.wrap($player);
|
||||||
var shotentity = entityRayCast(entityplayer, world, 12.0)
|
var shotentity = entityRayCast(entityplayer, world, 12.0)
|
||||||
if (shotentity != null){
|
if (shotentity != null){
|
||||||
shotentity.attackEntityFrom(magic, 10);
|
shotentity.attackEntityFrom(cactus, 10);
|
||||||
world.playSoundAtEntity(entityplayer.getRef(), ModAPI.util.str("tile.piston.out"), 1.0, 1.8);
|
world.playSoundAtEntity(entityplayer.getRef(), ModAPI.util.str("tile.piston.out"), 1.0, 1.8);
|
||||||
}
|
}
|
||||||
return $itemstack;
|
return $itemstack;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user