From 2300e0e58a0288fe7bd1dca6be1ccaae71eba9e2 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 12 Jul 2021 20:02:47 +0200 Subject: [PATCH] Bug Fixes - Copper backtanks can no longer accumulate air pressure when waterlogged - Copper backtanks now emit a comparator output - Removed id prefix requirement for ponder and seq. assembly tooltips #1931 - Improved the odds to succeed of existing sequenced assembly recipes - "junk" -> "salvage" --- gradle.properties | 2 +- src/generated/resources/.cache/cache | 30 +++++++++--------- .../resources/assets/create/lang/en_us.json | 2 +- .../assets/create/lang/unfinished/de_de.json | 2 +- .../assets/create/lang/unfinished/es_mx.json | 2 +- .../assets/create/lang/unfinished/fr_fr.json | 2 +- .../assets/create/lang/unfinished/it_it.json | 2 +- .../assets/create/lang/unfinished/nl_nl.json | 2 +- .../assets/create/lang/unfinished/pl_pl.json | 2 +- .../assets/create/lang/unfinished/pt_br.json | 2 +- .../assets/create/lang/unfinished/ru_ru.json | 2 +- .../assets/create/lang/unfinished/zh_cn.json | 2 +- .../assets/create/lang/unfinished/zh_tw.json | 2 +- .../data/create/advancements/aesthetics.json | 4 +-- .../recipes/sequenced_assembly/cogwheel.json | 2 +- .../sequenced_assembly/large_cogwheel.json | 2 +- .../precision_mechanism.json | 2 +- src/main/java/com/simibubi/create/Create.java | 2 +- .../armor/CopperBacktankBlock.java | 11 +++++++ .../armor/CopperBacktankTileEntity.java | 21 +++++++++++-- .../simibubi/create/events/ClientEvents.java | 31 ++++++++++--------- .../recipe/SequencedAssemblyRecipeGen.java | 6 ++-- src/main/resources/META-INF/mods.toml | 2 +- .../assets/create/lang/default/messages.json | 2 +- 24 files changed, 85 insertions(+), 54 deletions(-) diff --git a/gradle.properties b/gradle.properties index b569369be..80e22c8e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false # mod version info -mod_version = 0.3.2a +mod_version = 0.3.2b minecraft_version = 1.16.5 forge_version = 36.1.32 diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 8cef15816..817561684 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -426,20 +426,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json e1d3c02695cbd2ee7bbede97f72941835634a3a5 assets/create/lang/en_ud.json -f7ffc8417ea58584ecbe70ce0e9a6ec74e5ec463 assets/create/lang/en_us.json -cc3d964242bf7e777caa0edb5f62e00246a28993 assets/create/lang/unfinished/de_de.json +dda27625581783c310eaddce4fbd1aa4c983c15c assets/create/lang/en_us.json +52509bf5d478b5deff21180c19632ec6467aee35 assets/create/lang/unfinished/de_de.json 8e90f32c39e3a4d7e85b2db53100ffc90cc8eb67 assets/create/lang/unfinished/es_es.json -a01222895bd7e3d06d7ae3d34fa4caecbd86448d assets/create/lang/unfinished/es_mx.json -b05d56b0e9d724490ea143a3685b0bc9ebe6268a assets/create/lang/unfinished/fr_fr.json -1633b5a42865fba17572980560ad07a3015c1743 assets/create/lang/unfinished/it_it.json +3a3fd8c21798552e1358ad44f9f7e525d91b2741 assets/create/lang/unfinished/es_mx.json +7c30cbe707f3002a070289a98291bfd7119da3b6 assets/create/lang/unfinished/fr_fr.json +e266432ad97663dfdf76dfd35a6188f5550689d7 assets/create/lang/unfinished/it_it.json 5422e990c8075d4132d58287fa9ca858f9a0bc1f assets/create/lang/unfinished/ja_jp.json a1cfa4e628a915c25dc406918028ef6aa99c5c3d assets/create/lang/unfinished/ko_kr.json -95828eb4fa2e1353f737dc909407af21d50be149 assets/create/lang/unfinished/nl_nl.json -d8ed3929f5d8f0e58f4bd4de34ab20395f8d2c55 assets/create/lang/unfinished/pl_pl.json -ae37d77d132f6fac4bc718273637a367959533a1 assets/create/lang/unfinished/pt_br.json -4710f5a451b522b1a99529f79c68674df5d7fc57 assets/create/lang/unfinished/ru_ru.json -9f2a382e23291db21f8e441eb6a14adbfdcf2d9f assets/create/lang/unfinished/zh_cn.json -9bb1d1a10e4d536ef629114516a9ccadea2da110 assets/create/lang/unfinished/zh_tw.json +c26d8d9b04ce47d1ab9ff83925b173e50b2c8776 assets/create/lang/unfinished/nl_nl.json +4527d31d932661341bf92f49af8d599166b57985 assets/create/lang/unfinished/pl_pl.json +3034e1d6f167365a3c399ddabe68b05831bbcb73 assets/create/lang/unfinished/pt_br.json +a2e2cfcacca1e707d5cbb43a3fb15107a3dd59f7 assets/create/lang/unfinished/ru_ru.json +e1b094a37a11896f835e6dd11c91a61704bb8069 assets/create/lang/unfinished/zh_cn.json +dce3b0ec1fa06b020c43a3040aab044510595972 assets/create/lang/unfinished/zh_tw.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json @@ -1699,7 +1699,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json 58880e397902f8ca5b3b59ed4423e626109ddc4c assets/create/sounds.json -5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json +0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json @@ -3607,9 +3607,9 @@ f7b7ff190929ae525297fecb3c116f32fc05fd88 data/create/recipes/scoria_cobblestone_ a9096822db9d12b6014d6d34e52de5821305c03f data/create/recipes/scoria_cobblestone_wall_from_scoria_cobblestone_stonecutting.json a513468ce4d55fe3b3919bd76ba2bd5b6fac4d4e data/create/recipes/scoria_pillar.json 2e0ecbd3619f080d0fc6fe48307c5a5bcc2e91b4 data/create/recipes/scoria_pillar_from_scoria_stonecutting.json -23c9f4c033e5e04539c6c48e1253c95ad58ecf34 data/create/recipes/sequenced_assembly/cogwheel.json -eb8f0341d5fffab74003297af8bc36dd936b06fc data/create/recipes/sequenced_assembly/large_cogwheel.json -bf48a1da348c4fc536f2082aeead28ad7de7756e data/create/recipes/sequenced_assembly/precision_mechanism.json +1b6bec69b00c44e74951973d69caae53d85383cb data/create/recipes/sequenced_assembly/cogwheel.json +3bc3d13856f9ab8ccc47c3188cfd839f6db2359b data/create/recipes/sequenced_assembly/large_cogwheel.json +b49a0da57a179edc087eee224221ded22fd1be01 data/create/recipes/sequenced_assembly/precision_mechanism.json 4e817b521623966fa24186731a70f0e14c03168e data/create/recipes/smelting/aluminum_ingot_compat_silents_mechanisms.json ae90f50589bc06b44765ac8cbb9fbdc2b58fdb32 data/create/recipes/smelting/brass_ingot_from_crushed.json 64cbf425effba00ff2e31d95cffc2be2e0191932 data/create/recipes/smelting/bread.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 29a8c9a09..b3803cd55 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -750,7 +750,7 @@ "create.recipe.assembly.deploying_item": "Deploy %1$s", "create.recipe.assembly.cutting": "Cut with Saw", "create.recipe.assembly.repeat": "Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "Random junk", + "create.recipe.assembly.junk": "Random salvage", "create.recipe.processing.chance": "%1$s%% Chance", "create.recipe.heat_requirement.none": "No Heating Required", "create.recipe.heat_requirement.heated": "Heated", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 61a378803..d80593cfd 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "Chance: %1$s%%", "create.recipe.heat_requirement.none": "Keine Hitze benötigt", "create.recipe.heat_requirement.heated": "Wenig Hitze benötigt", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index 9c1662f37..8c0efb9a1 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "UNLOCALIZED: %1$s%% Chance", "create.recipe.heat_requirement.none": "UNLOCALIZED: No Heating Required", "create.recipe.heat_requirement.heated": "UNLOCALIZED: Heated", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index 284af00e8..e3d87f4cb 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%% de chance", "create.recipe.heat_requirement.none": "Pas de chauffage requis", "create.recipe.heat_requirement.heated": "Chauffé", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index 21fbf2683..da615360f 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%% di probabilità", "create.recipe.heat_requirement.none": "Nessun riscaldamento", "create.recipe.heat_requirement.heated": "Riscaldamento", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 171e5b407..28abd156a 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%% Kans", "create.recipe.heat_requirement.none": "UNLOCALIZED: No Heating Required", "create.recipe.heat_requirement.heated": "UNLOCALIZED: Heated", diff --git a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json index f27107538..d479a10d3 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pl_pl.json +++ b/src/generated/resources/assets/create/lang/unfinished/pl_pl.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%% szans", "create.recipe.heat_requirement.none": "Nie wymaga podgrzewania", "create.recipe.heat_requirement.heated": "Podrzewane", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 7c9a9dbe2..9210563b0 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%% de chance", "create.recipe.heat_requirement.none": "UNLOCALIZED: No Heating Required", "create.recipe.heat_requirement.heated": "UNLOCALIZED: Heated", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 38eb1010b..291b78f3e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%% шанса", "create.recipe.heat_requirement.none": "Не требует нагрева", "create.recipe.heat_requirement.heated": "Нагрето", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 650be5c55..c7d719c9c 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%%概率", "create.recipe.heat_requirement.none": "无需加热", "create.recipe.heat_requirement.heated": "加热", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 47656d31a..84fd62ea1 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -751,7 +751,7 @@ "create.recipe.assembly.deploying_item": "UNLOCALIZED: Deploy %1$s", "create.recipe.assembly.cutting": "UNLOCALIZED: Cut with Saw", "create.recipe.assembly.repeat": "UNLOCALIZED: Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "UNLOCALIZED: Random junk", + "create.recipe.assembly.junk": "UNLOCALIZED: Random salvage", "create.recipe.processing.chance": "%1$s%%概率", "create.recipe.heat_requirement.none": "不需要加熱", "create.recipe.heat_requirement.heated": "普通加熱", diff --git a/src/generated/resources/data/create/advancements/aesthetics.json b/src/generated/resources/data/create/advancements/aesthetics.json index 59a86f429..d723cbe38 100644 --- a/src/generated/resources/data/create/advancements/aesthetics.json +++ b/src/generated/resources/data/create/advancements/aesthetics.json @@ -28,8 +28,8 @@ "trigger": "create:bracket_apply", "conditions": { "accepted_entries": [ - "create:large_cogwheel", - "create:cogwheel" + "create:cogwheel", + "create:large_cogwheel" ] } }, diff --git a/src/generated/resources/data/create/recipes/sequenced_assembly/cogwheel.json b/src/generated/resources/data/create/recipes/sequenced_assembly/cogwheel.json index 84ae9aa9e..3815a5bdc 100644 --- a/src/generated/resources/data/create/recipes/sequenced_assembly/cogwheel.json +++ b/src/generated/resources/data/create/recipes/sequenced_assembly/cogwheel.json @@ -42,7 +42,7 @@ { "item": "create:cogwheel", "count": 12, - "chance": 22.0 + "chance": 32.0 }, { "item": "create:andesite_alloy", diff --git a/src/generated/resources/data/create/recipes/sequenced_assembly/large_cogwheel.json b/src/generated/resources/data/create/recipes/sequenced_assembly/large_cogwheel.json index 6fa8f6ff2..6c80cc515 100644 --- a/src/generated/resources/data/create/recipes/sequenced_assembly/large_cogwheel.json +++ b/src/generated/resources/data/create/recipes/sequenced_assembly/large_cogwheel.json @@ -58,7 +58,7 @@ { "item": "create:large_cogwheel", "count": 6, - "chance": 22.0 + "chance": 32.0 }, { "item": "create:andesite_alloy", diff --git a/src/generated/resources/data/create/recipes/sequenced_assembly/precision_mechanism.json b/src/generated/resources/data/create/recipes/sequenced_assembly/precision_mechanism.json index 1a795ca46..c130de722 100644 --- a/src/generated/resources/data/create/recipes/sequenced_assembly/precision_mechanism.json +++ b/src/generated/resources/data/create/recipes/sequenced_assembly/precision_mechanism.json @@ -59,7 +59,7 @@ "results": [ { "item": "create:precision_mechanism", - "chance": 60.0 + "chance": 120.0 }, { "item": "create:golden_sheet", diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 4fe1ec34f..952135f5b 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -56,7 +56,7 @@ public class Create { public static final String ID = "create"; public static final String NAME = "Create"; - public static final String VERSION = "0.3.2a"; + public static final String VERSION = "0.3.2b"; public static final Logger LOGGER = LogManager.getLogger(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java index c19b2d6d9..2976b1b26 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankBlock.java @@ -63,6 +63,17 @@ public class CopperBacktankBlock extends HorizontalKineticBlock builder.add(BlockStateProperties.WATERLOGGED); super.fillStateContainer(builder); } + + @Override + public boolean hasComparatorInputOverride(BlockState p_149740_1_) { + return true; + } + + @Override + public int getComparatorInputOverride(BlockState p_180641_1_, World world, BlockPos pos) { + return getTileEntityOptional(world, pos).map(CopperBacktankTileEntity::getComparatorOutput) + .orElse(0); + } @Override public BlockState updatePostPlacement(BlockState state, Direction direction, BlockState neighbourState, diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java index a4e94dd08..22c3e2f2e 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java @@ -5,12 +5,15 @@ import com.simibubi.create.AllSoundEvents; import com.simibubi.create.Create; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.particle.AirParticleData; +import com.simibubi.create.foundation.tileEntity.ComparatorUtil; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.ListNBT; import net.minecraft.particles.ParticleTypes; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction.Axis; import net.minecraft.util.INameable; @@ -25,7 +28,7 @@ public class CopperBacktankTileEntity extends KineticTileEntity implements IName public int airLevel; public int airLevelTimer; private ITextComponent customName; - + private int capacityEnchantLevel; private ListNBT enchantmentTag; @@ -39,6 +42,12 @@ public class CopperBacktankTileEntity extends KineticTileEntity implements IName super.tick(); if (getSpeed() == 0) return; + + BlockState state = getBlockState(); + BooleanProperty waterProperty = BlockStateProperties.WATERLOGGED; + if (state.contains(waterProperty) && state.get(waterProperty)) + return; + if (airLevelTimer > 0) { airLevelTimer--; return; @@ -57,14 +66,22 @@ public class CopperBacktankTileEntity extends KineticTileEntity implements IName if (airLevel == max) return; + int prevComparatorLevel = getComparatorOutput(); float abs = Math.abs(getSpeed()); int increment = MathHelper.clamp(((int) abs - 100) / 20, 1, 5); airLevel = Math.min(max, airLevel + increment); + if (getComparatorOutput() != prevComparatorLevel && !world.isRemote) + world.updateComparatorOutputLevel(pos, state.getBlock()); if (airLevel == max) sendData(); airLevelTimer = MathHelper.clamp((int) (128f - abs / 5f) - 108, 0, 20); } + public int getComparatorOutput() { + int max = BackTankUtil.maxAir(capacityEnchantLevel); + return ComparatorUtil.fractionToRedstoneLevel(airLevel / (float) max); + } + @Override protected void write(CompoundNBT compound, boolean clientPacket) { super.write(compound, clientPacket); @@ -139,7 +156,7 @@ public class CopperBacktankTileEntity extends KineticTileEntity implements IName public void setEnchantmentTag(ListNBT enchantmentTag) { this.enchantmentTag = enchantmentTag; } - + public void setCapacityEnchantLevel(int capacityEnchantLevel) { this.capacityEnchantLevel = capacityEnchantLevel; } diff --git a/src/main/java/com/simibubi/create/events/ClientEvents.java b/src/main/java/com/simibubi/create/events/ClientEvents.java index 38284706d..cf8c2a81c 100644 --- a/src/main/java/com/simibubi/create/events/ClientEvents.java +++ b/src/main/java/com/simibubi/create/events/ClientEvents.java @@ -168,7 +168,8 @@ public class ClientEvents { @SubscribeEvent public static void onUnloadWorld(WorldEvent.Unload event) { - if (event.getWorld().isRemote()) { + if (event.getWorld() + .isRemote()) { CreateClient.invalidateRenderers(); CreateClient.SOUL_PULSE_EFFECT_HANDLER.refresh(); AnimationTickHolder.reset(); @@ -178,7 +179,7 @@ public class ClientEvents { @SubscribeEvent public static void onRenderWorld(RenderWorldLastEvent event) { Vector3d cameraPos = Minecraft.getInstance().gameRenderer.getActiveRenderInfo() - .getProjectedView(); + .getProjectedView(); float pt = AnimationTickHolder.getPartialTicks(); MatrixStack ms = event.getMatrixStack(); @@ -239,17 +240,16 @@ public class ClientEvents { ItemStack stack = event.getItemStack(); String translationKey = stack.getItem() .getTranslationKey(stack); - if (!translationKey.startsWith(itemPrefix) && !translationKey.startsWith(blockPrefix)) - return; - if (TooltipHelper.hasTooltip(stack, event.getPlayer())) { - List itemTooltip = event.getToolTip(); - List toolTip = new ArrayList<>(); - toolTip.add(itemTooltip.remove(0)); - TooltipHelper.getTooltip(stack) - .addInformation(toolTip); - itemTooltip.addAll(0, toolTip); - } + if (translationKey.startsWith(itemPrefix) || translationKey.startsWith(blockPrefix)) + if (TooltipHelper.hasTooltip(stack, event.getPlayer())) { + List itemTooltip = event.getToolTip(); + List toolTip = new ArrayList<>(); + toolTip.add(itemTooltip.remove(0)); + TooltipHelper.getTooltip(stack) + .addInformation(toolTip); + itemTooltip.addAll(0, toolTip); + } if (stack.getItem() instanceof BlockItem) { BlockItem item = (BlockItem) stack.getItem(); @@ -337,8 +337,11 @@ public class ClientEvents { } public static void loadCompleted(FMLLoadCompleteEvent event) { - ModContainer createContainer = ModList.get().getModContainerById(Create.ID).orElseThrow(() -> new IllegalStateException("Create Mod Container missing after loadCompleted")); - createContainer.registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY, () -> (mc, previousScreen) -> BaseConfigScreen.forCreate(previousScreen)); + ModContainer createContainer = ModList.get() + .getModContainerById(Create.ID) + .orElseThrow(() -> new IllegalStateException("Create Mod Container missing after loadCompleted")); + createContainer.registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY, + () -> (mc, previousScreen) -> BaseConfigScreen.forCreate(previousScreen)); } } diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java b/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java index 7795e749a..42b653da0 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/SequencedAssemblyRecipeGen.java @@ -35,7 +35,7 @@ public class SequencedAssemblyRecipeGen extends CreateRecipeProvider { PRECISION_MECHANISM = create("precision_mechanism", b -> b.require(I.goldSheet()) .transitionTo(AllItems.INCOMPLETE_PRECISION_MECHANISM.get()) - .addOutput(AllItems.PRECISION_MECHANISM.get(), 60) + .addOutput(AllItems.PRECISION_MECHANISM.get(), 120) .addOutput(AllItems.GOLDEN_SHEET.get(), 8) .addOutput(AllItems.ANDESITE_ALLOY.get(), 8) .addOutput(AllBlocks.COGWHEEL.get(), 5) @@ -52,7 +52,7 @@ public class SequencedAssemblyRecipeGen extends CreateRecipeProvider { COGWHEEL = create("cogwheel", b -> b.require(I.andesite()) .transitionTo(AllItems.INCOMPLETE_COGWHEEL.get()) - .addOutput(new ItemStack(AllBlocks.COGWHEEL.get(), 12), 22) + .addOutput(new ItemStack(AllBlocks.COGWHEEL.get(), 12), 32) .addOutput(AllItems.ANDESITE_ALLOY.get(), 2) .addOutput(Blocks.ANDESITE, 1) .addOutput(AllBlocks.LARGE_COGWHEEL.get(), 1) @@ -65,7 +65,7 @@ public class SequencedAssemblyRecipeGen extends CreateRecipeProvider { LARGE_COGWHEEL = create("large_cogwheel", b -> b.require(I.andesite()) .transitionTo(AllItems.INCOMPLETE_LARGE_COGWHEEL.get()) - .addOutput(new ItemStack(AllBlocks.LARGE_COGWHEEL.get(), 6), 22) + .addOutput(new ItemStack(AllBlocks.LARGE_COGWHEEL.get(), 6), 32) .addOutput(AllItems.ANDESITE_ALLOY.get(), 2) .addOutput(Blocks.ANDESITE, 1) .addOutput(AllBlocks.COGWHEEL.get(), 1) diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 76afcc02d..ac2e2c277 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -5,7 +5,7 @@ license="MIT" [[mods]] modId="create" -version="v0.3.2a for 1.16.5" +version="v0.3.2b for 1.16.5" displayName="Create" #updateJSONURL="" displayURL="https://www.curseforge.com/minecraft/mc-mods/create" diff --git a/src/main/resources/assets/create/lang/default/messages.json b/src/main/resources/assets/create/lang/default/messages.json index 0de1d3e9b..1df9899de 100644 --- a/src/main/resources/assets/create/lang/default/messages.json +++ b/src/main/resources/assets/create/lang/default/messages.json @@ -62,7 +62,7 @@ "create.recipe.assembly.deploying_item": "Deploy %1$s", "create.recipe.assembly.cutting": "Cut with Saw", "create.recipe.assembly.repeat": "Repeat Sequence %1$s Times", - "create.recipe.assembly.junk": "Random junk", + "create.recipe.assembly.junk": "Random salvage", "create.recipe.processing.chance": "%1$s%% Chance", "create.recipe.heat_requirement.none": "No Heating Required",