Shift right clicking the Cloud Staff will clear Cloud Minions. Note: This can become wasteful of durability if used too much since whenever you activate it again it'll use up a durability point (as is how the staff is designed to work).

This commit is contained in:
bconlon 2020-12-25 18:54:11 -08:00
parent 03166df4f4
commit 7af09ff4d3
1 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import com.gildedgames.the_aether.entities.passive.EntityMiniCloud;
import com.gildedgames.the_aether.items.ItemsAether;
import com.gildedgames.the_aether.player.PlayerAether;
import com.gildedgames.the_aether.registry.creative_tabs.AetherCreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -44,6 +45,16 @@ public class ItemCloudStaff extends Item {
stack.damageItem(1, entityplayer);
}
else if (entityplayer.isSneaking())
{
for (Entity cloud : playerAether.clouds)
{
if (cloud instanceof EntityMiniCloud)
{
((EntityMiniCloud) cloud).lifeSpan = 0;
}
}
}
return stack;
}