fix commit

This commit is contained in:
sainagh
2026-07-25 16:20:42 -05:00
parent 9396611ce0
commit c6df59caf7
3226 changed files with 209810 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
#modloaded iceandfire
import crafttweaker.damage.IDamageSource;
import crafttweaker.entity.IEntityLivingBase;
import crafttweaker.event.PlayerInteractEntityEvent;
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.Item;
import mods.contenttweaker.IItemRightClick;
import mods.contenttweaker.Commands;
import mods.contenttweaker.ItemFood;
import mods.contenttweaker.IItemFoodEaten;
import mods.contenttweaker.MutableItemStack;
import mods.contenttweaker.Hand;
import mods.contenttweaker.World;
import mods.contenttweaker.IItemUpdate;
import mods.contenttweaker.Player;
import crafttweaker.player.IPlayer;
import crafttweaker.block.IBlock;
import crafttweaker.data.IData;
import crafttweaker.entity.IEntityEquipmentSlot;
events.onPlayerInteractEntity(function(event as PlayerInteractEntityEvent) {
if (event.world.isRemote()) {
return;
}
val heldItem = event.item;
// [edit item name in the bracket handler]
if (!isNull(heldItem) && heldItem.definition.id.matches(<contenttweaker:runes_of_the_love>.definition.id)) {
if (!event.target instanceof IEntityLivingBase) {
return;
}
val target as IEntityLivingBase = event.target;
if ((target.definition.id != "aoa3:realmshifter") || !target.isAlive()) {
return;
}
if (!(target.mainHandHeldItem.matches(<contenttweaker:stone_of_the_love>))) {
return;
}
Commands.call("summon Item ~ ~ ~ {Item:{id:\"contenttweaker:call_of_the_love\",Count:4b}}", event.player, event.world, true, true);
heldItem.mutable().shrink(1);
}
});