-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ghostly essence drops for spectral entities
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/mod/emt/harkenscythe/events/HSLivingDropsEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package mod.emt.harkenscythe.events; | ||
|
||
import mod.emt.harkenscythe.HarkenScythe; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraftforge.event.entity.living.LivingDropsEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.eventhandler.EventPriority; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
@Mod.EventBusSubscriber(modid = HarkenScythe.MOD_ID) | ||
public class HSLivingDropsEvent | ||
{ | ||
@SubscribeEvent(priority = EventPriority.LOWEST) | ||
public static void onLivingDrops(LivingDropsEvent event) | ||
{ | ||
EntityLivingBase entity = event.getEntityLiving(); | ||
// TODO: Set entity data to determine spectral variant | ||
if (entity.getCustomNameTag().contains("Spectral")) | ||
{ | ||
event.getDrops().clear(); | ||
} | ||
} | ||
} |