Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

knokko

Members
  • Joined

  • Last visited

Everything posted by knokko

  1. Ooohhhh.... I thought you meant that writeNoNBT was in the block class. I will try what you are saying.
  2. first: I don't think you have readed the code good because everything is allready saved in the tileentity. I didn't even find one for the block. second: What is the use of a container? And It doesn't even seems it saves integers.
  3. Create a static randomizer and change the value every tick.
  4. hello guys, I have made a noob version of a GUI, but the tileEntity is not saving the data. Here is the tileentity code: public class TileEntityMetalEnchanter extends TileEntity{ public MetalEnchanter enchanter; public Item powder; public int amountPowder; public int amountIron; public int ticksExisted; public void updateEntity(){ if(enchanter == null && worldObj.getBlock(xCoord, yCoord, zCoord) == EnderpowerBlocks.metalenchanter){ enchanter = (MetalEnchanter) worldObj.getBlock(xCoord, yCoord, zCoord); } if(enchanter != null && !worldObj.isRemote){ if(enchanter.input_powder != null){ if(enchanter.input_powder.stackSize < 1){ enchanter.input_powder = null; } } if(enchanter.input_iron != null && amountIron > 0){ if(enchanter.input_iron.stackSize == 0 && ticksExisted <= 5){ enchanter.input_iron.stackSize = amountIron; } } if(enchanter.input_iron != null){ if(enchanter.input_iron.stackSize > 0 || ticksExisted >= 5){ amountIron = enchanter.input_iron.stackSize; } } if(enchanter.input_powder == null && amountPowder > 0 && ticksExisted < 5 && powder != null){ enchanter.input_powder = new ItemStack(powder, amountPowder); } System.out.println("amountIron = " + amountIron); System.out.println(powder); System.out.println(amountPowder); } ++ticksExisted; } public void writeToNBT(NBTTagCompound nbt){ super.writeToNBT(nbt); if(enchanter != null){ if(enchanter.input_iron != null){ if(enchanter.input_iron.stackSize > 0){ nbt.setInteger("amountIron", enchanter.input_iron.stackSize); } } if(enchanter.input_powder != null){ nbt.setInteger("amountPowder", enchanter.input_powder.stackSize); nbt.setInteger("itemPowder", Item.getIdFromItem(enchanter.input_powder.getItem())); } } } public void readFromNBT(NBTTagCompound nbt){ super.readFromNBT(nbt); amountIron = nbt.getInteger("amountIron"); if(nbt.getInteger("itemPowder") != 0){ powder = Item.getItemById(nbt.getInteger("itemPowder")); amountPowder = nbt.getInteger("amountPowder"); } } } Here is the block code: public class MetalEnchanter extends BlockContainer{ @SideOnly(Side.CLIENT) public IIcon top; @SideOnly(Side.CLIENT) public IIcon bottom; public ItemStack input_iron = new ItemStack(Items.iron_ingot, 0); public ItemStack input_powder; public ItemStack output; public MetalEnchanter() { super(Material.rock); setHardness(5); setResistance(10); } @Override public TileEntity createNewTileEntity(World world, int i) { return new TileEntityMetalEnchanter(); } @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { if(side == 0){ return bottom; } if(side == 1){ return top; } else { return blockIcon; } } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister icon) { this.blockIcon = icon.registerIcon(R.T + "metalenchanter_side"); this.bottom = icon.registerIcon(R.T + "metalenchanter_bottom"); this.top = icon.registerIcon(R.T + "metalenchanter_top"); } public boolean onBlockActivated(World world, int x, int y,int z, EntityPlayer player, int side, float f1, float f2, float f3){ if(player.getCurrentEquippedItem() != null && !world.isRemote){ if(player.getCurrentEquippedItem().getItem() == Items.iron_ingot && input_iron.stackSize < 64){ player.getCurrentEquippedItem().stackSize -= 1; input_iron.stackSize += 1; } if(input_powder != null){ if(input_powder.stackSize < 64){ if(player.getCurrentEquippedItem().getItem() == input_powder.getItem()){ player.getCurrentEquippedItem().stackSize -= 1; input_powder.stackSize += 1; } } } else if(input_powder == null){ System.out.println("input_powder = null."); if(isValidItem(player)){ input_powder = new ItemStack(player.getCurrentEquippedItem().getItem(), 1); player.getCurrentEquippedItem().stackSize -= 1; } } } if(!world.isRemote){ System.out.println(input_iron); } return true; } public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player){ if(player.getCurrentEquippedItem() != null && !world.isRemote){ if(input_iron.stackSize > 0 && player.getCurrentEquippedItem().getItem() == Items.iron_ingot){ player.inventory.addItemStackToInventory(new ItemStack(Items.iron_ingot)); input_iron.stackSize -= 1; } if(input_powder != null){ if(input_powder.getItem() == player.getCurrentEquippedItem().getItem() && input_powder.stackSize > 0 && player.getCurrentEquippedItem().stackSize < 64){ input_powder.stackSize -= 1; player.getCurrentEquippedItem().stackSize += 1; } } } else if(player.getCurrentEquippedItem() == null && !world.isRemote){ if(input_iron.stackSize > 0){ player.inventory.addItemStackToInventory(new ItemStack(Items.iron_ingot, input_iron.stackSize)); input_iron.stackSize = 0; } if(input_powder != null){ player.inventory.addItemStackToInventory(input_powder); input_powder = null; } } } public void breakBlock(World world, int x, int y, int z, Block block, int metadata) { if(input_iron.stackSize > 0){ world.spawnEntityInWorld(new EntityItem(world, x, y, z, input_iron)); } if(input_powder != null){ world.spawnEntityInWorld(new EntityItem(world, x, y, z, input_powder)); } if(output != null){ world.spawnEntityInWorld(new EntityItem(world, x, y, z, output)); } super.breakBlock(world, x, y, z, block, metadata); } public boolean isValidItem(EntityPlayer player){ if(player.getCurrentEquippedItem().getItem() == EnderpowerItems.cursedpowder || player.getCurrentEquippedItem().getItem() == EnderpowerItems.poison || player.getCurrentEquippedItem().getItem() == EnderpowerItems.witherpowder){ return true; } else { return false; } } }
  5. Servers often use the slowness effect. You can use it as a sort of zoom.
  6. I don't believe you have told me that allready. And more important: Is there a way to let the client being called or can I better create an invisible entity that spawns particles and dies after it?
  7. First: Show your class. Second: There is called a method attackEntityFrom(DamageSource damage, float f). This method is called when the mob is attacked. Maybe this is a good tip for you.
  8. hello guys, I want to spawn a particle when an entity is attacked. But the particle doesn't spawn or I don't see it. Does anybody know why? @SubscribeEvent public void hurtEvent(LivingHurtEvent event){ if(event.entityLiving != null){ event.entityLiving.worldObj.spawnParticle("reddust", event.entityLiving.posX, event.entityLiving.posY + 2, event.entityLiving.posZ, 0, 0, 0); System.out.println("attack is detected"); } } The message "attack is detected" just spawns in the console, but I don't see a particle. I have tried a world.Isremote check but that only blocked the message. It is registered in the initializationevent.
  9. If the texture is wrong, the mob should have the right form but is should be black and purple. And I really don't know what is wrong.
  10. This tile entity doesn't have the boolean for updating every tick and updates every tick anyway: public class TileEntityEnderLift extends TileEntity { public void updateEntity(){ List mobs = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord + 1, zCoord - 0.5, xCoord + 0.5, yCoord + 100, zCoord + 0.5)); for (int j = 0; j < mobs.size(); ++j){ EntityLivingBase mob = (EntityLivingBase) mobs.get(j); mob.motionY = 0.1; mob.fallDistance = 0; } } }
  11. Your render class is not equal to one of my render classes. I will show you one that is surely working: but keep in your mind that the problem can be somewhere else. public class RenderEnderhunter extends RenderLiving { private static final ResourceLocation texture = new ResourceLocation(R.T + "textures/entities/enderhunter.png"); protected ModelEnderhunter modelEntity; public RenderEnderhunter(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); modelEntity = ((ModelEnderhunter) mainModel); } public void renderEnderhunter(EntityEnderhunter entity, double x, double y, double z, float u, float v){ super.doRender(entity, x, y, z, u, v); } public void doRenderLiving(EntityLiving entityLiving, double x, double y, double z, float u, float v){ renderEnderhunter((EntityEnderhunter)entityLiving, x, y, z, u, v); } public void doRender(Entity entity, double x, double y, double z, float u, float v){ renderEnderhunter((EntityEnderhunter)entity, x, y, z, u, v); } @Override protected ResourceLocation getEntityTexture(Entity var1) { return texture; } }
  12. I don't know why... but it is solved. Now he just remembers me. And I have hardly edited writeToNBT. But I have downgraded java, maybe that has solved it?
  13. For tile entities it is updateEntity(){ }. And that boolean is not required because it is standartly true.
  14. But every import info is written to nbt. You can read that in my code almost down. But why is it not readed correctly?
  15. Does really nobody know how to save custom data if you enter another dimension? Does nobody need this ever?
  16. If you are new to modding you can better start with easy things. If you aks me, GUI's are 1 of the most difficult things to add. But if you want to try, use youtube to get video's for custom furnaces.
  17. Add the next rule to your constructors and you are finished: "this.tasks.addTask(0, new EntityAISwimming(this));";
  18. You could use ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(2, 200, 1));
  19. You can use control + z for undo. Why do you not test if I was right. And left click the blue link in the console that points at your applyEntityAttributes, it will mark the rule where it goes wrong.
  20. For walking: player.moveEntity(0,0,1); futher I don't know. But do you want a robot or do you want to control the player?
  21. try using world.getEntititiesWithinAABB(EntityItem.class,...)
  22. knokko replied to a post in a topic in Modder Support
    That can't be very difficult I think, here is a little bit of the code you will need: @SubscribeEvent public void hurtEvent(LivingHurtEvent event){ if(event.source.getEntity() != null){ event.entityLiving.setPosition... } }
  23. hello guys, I have a problem with my mob again... I have added some lines of custom information. But they seems to disappear all if I enter the nether. I believe entering a new dimension means that a mob get removed and the games places a copy in the new dimension. But the custom data seems to get removed. Can anybody help me with this? here is the entity class: public class EntityUndeadMage extends EntityAnimal{ /** * The summoner is the player that has summoned this mob. * This mob is programmed to help the summoner. */ public EntityPlayer summoner; /** * The player name of the summoner. */ public String summonerName; public UUID summonerUUID; /** * The type of magic this mob uses. * 0 = healing * 1 = mixed * 2 = offensive */ public int mageType; double movementSpeed = this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getBaseValue(); /** * The current mana the mob has */ public int mobMana; /** * The time this mob can't cast spells. */ public int manaCooldown; public String summonerId; /** * returns true if the mob should follow the summoner. * returns false if the mob should keep on the place where it is. */ public boolean guardSummoner = true; /** * The way this mob choses his target. * 0 = defensive, it will only attack mobs that attack him, his partners or the summoner. * 1 = helper, it will attack all mobs that the summoner attacks too and the defensive targetting. * 2 = offensive, the mob will attack every monster it sees. */ public int fightType; /** * The last mob that attacked this mob. */ public Entity lastAttacker; public EntityLivingBase target; /** * A required constructor for a mob. * * Do not use this constructor to summon this mob. * Use the constructor world, summoner, mageType, x, y, z. * @param world */ public EntityUndeadMage(World world) { super(world); this.setSize(0.9F, 1.8F); } /** * * @param world - The world the mob has to spawn. * @param summoner - The player that summons this mob. * @param mageType - The type of magic this mob will use. 0 = positive 1 = mixed 2 = offensive * @param x - The X location the mob has to spawn. * @param y - The Y location the mob has to spawn. * @param z - The Z location the mob has to spawn. */ public EntityUndeadMage(World world, EntityPlayer summoner, int mageType, double x, double y, double z){ super(world); this.setSize(0.6F, 1.8F); setPosition(x, y, z); prevPosX = x; prevPosY = y; prevPosZ = z; this.summoner = summoner; this.mageType = mageType; } /** * Returns true if the newer Entity AI code should be run */ public boolean isAIEnabled() { return true; } /** * The base attributes of this mob. */ protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35); } /** * Returns the sound this mob makes while it's alive. */ protected String getLivingSound() { return null; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.zombie.hurt"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.zombie.hurt"; } protected void func_145780_a(int x, int y, int z, Block block) { this.playSound("mob.zombie.step", 0.15F, 1.0F); } /** * Returns the volume for the sounds this mob makes. */ protected float getSoundVolume() { return 0.4F; } protected Item getDropItem() { return Items.bone; } /** * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param * par2 - Level of Looting used to kill this mob. */ protected void dropFewItems(boolean hitbyplayer, int lootinglevel) { int j = this.rand.nextInt(3) + this.rand.nextInt(1 + lootinglevel); int k; for (k = 0; k < j; ++k) { this.dropItem(Items.bone, 1); } j = this.rand.nextInt(3) + 1 + this.rand.nextInt(1 + lootinglevel); for (k = 0; k < j; ++k) { if (this.isBurning()) { this.dropItem(Items.skull, 1); } else { this.dropItem(Items.skull, 1); } } } /** * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. */ public EntityUndeadMage createChild(EntityAgeable ageable) { return new EntityUndeadMage(this.worldObj); } public void onUpdate(){ super.onUpdate(); updateMana(); getSummoner(); if(summoner != null){ useMagic(); this.faceEntity(summoner, 0, 0); if(guardSummoner){ followSummoner(); } } } public void getSummoner() { if(summonerUUID == null && summoner == null && !worldObj.isRemote){ if(!summonerId.isEmpty()){ summonerUUID = UUID.fromString(summonerId); System.out.println(summonerId); } } if(summonerUUID != null && summoner == null){ summoner = worldObj.func_152378_a(summonerUUID); } if(summonerUUID != null){ summonerId = summonerUUID.toString(); } if(summoner != null && summonerUUID == null){ summonerUUID = summoner.getUniqueID(); } super.setInPortal(); } public void useMagic() { if(mageType == 0){ useHealingMagic(); } if(mageType == 1){ useMixedMagic(); } if(mageType == 2){ useOffensiveMagic(); } } public void useOffensiveMagic() { } public void useMixedMagic() { System.out.println(this.target); List partners = worldObj.getEntitiesWithinAABB(EntityUndeadMage.class, AxisAlignedBB.getBoundingBox(summoner.posX - 20, summoner.posY - 20, summoner.posZ - 20, summoner.posX + 20, summoner.posY + 20, summoner.posZ + 20)); for (int j = 0; j < partners.size(); ++j){ EntityUndeadMage partner = (EntityUndeadMage) partners.get(j); if(partner.getLastAttacker() != null && fightType == 0){ this.target = partner.getLastAttacker(); if(!this.target.isPotionActive(2) && mobMana >= 200){ this.target.addPotionEffect(new PotionEffect(2, 100, 5)); mobMana -= 200; } } } if(this.target != null && fightType == 0){ if(!this.target.isPotionActive(2) && mobMana >= 200){ this.target.addPotionEffect(new PotionEffect(2, 100, 5)); mobMana -= 200; } } } public void useHealingMagic() { if(summoner.isBurning() && !summoner.isPotionActive(12) && mobMana >= 200){ summoner.addPotionEffect(new PotionEffect(12, 40)); mobMana -= 200; worldObj.spawnParticle("flame", posX, posY, posZ, 0D, 0D, 0D); } List partners = worldObj.getEntitiesWithinAABB(EntityUndeadMage.class, AxisAlignedBB.getBoundingBox(summoner.posX - 20, summoner.posY - 20, summoner.posZ - 20, summoner.posX + 20, summoner.posY + 20, summoner.posZ + 20)); for (int j = 0; j < partners.size(); ++j){ EntityUndeadMage partner = (EntityUndeadMage) partners.get(j); if(partner.summoner == summoner){ if(partner.isBurning() && !partner.isPotionActive(12)){ if(mobMana >= 200){ partner.addPotionEffect(new PotionEffect(12, 40)); mobMana -= 200; } } if(partner.getHealth() >= 11 && partner.getHealth() <= 19 && !partner.isPotionActive(10) && mobMana >= 20){ partner.addPotionEffect(new PotionEffect(10, 100)); mobMana -= 20; } if(partner.fallDistance >= 4 && mobMana >= 100){ partner.fallDistance = 0; mobMana -= 100; } if(partner.getHealth() <= 10 && partner.getHealth() >= 6 && mobMana >= 100 && !partner.isPotionActive(10)){ partner.addPotionEffect(new PotionEffect(10, 100, 1)); mobMana -= 100; } if(partner.getHealth() <= 10 && partner.getHealth() >= 6 && partner.isPotionActive(10) && mobMana >= 100){ partner.heal(1F); mobMana -= 100; } if(partner.getHealth() <= 5 && partner.getHealth() >= 1 && mobMana >= 500 && !partner.isPotionActive(10)){ partner.addPotionEffect(new PotionEffect(10, 100, 2)); mobMana -= 500; } if(partner.getHealth() <= 5 && partner.getHealth() >= 1 && mobMana >= 1000){ mobMana -= 1000; partner.heal(5F); } } } if(summoner.getHealth() >= 11 && summoner.getHealth() <= 19 && !summoner.isPotionActive(10) && mobMana >= 20){ summoner.addPotionEffect(new PotionEffect(10,100)); mobMana -= 20; } if(summoner.fallDistance >= 4 && mobMana >= 100){ summoner.fallDistance = 0; mobMana -= 100; } if(summoner.getHealth() <= 10 && summoner.getHealth() >= 6 && !summoner.isPotionActive(10) && mobMana >= 100){ summoner.addPotionEffect(new PotionEffect(10, 10, 1)); mobMana -= 100; } if(summoner.getHealth() <= 10 && summoner.getHealth() >= 6 && summoner.isPotionActive(10) && mobMana >= 100){ summoner.heal(1F); mobMana -= 100; } if(summoner.getHealth() <= 5 && summoner.getHealth() >= 1 && !summoner.isPotionActive(10) && mobMana >= 500){ summoner.addPotionEffect(new PotionEffect(10, 100, 2)); mobMana -= 500; } if(summoner.getHealth() <= 5 && summoner.getHealth() >= 1 && mobMana >= 1000){ mobMana -= 1000; summoner.heal(5F); } } public void updateMana() { if(mobMana <= 5000){ mobMana += 1; } if(mobMana >= 5001){ mobMana = 5000; } if(manaCooldown >= 1){ manaCooldown -= 1; } if(manaCooldown <= 0){ manaCooldown = 0; } } public void followSummoner() { if(summoner != null){ if(summoner.posX >= posX + 5){ moveEntity(movementSpeed , 0, 0); } else if(summoner.posX <= posX - 5){ moveEntity(-1 * movementSpeed, 0, 0); } if(summoner.posZ >= posZ + 5){ moveEntity(0, 0, movementSpeed); } else if(summoner.posZ <= posZ - 5){ moveEntity(0, 0, -1 * movementSpeed); } if(this.onGround && summoner.posY >= posY + 2){ moveEntity(0, 3.0, 0); } if(summoner.posX >= posX + 16 || summoner.posX <= posX - 16 ||summoner.posY >= posY + 16 || summoner.posY <= posY - 16 || summoner.posZ >= posZ + 16|| summoner.posZ <= posZ - 16){ if(summoner.onGround || summoner.handleWaterMovement()){ setPosition(summoner.posX, summoner.posY, summoner.posZ); } } if(summoner.posX >= posX + 100 || summoner.posX <= posX - 100 || summoner.posZ >= posZ + 100 || summoner.posZ <= posZ - 100){ setPosition(summoner.posX, summoner.posY, summoner.posZ); } if(summoner.worldObj != null && worldObj != summoner.worldObj){ worldObj = summoner.worldObj; } } } public void writeEntityToNBT(NBTTagCompound nbt){ super.writeEntityToNBT(nbt); if(summoner != null){ nbt.setString("summonerUUID", summonerId); } nbt.setInteger("mobMana", mobMana); nbt.setBoolean("guardSummoner", guardSummoner); nbt.setInteger("mageType", mageType); nbt.setInteger("fightType", fightType); } public void readEntityFromNBT(NBTTagCompound nbt){ super.readEntityFromNBT(nbt); mobMana = nbt.getInteger("mobMana"); summonerId = nbt.getString("summonerUUID"); guardSummoner = nbt.getBoolean("guardSummoner"); mageType = nbt.getInteger("mageType"); fightType = nbt.getInteger("fightType"); } public boolean interact(EntityPlayer player){ if(!worldObj.isRemote){ if(player == summoner){ System.out.println(summoner); System.out.println(summonerUUID); System.out.println(summonerId); ItemStack currentItem = player.inventory.getCurrentItem(); if(currentItem != null){ if(currentItem.getItem() == EnderpowerItems.positiveSpellBook && mageType != 0){ mageType = 0; player.addChatMessage(new ChatComponentTranslation("I am now a healing mage.")); } if(currentItem.getItem() == EnderpowerItems.mixedSpellBook && mageType != 1){ mageType = 1; player.addChatMessage(new ChatComponentTranslation("I am now a mixed mage.")); } if(currentItem.getItem() == EnderpowerItems.offensiveSpellBook && mageType != 2){ mageType = 2; player.addChatMessage(new ChatComponentTranslation("I am now an offensive mage.")); } if(currentItem.getItem() == Items.wooden_sword || currentItem.getItem() == Items.stone_sword || currentItem.getItem() == Items.iron_sword || currentItem.getItem() == Items.golden_sword || currentItem.getItem() == Items.diamond_sword){ if(fightType == 0 && mageType != 0){ fightType = 1; player.addChatMessage(new ChatComponentTranslation("I will attack every mob that attacks you or you attack.")); } } } if(currentItem == null && guardSummoner == true && !worldObj.isRemote){ guardSummoner = false; player.addChatMessage(new ChatComponentTranslation("I will guard it here.")); } else if(currentItem == null && guardSummoner == false && !worldObj.isRemote){ guardSummoner = true; player.addChatMessage(new ChatComponentTranslation("I will follow you now.")); } } } return super.interact(player); } public boolean attackEntityFrom(DamageSource damage, float f){ lastAttacker = damage.getEntity(); summoner.setPositionAndUpdate(0, 0, 0); return super.attackEntityFrom(damage, f); } }
  24. The console points at applyEntityAttributes, I think the following rule is not good. this.getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage); And left click the link like thing in this rule in the console: "at net.mymod.mod.Entity.EntityVampire.applyEntityAttributes(EntityVampire.java:109)".
  25. Maybe control + click on methods will help you solving this. public void setPositionAndUpdate(double p_70634_1_, double p_70634_3_, double p_70634_5_) { this.setLocationAndAngles(p_70634_1_, p_70634_3_, p_70634_5_, this.rotationYaw, this.rotationPitch); } This is really strange if you ask me. And I can always use player.motionY I think this has something to do with your check. This is something that prevented my flywand from working.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.