Initial commit
This commit is contained in:
17
scripts/Generic/rightclick.zs
Normal file
17
scripts/Generic/rightclick.zs
Normal file
@@ -0,0 +1,17 @@
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import crafttweaker.api.events.CTEventManager;
|
||||
import crafttweaker.api.event.entity.player.interact.RightClickItemEvent;
|
||||
|
||||
val DisabledRightClickItems = [
|
||||
<item:apocalypsenow:spear>
|
||||
] as IItemStack[];
|
||||
|
||||
for Item in DisabledRightClickItems
|
||||
{
|
||||
CTEventManager.register<RightClickItemEvent>((event) => {
|
||||
var player = event.player;
|
||||
if Item.anyDamage().matches(player.getMainHandItem()) {
|
||||
event.cancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user