From e11bfed9fd423c81225db0b6b09b71b79aa58b28 Mon Sep 17 00:00:00 2001 From: Nicolas BARBOTIN Date: Sun, 11 Feb 2018 23:08:26 +0100 Subject: [PATCH] * Reduced default max screen resolution to 1920x1080 * Fixed bug causing crash when breaking the screen block which holds the tile entity * Updated README --- README.md | 12 ++++++++++-- src/main/java/net/montoyo/wd/WebDisplays.java | 4 ++-- .../java/net/montoyo/wd/entity/TileEntityScreen.java | 3 +++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a0ed0d7..66d3086 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ # WebDisplays for Minecraft 1.12.2 This is the unfinished port of the WebDisplays mod for Minecraft 1.12.2. The text below is my "TODO" list. -### TODO -* TESTING +### Bugs to fix +* Middle-click bug +* Limit screen size +* Bugged friend list +* Multiply volume by game volume +* Memory leak (screens aren't deleted?!?) +* GUIs are not closed blocks gets destroyed + +### Things before release +* Fix bugs (obviously) * "Anti-9minecraft" * Write wiki * Update website diff --git a/src/main/java/net/montoyo/wd/WebDisplays.java b/src/main/java/net/montoyo/wd/WebDisplays.java index f9bf292..cb22c6e 100644 --- a/src/main/java/net/montoyo/wd/WebDisplays.java +++ b/src/main/java/net/montoyo/wd/WebDisplays.java @@ -123,8 +123,8 @@ public class WebDisplays { Property hardRecipe = cfg.get("main", "hardRecipes", true); Property homePage = cfg.get("main", "homepage", "mod://webdisplays/main.html"); Property disableOT = cfg.get("main", "disableOwnershipThief", false); - Property maxResX = cfg.get("main", "maxResolutionX", 7680); - Property maxResY = cfg.get("main", "maxResolutionY", 4320); + Property maxResX = cfg.get("main", "maxResolutionX", 1920); + Property maxResY = cfg.get("main", "maxResolutionY", 1080); Property miniservPort = cfg.get("main", "miniservPort", 25566); Property miniservQuota = cfg.get("main", "miniservQuota", 1024); //It's stored as a string anyway Property loadDistance = cfg.get("client", "loadDistance", 30.0); diff --git a/src/main/java/net/montoyo/wd/entity/TileEntityScreen.java b/src/main/java/net/montoyo/wd/entity/TileEntityScreen.java index 762c8f6..e013254 100644 --- a/src/main/java/net/montoyo/wd/entity/TileEntityScreen.java +++ b/src/main/java/net/montoyo/wd/entity/TileEntityScreen.java @@ -1059,6 +1059,9 @@ public class TileEntityScreen extends TileEntity { @Override public boolean shouldRefresh(World world, BlockPos pos, @Nonnull IBlockState oldState, @Nonnull IBlockState newState) { + if(oldState.getBlock() != WebDisplays.INSTANCE.blockScreen || newState.getBlock() != WebDisplays.INSTANCE.blockScreen) + return true; + return oldState.getValue(BlockScreen.hasTE) != newState.getValue(BlockScreen.hasTE); }