mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-12 08:17:56 +00:00
Change Lust shards to drop from breeding (#26)
This commit is contained in:
1 parent
8a5dbe7019
commit
d3d7ca7c4e
4 files changed
+23
-21
No files matched your search
@@ -23,6 +23,7 @@ import net.minecraft.entity.monster.EntitySilverfish;
|
||||
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;
|
||||
@@ -38,6 +39,7 @@ import net.minecraft.util.StatCollector;
|
||||
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;
|
||||
@@ -518,16 +520,8 @@ public class FMEventHandler {
|
||||
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);
|
||||
@@ -538,6 +532,24 @@ public class FMEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@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) {
|
||||
|
||||
@@ -173,7 +173,7 @@ public class ForbiddenResearch {
|
||||
.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(
|
||||
|
||||
@@ -3,7 +3,6 @@ package fox.spiteful.forbidden.items.tools;
|
||||
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;
|
||||
@@ -20,9 +19,7 @@ import net.minecraft.world.World;
|
||||
|
||||
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 {
|
||||
|
||||
@@ -49,14 +46,6 @@ public class ItemRidingCrop extends ItemSword {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in new issue
Block a user