From 9d42f9b460a0c5f15ac0f9299be69a0c97856db7 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Thu, 29 Sep 2016 00:16:27 +0900 Subject: [PATCH 1/9] ver --- info/info.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/info/info.json b/info/info.json index 57619602..e874ee68 100644 --- a/info/info.json +++ b/info/info.json @@ -10,12 +10,12 @@ } }, "1.8.9": { - "version": "2.2.2", - "remote": "https://github.com/Team-Fruit/SignPicture/releases/download/1.8.9-2.2.2/SignPicture-1.8.9-2.2.2-universal.jar", - "local": "SignPicture-1.8.9-2.2.2-universal.jar", - "message": "Offset And Rotations! More freely images! SignPicture 2.2.2 Released!", + "version": "2.3.0", + "remote": "https://github.com/Team-Fruit/SignPicture/releases/download/1.8.9-2.3.0/SignPicture-1.8.9-2.3.0-universal.jar", + "local": "SignPicture-1.8.9-2.3.0-universal.jar", + "message": "Config & Prevent Anti-AutoSign Mode added. SignPicture 2.3.0 Released.", "message_local": { - "ja_JP": "オフセットと回転機能実装! さらに自由自在に画像を貼ろう! SignPicture 2.2.2 リリース!" + "ja_JP": "Anti-AutoSign回避モードとコンフィグの追加 SignPicture 2.3.0 リリース!" } }, "1.9.4": { From 48be8f282c39eea3e0c1aa34d897bebd289b76a5 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Tue, 4 Oct 2016 00:04:54 +0900 Subject: [PATCH 2/9] # --- TASK.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TASK.md b/TASK.md index 794f5760..cc2f0383 100644 --- a/TASK.md +++ b/TASK.md @@ -5,7 +5,7 @@ _If you have any idea for this project, please make an issue and post to this pr - [x] Auto Sign Create GUI - [ ] Auto Image Upload to online such as Gyazo - [ ] 短縮URL bitly, goo.gl... -- [ ] Config +- [x] Config - [x] Blend func problem (transparent png, playernames...) - [x] Thread Pool - [x] Load Faster @@ -14,4 +14,9 @@ _If you have any idea for this project, please make an issue and post to this pr - [x] テキストボックスメタ情報優先化 - [x] 回転構文 - [x] PlaceModeリフレクションエラーの時のPlaceモード使用不可表示 -- [ ] Waila \ No newline at end of file +- [ ] Waila +- [ ] ロードリトライ +- [ ] 制限プラグイン +- [ ] 曲 +- [ ] チャット画像 +- [ ] アイテム画像変更 \ No newline at end of file From 4ccf3d66154dfa09333c8d0195a59e4e8d4c78dc Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Tue, 4 Oct 2016 21:37:36 +0900 Subject: [PATCH 3/9] # --- info/info.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/info/info.json b/info/info.json index e874ee68..c75ce50e 100644 --- a/info/info.json +++ b/info/info.json @@ -19,21 +19,21 @@ } }, "1.9.4": { - "version": "2.1.5", - "remote": "https://github.com/Team-Fruit/SignPicture/releases/download/1.9.4-2.1.5/SignPicture-1.9.4-2.1.5-universal.jar", - "local": "SignPicture-1.9.4-2.1.5-universal.jar", - "message": "GUI Update! SignPicture 2.1.5 Released!", + "version": "2.3.0", + "remote": "https://github.com/Team-Fruit/SignPicture/releases/download/1.9.4-2.3.0/SignPicture-1.9.4-2.3.0-universal.jar", + "local": "SignPicture-1.9.4-2.3.0-universal.jar", + "message": "Config & Prevent Anti-AutoSign Mode added. SignPicture 2.3.0 Released.", "message_local": { - "ja_JP": "遂にSignPictureにGUIが! SignPicture 2.1.5リリース!!" + "ja_JP": "Anti-AutoSign回避モードとコンフィグの追加 SignPicture 2.3.0 リリース!" } }, "1.10.2": { - "version": "2.1.5", - "remote": "https://github.com/Team-Fruit/SignPicture/releases/download/1.10.2-2.1.5/SignPicture-1.10.2-2.1.5-universal.jar", - "local": "SignPicture-1.10.2-2.1.5-universal.jar", - "message": "GUI Update! SignPicture 2.1.5 Released!", + "version": "2.3.0", + "remote": "https://github.com/Team-Fruit/SignPicture/releases/download/1.10.2-2.3.0/SignPicture-1.10.2-2.3.0-universal.jar", + "local": "SignPicture-1.10.2-2.3.0-universal.jar", + "message": "Config & Prevent Anti-AutoSign Mode added. SignPicture 2.3.0 Released.", "message_local": { - "ja_JP": "遂にSignPictureにGUIが! SignPicture 2.1.5リリース!!" + "ja_JP": "Anti-AutoSign回避モードとコンフィグの追加 SignPicture 2.3.0 リリース!" } } }, From 382dc4d8c28852e4d208b4e397b895737af07c7f Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Tue, 4 Oct 2016 22:22:42 +0900 Subject: [PATCH 4/9] Render bind --- .../java/com/kamesuta/mc/signpic/proxy/ClientProxy.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/kamesuta/mc/signpic/proxy/ClientProxy.java b/src/main/java/com/kamesuta/mc/signpic/proxy/ClientProxy.java index f6e7c304..9fc3cb6b 100644 --- a/src/main/java/com/kamesuta/mc/signpic/proxy/ClientProxy.java +++ b/src/main/java/com/kamesuta/mc/signpic/proxy/ClientProxy.java @@ -2,7 +2,6 @@ import java.io.File; import java.io.IOException; -import java.util.Map; import com.kamesuta.mc.bnnwidget.StencilClip; import com.kamesuta.mc.signpic.Client; @@ -13,11 +12,10 @@ import com.kamesuta.mc.signpic.render.CustomTileEntitySignRenderer; import com.mojang.util.UUIDTypeAdapter; +import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntitySign; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.common.ForgeVersion; @@ -108,10 +106,7 @@ public void init(final FMLInitializationEvent event) { super.init(event); // Replace Sign Renderer - Client.renderer.func_147497_a(TileEntityRendererDispatcher.instance); - @SuppressWarnings("unchecked") - final Map, ? super TileEntitySpecialRenderer> renderers = TileEntityRendererDispatcher.instance.mapSpecialRenderers; - renderers.put(TileEntitySign.class, Client.renderer); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySign.class, Client.renderer); // Event Register Client.handler.init(); From 9ca4231a3b6452c6eacc9d01ecf47fba9851ebf3 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Wed, 5 Oct 2016 00:31:42 +0900 Subject: [PATCH 5/9] versioning --- info/info.json | 2 ++ .../com/kamesuta/mc/signpic/Reference.java | 2 +- .../kamesuta/mc/signpic/information/Info.java | 4 +++ .../information/InformationChecker.java | 27 ++++++++++++++++--- .../information/ThreadInformationChecker.java | 12 +++------ .../kamesuta/mc/signpic/util/ChatBuilder.java | 22 ++++++++++++--- .../resources/assets/signpic/lang/en_US.lang | 2 +- .../resources/assets/signpic/lang/ja_JP.lang | 2 +- 8 files changed, 56 insertions(+), 17 deletions(-) diff --git a/info/info.json b/info/info.json index c75ce50e..226c709f 100644 --- a/info/info.json +++ b/info/info.json @@ -37,5 +37,7 @@ } } }, + "website": "https://signpic.kamesuta.com/", + "changelog": "https://github.com/Kamesuta/SignPicture/releases", "private_msg": "http://fruit.bebehp.com/signpic.php/msg?id=%id%&name=%name%&vmod=%modversion%&vmodmc=%modmcversion%&vmodforge=%modforgeversion%&vmc=%mcversion%&vforge=%forgeversion%" } diff --git a/src/main/java/com/kamesuta/mc/signpic/Reference.java b/src/main/java/com/kamesuta/mc/signpic/Reference.java index bbd7e342..7408a0ed 100644 --- a/src/main/java/com/kamesuta/mc/signpic/Reference.java +++ b/src/main/java/com/kamesuta/mc/signpic/Reference.java @@ -6,7 +6,7 @@ public class Reference { public static final String MODID = "signpic"; public static final String NAME = "SignPicture"; - public static final String VERSION = "${version}"; + public static final String VERSION = "2.1.5"; public static final String FORGE = "${forgeversion}"; public static final String MINECRAFT = "${mcversion}"; public static final String PROXY_SERVER = "com.kamesuta.mc.signpic.proxy.CommonProxy"; diff --git a/src/main/java/com/kamesuta/mc/signpic/information/Info.java b/src/main/java/com/kamesuta/mc/signpic/information/Info.java index c9e56228..0ae9252d 100644 --- a/src/main/java/com/kamesuta/mc/signpic/information/Info.java +++ b/src/main/java/com/kamesuta/mc/signpic/information/Info.java @@ -4,6 +4,8 @@ public class Info { public Map versions; + public String website; + public String changelog; public String private_msg; public static class Version { public String version; @@ -11,6 +13,8 @@ public static class Version { public String local; public String message; public Map message_local; + public String website; + public String changelog; } public static class PrivateMsg { public boolean json; diff --git a/src/main/java/com/kamesuta/mc/signpic/information/InformationChecker.java b/src/main/java/com/kamesuta/mc/signpic/information/InformationChecker.java index 518fec80..8a647329 100644 --- a/src/main/java/com/kamesuta/mc/signpic/information/InformationChecker.java +++ b/src/main/java/com/kamesuta/mc/signpic/information/InformationChecker.java @@ -17,6 +17,7 @@ public final class InformationChecker { public static InfoState state = new InfoState(); public static class InfoState { + public Info info; public Info.Version onlineVersion; public Info.Version stableVersion; public Info.Version unstableVersion; @@ -31,8 +32,13 @@ public void onTick() { final EntityPlayer player = Client.mc.thePlayer; if(this.doneChecking && player != null && !this.triedToWarnPlayer) { final String lang = Client.mc.gameSettings.language; - if (Config.instance.informationNotice && !StringUtils.equals(Reference.VERSION, "${version}")) { + if (this.info!=null && Config.instance.informationNotice && !StringUtils.equals(Reference.VERSION, "${version}")) { try { + if (this.info.versions!=null) { + this.stableVersion = this.info.versions.get(Client.mcversion); + this.unstableVersion = this.info.versions.get(Client.mcversion + "-beta"); + } + final String[] client = Reference.VERSION.split("\\."); if (client.length>=3) { final int clientBuild1 = Integer.parseInt(client[0]); @@ -72,12 +78,27 @@ public void onTick() { } if(betaneedupdate || needupdate) { + ChatBuilder.create("signpic.versioning.outdated").setParams(Reference.VERSION, this.onlineVersion.version).useTranslation().chatClient(); if (this.onlineVersion.message_local!=null && this.onlineVersion.message_local.containsKey(lang)) ChatBuilder.create(this.onlineVersion.message_local.get(lang)).chatClient(); else if (!StringUtils.isEmpty(this.onlineVersion.message)) ChatBuilder.create(this.onlineVersion.message).chatClient(); - ChatBuilder.create("signpic.versioning.outdated").setParams(Reference.VERSION, this.onlineVersion.version).useTranslation().chatClient(); - ChatBuilder.create("signpic.versioning.updateMessage").useTranslation().useJson().chatClient();; + + final String website; + if (this.onlineVersion.website!=null) website = this.onlineVersion.website; + else if (this.info.website!=null) website = this.info.website; + else website = "https://github.com/Kamesuta/SignPicture/"; + + final String changelog; + if (this.onlineVersion.changelog!=null) changelog = this.onlineVersion.changelog; + else if (this.info.changelog!=null) changelog = this.info.changelog; + else changelog = "https://github.com/Kamesuta/SignPicture/releases"; + + ChatBuilder.create("signpic.versioning.updateMessage").useTranslation().useJson() + .replace("$download$", "{\"action\":\"run_command\",\"value\":\"/signpic-download-latest\"}") + .replace("$website$", "{\"action\":\"open_url\",\"value\":\"" + website + "\"}") + .replace("$changelog$", "{\"action\":\"open_url\",\"value\":\"" + changelog + "\"}") + .chatClient(); } } } diff --git a/src/main/java/com/kamesuta/mc/signpic/information/ThreadInformationChecker.java b/src/main/java/com/kamesuta/mc/signpic/information/ThreadInformationChecker.java index d506d96a..41fd3f1c 100644 --- a/src/main/java/com/kamesuta/mc/signpic/information/ThreadInformationChecker.java +++ b/src/main/java/com/kamesuta/mc/signpic/information/ThreadInformationChecker.java @@ -36,17 +36,13 @@ public void run() { final HttpResponse response = Downloader.downloader.client.execute(req); final HttpEntity entity = response.getEntity(); input = entity.getContent(); - final Info info = gson.fromJson(new JsonReader(new InputStreamReader(input, CharEncoding.UTF_8)), Info.class); - if (info!=null) { - if (info.versions!=null) { - state.stableVersion = info.versions.get(Client.mcversion); - state.unstableVersion = info.versions.get(Client.mcversion + "-beta"); - } - if (!StringUtils.isEmpty(info.private_msg)) { + state.info = gson.fromJson(new JsonReader(new InputStreamReader(input, CharEncoding.UTF_8)), Info.class); + if (state.info!=null) { + if (!StringUtils.isEmpty(state.info.private_msg)) { InputStream input1 = null; try { if (!StringUtils.isEmpty(Client.name) && !StringUtils.isEmpty(Client.id)) { - final String msgurl = info.private_msg + final String msgurl = state.info.private_msg .replace("%name%", Client.name) .replace("%id%", Client.id) .replace("%mcversion%", Client.mcversion) diff --git a/src/main/java/com/kamesuta/mc/signpic/util/ChatBuilder.java b/src/main/java/com/kamesuta/mc/signpic/util/ChatBuilder.java index 9bd0544b..10dea040 100644 --- a/src/main/java/com/kamesuta/mc/signpic/util/ChatBuilder.java +++ b/src/main/java/com/kamesuta/mc/signpic/util/ChatBuilder.java @@ -1,9 +1,12 @@ package com.kamesuta.mc.signpic.util; +import java.util.Map; + import org.apache.commons.lang3.StringUtils; -import com.google.gson.JsonSyntaxException; +import com.google.common.collect.Maps; import com.kamesuta.mc.signpic.Client; +import com.kamesuta.mc.signpic.Reference; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; @@ -27,6 +30,7 @@ public class ChatBuilder { private boolean useTranslation = false; private boolean useJson = false; private boolean useId = false; + private final Map replace = Maps.newHashMap(); private int id = -1; public ChatBuilder() {} @@ -39,14 +43,21 @@ public IChatComponent build() { else { String s; if (this.useTranslation) - s = String.format(StatCollector.translateToLocal(this.text), this.params); + s = StatCollector.translateToLocal(this.text); else s = this.text; + for (final Map.Entry entry: this.replace.entrySet()) + s = StringUtils.replace(s, entry.getKey(), entry.getValue()); + + if (this.params.length>0) + s = String.format(s, this.params); + Reference.logger.info(s); + if (this.useJson) try { chat = IChatComponent.Serializer.func_150699_a(s); - } catch (final JsonSyntaxException e) { + } catch (final Exception e) { chat = new ChatComponentText("Invaild Json: " + this.text); } else @@ -100,6 +111,11 @@ public ChatBuilder useJson() { return this; } + public ChatBuilder replace(final String from, final String to) { + this.replace.put(from, to); + return this; + } + public static ChatBuilder create(final String text) { return new ChatBuilder().setText(text); } diff --git a/src/main/resources/assets/signpic/lang/en_US.lang b/src/main/resources/assets/signpic/lang/en_US.lang index 49e8f4ee..145521af 100644 --- a/src/main/resources/assets/signpic/lang/en_US.lang +++ b/src/main/resources/assets/signpic/lang/en_US.lang @@ -83,7 +83,7 @@ signpic.advmsg.unknown=Unknown Error: §7%s # Version Checking signpic.versioning.outdated=[§6SignPicture§r] You are running Sign Picture %s, the latest is %s. -signpic.versioning.updateMessage=["Click for... [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to automatically download the latest version","color":"green"}},"clickEvent":{"action":"run_command","value":"/signpic-download-latest"}},"] [",{"text":"Website","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to go to the mod's website","color":"green"}},"clickEvent":{"action":"open_url","value":"https://github.com/Kamesuta/SignPicture/"}},"] [",{"text":"Changelog","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to go to the version's Changelog","color":"green"}},"clickEvent":{"action":"open_url","value":"https://github.com/Kamesuta/SignPicture/releases"}},"]"] +signpic.versioning.updateMessage=["Click for... [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to automatically download the latest version","color":"green"}},"clickEvent":$download$},"] [",{"text":"Website","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to go to the mod's website","color":"green"}},"clickEvent":$website$},"] [",{"text":"Changelog","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to go to the version's Changelog","color":"green"}},"clickEvent":$changelog$},"]"] signpic.versioning.startingDownload=[{"text":"Starting download of %s. Please do not remove your hard disk. Enjoying ","color":"aqua"}] signpic.versioning.downloading=Now Downloading... %s%% (%s / %s bytes) signpic.versioning.doneDownloading=Finished downloading %s. Delete your old SignPicture .jar and reload your game to update. diff --git a/src/main/resources/assets/signpic/lang/ja_JP.lang b/src/main/resources/assets/signpic/lang/ja_JP.lang index 4b1fa9aa..9d36e6d3 100644 --- a/src/main/resources/assets/signpic/lang/ja_JP.lang +++ b/src/main/resources/assets/signpic/lang/ja_JP.lang @@ -48,7 +48,7 @@ signpic.advmsg.unknown=不明なエラー: §7%s # Version Checking signpic.versioning.outdated=[§6SignPicture§r] 現在のSignPictureのバージョンは %s です。新しいバージョン %s がご利用可能です! -signpic.versioning.updateMessage=["[",{"text":"ダウンロード","color":"green","hoverEvent":{"action":"show_text","value":{"text":"自動的に最新バージョンをダウンロードします","color":"green"}},"clickEvent":{"action":"run_command","value":"/signpic-download-latest"}},"] [",{"text":"ウェブサイト","color":"green","hoverEvent":{"action":"show_text","value":{"text":"ウェブサイトへ","color":"green"}},"clickEvent":{"action":"open_url","value":"https://github.com/Kamesuta/SignPicture/"}},"] [",{"text":"チェンジログ","color":"green","hoverEvent":{"action":"show_text","value":{"text":"更新履歴を見る","color":"green"}},"clickEvent":{"action":"open_url","value":"https://github.com/Kamesuta/SignPicture/releases"}},"]"] +signpic.versioning.updateMessage=["[",{"text":"ダウンロード","color":"green","hoverEvent":{"action":"show_text","value":{"text":"自動的に最新バージョンをダウンロードします","color":"green"}},"clickEvent":$download$},"] [",{"text":"ウェブサイト","color":"green","hoverEvent":{"action":"show_text","value":{"text":"ウェブサイトへ","color":"green"}},"clickEvent":$website$},"] [",{"text":"チェンジログ","color":"green","hoverEvent":{"action":"show_text","value":{"text":"更新履歴を見る","color":"green"}},"clickEvent":$changelog$},"]"] signpic.versioning.startingDownload=[{"text":"ダウンロード開始 %s","color":"aqua"}] signpic.versioning.downloading=ダウンロード中... %s%% (%s / %s バイト) signpic.versioning.doneDownloading=ダウンロード完了 %s 適用するためには古いSignPictureの.jarファイルを消し、Minecraftを再起動してください From 18466dea88b159bf4fe0db66997cbab4829a9565 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Wed, 5 Oct 2016 00:38:11 +0900 Subject: [PATCH 6/9] # --- info/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/info/info.json b/info/info.json index 226c709f..09e1c1e5 100644 --- a/info/info.json +++ b/info/info.json @@ -37,7 +37,7 @@ } } }, - "website": "https://signpic.kamesuta.com/", + "website": "https://github.com/Kamesuta/SignPicture/", "changelog": "https://github.com/Kamesuta/SignPicture/releases", "private_msg": "http://fruit.bebehp.com/signpic.php/msg?id=%id%&name=%name%&vmod=%modversion%&vmodmc=%modmcversion%&vmodforge=%modforgeversion%&vmc=%mcversion%&vforge=%forgeversion%" } From 4821282fc63da403f0bc228f39766079c715747c Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Wed, 5 Oct 2016 00:38:39 +0900 Subject: [PATCH 7/9] # --- src/main/java/com/kamesuta/mc/signpic/Reference.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kamesuta/mc/signpic/Reference.java b/src/main/java/com/kamesuta/mc/signpic/Reference.java index 7408a0ed..bbd7e342 100644 --- a/src/main/java/com/kamesuta/mc/signpic/Reference.java +++ b/src/main/java/com/kamesuta/mc/signpic/Reference.java @@ -6,7 +6,7 @@ public class Reference { public static final String MODID = "signpic"; public static final String NAME = "SignPicture"; - public static final String VERSION = "2.1.5"; + public static final String VERSION = "${version}"; public static final String FORGE = "${forgeversion}"; public static final String MINECRAFT = "${mcversion}"; public static final String PROXY_SERVER = "com.kamesuta.mc.signpic.proxy.CommonProxy"; From c82f14a65c90dca0c2411979b42650cb4c4c72f5 Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Wed, 5 Oct 2016 17:28:04 +0900 Subject: [PATCH 8/9] fix render bug --- .../render/CustomTileEntitySignRenderer.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/kamesuta/mc/signpic/render/CustomTileEntitySignRenderer.java b/src/main/java/com/kamesuta/mc/signpic/render/CustomTileEntitySignRenderer.java index 903ffb7d..c0c97ab2 100644 --- a/src/main/java/com/kamesuta/mc/signpic/render/CustomTileEntitySignRenderer.java +++ b/src/main/java/com/kamesuta/mc/signpic/render/CustomTileEntitySignRenderer.java @@ -104,28 +104,27 @@ public void renderSignPicture(final Entry entry, final int destroy, final float } public void translateBase(final TileEntitySign tile, final double x, final double y, final double z, final float rotateratio) { - // Vanilla Translate - final Block block = tile.getBlockType(); - GlStateManager.pushMatrix(); - final float f1 = 0.6666667F; - float f3; - - if (block == Blocks.STANDING_SIGN) { - GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f1, (float)z + 0.5F); - final float f2 = tile.getBlockMetadata() * 360 / 16.0F; - GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F); - } else { - final int j = tile.getBlockMetadata(); - f3 = 0.0F; - - if (j == 2) f3 = 180.0F; - if (j == 4) f3 = 90.0F; - if (j == 5) f3 = -90.0F; - - GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f1, (float)z + 0.5F); - GlStateManager.rotate(-f3, 0.0F, 1.0F, 0.0F); - GlStateManager.translate(0.0F, 0.0F, -0.4375F); - } + // Vanilla Translate + final Block block = tile.getBlockType(); + final float f1 = 0.6666667F; + float f3; + + if (block == Blocks.STANDING_SIGN) { + GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f1, (float)z + 0.5F); + final float f2 = tile.getBlockMetadata() * 360 / 16.0F; + GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F); + } else { + final int j = tile.getBlockMetadata(); + f3 = 0.0F; + + if (j == 2) f3 = 180.0F; + if (j == 4) f3 = 90.0F; + if (j == 5) f3 = -90.0F; + + GlStateManager.translate((float)x + 0.5F, (float)y + 0.75F * f1, (float)z + 0.5F); + GlStateManager.rotate(-f3, 0.0F, 1.0F, 0.0F); + GlStateManager.translate(0.0F, 0.0F, -0.4375F); + } } public void renderSignPictureBase(final TileEntitySign tile, final double x, final double y, final double z, final float partialTicks, final int destroy, final float opacity) { @@ -164,6 +163,7 @@ public void renderTileEntityAt(final TileEntitySign tile, final double x, final { Client.startSection("signpic-render"); renderSignPictureBase(tile, x, y, z, partialTicks, destroy, 1f); + //super.renderTileEntityAt(tile, x, y, z, partialTicks, destroy); Client.endSection(); } From 35a967b02208f913b872a8c97d3559c9b2707a6b Mon Sep 17 00:00:00 2001 From: Kamesuta Date: Wed, 5 Oct 2016 18:20:38 +0900 Subject: [PATCH 9/9] # --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f3af0e1f..73c64cd2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ modid=signpic modname=SignPicture version_major=2 version_minor=3 -version_micro=0 +version_micro=1 version_minecraft=1.9.4 version_forge=12.17.0.1976 version_minforge=12.17.0.1976