diff --git a/gradle.properties b/gradle.properties index 9872413..0bb6e8f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,4 @@ meta_download=https://www.curseforge.com/minecraft/mc-mods/engineers-decor/ version_minecraft=1.18.1 version_forge_minecraft=1.18.1-39.0.5 version_jei=1.18.1:9.1.2.54 -version_engineersdecor=1.1.19 +version_engineersdecor=1.1.20 diff --git a/meta/update.json b/meta/update.json index f0dd3ab..6a754b4 100644 --- a/meta/update.json +++ b/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.18.1": { + "1.1.20": "[F] Fixed Shingle Roof Wire Conduit collision shape (thx os, issue #202).\n[F] Mineral Melter accepts input items only when empty (issue #198, ty Archie).", "1.1.19": "[R] Release build.\n[F] Manual category RLs prefixed (issue #199, ty freopt).", "1.1.19-b3": "[F] Fixed rendering issue.", "1.1.19-b2": "[F] Fixed waterlogging.\n[F] Block entity parent saving corrected, ticker unified.\n[U] Forge/gradle update.", @@ -50,7 +51,7 @@ "1.1.2-b1": "[U] Ported to MC1.16.2." }, "promos": { - "1.18.1-recommended": "1.1.19", - "1.18.1-latest": "1.1.19" + "1.18.1-recommended": "1.1.20", + "1.18.1-latest": "1.1.20" } } \ No newline at end of file diff --git a/readme.md b/readme.md index 78eae8e..38ee575 100644 --- a/readme.md +++ b/readme.md @@ -11,6 +11,9 @@ Mod sources for Minecraft version 1.18.x. ## Version history + - v1.1.20 [F] Fixed Shingle Roof Wire Conduit collision shape (thx os, issue #202). + [F] Mineral Melter accepts input items only when empty (issue #198, ty Archie). + - v1.1.19 [R] Release build. [F] Manual category RLs prefixed (issue #199, ty freopt). diff --git a/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java b/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java index a3527d9..7645545 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java +++ b/src/main/java/wile/engineersdecor/blocks/EdMineralSmelter.java @@ -149,7 +149,7 @@ public class EdMineralSmelter boolean dirty = false; if(te.accepts_lava_container(stack)) { if(stack.sameItemStackIgnoreDurability(MineralSmelterTileEntity.BUCKET_STACK)) { // check how this works with item capabilities or so - if(te.fluid_extraction_possible()) { + if(te.bucket_extraction_possible()) { if(stack.getCount() > 1) { int target_stack_index = -1; for(int i=0; i((index==1) && (phase()!=PHASE_LAVA)), - (index,stack)->((index==0) && accepts_input(stack)), + (index,stack)->((index==0) && (progress_==0) && accepts_input(stack)), (index,stack)->{}, (index,stack)->{ if(index!=0) reset_process(); } ); @@ -296,7 +296,7 @@ public class EdMineralSmelter return PHASE_WARMUP; } - public boolean fluid_extraction_possible() + public boolean bucket_extraction_possible() { return tank_.getFluidAmount() >= MAX_BUCKET_EXTRACT_FLUID_LEVEL; } public int comparator_signal() @@ -309,7 +309,7 @@ public class EdMineralSmelter { if(!main_inventory_.isEmpty()) { return false; - } else if(fluid_extraction_possible()) { + } else if(bucket_extraction_possible()) { return accepts_lava_container(stack); } else { if(stack.getItem().getTags().contains(new ResourceLocation(Auxiliaries.modid(), "accepted_mineral_smelter_input"))) return true; @@ -424,7 +424,7 @@ public class EdMineralSmelter // That stays in the slot until its extracted or somone takes it out. if(istack.sameItem(BUCKET_STACK)) { if(!main_inventory_.getItem(1).sameItem(LAVA_BUCKET_STACK)) { - if(fluid_extraction_possible()) { + if(bucket_extraction_possible()) { reset_process(); main_inventory_.setItem(1, LAVA_BUCKET_STACK); level.playSound(null, worldPosition, SoundEvents.BUCKET_FILL_LAVA, SoundSource.BLOCKS, 0.2f, 1.3f); @@ -465,7 +465,7 @@ public class EdMineralSmelter } else { main_inventory_.setItem(0, MAGMA_STACK.copy()); main_inventory_.setItem(1, MAGMA_STACK.copy()); - tank_.clear(); + tank_.drain(1000); } level.playSound(null, worldPosition, SoundEvents.LAVA_EXTINGUISH, SoundSource.BLOCKS, 0.5f, 1.1f); dirty = true; @@ -491,7 +491,9 @@ public class EdMineralSmelter if(n > 0) { tank_.drain(n); if(tank_.isEmpty()) { + final ItemStack prev = main_inventory_.getItem(0); reset_process(); + main_inventory_.setItem(0, prev); level.playSound(null, worldPosition, SoundEvents.LAVA_EXTINGUISH, SoundSource.BLOCKS, 0.3f, 0.7f); } } diff --git a/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java b/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java index 50596de..6c9d1ff 100644 --- a/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java +++ b/src/main/java/wile/engineersdecor/blocks/EdRoofBlock.java @@ -72,6 +72,10 @@ public class EdRoofBlock extends StandardBlocks.HorizontalWaterLoggable public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return shape_cache_[state.getValue(HALF).ordinal()][state.getValue(HORIZONTAL_FACING).get3DDataValue()][state.getValue(SHAPE).ordinal()]; } + @Override + public VoxelShape getCollisionShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext selectionContext) + { return getShape(state, world, pos, selectionContext); } + @Override protected void createBlockStateDefinition(StateDefinition.Builder builder) { super.createBlockStateDefinition(builder); builder.add(SHAPE, HALF); }