Skip to content

Add link to "Penguins Premium" #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2019
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Distributed under MIT, originally from https://github.com/Selim042/SM-Penguins

package com.mcmoddev.communtiymod.selim.penguins;

import net.minecraft.entity.EntityAgeable;
Expand All @@ -19,6 +17,10 @@
import net.minecraft.init.Items;
import net.minecraft.item.ItemFishFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.Style;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.event.ClickEvent;
import net.minecraft.world.World;

public class EntityPenguin extends EntityAnimal {
Expand Down Expand Up @@ -61,6 +63,19 @@ protected void initEntityAI() {
this.tasks.addTask(7, new EntityAILookIdle(this));
}

@Override
public boolean processInteract(EntityPlayer player, EnumHand hand) {
boolean ret = super.processInteract(player, hand);
if (player.world.isRemote && hand == EnumHand.MAIN_HAND) {
player.sendMessage(new TextComponentString(
"If you like these penguins, you'll like the full version more!"));
player.sendMessage(new TextComponentString("Click [here] to download it on CurseForge.")
.setStyle(new Style().setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL,
"https://minecraft.curseforge.com/projects/penguins"))));
}
return ret;
}

@Override
public boolean canBreatheUnderwater() {
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Distributed under MIT, originally from https://github.com/Selim042/SM-Penguins

package com.mcmoddev.communtiymod.selim.penguins;

import net.minecraft.client.model.ModelBase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Distributed under MIT, originally from https://github.com/Selim042/SM-Penguins

package com.mcmoddev.communtiymod.selim.penguins;

import net.minecraft.client.renderer.entity.RenderLiving;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Distributed under MIT, originally from https://github.com/Selim042/SM-Penguins

package com.mcmoddev.communtiymod.selim.penguins;

import java.util.LinkedList;
Expand Down