Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/1.9' into 1.8
Browse files Browse the repository at this point in the history
Conflicts:
	gradle.properties
  • Loading branch information
Kamesuta committed Sep 10, 2016
2 parents d901cea + 9aa5b20 commit f3461f5
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
}
}
Expand Down
31 changes: 20 additions & 11 deletions info/info.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
{
"versions": {
"1.7.10": {
"version": "2.1.0",
"remote": "https://github.com/Team-Fruit/SignPicture/releases/download/2.1.0/SignPicture-1.7.10-2.1.0-universal.jar",
"local": "SignPicture-1.7.10-2.1.0-universal.jar",
"message": "GUI Update! SignPicture 2.1.0 Released!",
"version": "2.1.5",
"remote": "https://github.com/Team-Fruit/SignPicture/releases/download/2.1.5/SignPicture-1.7.10-2.1.5-universal.jar",
"local": "SignPicture-1.7.10-2.1.5-universal.jar",
"message": "GUI Update! SignPicture 2.1.5 Released!",
"message_local": {
"ja_JP": "遂にSignPictureにGUIが! SignPicture 2.1.0リリース!!"
"ja_JP": "遂にSignPictureにGUIが! SignPicture 2.1.5リリース!!"
}
},
"1.7.10-beta": {
"version": "2.1.1.beta",
"remote": "https://github.com/Team-Fruit/SignPicture/releases/download/2.1.1/SignPicture-1.7.10-2.1.1.beta-universal.jar",
"local": "SignPicture-1.7.10-2.1.1.beta-universal.jar",
"message": "Preview Implements!",
"1.8": {
"version": "2.1.5",
"remote": "https://github.com/Team-Fruit/SignPicture/releases/download/2.1.5/SignPicture-1.8-2.1.5-universal.jar",
"local": "SignPicture-1.8-2.1.5-universal.jar",
"message": "GUI Update! SignPicture 2.1.5 Released!",
"message_local": {
"ja_JP": "プレビュー機能実装! より視覚的に!"
"ja_JP": "遂にSignPictureにGUIが! SignPicture 2.1.5リリース!!"
}
},
"1.9": {
"version": "2.1.5",
"remote": "https://github.com/Team-Fruit/SignPicture/releases/download/2.1.5/SignPicture-1.9-2.1.5-universal.jar",
"local": "SignPicture-1.9-2.1.5-universal.jar",
"message": "GUI Update! SignPicture 2.1.5 Released!",
"message_local": {
"ja_JP": "遂にSignPictureにGUIが! SignPicture 2.1.5リリース!!"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
Expand All @@ -24,7 +23,6 @@ public class CoreHandler {
public final InformationChecker informationHandler = new InformationChecker();

public void init() {
FMLCommonHandler.instance().bus().register(this);
MinecraftForge.EVENT_BUS.register(this);
KeyHandler.init();
SignHandler.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onSign(final GuiOpenEvent event) {
ChatBuilder.create("signpic.chat.error.place").setId().useTranslation().chatClient();
}
}
}
}

@CoreEvent
public void onClick(final MouseEvent event) {
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/kamesuta/mc/signpic/util/ChatBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.server.management.ServerConfigurationManager;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.common.FMLCommonHandler;
Expand All @@ -18,6 +19,7 @@ public class ChatBuilder {
public static final int DefaultId = 877;

private IChatComponent chat = null;
private ChatStyle style = null;
private String text = "";
private Object[] params = new Object[0];
private boolean useTranslation = false;
Expand Down Expand Up @@ -51,6 +53,8 @@ public IChatComponent build() {
} else {
chat = this.chat;
}
if (chat!=null && this.style!=null)
chat.setChatStyle(this.style);
return chat;
}

Expand Down Expand Up @@ -80,6 +84,11 @@ public ChatBuilder setParams(final Object... params) {
return this;
}

public ChatBuilder setStyle(final ChatStyle style) {
this.style = style;
return this;
}

public ChatBuilder useTranslation() {
this.useTranslation = true;
return this;
Expand Down

0 comments on commit f3461f5

Please sign in to comment.