Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions src/main/java/fox/spiteful/forbidden/FMEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
Expand All @@ -38,6 +39,7 @@
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
Expand Down Expand Up @@ -518,16 +520,8 @@ public void onFeelPain(LivingHurtEvent event) {
int doses = 3 * (int) Math.min(event.ammount, event.entityLiving.getHealth());
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
EntityPlayer dom = (EntityPlayer) event.source.getEntity();
int chance = 1;
if (dom.getHeldItem() != null && dom.getHeldItem().getItem() instanceof ItemRidingCrop) {
doses += 3;
chance += 3;
}
if (player.worldObj.provider.dimensionId == -1 && randy.nextInt(30) < chance) {
EntityItem ent = player.entityDropItem(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), 1.0F);
ent.motionY += player.worldObj.rand.nextFloat() * 0.05F;
ent.motionX += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
}
}
ItemSubCollar collar = ((ItemSubCollar) ForbiddenItems.subCollar);
Expand All @@ -538,6 +532,24 @@ public void onFeelPain(LivingHurtEvent event) {
}
}

@SubscribeEvent
public void onBabySpawn(EntityJoinWorldEvent event) {
if (!Config.noLust && !event.world.isRemote
&& event.world.provider.dimensionId == -1
&& event.entity instanceof EntityAnimal baby
&& baby.getGrowingAge() < 0
&& randy.nextInt(3) == 1) {
EntityItem ent = new EntityItem(
event.world,
baby.posX,
baby.posY,
baby.posZ,
new ItemStack(ForbiddenItems.deadlyShards, 1, 4));
ent.delayBeforeCanPickup = 10;
event.world.spawnEntityInWorld(ent);
}
}

@SubscribeEvent
public void onTooltip(ItemTooltipEvent event) {
if (event.itemStack.getItem() instanceof ItemWandCasting) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static void addInfernalism() {
.setPages(
new ResearchPage("forbidden.research_page.NETHERSHARDS.1"),
new ResearchPage("forbidden.research_page.NETHERSHARDS.2b"),
new ResearchPage("forbidden.research_page.NETHERSHARDS.3"))
new ResearchPage("forbidden.research_page.NETHERSHARDS.3b"))
.setStub().setRound().setAutoUnlock().registerResearchItem();

(new DarkResearchItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityGolem;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.passive.EntityPig;
Expand All @@ -20,9 +19,7 @@

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Config;
import fox.spiteful.forbidden.Forbidden;
import fox.spiteful.forbidden.items.ForbiddenItems;

public class ItemRidingCrop extends ItemSword {

Expand All @@ -49,14 +46,6 @@ else if (victim instanceof EntityPlayer || victim instanceof EntityGolem) {
victim.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 200, 1));
victim.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 200, 1));
}
if (!player.worldObj.isRemote && !Config.noLust
&& player.worldObj.provider.dimensionId == -1
&& player.worldObj.rand.nextInt(15) == 1) {
EntityItem ent = victim.entityDropItem(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), 1.0F);
ent.motionY += player.worldObj.rand.nextFloat() * 0.05F;
ent.motionX += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
}
return true;
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/forbidden/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ forbidden.research_text.NETHERSHARDS=Aim to misbehave.
forbidden.research_page.NETHERSHARDS.1=Strange energies swirl through the Nether. On occasion, they have been known to solidify into crystal shards when certain sympathetic events occur.
forbidden.research_page.NETHERSHARDS.2=These crystals are imbued with different vices and have many uses for more unscrupulous Thaumaturges.<BR>There are seven documented types of nether shard, each attuned to a different "deadly sin."<BR><BR><IMG>forbidden:textures/misc/research.png:0:0:111:16:1</IMG><BR>
forbidden.research_page.NETHERSHARDS.2b=These crystals are imbued with different vices and have many uses for more unscrupulous Thaumaturges.<BR>There are six documented types of nether shard, each attuned to a different "deadly sin."<BR><BR><IMG>forbidden:textures/misc/research.png:0:16:95:16:1</IMG><BR>
forbidden.research_page.NETHERSHARDS.3=Wrath Shards crystallize around acts of violence. The more excessive the physical force used, the more likely it is for a Wrath Shard to appear.<BR><BR>Sloth Shards congeal when proxies and accidents are used to collect resources without effort.<BR><BR>Envy Shards are taken from those who have them by those that covet them.<BR><BR>Pride Shards materialize when a creature of truly great power is cut down to size.<BR><BR>Gluttony Shards crystallize when someone feasts.<BR><BR>Greed Shards appear when enchantment is used to turn a profit.
forbidden.research_page.NETHERSHARDS.3=Wrath Shards crystallize around acts of violence. The more excessive the physical force used, the more likely it is for a Wrath Shard to appear.<BR><BR>Sloth Shards congeal when proxies and accidents are used to collect resources without effort.<BR><BR>Envy Shards are taken from those who have them by those that covet them.<BR><BR>Pride Shards materialize when a creature of truly great power is cut down to size.<BR><BR>Gluttony Shards crystallize when someone feasts.<BR><BR>Greed Shards appear when enchantment is used to turn a profit.<BR><BR>Lust Shards emerge from the recreation of fauna.
forbidden.research_page.NETHERSHARDS.3b=Wrath Shards crystallize around acts of violence. The more excessive the physical force used, the more likely it is for a Wrath Shard to appear.<BR><BR>Sloth Shards congeal when proxies and accidents are used to collect resources without effort.<BR><BR>Envy Shards are taken from those who have them by those that covet them.<BR><BR>Pride Shards materialize when a creature of truly great power is cut down to size.<BR><BR>Gluttony Shards crystallize when someone feasts.<BR><BR>Greed Shards appear when enchantment is used to turn a profit.
#
forbidden.research_name.SKULLAXE=Axe of the Skulltaker
forbidden.research_text.SKULLAXE=Off with their heads!
Expand Down
Loading