Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
1.2.1: Various patches (#18)
Browse files Browse the repository at this point in the history
* mcmod.info update

* Version changes for 1.2.1 prep

* ISSUE-9: Update link in message (#13)

* Removed DS_STORE

* ISSUE-9: Update link in message

* ISSUE-16: Check to make sure mob name is long enough (#17)
  • Loading branch information
symt authored Dec 19, 2019
1 parent 816a9c7 commit e3d90f5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ local.properties

# PDT-specific
.buildpath

out/

.DS_STORE
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
version = "1.2.0"
version = "1.2.1"
group= "io.github.symt"
archivesBaseName = "ZealotCounter"

Expand Down
11 changes: 8 additions & 3 deletions src/main/java/io/github/symt/EventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.event.ClickEvent;
import net.minecraft.event.ClickEvent.Action;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
Expand Down Expand Up @@ -45,7 +47,7 @@ public void onMobDeath(LivingDeathEvent event) {
if (((objectMouseOver != null && objectMouseOver.typeOfHit == MovingObjectType.ENTITY
&& objectMouseOver.entityHit.getEntityId() == event.entity.getEntityId())
|| attackedEntity == event.entity.getEntityId())
&& (event.entity.getName().substring(2).equals("Enderman")
&& ((event.entity.getName().length() > 2 && event.entity.getName().substring(2).equals("Enderman"))
|| event.entity instanceof EntityEnderman)
&& prevEntity != event.entity.getEntityId()
&& ZealotCounter.dragonsNest) {
Expand All @@ -61,7 +63,7 @@ public void onMobDeath(LivingDeathEvent event) {
@SubscribeEvent(priority = EventPriority.HIGH)
public void onAttack(AttackEntityEvent event) {
if (event.entity.getEntityId() == Minecraft.getMinecraft().thePlayer.getEntityId() &&
(event.target.getName().substring(2).equals("Enderman")
((event.target.getName().length() > 2 && event.target.getName().substring(2).equals("Enderman"))
|| event.target instanceof EntityEnderman) && ZealotCounter.dragonsNest) {
attackedEntity = event.target.getEntityId();
}
Expand Down Expand Up @@ -162,12 +164,15 @@ public void onPlayerJoinEvent(FMLNetworkEvent.ClientConnectedToServerEvent event
.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN +
"You are currently on a pre-release build of ZealotCounter. Please report any bugs that you may come across"));
} else if (latestTag[i].compareTo(currentTag[i]) >= 1) {
ChatComponentText updateLink = new ChatComponentText(EnumChatFormatting.DARK_GREEN + "" + EnumChatFormatting.BOLD + "[CLICK HERE]");
updateLink.setChatStyle(updateLink.getChatStyle().setChatClickEvent(new ClickEvent(
Action.OPEN_URL, "https://github.com/symt/zealot-counter/releases/latest")));
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
EnumChatFormatting.GREEN + "You are currently on version "
+ EnumChatFormatting.DARK_GREEN + current + EnumChatFormatting.GREEN
+ " and the latest version is " + EnumChatFormatting.DARK_GREEN
+ latest + EnumChatFormatting.GREEN
+ ". Please update to the latest version of ZealotCounter."));
+ ". Please update to the latest version of ZealotCounter. ").appendSibling(updateLink));
}
Minecraft.getMinecraft().thePlayer
.addChatMessage(new ChatComponentTranslation("", new Object[0]));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/github/symt/ZealotCounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class ZealotCounter {

static final String MODID = "ZealotCounter";
static final String VERSION = "1.2.0";
static final String VERSION = "1.2.1";
private static final String ZEALOT_PATH = "zealotcounter.dat";
static boolean loggedIn = false;
static boolean usingLabyMod = false;
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[
{
"modid": "examplemod",
"name": "Example Mod",
"description": "Example placeholder mod.",
"modid": "ZealotCounter",
"name": "Zealot Counter",
"description": "Mod for tracking zealot kills in Hypixel SkyBlock",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",
"authorList": ["ExampleDude"],
"credits": "The Forge and FML guys, for making this example",
"authorList": ["symt"],
"credits": "",
"logoFile": "",
"screenshots": [],
"dependencies": []
Expand Down

0 comments on commit e3d90f5

Please sign in to comment.