Skip to content

Commit

Permalink
Merge pull request #738 from FTBTeam/1.20.4/dev
Browse files Browse the repository at this point in the history
1.20.4/dev
  • Loading branch information
desht authored Jun 21, 2024
2 parents f664e62 + 048bbec commit 575c6ea
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fluids in fluid tasks can now be shift-clicked to show recipes for the fluid in JEI or REI
* Added a tooltip to fluid tasks when viewing quests to mention this

### Fixed
* Fixed Task Screen multiblocks being oversized
* Removed misleading "Click to submit" tooltip from fluid tasks (fluid tasks can only be submitted via Task Screen)

# [2004.2.1]

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.DirectionProperty;
import net.minecraft.world.level.levelgen.structure.BoundingBox;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -218,16 +219,15 @@ public static boolean hasPermissionToEdit(ServerPlayer player, ITaskScreen scree
* @param facing the side the display screen is on
* @return the bounding box containing all blocks of the multiblock
*/
public static AABB getMultiblockBounds(BlockPos corePos, int size, Direction facing) {
if (size == 1) return new AABB(corePos);
public static BoundingBox getMultiblockBounds(BlockPos corePos, int size, Direction facing) {
if (size == 1) return new BoundingBox(corePos);

int size2 = size / 2;
facing = facing.getCounterClockWise();

return new AABB(
corePos.getX() - size2 * facing.getStepX(), corePos.getY(), corePos.getZ() - size2 * facing.getStepZ(),
corePos.getX() + size2 * facing.getStepX(), corePos.getY() + size - 1, corePos.getZ() + size2 * facing.getStepZ()
);
BlockPos pos1 = new BlockPos(corePos.getX() - size2 * facing.getStepX(), corePos.getY(), corePos.getZ() - size2 * facing.getStepZ());
BlockPos pos2 = new BlockPos(corePos.getX() + size2 * facing.getStepX(), corePos.getY() + size - 1, corePos.getZ() + size2 * facing.getStepZ());
return BoundingBox.fromCorners(pos1, pos2);
}

public static class Aux extends TaskScreenBlock {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ public void addMouseOverHeader(TooltipList list, TeamData teamData, boolean adva
*/
@Environment(EnvType.CLIENT)
public void addMouseOverText(TooltipList list, TeamData teamData) {
if (consumesResources()) {
list.blankLine();
list.add(Component.translatable("ftbquests.task.click_to_submit").withStyle(ChatFormatting.YELLOW, ChatFormatting.UNDERLINE));
}
}

@Environment(EnvType.CLIENT)
Expand Down Expand Up @@ -334,7 +330,7 @@ public void readNetData(FriendlyByteBuf buffer) {
public void fillConfigGroup(ConfigGroup config) {
super.fillConfigGroup(config);

config.addBool("optional_task", optionalTask, v -> optionalTask = v, false).setNameKey("ftbquests.quest.misc.optional");
config.addBool("optional_task", optionalTask, v -> optionalTask = v, false).setNameKey("ftbquests.quest.misc.optional_task");
}

protected ResourceLocation safeResourceLocation(String str, ResourceLocation fallback) {
Expand Down
2 changes: 2 additions & 0 deletions common/src/main/resources/assets/ftbquests/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@
"ftbquests.quest.visibility.hide_text_until_complete": "Hide Text Until Quest is Completed",
"ftbquests.quest.misc.disable_jei": "Disable JEI Recipe",
"ftbquests.quest.misc.optional": "Optional Quest",
"ftbquests.quest.misc.optional_task": "Optional Task",
"ftbquests.quest.misc.optional_task.tooltip": "Note: not the same as an optional quest\nA quest with no non-optional tasks will autocomplete on player login",
"ftbquests.quest.locked": "Locked: uncompleted dependencies",
"ftbquests.quest.appearance.min_width": "Min Opened Quest Window Width",
"ftbquests.quest.misc.ignore_reward_blocking": "Ignore reward blocking",
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ archives_base_name=ftb-quests
minecraft_version=1.20.4

# Build time
mod_version=2004.2.1
mod_version=2004.2.2
maven_group=dev.ftb.mods
mod_author=FTB Team

Expand Down

0 comments on commit 575c6ea

Please sign in to comment.