Skip to content

Commit

Permalink
Merge branch '1.20.1-main' into manor-loot
Browse files Browse the repository at this point in the history
  • Loading branch information
f-raZ0R authored Oct 12, 2024
2 parents 05e2a2d + 21a8fcf commit 4d4ea86
Show file tree
Hide file tree
Showing 27 changed files with 469 additions and 80 deletions.
39 changes: 18 additions & 21 deletions raw/wip/guidebook/dimension/monstrosity.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
{
"name": "The Monstrosity",
"icon": "minecraft:bedrock",
"priority": true,
"advancement": "spectrum:lategame/hurt_by_monstrosity",
"category": "spectrum:dimension",
"extra_recipe_mappings": {
"spectrum:monstrosity_head": 0
"name": "book.spectrum.guidebook.monstrosity.name",
"icon": "minecraft:air",
"condition": {
"type": "modonomicon:advancement",
"advancement_id": "spectrum:hidden/entity_interact/killed_by_monstrosity"
},
"pages": [
{
"type": "modonomicon:text",
"title": "The Monstrosity",
"text": "$(italic)Something is lurking down there. You knew it!$()$(br2)A cruel monstrosity watching your every move, just waiting for the right moment to strike...(br)Be careful not to be torn to shreds and devoured. What a nice time to be alive."
},
"category": "spectrum:dimension",
"hide_while_locked": true,
"parents": [
{
"type": "modonomicon:text",
"advancement": "spectrum:lategame/killed_monstrosity",
"title": "Victory?",
"text": "It's dead.$(br2)$(italic)You think$()."
},
"entry": "spectrum:dimension/creatures"
}
],
"background_u_index": 0,
"background_v_index": 0,
"x": -3,
"y": 1,
"pages": [
{
"type": "modonomicon:text",
"advancement": "spectrum:hidden/entity_interact/killed_by_monstrosity",
"title": "Loss?",
"text": "This being is powerful. Very powerful. Whatever it may be, it's not a good idea to face this thing unprepared."
"title": "book.spectrum.guidebook.monstrosity.name",
"text": "book.spectrum.guidebook.monstrosity.page0.text"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit
if (world.random.nextInt(100) == 0) {
ItemStack itemStack = itemEntity.getStack();
FluidConvertingRecipe recipe = getConversionRecipeFor(getDippingRecipeType(), world, itemStack);
if (recipe != null) {
if (recipe != null && !recipe.getOutput(world.getRegistryManager()).isOf(itemStack.getItem())) { // do not try to convert items into itself for performance reasons
world.playSound(null, itemEntity.getBlockPos(), SoundEvents.BLOCK_WOOL_BREAK, SoundCategory.NEUTRAL, 1.0F, 0.9F + world.getRandom().nextFloat() * 0.2F);

ItemStack result = craft(recipe, itemStack, world);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt
return ActionResult.CONSUME;
}

if (!handStack.isIn(SpectrumItemTags.TITRATION_NEVER_FLUID) && ContainerItemContext.forPlayerInteraction(player, hand).find(FluidStorage.ITEM) != null) {
if (ContainerItemContext.forPlayerInteraction(player, hand).find(FluidStorage.ITEM) != null) {
if (FluidStorageUtil.interactWithFluidStorage(barrelEntity.fluidStorage, player, hand)) {
if (barrelEntity.getFluidVariant().isBlank()) {
if (state.get(BARREL_STATE) == TitrationBarrelBlock.BarrelState.FILLED && barrelEntity.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.dafuqs.spectrum.compat.modonomicon.pages;

import com.google.common.collect.*;
import com.google.gson.*;
import com.klikli_dev.modonomicon.book.*;
import com.klikli_dev.modonomicon.book.conditions.*;
Expand Down Expand Up @@ -32,7 +33,7 @@ public static BookChecklistPage fromJson(JsonObject json) {
? BookCondition.fromJson(json.getAsJsonObject("condition"))
: new BookNoneCondition();
var checklistObject = JsonHelper.getObject(json, "checklist", new JsonObject());
var checklist = new HashMap<Identifier, BookTextHolder>();
Map<Identifier, BookTextHolder> checklist = new LinkedHashMap<>();
for (var key : checklistObject.keySet()) {
var value = BookGsonHelper.getAsBookTextHolder(checklistObject, key, BookTextHolder.EMPTY);
checklist.put(new Identifier(key), value);
Expand All @@ -47,7 +48,7 @@ public static BookChecklistPage fromNetwork(PacketByteBuf buffer) {
var text = BookTextHolder.fromNetwork(buffer);
var anchor = buffer.readString();
var condition = BookCondition.fromNetwork(buffer);
var checklist = buffer.readMap(PacketByteBuf::readIdentifier, BookTextHolder::fromNetwork);
var checklist = buffer.readMap(Maps::newLinkedHashMapWithExpectedSize, PacketByteBuf::readIdentifier, BookTextHolder::fromNetwork);
return new BookChecklistPage(title, text, useMarkdownInTitle, showTitleSeparator, anchor, condition, checklist);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class TooltipHelper {
public static void addFoodComponentEffectTooltip(ItemStack stack, List<Text> tooltip) {
FoodComponent foodComponent = stack.getItem().getFoodComponent();
if (foodComponent != null) {
buildEffectTooltipWithChance(tooltip, foodComponent.getStatusEffects(), Text.translatable("spectrum.food.whenEaten"));
buildEffectTooltipWithChance(tooltip, foodComponent.getStatusEffects(), stack.getUseAction() == UseAction.DRINK ? Text.translatable("spectrum.food.whenDrunk") : Text.translatable("spectrum.food.whenEaten"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ public boolean matches(FusionShrineBlockEntity inv, World world) {
if (!this.fluid.test(fluidStorage.variant)) {
return false;
}
if (fluidStorage.getAmount() != fluidStorage.getCapacity()) {
return false;
if (this.fluid != FluidIngredient.EMPTY) {
if (fluidStorage.getAmount() != fluidStorage.getCapacity()) {
return false;
}
}
return matchIngredientStacksExclusively(inv, getIngredientStacks());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ public boolean matches(TitrationBarrelBlockEntity inventory, World world) {
if (!this.fluid.test(fluidStorage.variant)) {
return false;
}
if (fluidStorage.getAmount() != fluidStorage.getCapacity()) {
return false;
if (this.fluid != FluidIngredient.EMPTY) {
if (fluidStorage.getAmount() != fluidStorage.getCapacity()) {
return false;
}
}
return matchIngredientStacksExclusively(inventory, getIngredientStacks());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,8 @@ private static Settings gravityBlock(MapColor mapColor) {
// SOLID LIQUID CRYSTAL
public static final Block FROSTBITE_CRYSTAL = new Block(FabricBlockSettings.copyOf(Blocks.GLOWSTONE).mapColor(MapColor.LIGHT_BLUE_GRAY));
public static final Block BLAZING_CRYSTAL = new Block(FabricBlockSettings.copyOf(Blocks.GLOWSTONE).mapColor(MapColor.ORANGE));

public static final Block RESONANT_LILY = new ResonantLilyBlock(StatusEffects.INSTANT_HEALTH, 5, FabricBlockSettings.copyOf(Blocks.POPPY).mapColor(MapColor.WHITE));
public static final Block RESONANT_LILY = new ResonantLilyBlock(StatusEffects.REGENERATION, 5, FabricBlockSettings.copyOf(Blocks.POPPY).mapColor(MapColor.WHITE));
public static final Block QUITOXIC_REEDS = new QuitoxicReedsBlock(settings(MapColor.CLEAR, BlockSoundGroup.GRASS, 0.0F).noCollision().offset(AbstractBlock.OffsetType.XYZ).ticksRandomly().luminance(state -> state.get(QuitoxicReedsBlock.LOGGED).getLuminance()));
public static final Block MERMAIDS_BRUSH = new MermaidsBrushBlock(settings(MapColor.CLEAR, BlockSoundGroup.WET_GRASS, 0.0F).noCollision().ticksRandomly().luminance(state -> state.get(MermaidsBrushBlock.LOGGED).getLuminance()));
public static final Block RADIATING_ENDER = new RadiatingEnderBlock(FabricBlockSettings.copyOf(Blocks.EMERALD_BLOCK).mapColor(MapColor.PURPLE));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.util.*;
import org.joml.*;


public class SpectrumFluids {

// RenderHandler storage for compatibility purposes
Expand Down Expand Up @@ -56,7 +57,6 @@ public static void register() {
registerFluid("mud", MUD, FLOWING_MUD, DyeColor.BROWN);
registerFluid("midnight_solution", MIDNIGHT_SOLUTION, FLOWING_MIDNIGHT_SOLUTION, DyeColor.GRAY);
registerFluid("dragonrot", DRAGONROT, FLOWING_DRAGONROT, DyeColor.GRAY);

}

private static void registerFluid(String name, Fluid stillFluid, Fluid flowingFluid, DyeColor dyeColor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class SpectrumItemTags {
public static final TagKey<Item> EMISSIVE = of("emissive");
public static final TagKey<Item> PASTEL_NODE_UPGRADES = of("pastel_node_upgrades");
public static final TagKey<Item> TAG_FILTERING_ITEMS = of("tag_filtering_items");
public static final TagKey<Item> TITRATION_NEVER_FLUID = of("titration_never_fluid");

private static TagKey<Item> of(String id) {
return TagKey.of(RegistryKeys.ITEM, SpectrumCommon.locate(id));
Expand Down
9 changes: 6 additions & 3 deletions src/main/resources/assets/spectrum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2546,8 +2546,8 @@
"book.spectrum.guidebook.ender_splice.page2.text": "Reduces the chance of it breaking on use.",
"book.spectrum.guidebook.ender_splice.page3.text": "Allows for inter-dimensional teleportation.",
"book.spectrum.guidebook.enemy_tears": "The classic. The only thing that would make this one even more delicious would be the tears of my enemies.",
"book.spectrum.guidebook.entity_detector.name": "Entity Detector",
"book.spectrum.guidebook.entity_detector.page0.text": "The gem built into the Entity Detector reacts to micro-vibrations in the ground.\\\nThis gives it the ability to measure the number of creatures in its vicinity.",
"book.spectrum.guidebook.entity_detector.name": "Creature Detector",
"book.spectrum.guidebook.entity_detector.page0.text": "The gem built into the Creature Detector reacts to micro-vibrations in the ground.\\\nThis gives it the ability to measure the number of creatures in its vicinity.",
"book.spectrum.guidebook.entity_detector.page1.text": "Outputs a cumulative strength of 1 for every creature within a 10 block radius.",
"book.spectrum.guidebook.erasers.name": "Erasers",
"book.spectrum.guidebook.erasers.page0.text": "*Note from me to me: Don't let them overwhelm you!*",
Expand Down Expand Up @@ -3114,6 +3114,7 @@
"book.spectrum.guidebook.mod_integration.botania.least_black_lotus_reagent.text": "- +1 positive effect\n- +3 negative effects\n- makes the potion unidentifiable.\\\n\\\n*Do I fancy a gamble?*",
"book.spectrum.guidebook.mod_integration.botania.life_essence_reagent.text": "- +2.5 potency\n- -3 yield\\\n\\\nRequires other reagents to increase the yield, otherwise I will end up with nothing...",
"book.spectrum.guidebook.mod_integration.botania.mana_powder_reagent.text": "- +25%% duration\n- 15%% chance to add last effect",
"book.spectrum.guidebook.mod_integration.botania.pixie_dust_reagent.text": "- creates Lingering Potions & Tipped Arrows\n- -25%% potency",
"book.spectrum.guidebook.mod_integration.botania.name": "Botania",
"book.spectrum.guidebook.mod_integration.botania.page0.text": "I found an abundance of colorful flowers growing in small patches in forests and plains! What's up with those? Definitely worth a look tinkering with them and train my brown thumb.",
"book.spectrum.guidebook.mod_integration.botania.page1.text": "Crushing the flowers may seem a bit unorthodox, but it *did* work. No problem plucking the petals from the flattened blossom afterwards.",
Expand All @@ -3130,7 +3131,6 @@
"book.spectrum.guidebook.mod_integration.botania.page7.text": "Those elusive seeds I could only find in chests hidden across the world? Expensive - maybe not even worth the hassle - but I finally found a way to reproduce them.",
"book.spectrum.guidebook.mod_integration.botania.page8.text": "I can finally harvest Enchanted Soil! [Resonance](entry://enchanting/enchantments/resonance) is the key.",
"book.spectrum.guidebook.mod_integration.botania.page8.title": "Enchanted Soil",
"book.spectrum.guidebook.mod_integration.botania.pixie_dust_reagent.text": "- creates Lingering Potions & Tipped Arrows\n- -25%% potency",
"book.spectrum.guidebook.mod_integration.byg.name": "Oh The Biomes You'll Go",
"book.spectrum.guidebook.mod_integration.chalk.name": "Chalk",
"book.spectrum.guidebook.mod_integration.chalk.page0.text": "Getting lost deep down time and time again has made me carry a bit of [#](bb00bb)Chalk[#]() at all times, allowing me to mark the way back out. Unfortunately these little pieces of Calcite never last long before they break.",
Expand Down Expand Up @@ -5097,6 +5097,8 @@
"spectrum.rei.potion_workshop_reacting.spectrum.topaz_powder": "• makes effects not show any particles",
"spectrum.rei.potion_workshop_reacting.spectrum.vegetal": "• +200% duration\n• -25% potency",
"spectrum.rei.potion_workshop_reacting.spectrum.bitter_oils": "• -4 yield\n• makes effects (near) incurable",
"spectrum.rei.potion_workshop_reacting.spectrum.blackest_lotus": "• +3 positive effects\n• +1 negative effect\n• makes the potion unidentifiable.\n\nFancy a gamble?",
"spectrum.rei.potion_workshop_reacting.spectrum.least_black_lotus": "• +1 positive effect\n• +3 negative effects\n• makes the potion unidentifiable.\n\nFancy a gamble?",

"spectrum.subtitles.air_launch_belt_charging": "Takeoff Belt charging",
"spectrum.subtitles.bident_hit_ground": "Bident vibrates",
Expand Down Expand Up @@ -5637,6 +5639,7 @@
"______food_tooltips": "Food Tooltips:",
"spectrum.food.withChance": "%s [%d%%]",
"spectrum.food.whenEaten": "When Eaten:",
"spectrum.food.whenDrunk": "When Drunk:",

"______structure_translations": "Structure Translations:",
"structure.spectrum.city_below": "City Below",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/spectrum/lang/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -3393,8 +3393,8 @@
"book.spectrum.guidebook.ender_splice.page1.text": "- When I first use it, it binds to my current position, the second use will teleport me back.\n- Can even be used on other players\n- Cannot teleport across dimensions",
"book.spectrum.guidebook.ender_splice.page2.text": "Unbreaking reduces the chance of it breaking on use.",
"book.spectrum.guidebook.ender_splice.page3.text": "Resonance will allow for inter-dimensional teleportation.",
"book.spectrum.guidebook.entity_detector.name": "Entity Detector",
"book.spectrum.guidebook.entity_detector.page0.text": "The gem built into the Entity Detector reacts to micro-vibrations in the ground. This gives it the ability to measure the number of creatures in its vicinity.",
"book.spectrum.guidebook.entity_detector.name": "Creature Detector",
"book.spectrum.guidebook.entity_detector.page0.text": "The gem built into the Creature Detector reacts to micro-vibrations in the ground. This gives it the ability to measure the number of creatures in its vicinity.",
"book.spectrum.guidebook.entity_detector.page1.text": "Outputs a cumulative strength of 1 for every creature within a 10 block radius.",
"book.spectrum.guidebook.everpromise_ribbon.page0.text": "A ribbon given to pets as an everlasting promise to watch over and care for them.\\\nI can name it and pin it on a creature. Should it ever die it will drop a [#](bb00bb)Broken Promise[#]().",
"book.spectrum.guidebook.everpromise_ribbon.page1.text": "My pet will immediately trust me, if it does not already. After naming it, I can use a [#](bb00bb)Crafting Table[#]() to add [Pigment](entry://general/pigment) to the [#](bb00bb)Ribbon[#]() to color the pets name.",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "modonomicon:advancement",
"advancement_id": "spectrum:unlocks/redstone/entity_detector"
},
"icon": "spectrum:player_detector",
"icon": "spectrum:entity_detector",
"category": "spectrum:magical_blocks",
"hide_while_locked": true,
"parents": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "modonomicon:advancement",
"advancement_id": "spectrum:unlocks/redstone/item_detector"
},
"icon": "spectrum:player_detector",
"icon": "spectrum:item_detector",
"category": "spectrum:magical_blocks",
"hide_while_locked": true,
"parents": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "modonomicon:advancement",
"advancement_id": "spectrum:unlocks/redstone/light_level_detector"
},
"icon": "spectrum:player_detector",
"icon": "spectrum:light_level_detector",
"category": "spectrum:magical_blocks",
"hide_while_locked": true,
"parents": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "modonomicon:advancement",
"advancement_id": "spectrum:unlocks/redstone/weather_detector"
},
"icon": "spectrum:player_detector",
"icon": "spectrum:weather_detector",
"category": "spectrum:magical_blocks",
"hide_while_locked": true,
"parents": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,16 @@
"item": "spectrum:bristle_mead",
"count": 4
},
"required_advancement": "spectrum:hidden/collect_cookbooks/brewers_handbook"
"required_advancement": "spectrum:hidden/collect_cookbooks/brewers_handbook",
"fabric:load_conditions": [
{
"condition": "fabric:not",
"value": {
"condition": "fabric:fluid_tags_populated",
"values": [
"c:honey"
]
}
}
]
}
Loading

0 comments on commit 4d4ea86

Please sign in to comment.