From 123319eaf0282860a0713451c1bb903476ba2b84 Mon Sep 17 00:00:00 2001 From: stfwi Date: Thu, 13 Feb 2020 21:16:35 +0100 Subject: [PATCH] 1.12: Added Factory Hopper bottom item handler. --- 1.12/gradle.properties | 2 +- 1.12/meta/update.json | 3 ++- 1.12/readme.md | 2 ++ .../wile/engineersdecor/blocks/BlockDecorHopper.java | 7 +++++-- meta/lib/libtask.js | 9 ++------- meta/update.json | 9 ++++++--- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/1.12/gradle.properties b/1.12/gradle.properties index 49b29be..7d57991 100644 --- a/1.12/gradle.properties +++ b/1.12/gradle.properties @@ -4,4 +4,4 @@ org.gradle.jvmargs=-Xmx8G version_minecraft=1.12.2 version_forge=14.23.5.2768 version_jei=4.10.0.198 -version_engineersdecor=1.0.19-b2 +version_engineersdecor=1.0.19-b3 diff --git a/1.12/meta/update.json b/1.12/meta/update.json index 5e21f05..4cc9c79 100644 --- a/1.12/meta/update.json +++ b/1.12/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.19-b3": "[A] Factory Hopper: Added bottom item handler (CR#227).", "1.0.19-b2": "[F] Fixed Floor Grating item pass-through jitters (thx Cid).\n[M] Removed obsolete recipe collision testing recipes.", "1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).", "1.0.18": "[R] Release based on v1.0.18-b2. Release-to-release changes: * Tree cutter config fixes. * Treated Wood Crafting Table mouse tweaks. * Lang updates.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).", @@ -79,6 +80,6 @@ }, "promos": { "1.12.2-recommended": "1.0.18", - "1.12.2-latest": "1.0.19-b2" + "1.12.2-latest": "1.0.19-b3" } } \ No newline at end of file diff --git a/1.12/readme.md b/1.12/readme.md index 6c24eef..9aeb631 100644 --- a/1.12/readme.md +++ b/1.12/readme.md @@ -10,6 +10,8 @@ Mod sources for Minecraft version 1.12.2. ---- ## Version history + - v1.0.19-b3 [A] Factory Hopper: Added bottom item handler (CR#227). + - v1.0.19-b2 [F] Fixed Floor Grating item pass-through jitters (thx Cid). [M] Removed obsolete recipe collision testing recipes. diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHopper.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHopper.java index b5c1e78..dd9e3e4 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHopper.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHopper.java @@ -612,6 +612,7 @@ public class BlockDecorHopper extends BlockDecorDirected // ISidedInventory ---------------------------------------------------------------------------- private final IItemHandler item_handler_ = new SidedInvWrapper(this, EnumFacing.UP); + private final IItemHandler down_item_handler_ = new SidedInvWrapper(this, EnumFacing.DOWN); private static final int[] SIDED_INV_SLOTS; static { SIDED_INV_SLOTS = new int[NUM_OF_SLOTS]; @@ -628,7 +629,7 @@ public class BlockDecorHopper extends BlockDecorDirected @Override public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) - { return false; } + { return direction==EnumFacing.DOWN; } // Capability export ---------------------------------------------------------------------------- @@ -641,7 +642,9 @@ public class BlockDecorHopper extends BlockDecorDirected @Nullable public T getCapability(Capability capability, @Nullable EnumFacing facing) { - if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return (T)item_handler_; + if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { + return (facing == EnumFacing.DOWN) ? ((T)down_item_handler_) : ((T)item_handler_); + } return super.getCapability(capability, facing); } diff --git a/meta/lib/libtask.js b/meta/lib/libtask.js index 6bf2940..70bb1d6 100644 --- a/meta/lib/libtask.js +++ b/meta/lib/libtask.js @@ -233,15 +233,10 @@ const expected_commit_version = modversion.replace(/[-]/g,"") + "-mc" + mcversion; if(!gittags.filter(function(s){return s.indexOf(expected_commit_version)>=0}).length) fails.push("No tag version on this commit matching the gradle properties version (should be v" + expected_commit_version + ")."); if(((!constants.options.without_ref_repository_check)) && (git_remote.replace(/[\s]/g,"").indexOf(constants.reference_repository() + "(push)") < 0)) fails.push("Not the reference repository."); - if((git_branch != "develop") && (git_branch != "master")) { - fails.push("No valid branch for dist. (branch:'"+git_branch+"')"); - } else if((git_branch == "develop") && (modversion.replace(/[^ab]/g,"")=="")) { - fails.push("Cannot make release dist on develop branch."); - } else if((git_branch == "master") && (modversion.replace(/[^ab]/g,"")!="")) { - fails.push("Cannot make beta dist on master branch."); + if(git_branch != "develop") { + fails.push("Not a valid branch for dist. (branch:'"+git_branch+"', must be 'develop')"); } if(git_diff !== "") fails.push("Not everything committed to the GIT repository."); - // if((!fs.isfile("signing.jks")) || (!fs.isfile("signing.properties"))) fails.push("Jar signing files missing."); return fails; }; diff --git a/meta/update.json b/meta/update.json index ad34133..3f3e578 100644 --- a/meta/update.json +++ b/meta/update.json @@ -2,13 +2,14 @@ "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "promos": { "1.12.2-recommended": "1.0.18", - "1.12.2-latest": "1.0.19-b2", + "1.12.2-latest": "1.0.19-b3", "1.14.4-recommended": "", - "1.14.4-latest": "1.0.19-b2", + "1.14.4-latest": "1.0.19-b3", "1.15.2-recommended": "", - "1.15.2-latest": "1.0.19-b2" + "1.15.2-latest": "1.0.19-b3" }, "1.12.2": { + "1.0.19-b3": "[A] Factory Hopper: Added bottom item handler (CR#227).", "1.0.19-b2": "[F] Fixed Floor Grating item pass-through jitters (thx Cid).\n[M] Removed obsolete recipe collision testing recipes.", "1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).", "1.0.18": "[R] Release based on v1.0.18-b2. Release-to-release changes: * Tree cutter config fixes. * Treated Wood Crafting Table mouse tweaks. * Lang updates.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).", @@ -86,6 +87,7 @@ "1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table." }, "1.14.4": { + "1.0.19-b3": "[M] Config tweaks: Value limit ranges increased to facilitate modpacking.\n[A] Factory Hopper: Added bottom item handler (CR#227).\n[M] Block shapes refined.\n[F] Fixed duping bug (issue #87, thx Nachtflame)", "1.0.19-b2": "[F] Fixed Floor Grating item pass-through jitters (thx Cid).\n[M] Removed obsolete recipe collision testing recipes.\n[F] Fixed missing Block Breaker dynamic block drops.\n[F] Block Placer planting race condition issue fixed (issue #83, thx jcardii).\n[F] Factory Hopper: Added second standard insertion after smart-insert to circumcent compat issues (issue #84, thx NillerMedDild).", "1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).", "1.0.18-b4": "[M] Lang update ru_ru (PR#77, thanks Smollet777).\n[F] Fixed Milking machine cow path issue, added milking delay cow tracking.\n[F] Slab / Slab Slice placement adapted to vanilla standard.", @@ -130,6 +132,7 @@ "1.0.7-b3": "[A] Initial 1.14.2 port of decorative blocks." }, "1.15.2": { + "1.0.19-b3": "[M] Config tweaks: Value limit ranges increased to facilitate modpacking.\n[A] Factory Hopper: Added bottom item handler (CR#227).\n[M] Block shapes refined.\n[F] Fixed duping bug (issue #87, thx Nachtflame)", "1.0.19-b2": "[F] Fixed Floor Grating item pass-through jitters (thx Cid).\n[M] Removed obsolete recipe collision testing recipes.\n[F] Fixed missing Block Breaker dynamic block drops.\n[F] Block Placer planting race condition issue fixed (issue #83, thx jcardii).\n[F] Factory Hopper: Added second standard insertion run after smart-insert to circumcent compat issues (issue #84, thx NillerMedDild).\n[A] Enabled JEI plugin (issue #85, thx ProsperCraft/Goshen).", "1.0.19-b1": "[U] Update to 1.15.2.\n[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).", "1.0.18-b4": "[A] Ported Treated Wood Crafting Table item rendering.\n[F] Fixed Milking machine cow path issue, added milking delay cow tracking.\n[F] Slab / Slab Slice placement adapted to vanilla standard.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).",