├── .github ├── ISSUE_TEMPLATE │ ├── 1-bug_report.yml │ ├── 2-crash_report.yml │ ├── 3-feature_request.yml │ └── config.yml └── workflows │ └── gradle-publish.yml ├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── common ├── build.gradle └── src │ ├── generated │ └── resources │ │ ├── .cache │ │ ├── 77038cb024c5999ce280bcb6800e72cf1c655fe7 │ │ └── 7dda471881370ae09913a072085433a4eb774f0b │ │ ├── assets │ │ └── sereneseasons │ │ │ ├── blockstates │ │ │ └── season_sensor.json │ │ │ ├── items │ │ │ ├── calendar.json │ │ │ ├── season_sensor.json │ │ │ └── ss_icon.json │ │ │ └── models │ │ │ ├── block │ │ │ ├── season_sensor.json │ │ │ ├── season_sensor_autumn.json │ │ │ ├── season_sensor_summer.json │ │ │ └── season_sensor_winter.json │ │ │ └── item │ │ │ ├── calendar_00.json │ │ │ ├── calendar_01.json │ │ │ ├── calendar_02.json │ │ │ ├── calendar_03.json │ │ │ ├── calendar_04.json │ │ │ ├── calendar_05.json │ │ │ ├── calendar_06.json │ │ │ ├── calendar_07.json │ │ │ ├── calendar_08.json │ │ │ ├── calendar_09.json │ │ │ ├── calendar_10.json │ │ │ ├── calendar_11.json │ │ │ ├── calendar_null.json │ │ │ ├── calendar_tropical_00.json │ │ │ ├── calendar_tropical_01.json │ │ │ ├── calendar_tropical_02.json │ │ │ ├── calendar_tropical_03.json │ │ │ ├── calendar_tropical_04.json │ │ │ ├── calendar_tropical_05.json │ │ │ └── ss_icon.json │ │ └── data │ │ └── sereneseasons │ │ ├── advancement │ │ └── recipes │ │ │ ├── redstone │ │ │ └── season_sensor.json │ │ │ └── tools │ │ │ └── calendar.json │ │ └── recipe │ │ ├── calendar.json │ │ └── season_sensor.json │ └── main │ ├── java │ └── sereneseasons │ │ ├── api │ │ ├── SSBlockEntities.java │ │ ├── SSBlocks.java │ │ ├── SSGameRules.java │ │ ├── SSItems.java │ │ └── season │ │ │ ├── ISeasonColorProvider.java │ │ │ ├── ISeasonState.java │ │ │ ├── Season.java │ │ │ ├── SeasonChangedEvent.java │ │ │ └── SeasonHelper.java │ │ ├── block │ │ ├── SeasonSensorBlock.java │ │ └── entity │ │ │ └── SeasonSensorBlockEntity.java │ │ ├── client │ │ └── item │ │ │ ├── ContextCalendarType.java │ │ │ └── SeasonTimeProperty.java │ │ ├── command │ │ ├── CommandGetSeason.java │ │ ├── CommandSetSeason.java │ │ ├── SeasonArgument.java │ │ └── SeasonCommands.java │ │ ├── config │ │ ├── FertilityConfig.java │ │ └── SeasonsConfig.java │ │ ├── core │ │ └── SereneSeasons.java │ │ ├── init │ │ ├── ModAPI.java │ │ ├── ModBlockEntities.java │ │ ├── ModBlocks.java │ │ ├── ModClient.java │ │ ├── ModConfig.java │ │ ├── ModCreativeTab.java │ │ ├── ModFertility.java │ │ ├── ModGameRules.java │ │ ├── ModItems.java │ │ ├── ModPackets.java │ │ └── ModTags.java │ │ ├── item │ │ ├── CalendarItem.java │ │ └── CalendarType.java │ │ ├── mixin │ │ ├── MixinBiome.java │ │ ├── MixinBlockStateBase.java │ │ ├── MixinLevel.java │ │ ├── MixinServerLevel.java │ │ └── client │ │ │ ├── MixinBiomeClient.java │ │ │ ├── MixinRangeSelectItemModelProperties.java │ │ │ ├── MixinSelectItemModelProperties.java │ │ │ └── MixinWeatherEffectRenderer.java │ │ ├── network │ │ └── SyncSeasonCyclePacket.java │ │ ├── season │ │ ├── RandomUpdateHandler.java │ │ ├── SeasonColorHandlers.java │ │ ├── SeasonHandler.java │ │ ├── SeasonHandlerClient.java │ │ ├── SeasonHooks.java │ │ ├── SeasonSavedData.java │ │ ├── SeasonTime.java │ │ └── SeasonalCropGrowthHandler.java │ │ └── util │ │ ├── Color.java │ │ └── SeasonColorUtil.java │ └── resources │ ├── assets │ └── sereneseasons │ │ ├── lang │ │ ├── cs_cz.json │ │ ├── de_de.json │ │ ├── en_us.json │ │ ├── es_ar.json │ │ ├── es_es.json │ │ ├── es_mx.json │ │ ├── fi_fi.json │ │ ├── fr_fr.json │ │ ├── it_it.json │ │ ├── kk_kz.json │ │ ├── ko_kr.json │ │ ├── nl_nl.json │ │ ├── nn_no.json │ │ ├── pl_pl.json │ │ ├── pt_br.json │ │ ├── ru_ru.json │ │ ├── tr_tr.json │ │ ├── uk_ua.json │ │ ├── vi_vn.json │ │ ├── zh_cn.json │ │ └── zh_tw.json │ │ └── textures │ │ ├── block │ │ ├── season_sensor_autumn_top.png │ │ ├── season_sensor_side.png │ │ ├── season_sensor_spring_top.png │ │ ├── season_sensor_summer_top.png │ │ └── season_sensor_winter_top.png │ │ └── item │ │ ├── calendar_00.png │ │ ├── calendar_01.png │ │ ├── calendar_02.png │ │ ├── calendar_03.png │ │ ├── calendar_04.png │ │ ├── calendar_05.png │ │ ├── calendar_06.png │ │ ├── calendar_07.png │ │ ├── calendar_08.png │ │ ├── calendar_09.png │ │ ├── calendar_10.png │ │ ├── calendar_11.png │ │ ├── calendar_null.png │ │ ├── calendar_tropical_00.png │ │ ├── calendar_tropical_01.png │ │ ├── calendar_tropical_02.png │ │ ├── calendar_tropical_03.png │ │ ├── calendar_tropical_04.png │ │ ├── calendar_tropical_05.png │ │ └── ss_icon.png │ ├── data │ ├── c │ │ └── tags │ │ │ └── block │ │ │ └── glass_blocks.json │ ├── forge │ │ └── tags │ │ │ └── block │ │ │ └── glass.json │ └── sereneseasons │ │ ├── loot_table │ │ └── block │ │ │ └── season_sensor.json │ │ └── tags │ │ ├── block │ │ ├── autumn_crops.json │ │ ├── greenhouse_glass.json │ │ ├── spring_crops.json │ │ ├── summer_crops.json │ │ ├── unbreakable_infertile_crops.json │ │ ├── winter_crops.json │ │ └── year_round_crops.json │ │ ├── item │ │ ├── autumn_crops.json │ │ ├── spring_crops.json │ │ ├── summer_crops.json │ │ ├── winter_crops.json │ │ └── year_round_crops.json │ │ └── worldgen │ │ └── biome │ │ ├── blacklisted_biomes.json │ │ ├── infertile_biomes.json │ │ ├── lesser_color_change_biomes.json │ │ └── tropical_biomes.json │ ├── pack.mcmeta │ ├── sereneseasons.accesswidener │ ├── sereneseasons.mixins.json │ └── sereneseasons_logo.png ├── fabric ├── build.gradle └── src │ └── main │ ├── java │ └── sereneseasons │ │ └── fabric │ │ └── core │ │ └── SereneSeasonsFabric.java │ └── resources │ ├── fabric.mod.json │ └── sereneseasons.fabric.mixins.json ├── forge ├── build.gradle └── src │ └── main │ ├── java │ └── sereneseasons │ │ └── forge │ │ └── core │ │ └── SereneSeasonsForge.java │ └── resources │ ├── META-INF │ ├── accesstransformer.cfg │ └── mods.toml │ └── sereneseasons.forge.mixins.json ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── neoforge ├── build.gradle └── src │ └── main │ ├── java │ └── sereneseasons │ │ ├── datagen │ │ ├── DataGenerationHandler.java │ │ ├── models │ │ │ ├── SSBlockModelGenerators.java │ │ │ ├── SSItemModelGenerators.java │ │ │ └── SSModelProvider.java │ │ └── provider │ │ │ └── SSRecipeProvider.java │ │ └── neoforge │ │ └── core │ │ └── SereneSeasonsNeoForge.java │ └── resources │ ├── META-INF │ ├── accesstransformer.cfg │ └── neoforge.mods.toml │ └── sereneseasons.neoforge.mixins.json └── settings.gradle /.github/ISSUE_TEMPLATE/1-bug_report.yml: -------------------------------------------------------------------------------- 1 | name: 1.21+ Bug Report 2 | description: File a bug report 3 | labels: [bug] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | For bugs experienced with Minecraft 1.21+. Older versions are not supported. 9 | If any section does not apply, replace its content with "N/A". 10 | 11 | Please search for existing bug reports before making your own report. 12 | Duplicate reports will be marked as such and you will be referred to the original report. 13 | - type: textarea 14 | attributes: 15 | label: What's the issue you encountered? 16 | description: | 17 | Describe the issue in detail and what you were doing beforehand. 18 | validations: 19 | required: true 20 | - type: textarea 21 | attributes: 22 | label: How can the issue be reproduced? 23 | description: Include a detailed step by step process for recreating your issue. 24 | validations: 25 | required: true 26 | - type: input 27 | attributes: 28 | label: Logs 29 | description: | 30 | Logs can be found in your Minecraft directory under `/logs/latest.log`. 31 | If your issue caused Minecraft to crash, include the crash report by creating a [gist](https://gist.github.com/) and pasting the link here. 32 | If your don't include logs in instances of crash related issues, we will ask you to provide one. 33 | - type: input 34 | attributes: 35 | label: Mod Version 36 | description: | 37 | Replace ×'s with the mod version you are using. 38 | You can find your mod version by checking the ``Mods`` menu on the title screen. 39 | placeholder: ×.×.×.× 40 | validations: 41 | required: true 42 | - type: textarea 43 | attributes: 44 | label: Additional information 45 | description: | 46 | Any other information relevant to your issue. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2-crash_report.yml: -------------------------------------------------------------------------------- 1 | name: 1.21+ Crash Report 2 | description: File a crash report 3 | labels: [crash] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | For crashes experienced with Minecraft 1.21+. Older versions are not supported. 9 | If any section does not apply, replace its content with "N/A". 10 | 11 | Please search for existing crash reports before making your own report. 12 | Duplicate reports will be marked as such and you will be referred to the original report. 13 | - type: textarea 14 | attributes: 15 | label: What's the issue you encountered? 16 | description: | 17 | Describe the issue in detail and what you were doing beforehand. 18 | validations: 19 | required: true 20 | - type: textarea 21 | attributes: 22 | label: How can the issue be reproduced? 23 | description: Include a detailed step by step process for recreating your issue. 24 | validations: 25 | required: true 26 | - type: input 27 | attributes: 28 | label: Logs 29 | description: | 30 | Logs can be found in your Minecraft directory under `/logs/latest.log`. 31 | If your issue caused Minecraft to crash, include the crash report by creating a [gist](https://gist.github.com/) and pasting the link here. 32 | If your don't include logs in instances of crash related issues, we will ask you to provide one. 33 | validations: 34 | required: true 35 | - type: input 36 | attributes: 37 | label: Mod Version 38 | description: | 39 | Replace ×'s with the mod version you are using. 40 | You can find your mod version by checking the ``Mods`` menu on the title screen. 41 | placeholder: ×.×.×.× 42 | validations: 43 | required: true 44 | - type: textarea 45 | attributes: 46 | label: Additional information 47 | description: | 48 | Any other information relevant to your issue. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3-feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 1.21+ Feature Request 2 | description: Request a new feature 3 | labels: [feature] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Feature requests for Minecraft 1.21+. Older versions are not supported. 9 | If any section does not apply, replace its contents with "N/A". 10 | 11 | Please search for existing feature requests before you make your own request. 12 | Duplicate requests will be marked as such and you will be referred to the original request. 13 | - type: markdown 14 | attributes: 15 | value: "## What feature are you suggesting?" 16 | - type: textarea 17 | attributes: 18 | label: Overview 19 | description: Provide an overview of the feature being suggested. 20 | validations: 21 | required: true 22 | - type: textarea 23 | attributes: 24 | label: Why would this feature be useful? 25 | description: | 26 | Describe the benefits of implementing this feature. 27 | validations: 28 | required: true -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Glitchfiend Discord 4 | url: https://discord.gg/GyyzU6T 5 | about: Please ask general questions here instead of opening issues for them. -------------------------------------------------------------------------------- /.github/workflows/gradle-publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | on: 3 | workflow_dispatch: 4 | push: 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | contents: read 10 | packages: write 11 | steps: 12 | - name: "Checkout" 13 | uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | fetch-tags: true 17 | - name: Set up JDK 21 18 | uses: actions/setup-java@v4 19 | with: 20 | java-version: '21' 21 | distribution: 'oracle' 22 | server-id: github # Value of the distributionManagement/repository/id field of the pom.xml 23 | settings-path: ${{ github.workspace }} # location for the settings.xml file 24 | - name: Setup Gradle 25 | uses: gradle/gradle-build-action@v2 26 | - name: Publish 27 | run: ./gradlew publish 28 | env: 29 | MAVEN_USER: ${{ secrets.MAVEN_USER }} 30 | MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} 31 | BUILD_NUMBER: ${{ github.run_number }} 32 | - name: CurseForge Publish 33 | run: ./gradlew curseforge -PcurseApiKey=${CURSE_API_KEY} 34 | env: 35 | CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }} 36 | BUILD_NUMBER: ${{ github.run_number }} 37 | continue-on-error: true 38 | - name: Modrinth Publish 39 | run: ./gradlew modrinth -PmodrinthToken=${MODRINTH_TOKEN} 40 | env: 41 | MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} 42 | BUILD_NUMBER: ${{ github.run_number }} 43 | continue-on-error: true 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # eclipse 2 | bin 3 | *.launch 4 | .settings 5 | .metadata 6 | .classpath 7 | .project 8 | 9 | # idea 10 | out 11 | *.ipr 12 | *.iws 13 | *.iml 14 | .idea/* 15 | !.idea/scopes 16 | 17 | # gradle 18 | build 19 | .gradle 20 | 21 | # other 22 | eclipse 23 | run 24 | runs 25 | *.cache -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | All rights reserved. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

https://discord.gg/GyyzU6T

6 | 7 | **Serene Seasons** is a **Minecraft mod** that adds **seasons** with **changing colors, temperature shifting, and more!** 8 | 9 | ----------------- 10 | 11 | © 2024 Glitchfiend. All rights reserved. -------------------------------------------------------------------------------- /common/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' 3 | } 4 | 5 | base.archivesName.set("${mod_name}-common") 6 | 7 | minecraft { 8 | version(minecraft_version) 9 | if (file("src/main/resources/${mod_id}.accesswidener").exists()) { 10 | accessWideners(project.file("src/main/resources/${mod_id}.accesswidener")) 11 | } 12 | } 13 | 14 | sourceSets.main.resources.srcDir 'src/generated/resources' 15 | 16 | dependencies { 17 | compileOnly group:'org.spongepowered', name: 'mixin', version: '0.8.5' 18 | compileOnly group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' 19 | compileOnly("com.electronwill.night-config:toml:${nightconfig_version}") 20 | compileOnly("com.electronwill.night-config:core:${nightconfig_version}") 21 | compileOnly("net.jodah:typetools:0.6.3") 22 | compileOnly 'com.github.glitchfiend:GlitchCore-common:' + minecraft_version + '-' + glitchcore_version 23 | } 24 | -------------------------------------------------------------------------------- /common/src/generated/resources/.cache/77038cb024c5999ce280bcb6800e72cf1c655fe7: -------------------------------------------------------------------------------- 1 | // 1.21.5 2025-04-07T13:06:46.0248493 Model Definitions 2 | 2ea45e64e9e34075391dc30304fed3123150b8ef assets/sereneseasons/blockstates/season_sensor.json 3 | 5fd5aa241920a07c37d4df886850192229270ada assets/sereneseasons/items/calendar.json 4 | 099047045d7653877027bfca4a3175d4a0adb968 assets/sereneseasons/items/season_sensor.json 5 | eea0ea9e0c24e02a67f6f5192a3b06e118c40585 assets/sereneseasons/items/ss_icon.json 6 | 607600cb666bf37bc704c834d7d0ffc585b405d0 assets/sereneseasons/models/block/season_sensor.json 7 | 2797b7f59442c019e778d4e72e49c819153d75b3 assets/sereneseasons/models/block/season_sensor_autumn.json 8 | 7ed498c84b8810c377d83886277d13204d936b5a assets/sereneseasons/models/block/season_sensor_summer.json 9 | 7013d7e0506d4d1f4bde717ae5fbb71bd269ee86 assets/sereneseasons/models/block/season_sensor_winter.json 10 | cb387a39c39a0f4665c565e7218cd4426875246a assets/sereneseasons/models/item/calendar_00.json 11 | c154671ec34c7931bc05c47db4f69f21a5e413c7 assets/sereneseasons/models/item/calendar_01.json 12 | 01c1acf59f2e7d7b8319592777b1f2218c208f78 assets/sereneseasons/models/item/calendar_02.json 13 | d44c9ac4201a4a952696ecccd594fc9689de3576 assets/sereneseasons/models/item/calendar_03.json 14 | cc3782ec8e516147656f4045139440b5ccadf0b6 assets/sereneseasons/models/item/calendar_04.json 15 | 55827705e48251633ddf7345549e9e3cfc9a7fc9 assets/sereneseasons/models/item/calendar_05.json 16 | 93c14f266f904cc70eede0f028efaf976f348c41 assets/sereneseasons/models/item/calendar_06.json 17 | ef42e0689c450893ae9666734d540a12d22974cc assets/sereneseasons/models/item/calendar_07.json 18 | 01b281a50b438eb9899a38bb22fbe4a07d524a77 assets/sereneseasons/models/item/calendar_08.json 19 | b48f883f9a867921ce1cf1d738c929dbf4fa811a assets/sereneseasons/models/item/calendar_09.json 20 | cfce93d8a9e0dccea5e123e0a0fd61830ef92024 assets/sereneseasons/models/item/calendar_10.json 21 | f752ad7cd8c2af7907da019e39596dada37fcd0d assets/sereneseasons/models/item/calendar_11.json 22 | 4f091f7f06f8789e698f1298b02436a9063cee2f assets/sereneseasons/models/item/calendar_null.json 23 | a2497c6b45c5f4c1d63d25bbc39d97b586062c53 assets/sereneseasons/models/item/calendar_tropical_00.json 24 | 6eb80c9a6831badc1ba847e866c1092df7e7aaf9 assets/sereneseasons/models/item/calendar_tropical_01.json 25 | 8b518f9123cc741a690af3a729d1e4348278529d assets/sereneseasons/models/item/calendar_tropical_02.json 26 | b36f2b2372a0985419e0659656089466b8e963a3 assets/sereneseasons/models/item/calendar_tropical_03.json 27 | af26ace87fdb72c0f5a952073ad284ddf288c4d0 assets/sereneseasons/models/item/calendar_tropical_04.json 28 | 7116416dd672caa9749618f5d43bb16bae99ed5b assets/sereneseasons/models/item/calendar_tropical_05.json 29 | c4e806108e523f09f34968a76f3cdd9c6f985a22 assets/sereneseasons/models/item/ss_icon.json 30 | -------------------------------------------------------------------------------- /common/src/generated/resources/.cache/7dda471881370ae09913a072085433a4eb774f0b: -------------------------------------------------------------------------------- 1 | // 1.21.5 2025-04-07T13:06:46.02585 SS Recipes 2 | e072858e57ee517a9ad673759ea337523f1faf58 data/sereneseasons/advancement/recipes/redstone/season_sensor.json 3 | a6e2e9061195651e5a5ebe536429b983725e47a8 data/sereneseasons/advancement/recipes/tools/calendar.json 4 | 8baddb9771f6e76a935fa1bf988623c65578b91f data/sereneseasons/recipe/calendar.json 5 | 1e0108f730fc7055f414ae4274b89cda22b7a722 data/sereneseasons/recipe/season_sensor.json 6 | -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/blockstates/season_sensor.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "season=0": { 4 | "model": "sereneseasons:block/season_sensor" 5 | }, 6 | "season=1": { 7 | "model": "sereneseasons:block/season_sensor_summer" 8 | }, 9 | "season=2": { 10 | "model": "sereneseasons:block/season_sensor_autumn" 11 | }, 12 | "season=3": { 13 | "model": "sereneseasons:block/season_sensor_winter" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/items/season_sensor.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": { 3 | "type": "minecraft:model", 4 | "model": "sereneseasons:block/season_sensor" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/items/ss_icon.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": { 3 | "type": "minecraft:model", 4 | "model": "sereneseasons:item/ss_icon" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/block/season_sensor.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/template_daylight_detector", 3 | "textures": { 4 | "side": "sereneseasons:block/season_sensor_side", 5 | "top": "sereneseasons:block/season_sensor_spring_top" 6 | } 7 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/block/season_sensor_autumn.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/template_daylight_detector", 3 | "textures": { 4 | "side": "sereneseasons:block/season_sensor_side", 5 | "top": "sereneseasons:block/season_sensor_autumn_top" 6 | } 7 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/block/season_sensor_summer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/template_daylight_detector", 3 | "textures": { 4 | "side": "sereneseasons:block/season_sensor_side", 5 | "top": "sereneseasons:block/season_sensor_summer_top" 6 | } 7 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/block/season_sensor_winter.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/template_daylight_detector", 3 | "textures": { 4 | "side": "sereneseasons:block/season_sensor_side", 5 | "top": "sereneseasons:block/season_sensor_winter_top" 6 | } 7 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_00.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_00" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_01.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_01" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_02.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_02" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_03.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_03" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_04.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_04" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_05.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_05" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_06.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_06" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_07.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_07" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_08.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_08" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_09.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_09" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_10.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_10" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_11.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_11" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_null.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_null" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_tropical_00.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_tropical_00" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_tropical_01.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_tropical_01" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_tropical_02.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_tropical_02" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_tropical_03.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_tropical_03" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_tropical_04.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_tropical_04" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/calendar_tropical_05.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/calendar_tropical_05" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/assets/sereneseasons/models/item/ss_icon.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "sereneseasons:item/ss_icon" 5 | } 6 | } -------------------------------------------------------------------------------- /common/src/generated/resources/data/sereneseasons/advancement/recipes/redstone/season_sensor.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_calendar": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": "sereneseasons:calendar" 9 | } 10 | ] 11 | }, 12 | "trigger": "minecraft:inventory_changed" 13 | }, 14 | "has_the_recipe": { 15 | "conditions": { 16 | "recipe": "sereneseasons:season_sensor" 17 | }, 18 | "trigger": "minecraft:recipe_unlocked" 19 | } 20 | }, 21 | "requirements": [ 22 | [ 23 | "has_the_recipe", 24 | "has_calendar" 25 | ] 26 | ], 27 | "rewards": { 28 | "recipes": [ 29 | "sereneseasons:season_sensor" 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /common/src/generated/resources/data/sereneseasons/advancement/recipes/tools/calendar.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_clock": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": "minecraft:clock" 9 | } 10 | ] 11 | }, 12 | "trigger": "minecraft:inventory_changed" 13 | }, 14 | "has_the_recipe": { 15 | "conditions": { 16 | "recipe": "sereneseasons:calendar" 17 | }, 18 | "trigger": "minecraft:recipe_unlocked" 19 | } 20 | }, 21 | "requirements": [ 22 | [ 23 | "has_the_recipe", 24 | "has_clock" 25 | ] 26 | ], 27 | "rewards": { 28 | "recipes": [ 29 | "sereneseasons:calendar" 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /common/src/generated/resources/data/sereneseasons/recipe/calendar.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "equipment", 4 | "key": { 5 | "C": "minecraft:clock", 6 | "P": "minecraft:paper" 7 | }, 8 | "pattern": [ 9 | "PPP", 10 | "PCP", 11 | "PPP" 12 | ], 13 | "result": { 14 | "count": 1, 15 | "id": "sereneseasons:calendar" 16 | } 17 | } -------------------------------------------------------------------------------- /common/src/generated/resources/data/sereneseasons/recipe/season_sensor.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "redstone", 4 | "key": { 5 | "#": "minecraft:cobblestone_slab", 6 | "C": "sereneseasons:calendar", 7 | "G": "minecraft:glass", 8 | "Q": "minecraft:quartz" 9 | }, 10 | "pattern": [ 11 | "GGG", 12 | "QCQ", 13 | "###" 14 | ], 15 | "result": { 16 | "count": 1, 17 | "id": "sereneseasons:season_sensor" 18 | } 19 | } -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/SSBlockEntities.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api; 6 | 7 | import net.minecraft.world.level.block.entity.BlockEntityType; 8 | 9 | public class SSBlockEntities 10 | { 11 | public static BlockEntityType SEASON_SENSOR; 12 | } 13 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/SSBlocks.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.api; 2 | 3 | import net.minecraft.world.level.block.Block; 4 | 5 | public class SSBlocks 6 | { 7 | public static Block SEASON_SENSOR; 8 | } 9 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/SSGameRules.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api; 6 | 7 | import net.minecraft.world.level.GameRules; 8 | 9 | public class SSGameRules 10 | { 11 | public static GameRules.Key RULE_DOSEASONCYCLE; 12 | } 13 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/SSItems.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api; 6 | 7 | import net.minecraft.world.item.Item; 8 | 9 | public class SSItems 10 | { 11 | public static Item CALENDAR; 12 | public static Item SS_ICON; 13 | 14 | public static Item SEASON_SENSOR; 15 | } 16 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/season/ISeasonColorProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api.season; 6 | 7 | public interface ISeasonColorProvider 8 | { 9 | int getGrassOverlay(); 10 | float getGrassSaturationMultiplier(); 11 | int getFoliageOverlay(); 12 | float getFoliageSaturationMultiplier(); 13 | int getBirchColor(); 14 | } 15 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/season/ISeasonState.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api.season; 6 | 7 | public interface ISeasonState 8 | { 9 | /** 10 | * Get the duration of a single day. Normally this is 11 | * 24000 ticks. 12 | * 13 | * @return The duration in ticks 14 | */ 15 | int getDayDuration(); 16 | 17 | /** 18 | * Get the duration of a single sub season. 19 | * 20 | * @return The duration in ticks 21 | */ 22 | int getSubSeasonDuration(); 23 | 24 | /** 25 | * Get the duration of a single season. 26 | * 27 | * @return The duration in ticks 28 | */ 29 | int getSeasonDuration(); 30 | 31 | /** 32 | * Get the duration of an entire cycle (a 'year') 33 | * 34 | * @return The duration in ticks 35 | */ 36 | int getCycleDuration(); 37 | 38 | /** 39 | * The time elapsed in ticks for the current overall cycle. 40 | * A cycle can be considered equivalent to a year, and is comprised 41 | * of Summer, Autumn, Winter and Spring. 42 | * 43 | * @return The time in ticks 44 | */ 45 | int getSeasonCycleTicks(); 46 | 47 | /** 48 | * Get the number of days elapsed. 49 | * 50 | * @return The current day 51 | */ 52 | int getDay(); 53 | 54 | /** 55 | * Get the current sub season. 56 | * 57 | * @return The current sub season 58 | */ 59 | Season.SubSeason getSubSeason(); 60 | 61 | /** 62 | * Get the current season. This method is 63 | * mainly for convenience. 64 | * 65 | * @return The current season 66 | */ 67 | Season getSeason(); 68 | 69 | /** 70 | * Get the current tropical season. This method is 71 | * mainly for convenience. 72 | * 73 | * @return The current tropical season 74 | */ 75 | Season.TropicalSeason getTropicalSeason(); 76 | } 77 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/season/Season.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api.season; 6 | 7 | import com.mojang.serialization.Codec; 8 | import net.minecraft.util.StringRepresentable; 9 | 10 | import java.util.Locale; 11 | 12 | public enum Season 13 | { 14 | SPRING, SUMMER, AUTUMN, WINTER; 15 | 16 | public enum SubSeason implements ISeasonColorProvider, StringRepresentable 17 | { 18 | EARLY_SPRING(SPRING, 0x778087, 0.85F, 0x6F818F, 0.85F, 0x869A68), 19 | MID_SPRING(SPRING, 0x678297, 0x4F86AF, 0x6EB283), 20 | LATE_SPRING(SPRING, 0x6F818F, 0x5F849F, 0x74AE73), 21 | EARLY_SUMMER(SUMMER, 0x778087, 0x6F818F, 0x7AAA64), 22 | MID_SUMMER(SUMMER, 0xFFFFFF, 0xFFFFFF, 0x80A755), 23 | LATE_SUMMER(SUMMER, 0x877777, 0x9F5F5F, 0x98A54B), 24 | EARLY_AUTUMN(AUTUMN, 0x8F6F6F, 0xC44040, 0xB1A442), 25 | MID_AUTUMN(AUTUMN, 0x9F5F5F, 0xEF2121, 0xE2A231), 26 | LATE_AUTUMN(AUTUMN, 0xAF4F4F, 0.85F, 0xDB3030, 0.85F, 0xC98A35), 27 | EARLY_WINTER(WINTER, 0xAF4F4F, 0.60F, 0xDB3030, 0.60F, 0xB1723B), 28 | MID_WINTER(WINTER, 0xAF4F4F, 0.45F, 0xDB3030, 0.45F, 0xA0824D), 29 | LATE_WINTER(WINTER, 0x8E8181, 0.60F, 0xA57070, 0.60F, 0x8F925F); 30 | 31 | public static final Codec CODEC = StringRepresentable.fromEnum(SubSeason::values); 32 | public static final SubSeason[] VALUES = SubSeason.values(); 33 | 34 | private Season season; 35 | private int grassOverlay; 36 | private float grassSaturationMultiplier; 37 | private int foliageOverlay; 38 | private float foliageSaturationMultiplier; 39 | private int birchColor; 40 | 41 | SubSeason(Season season, int grassColour, float grassSaturation, int foliageColour, float foliageSaturation, int birchColor) 42 | { 43 | this.season = season; 44 | this.grassOverlay = grassColour; 45 | this.grassSaturationMultiplier = grassSaturation; 46 | this.foliageOverlay = foliageColour; 47 | this.foliageSaturationMultiplier = foliageSaturation; 48 | this.birchColor = birchColor; 49 | } 50 | 51 | SubSeason(Season season, int grassColour, int foliageColour, int birchColor) 52 | { 53 | this(season, grassColour, -1, foliageColour, -1, birchColor); 54 | } 55 | 56 | public Season getSeason() 57 | { 58 | return this.season; 59 | } 60 | 61 | public int getGrassOverlay() 62 | { 63 | return this.grassOverlay; 64 | } 65 | 66 | public float getGrassSaturationMultiplier() 67 | { 68 | return this.grassSaturationMultiplier; 69 | } 70 | 71 | public int getFoliageOverlay() 72 | { 73 | return this.foliageOverlay; 74 | } 75 | 76 | public float getFoliageSaturationMultiplier() 77 | { 78 | return this.foliageSaturationMultiplier; 79 | } 80 | 81 | public int getBirchColor() 82 | { 83 | return this.birchColor; 84 | } 85 | 86 | @Override 87 | public String getSerializedName() 88 | { 89 | return this.name().toLowerCase(Locale.ROOT); 90 | } 91 | } 92 | 93 | public enum TropicalSeason implements ISeasonColorProvider 94 | { 95 | EARLY_DRY(0xFFFFFF, 0xFFFFFF, 0x80A755), 96 | MID_DRY(0xA58668, 0.8F, 0xB7867C, 0.95F, 0x98A54B), 97 | LATE_DRY(0x8E7B6D, 0.9F, 0xA08B86, 0.975F, 0x80A755), 98 | EARLY_WET(0x758C8A, 0x728C91, 0x80A755), 99 | MID_WET(0x548384, 0x2498AE, 0x76AC6C), 100 | LATE_WET(0x658989, 0x4E8893, 0x80A755); 101 | 102 | public static final TropicalSeason[] VALUES = TropicalSeason.values(); 103 | 104 | private int grassOverlay; 105 | private float grassSaturationMultiplier; 106 | private int foliageOverlay; 107 | private float foliageSaturationMultiplier; 108 | private int birchColor; 109 | 110 | TropicalSeason(int grassColour, float grassSaturation, int foliageColour, float foliageSaturation, int birchColor) 111 | { 112 | this.grassOverlay = grassColour; 113 | this.grassSaturationMultiplier = grassSaturation; 114 | this.foliageOverlay = foliageColour; 115 | this.foliageSaturationMultiplier = foliageSaturation; 116 | this.birchColor = birchColor; 117 | } 118 | 119 | TropicalSeason(int grassColour, int foliageColour, int birchColor) 120 | { 121 | this(grassColour, -1, foliageColour, -1, birchColor); 122 | } 123 | 124 | public int getGrassOverlay() 125 | { 126 | return this.grassOverlay; 127 | } 128 | 129 | public float getGrassSaturationMultiplier() 130 | { 131 | return this.grassSaturationMultiplier; 132 | } 133 | 134 | public int getFoliageOverlay() 135 | { 136 | return this.foliageOverlay; 137 | } 138 | 139 | public float getFoliageSaturationMultiplier() 140 | { 141 | return this.foliageSaturationMultiplier; 142 | } 143 | 144 | public int getBirchColor() 145 | { 146 | return this.birchColor; 147 | } 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/season/SeasonChangedEvent.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api.season; 6 | 7 | import glitchcore.event.Event; 8 | import net.minecraft.world.level.Level; 9 | 10 | public class SeasonChangedEvent extends Event 11 | { 12 | private final Level level; 13 | private final T prevSeason; 14 | private final T newSeason; 15 | 16 | private SeasonChangedEvent(Level level, T prevSeason, T newSeason) 17 | { 18 | this.level = level; 19 | this.prevSeason = prevSeason; 20 | this.newSeason = newSeason; 21 | } 22 | 23 | public Level getLevel() 24 | { 25 | return this.level; 26 | } 27 | 28 | public T getPrevSeason() 29 | { 30 | return this.prevSeason; 31 | } 32 | 33 | public T getNewSeason() 34 | { 35 | return this.newSeason; 36 | } 37 | 38 | /** 39 | * Fired when the current sub season changes. 40 | */ 41 | public static class Standard extends SeasonChangedEvent 42 | { 43 | public Standard(Level level, Season.SubSeason prevSeason, Season.SubSeason newSeason) 44 | { 45 | super(level, prevSeason, newSeason); 46 | } 47 | } 48 | 49 | /** 50 | * Fired when the current tropical season changes. 51 | */ 52 | public static class Tropical extends SeasonChangedEvent 53 | { 54 | public Tropical(Level level, Season.TropicalSeason prevSeason, Season.TropicalSeason newSeason) 55 | { 56 | super(level, prevSeason, newSeason); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/api/season/SeasonHelper.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.api.season; 6 | 7 | import net.minecraft.core.Holder; 8 | import net.minecraft.world.level.Level; 9 | import net.minecraft.world.level.biome.Biome; 10 | 11 | public class SeasonHelper 12 | { 13 | public static ISeasonDataProvider dataProvider; 14 | 15 | /** 16 | * Obtains data about the state of the season cycle in the world. This works both on 17 | * the client and the server. 18 | */ 19 | public static ISeasonState getSeasonState(Level level) 20 | { 21 | ISeasonState data; 22 | 23 | if (!level.isClientSide()) 24 | { 25 | data = dataProvider.getServerSeasonState(level); 26 | } 27 | else 28 | { 29 | data = dataProvider.getClientSeasonState(level); 30 | } 31 | 32 | return data; 33 | } 34 | 35 | /** 36 | * Check whether a biome uses tropical seasons. 37 | * @param biome the biome to check. 38 | * @return whether the biome uses tropical seasons. 39 | */ 40 | public static boolean usesTropicalSeasons(Holder biome) 41 | { 42 | return dataProvider.usesTropicalSeasons(biome); 43 | } 44 | 45 | public interface ISeasonDataProvider 46 | { 47 | ISeasonState getServerSeasonState(Level level); 48 | ISeasonState getClientSeasonState(Level level); 49 | boolean usesTropicalSeasons(Holder key); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/block/entity/SeasonSensorBlockEntity.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.block.entity; 6 | 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.world.level.block.state.BlockState; 9 | import net.minecraft.world.level.block.entity.BlockEntity; 10 | import sereneseasons.api.SSBlockEntities; 11 | 12 | public class SeasonSensorBlockEntity extends BlockEntity 13 | { 14 | public SeasonSensorBlockEntity(BlockPos pos, BlockState state) 15 | { 16 | super(SSBlockEntities.SEASON_SENSOR, pos, state); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/client/item/ContextCalendarType.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.client.item; 6 | 7 | import com.mojang.serialization.Codec; 8 | import com.mojang.serialization.MapCodec; 9 | import net.minecraft.client.multiplayer.ClientLevel; 10 | import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperty; 11 | import net.minecraft.core.Holder; 12 | import net.minecraft.world.entity.Entity; 13 | import net.minecraft.world.entity.LivingEntity; 14 | import net.minecraft.world.item.ItemDisplayContext; 15 | import net.minecraft.world.item.ItemStack; 16 | import net.minecraft.world.level.Level; 17 | import net.minecraft.world.level.biome.Biome; 18 | import org.jetbrains.annotations.Nullable; 19 | import sereneseasons.init.ModConfig; 20 | import sereneseasons.init.ModTags; 21 | import sereneseasons.item.CalendarType; 22 | 23 | public class ContextCalendarType implements SelectItemModelProperty 24 | { 25 | public static final SelectItemModelProperty.Type TYPE = SelectItemModelProperty.Type.create( 26 | MapCodec.unit(new ContextCalendarType()), CalendarType.CODEC 27 | ); 28 | 29 | @Nullable 30 | @Override 31 | public CalendarType get(ItemStack stack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) 32 | { 33 | Level level = clientLevel; 34 | Entity holder = (Entity)(livingEntity != null ? livingEntity : stack.getFrame()); 35 | 36 | if (level == null && holder != null) 37 | { 38 | level = holder.level(); 39 | } 40 | 41 | if (level == null || !ModConfig.seasons.isDimensionWhitelisted(level.dimension())) return CalendarType.NONE; 42 | 43 | if (holder != null) 44 | { 45 | Holder biome = level.getBiome(holder.blockPosition()); 46 | if (biome.is(ModTags.Biomes.TROPICAL_BIOMES)) return CalendarType.TROPICAL; 47 | } 48 | 49 | return CalendarType.STANDARD; 50 | } 51 | 52 | @Override 53 | public Codec valueCodec() 54 | { 55 | return CalendarType.CODEC; 56 | } 57 | 58 | 59 | @Override 60 | public Type, CalendarType> type() 61 | { 62 | return TYPE; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/client/item/SeasonTimeProperty.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.client.item; 6 | 7 | import com.mojang.serialization.MapCodec; 8 | import net.minecraft.client.multiplayer.ClientLevel; 9 | import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperty; 10 | import net.minecraft.util.Mth; 11 | import net.minecraft.world.entity.Entity; 12 | import net.minecraft.world.entity.LivingEntity; 13 | import net.minecraft.world.item.ItemStack; 14 | import org.jetbrains.annotations.Nullable; 15 | import sereneseasons.api.season.SeasonHelper; 16 | import sereneseasons.season.SeasonTime; 17 | 18 | public class SeasonTimeProperty implements RangeSelectItemModelProperty 19 | { 20 | public static final MapCodec TYPE = MapCodec.unit(new SeasonTimeProperty()); 21 | 22 | @Override 23 | public float get(ItemStack itemStack, @Nullable ClientLevel level, @Nullable LivingEntity livingEntity, int i) 24 | { 25 | Entity holder = (Entity)(livingEntity != null ? livingEntity : itemStack.getFrame()); 26 | 27 | if (level == null && holder != null) level = (ClientLevel)holder.level(); 28 | if (level == null) return 0.0F; 29 | 30 | double d0; 31 | 32 | int seasonCycleTicks = SeasonHelper.getSeasonState(level).getSeasonCycleTicks(); 33 | d0 = (float)seasonCycleTicks / (float) SeasonTime.ZERO.getCycleDuration(); 34 | return Mth.positiveModulo((float)d0, 1.0F); 35 | } 36 | 37 | @Override 38 | public MapCodec type() 39 | { 40 | return TYPE; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/command/CommandGetSeason.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.command; 6 | 7 | import com.mojang.brigadier.builder.ArgumentBuilder; 8 | import net.minecraft.commands.CommandSourceStack; 9 | import net.minecraft.commands.Commands; 10 | import net.minecraft.network.chat.Component; 11 | import net.minecraft.world.level.Level; 12 | import sereneseasons.init.ModConfig; 13 | import sereneseasons.season.SeasonHandler; 14 | import sereneseasons.season.SeasonSavedData; 15 | import sereneseasons.season.SeasonTime; 16 | 17 | import java.util.Locale; 18 | 19 | public class CommandGetSeason 20 | { 21 | static ArgumentBuilder register() 22 | { 23 | return Commands.literal("get") 24 | .executes(ctx -> { 25 | Level world = ctx.getSource().getLevel(); 26 | return getSeason(ctx.getSource(), world); 27 | }); 28 | } 29 | 30 | private static int getSeason(CommandSourceStack cs, Level world) 31 | { 32 | SeasonSavedData seasonData = SeasonHandler.getSeasonSavedData(world); 33 | SeasonTime time = new SeasonTime(seasonData.seasonCycleTicks); 34 | int subSeasonDuration = ModConfig.seasons.subSeasonDuration; 35 | cs.sendSuccess(() -> Component.translatable("commands.sereneseasons.getseason.success", Component.translatable("desc.sereneseasons."+ time.getSubSeason().toString().toLowerCase(Locale.ROOT)), (time.getDay() % subSeasonDuration) + 1, subSeasonDuration, time.getSeasonCycleTicks() % time.getDayDuration(), time.getDayDuration()), true); 36 | 37 | return 1; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/command/CommandSetSeason.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.command; 6 | 7 | import com.mojang.brigadier.builder.ArgumentBuilder; 8 | import net.minecraft.commands.CommandSourceStack; 9 | import net.minecraft.commands.Commands; 10 | import net.minecraft.network.chat.Component; 11 | import net.minecraft.world.level.Level; 12 | import sereneseasons.api.season.Season; 13 | import sereneseasons.season.SeasonHandler; 14 | import sereneseasons.season.SeasonSavedData; 15 | import sereneseasons.season.SeasonTime; 16 | 17 | import java.util.Locale; 18 | 19 | public class CommandSetSeason 20 | { 21 | static ArgumentBuilder register() 22 | { 23 | return Commands.literal("set") 24 | .then(Commands.argument("season", SeasonArgument.season()) 25 | .executes(ctx -> { 26 | Level world = ctx.getSource().getLevel(); 27 | return setSeason(ctx.getSource(), world, SeasonArgument.getSeason(ctx, "season")); 28 | })); 29 | } 30 | 31 | private static int setSeason(CommandSourceStack cs, Level world, Season.SubSeason season) 32 | { 33 | if (season != null) 34 | { 35 | SeasonSavedData seasonData = SeasonHandler.getSeasonSavedData(world); 36 | seasonData.seasonCycleTicks = SeasonTime.ZERO.getSubSeasonDuration() * season.ordinal(); 37 | seasonData.setDirty(); 38 | SeasonHandler.sendSeasonUpdate(world); 39 | cs.sendSuccess(() -> Component.translatable("commands.sereneseasons.setseason.success", Component.translatable("desc.sereneseasons."+ season.toString().toLowerCase(Locale.ROOT))), true); 40 | } 41 | else 42 | { 43 | cs.sendFailure(Component.translatable("commands.sereneseasons.setseason.fail", Component.translatable("desc.sereneseasons."+ season.toString().toLowerCase(Locale.ROOT)))); 44 | } 45 | 46 | return 1; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/command/SeasonArgument.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.command; 6 | 7 | import com.mojang.brigadier.context.CommandContext; 8 | import net.minecraft.commands.CommandSourceStack; 9 | import net.minecraft.commands.arguments.StringRepresentableArgument; 10 | import sereneseasons.api.season.Season; 11 | 12 | public class SeasonArgument extends StringRepresentableArgument 13 | { 14 | private SeasonArgument() { 15 | super(Season.SubSeason.CODEC, Season.SubSeason::values); 16 | } 17 | 18 | public static StringRepresentableArgument season() 19 | { 20 | return new SeasonArgument(); 21 | } 22 | 23 | public static Season.SubSeason getSeason(CommandContext context, String s) { 24 | return context.getArgument(s, Season.SubSeason.class); 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/command/SeasonCommands.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.command; 2 | 3 | import com.mojang.brigadier.builder.LiteralArgumentBuilder; 4 | import glitchcore.event.server.RegisterCommandsEvent; 5 | import net.minecraft.commands.CommandSourceStack; 6 | import net.minecraft.commands.synchronization.ArgumentTypeInfo; 7 | import net.minecraft.commands.synchronization.ArgumentTypeInfos; 8 | import net.minecraft.commands.synchronization.SingletonArgumentInfo; 9 | import net.minecraft.resources.ResourceLocation; 10 | import sereneseasons.core.SereneSeasons; 11 | 12 | import java.util.function.BiConsumer; 13 | 14 | public class SeasonCommands 15 | { 16 | public static void onRegisterCommands(RegisterCommandsEvent event) 17 | { 18 | event.getDispatcher().register( 19 | LiteralArgumentBuilder.literal("season") 20 | .requires(cs -> cs.hasPermission(2)) 21 | .then(CommandSetSeason.register()) 22 | .then(CommandGetSeason.register()) 23 | ); 24 | } 25 | 26 | public static void registerArguments(BiConsumer> func) 27 | { 28 | register(func, "season", SeasonArgument.class, SingletonArgumentInfo.contextFree(SeasonArgument::season)); 29 | } 30 | 31 | private static ArgumentTypeInfo register(BiConsumer> func, String name, Class clazz, ArgumentTypeInfo typeInfo) 32 | { 33 | func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), typeInfo); 34 | ArgumentTypeInfos.BY_CLASS.put(clazz, typeInfo); 35 | return typeInfo; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/config/FertilityConfig.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.config; 2 | 3 | import glitchcore.config.Config; 4 | import glitchcore.util.Environment; 5 | import net.minecraft.world.level.dimension.DimensionType; 6 | import sereneseasons.core.SereneSeasons; 7 | 8 | public class FertilityConfig extends Config 9 | { 10 | // General config options 11 | public boolean seasonalCrops; 12 | public boolean cropTooltips; 13 | public int outOfSeasonCropBehavior; 14 | public int undergroundFertilityLevel; 15 | 16 | public FertilityConfig() 17 | { 18 | super(Environment.getConfigPath().resolve(SereneSeasons.MOD_ID + "/fertility.toml")); 19 | } 20 | 21 | @Override 22 | public void load() 23 | { 24 | seasonalCrops = add("general.seasonal_crops", true, "Whether crops are affected by seasons."); 25 | cropTooltips = add("general.crop_tooltips", true, "Whether to include tooltips on crops listing which seasons they're fertile in. Note: This only applies to listed crops."); 26 | outOfSeasonCropBehavior = addNumber("general.out_of_season_crop_behavior", 0, 0, 2, "How crops behave when out of season.\n0 = Grow slowly\n1 = Can't grow\n2 = Break when trying to grow"); 27 | undergroundFertilityLevel = addNumber("general.underground_fertility_level", 48, DimensionType.MIN_Y, Integer.MAX_VALUE, "Maximum height level for out of season crops to have fertility underground."); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/core/SereneSeasons.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.core; 6 | 7 | import glitchcore.event.EventManager; 8 | import glitchcore.util.Environment; 9 | import glitchcore.util.RegistryHelper; 10 | import net.minecraft.core.registries.Registries; 11 | import org.apache.logging.log4j.LogManager; 12 | import org.apache.logging.log4j.Logger; 13 | import sereneseasons.command.SeasonCommands; 14 | import sereneseasons.init.*; 15 | import sereneseasons.season.RandomUpdateHandler; 16 | import sereneseasons.season.SeasonHandler; 17 | import sereneseasons.season.SeasonalCropGrowthHandler; 18 | 19 | public class SereneSeasons 20 | { 21 | public static final String MOD_ID = "sereneseasons"; 22 | public static final Logger LOGGER = LogManager.getLogger(MOD_ID); 23 | 24 | public static void init() 25 | { 26 | ModConfig.init(); 27 | ModTags.setup(); 28 | addRegistrars(); 29 | addHandlers(); 30 | ModGameRules.init(); 31 | ModPackets.init(); 32 | ModAPI.init(); 33 | } 34 | 35 | private static void addRegistrars() 36 | { 37 | var regHelper = RegistryHelper.create(); 38 | regHelper.addRegistrar(Registries.BLOCK, ModBlocks::registerBlocks); 39 | regHelper.addRegistrar(Registries.BLOCK_ENTITY_TYPE, ModBlockEntities::registerBlockEntities); 40 | regHelper.addRegistrar(Registries.ITEM, ModItems::setup); 41 | regHelper.addRegistrar(Registries.CREATIVE_MODE_TAB, ModCreativeTab::registerCreativeTabs); 42 | regHelper.addRegistrar(Registries.COMMAND_ARGUMENT_TYPE, SeasonCommands::registerArguments); 43 | } 44 | 45 | private static void addHandlers() 46 | { 47 | // Season updates 48 | EventManager.addListener(SeasonHandler::onLevelTick); 49 | EventManager.addListener(SeasonHandler::onJoinLevel); 50 | 51 | // Melting 52 | EventManager.addListener(RandomUpdateHandler::onWorldTick); 53 | 54 | // Commands 55 | EventManager.addListener(SeasonCommands::onRegisterCommands); 56 | 57 | // Crop fertility 58 | EventManager.addListener(SeasonalCropGrowthHandler::onTagsUpdated); 59 | EventManager.addListener(SeasonalCropGrowthHandler::applyBonemeal); 60 | 61 | if (Environment.isClient()) 62 | { 63 | ModClient.addClientHandlers(); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModAPI.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.init; 6 | 7 | import sereneseasons.api.season.SeasonHelper; 8 | import sereneseasons.season.SeasonHandler; 9 | 10 | public class ModAPI 11 | { 12 | private static final SeasonHandler SEASON_HANDLER = new SeasonHandler(); 13 | 14 | public static void init() 15 | { 16 | SeasonHelper.dataProvider = SEASON_HANDLER; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModBlockEntities.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.init; 6 | 7 | import net.minecraft.Util; 8 | import net.minecraft.resources.ResourceLocation; 9 | import net.minecraft.util.datafix.fixes.References; 10 | import net.minecraft.world.level.block.Block; 11 | import net.minecraft.world.level.block.entity.BlockEntity; 12 | import net.minecraft.world.level.block.entity.BlockEntityType; 13 | import sereneseasons.api.SSBlockEntities; 14 | import sereneseasons.api.SSBlocks; 15 | import sereneseasons.block.entity.SeasonSensorBlockEntity; 16 | import sereneseasons.core.SereneSeasons; 17 | 18 | import java.util.List; 19 | import java.util.Set; 20 | import java.util.function.BiConsumer; 21 | 22 | public class ModBlockEntities 23 | { 24 | public static void registerBlockEntities(BiConsumer> func) 25 | { 26 | SSBlockEntities.SEASON_SENSOR = register(func, "season_sensor", SeasonSensorBlockEntity::new, Set.of(SSBlocks.SEASON_SENSOR)); 27 | } 28 | 29 | private static BlockEntityType register(BiConsumer> func, String name, BlockEntityType.BlockEntitySupplier supplier, Set blocks) 30 | { 31 | var type = new BlockEntityType(supplier, blocks); 32 | func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), type); 33 | return type; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModBlocks.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.init; 2 | 3 | import net.minecraft.core.registries.Registries; 4 | import net.minecraft.resources.ResourceKey; 5 | import net.minecraft.resources.ResourceLocation; 6 | import net.minecraft.world.level.block.Block; 7 | import net.minecraft.world.level.block.SoundType; 8 | import net.minecraft.world.level.block.state.BlockBehaviour; 9 | import sereneseasons.api.SSBlocks; 10 | import sereneseasons.block.SeasonSensorBlock; 11 | import sereneseasons.core.SereneSeasons; 12 | 13 | import java.util.function.BiConsumer; 14 | import java.util.function.Function; 15 | 16 | public class ModBlocks 17 | { 18 | public static void registerBlocks(BiConsumer func) 19 | { 20 | SSBlocks.SEASON_SENSOR = register(func, "season_sensor", SeasonSensorBlock::new, Block.Properties.of().strength(0.2F).sound(SoundType.STONE)); 21 | } 22 | 23 | private static Block register(BiConsumer func, ResourceKey key, Function factory, BlockBehaviour.Properties properties) 24 | { 25 | Block block = factory.apply(properties.setId(key)); 26 | func.accept(key.location(), block); 27 | return block; 28 | } 29 | 30 | private static Block register(BiConsumer func, String name, Function factory, BlockBehaviour.Properties properties) 31 | { 32 | return register(func, blockId(name), factory, properties); 33 | } 34 | 35 | private static ResourceKey blockId(String name) 36 | { 37 | return ResourceKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModConfig.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.init; 6 | 7 | import glitchcore.config.ConfigSync; 8 | import sereneseasons.config.FertilityConfig; 9 | import sereneseasons.config.SeasonsConfig; 10 | 11 | public class ModConfig 12 | { 13 | public static FertilityConfig fertility; 14 | public static SeasonsConfig seasons; 15 | 16 | public static void init() 17 | { 18 | fertility = new FertilityConfig(); 19 | seasons = new SeasonsConfig(); 20 | 21 | ConfigSync.register(fertility); 22 | ConfigSync.register(seasons); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModCreativeTab.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.init; 6 | 7 | import com.google.common.collect.ImmutableList; 8 | import net.minecraft.network.chat.Component; 9 | import net.minecraft.resources.ResourceLocation; 10 | import net.minecraft.world.item.CreativeModeTab; 11 | import net.minecraft.world.item.Item; 12 | import net.minecraft.world.item.ItemStack; 13 | import sereneseasons.api.SSItems; 14 | import sereneseasons.core.SereneSeasons; 15 | 16 | import java.lang.reflect.Field; 17 | import java.util.function.BiConsumer; 18 | 19 | public class ModCreativeTab 20 | { 21 | public static void registerCreativeTabs(BiConsumer func) 22 | { 23 | var ITEM_BLACKLIST = ImmutableList.of(SSItems.SS_ICON); 24 | var tab = CreativeModeTab.builder(CreativeModeTab.Row.TOP, 0) 25 | .icon(() -> new ItemStack(SSItems.SS_ICON)) 26 | .title(Component.translatable("itemGroup.tabSereneSeasons")) 27 | .displayItems((displayParameters, output) -> 28 | { 29 | for (Field field : SSItems.class.getFields()) 30 | { 31 | if (field.getType() != Item.class) continue; 32 | 33 | try 34 | { 35 | Item item = (Item) field.get(null); 36 | if (!ITEM_BLACKLIST.contains(item)) 37 | output.accept(new ItemStack(item)); 38 | } 39 | catch (IllegalAccessException e) 40 | { 41 | } 42 | } 43 | }).build(); 44 | 45 | register(func, "main", tab); 46 | } 47 | 48 | private static CreativeModeTab register(BiConsumer func, String name, CreativeModeTab tab) 49 | { 50 | func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), tab); 51 | return tab; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModGameRules.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.init; 6 | 7 | import net.minecraft.world.level.GameRules; 8 | import sereneseasons.api.SSGameRules; 9 | 10 | import static net.minecraft.world.level.GameRules.register; 11 | 12 | public class ModGameRules 13 | { 14 | public static void init() 15 | { 16 | SSGameRules.RULE_DOSEASONCYCLE = register("doSeasonCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModItems.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.init; 2 | 3 | import glitchcore.util.Environment; 4 | import net.minecraft.core.registries.Registries; 5 | import net.minecraft.resources.ResourceKey; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.world.item.BlockItem; 8 | import net.minecraft.world.item.Item; 9 | import net.minecraft.world.level.block.Block; 10 | import sereneseasons.api.SSBlocks; 11 | import sereneseasons.api.SSItems; 12 | import sereneseasons.core.SereneSeasons; 13 | import sereneseasons.item.CalendarItem; 14 | 15 | import java.util.function.BiConsumer; 16 | import java.util.function.BiFunction; 17 | import java.util.function.Function; 18 | 19 | import static sereneseasons.api.SSItems.*; 20 | 21 | public class ModItems 22 | { 23 | public static void setup(BiConsumer func) 24 | { 25 | registerItems(func); 26 | registerBlockItems(func); 27 | 28 | if (Environment.isClient()) 29 | { 30 | ModClient.registerItemProperties(); 31 | } 32 | } 33 | 34 | public static void registerItems(BiConsumer func) 35 | { 36 | // SS Creative Tab Icon 37 | SSItems.SS_ICON = registerItem(func, "ss_icon", new Item.Properties()); 38 | 39 | // Main Items 40 | SSItems.CALENDAR = registerItem(func, "calendar", CalendarItem::new, new Item.Properties().stacksTo(1)); 41 | } 42 | 43 | public static void registerBlockItems(BiConsumer func) 44 | { 45 | SEASON_SENSOR = registerBlock(func, SSBlocks.SEASON_SENSOR); 46 | } 47 | 48 | public static Item registerBlock(BiConsumer func, Block block) 49 | { 50 | return registerBlock(func, block, BlockItem::new); 51 | } 52 | 53 | public static Item registerBlock(BiConsumer func, Block block, BiFunction factory) 54 | { 55 | return registerBlock(func, block, factory, new Item.Properties()); 56 | } 57 | 58 | public static Item registerBlock(BiConsumer func, Block block, BiFunction factory, Item.Properties properties) 59 | { 60 | return registerItem(func, blockIdToItemId(block.builtInRegistryHolder().key()), p_370785_ -> factory.apply(block, p_370785_), properties.useBlockDescriptionPrefix() 61 | ); 62 | } 63 | 64 | private static Item registerItem(BiConsumer func, ResourceKey key, Function factory, Item.Properties properties) 65 | { 66 | Item item = factory.apply(properties.setId(key)); 67 | func.accept(key.location(), item); 68 | return item; 69 | } 70 | 71 | private static Item registerItem(BiConsumer func, String name, Function factory, Item.Properties properties) 72 | { 73 | return registerItem(func, itemId(name), factory, properties); 74 | } 75 | 76 | private static Item registerItem(BiConsumer func, String name, Item.Properties properties) 77 | { 78 | return registerItem(func, itemId(name), Item::new, properties); 79 | } 80 | 81 | private static ResourceKey blockIdToItemId(ResourceKey key) 82 | { 83 | return ResourceKey.create(Registries.ITEM, key.location()); 84 | } 85 | 86 | private static ResourceKey itemId(String name) 87 | { 88 | return ResourceKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name)); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModPackets.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.init; 6 | 7 | import glitchcore.network.CustomPacket; 8 | import glitchcore.network.PacketHandler; 9 | import net.minecraft.resources.ResourceLocation; 10 | import sereneseasons.core.SereneSeasons; 11 | import sereneseasons.network.SyncSeasonCyclePacket; 12 | 13 | public class ModPackets 14 | { 15 | private static final ResourceLocation CHANNEL = ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, "main"); 16 | public static final PacketHandler HANDLER = new PacketHandler(CHANNEL); 17 | 18 | public static void init() 19 | { 20 | register("sync_season_cycle", new SyncSeasonCyclePacket()); 21 | } 22 | 23 | public static void register(String name, CustomPacket packet) 24 | { 25 | HANDLER.register(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), packet); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/init/ModTags.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.init; 2 | 3 | import net.minecraft.core.registries.Registries; 4 | import net.minecraft.resources.ResourceLocation; 5 | import net.minecraft.tags.BiomeTags; 6 | import net.minecraft.tags.BlockTags; 7 | import net.minecraft.tags.ItemTags; 8 | import net.minecraft.tags.TagKey; 9 | import net.minecraft.world.item.Item; 10 | import net.minecraft.world.level.biome.Biome; 11 | import net.minecraft.world.level.block.Block; 12 | 13 | public class ModTags 14 | { 15 | public static void setup() 16 | { 17 | Blocks.setup(); 18 | Items.setup(); 19 | Biomes.setup(); 20 | } 21 | 22 | public static class Blocks 23 | { 24 | private static void setup() {} 25 | 26 | public static final TagKey SPRING_CROPS = create(ResourceLocation.parse("sereneseasons:spring_crops")); 27 | public static final TagKey SUMMER_CROPS = create(ResourceLocation.parse("sereneseasons:summer_crops")); 28 | public static final TagKey AUTUMN_CROPS = create(ResourceLocation.parse("sereneseasons:autumn_crops")); 29 | public static final TagKey WINTER_CROPS = create(ResourceLocation.parse("sereneseasons:winter_crops")); 30 | public static final TagKey YEAR_ROUND_CROPS = create(ResourceLocation.parse("sereneseasons:year_round_crops")); 31 | 32 | public static final TagKey GREENHOUSE_GLASS = create(ResourceLocation.parse("sereneseasons:greenhouse_glass")); 33 | public static final TagKey UNBREAKABLE_INFERTILE_CROPS = create(ResourceLocation.parse("sereneseasons:unbreakable_infertile_crops")); 34 | 35 | public static TagKey create(ResourceLocation name) 36 | { 37 | return TagKey.create(Registries.BLOCK, name); 38 | } 39 | } 40 | 41 | public static class Items 42 | { 43 | private static void setup() {} 44 | 45 | public static final TagKey SPRING_CROPS = create(ResourceLocation.parse("sereneseasons:spring_crops")); 46 | public static final TagKey SUMMER_CROPS = create(ResourceLocation.parse("sereneseasons:summer_crops")); 47 | public static final TagKey AUTUMN_CROPS = create(ResourceLocation.parse("sereneseasons:autumn_crops")); 48 | public static final TagKey WINTER_CROPS = create(ResourceLocation.parse("sereneseasons:winter_crops")); 49 | public static final TagKey YEAR_ROUND_CROPS = create(ResourceLocation.parse("sereneseasons:year_round_crops")); 50 | 51 | public static TagKey create(ResourceLocation name) 52 | { 53 | return TagKey.create(Registries.ITEM, name); 54 | } 55 | } 56 | 57 | public static class Biomes 58 | { 59 | private static void setup() {} 60 | 61 | public static final TagKey BLACKLISTED_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:blacklisted_biomes")); 62 | public static final TagKey INFERTILE_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:infertile_biomes")); 63 | public static final TagKey LESSER_COLOR_CHANGE_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:lesser_color_change_biomes")); 64 | public static final TagKey TROPICAL_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:tropical_biomes")); 65 | } 66 | 67 | private static TagKey createBiomeTag(ResourceLocation name) { 68 | return TagKey.create(Registries.BIOME, name); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/item/CalendarItem.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.item; 2 | 3 | import net.minecraft.ChatFormatting; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.core.component.DataComponents; 6 | import net.minecraft.network.chat.Component; 7 | import net.minecraft.resources.ResourceKey; 8 | import net.minecraft.world.item.Item; 9 | import net.minecraft.world.item.ItemStack; 10 | import net.minecraft.world.item.TooltipFlag; 11 | import net.minecraft.world.level.Level; 12 | import net.minecraft.world.level.saveddata.maps.MapId; 13 | import net.minecraft.world.level.saveddata.maps.MapItemSavedData; 14 | import sereneseasons.api.season.SeasonHelper; 15 | import sereneseasons.core.SereneSeasons; 16 | import sereneseasons.init.ModConfig; 17 | import sereneseasons.season.SeasonTime; 18 | 19 | import javax.annotation.Nullable; 20 | import java.util.List; 21 | import java.util.Locale; 22 | 23 | public class CalendarItem extends Item 24 | { 25 | public CalendarItem(Properties p_41383_) 26 | { 27 | super(p_41383_); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/item/CalendarType.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.item; 6 | 7 | import com.mojang.serialization.Codec; 8 | import net.minecraft.util.StringRepresentable; 9 | import net.minecraft.world.item.CrossbowItem; 10 | 11 | public enum CalendarType implements StringRepresentable { 12 | STANDARD("standard"), 13 | TROPICAL("tropical"), 14 | NONE("none"); 15 | 16 | public static final Codec CODEC = StringRepresentable.fromEnum(CalendarType::values); 17 | private final String name; 18 | 19 | private CalendarType(String p_386626_) { 20 | this.name = p_386626_; 21 | } 22 | 23 | @Override 24 | public String getSerializedName() { 25 | return this.name; 26 | } 27 | } -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/MixinBiome.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin; 6 | 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.world.level.LevelReader; 9 | import net.minecraft.world.level.biome.Biome; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.Redirect; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 15 | import sereneseasons.season.SeasonHooks; 16 | 17 | @Mixin(Biome.class) 18 | public class MixinBiome 19 | { 20 | @Inject(method="shouldSnow", at=@At("HEAD"), cancellable = true) 21 | public void onShouldSnow(LevelReader level, BlockPos pos, CallbackInfoReturnable cir) 22 | { 23 | cir.setReturnValue(SeasonHooks.shouldSnowHook((Biome)(Object)this, level, pos, level.getSeaLevel())); 24 | } 25 | 26 | @Redirect(method = "shouldFreeze(Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;Z)Z", at=@At(value = "INVOKE", target = "net/minecraft/world/level/biome/Biome.warmEnoughToRain(Lnet/minecraft/core/BlockPos;I)Z")) 27 | public boolean onShouldFreeze_warmEnoughToRain(Biome biome, BlockPos pos, int seaLevel, LevelReader level) 28 | { 29 | return SeasonHooks.shouldFreezeWarmEnoughToRainHook(biome, pos, seaLevel, level); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/MixinBlockStateBase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin; 6 | 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.server.level.ServerLevel; 9 | import net.minecraft.util.RandomSource; 10 | import net.minecraft.world.level.block.state.BlockBehaviour; 11 | import net.minecraft.world.level.block.state.BlockState; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | import sereneseasons.season.SeasonalCropGrowthHandler; 17 | 18 | @Mixin(BlockBehaviour.BlockStateBase.class) 19 | public class MixinBlockStateBase 20 | { 21 | @Inject(method="randomTick", at=@At("HEAD"), cancellable = true) 22 | public void onRandomTick(ServerLevel level, BlockPos pos, RandomSource random, CallbackInfo ci) 23 | { 24 | if ((Object)this instanceof BlockState) 25 | { 26 | SeasonalCropGrowthHandler.onCropGrowth(level, pos, (BlockState)(Object)this, ci); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/MixinLevel.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin; 6 | 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.world.level.Level; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | import sereneseasons.season.SeasonHooks; 14 | 15 | @Mixin(Level.class) 16 | public class MixinLevel 17 | { 18 | @Inject(method="isRainingAt", at=@At(value="HEAD"), cancellable = true) 19 | public void onIsRainingAt(BlockPos pos, CallbackInfoReturnable cir) 20 | { 21 | cir.setReturnValue(SeasonHooks.isRainingAtHook((Level)(Object)this, pos)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/MixinServerLevel.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin; 6 | 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.server.level.ServerLevel; 9 | import net.minecraft.world.level.LevelReader; 10 | import net.minecraft.world.level.biome.Biome; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Redirect; 14 | import sereneseasons.season.SeasonHooks; 15 | 16 | @Mixin(ServerLevel.class) 17 | public class MixinServerLevel 18 | { 19 | @Redirect(method="tickPrecipitation", at=@At(value = "INVOKE", target = "Lnet/minecraft/world/level/biome/Biome;getPrecipitationAt(Lnet/minecraft/core/BlockPos;I)Lnet/minecraft/world/level/biome/Biome$Precipitation;")) 20 | public Biome.Precipitation tickIceAndSnow_getPrecipitationAt(Biome biome, BlockPos pos, int seaLevel) 21 | { 22 | return SeasonHooks.getPrecipitationAtTickIceAndSnowHook((LevelReader)this, biome, pos, seaLevel); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/client/MixinBiomeClient.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin.client; 6 | 7 | import net.minecraft.client.Minecraft; 8 | import net.minecraft.core.BlockPos; 9 | import net.minecraft.world.level.Level; 10 | import net.minecraft.world.level.biome.Biome; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 15 | import sereneseasons.season.SeasonHooks; 16 | 17 | @Mixin(Biome.class) 18 | public class MixinBiomeClient 19 | { 20 | @Inject(method="getPrecipitationAt", at=@At("HEAD"), cancellable = true) 21 | public void onGetPrecipitationAt(BlockPos pos, int seaLevel, CallbackInfoReturnable cir) 22 | { 23 | Minecraft minecraft = Minecraft.getInstance(); 24 | Level level = minecraft.level; 25 | 26 | if (level != null) 27 | { 28 | cir.setReturnValue(SeasonHooks.getPrecipitationAtSeasonal(level, level.getBiome(pos), pos, seaLevel)); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/client/MixinRangeSelectItemModelProperties.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin.client; 6 | 7 | import com.mojang.serialization.MapCodec; 8 | import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperties; 9 | import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperty; 10 | import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperties; 11 | import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperty; 12 | import net.minecraft.resources.ResourceLocation; 13 | import net.minecraft.util.ExtraCodecs; 14 | import org.spongepowered.asm.mixin.Final; 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.Shadow; 17 | import org.spongepowered.asm.mixin.injection.At; 18 | import org.spongepowered.asm.mixin.injection.Inject; 19 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 20 | import sereneseasons.client.item.ContextCalendarType; 21 | import sereneseasons.client.item.SeasonTimeProperty; 22 | 23 | @Mixin(RangeSelectItemModelProperties.class) 24 | public class MixinRangeSelectItemModelProperties 25 | { 26 | @Shadow 27 | @Final 28 | private static ExtraCodecs.LateBoundIdMapper> ID_MAPPER; 29 | 30 | @Inject(method = "bootstrap", at=@At("TAIL")) 31 | private static void onBootstrap(CallbackInfo ci) 32 | { 33 | ID_MAPPER.put(ResourceLocation.withDefaultNamespace("season_time"), SeasonTimeProperty.TYPE); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/client/MixinSelectItemModelProperties.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin.client; 6 | 7 | import net.minecraft.client.renderer.item.properties.select.ContextDimension; 8 | import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperties; 9 | import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperty; 10 | import net.minecraft.resources.ResourceLocation; 11 | import net.minecraft.util.ExtraCodecs; 12 | import org.spongepowered.asm.mixin.Final; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.Shadow; 15 | import org.spongepowered.asm.mixin.injection.At; 16 | import org.spongepowered.asm.mixin.injection.Inject; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 18 | import sereneseasons.client.item.ContextCalendarType; 19 | 20 | @Mixin(SelectItemModelProperties.class) 21 | public class MixinSelectItemModelProperties 22 | { 23 | @Shadow 24 | @Final 25 | private static ExtraCodecs.LateBoundIdMapper> ID_MAPPER; 26 | 27 | @Inject(method = "bootstrap", at=@At("TAIL")) 28 | private static void onBootstrap(CallbackInfo ci) 29 | { 30 | ID_MAPPER.put(ResourceLocation.withDefaultNamespace("context_calendar_type"), ContextCalendarType.TYPE); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/mixin/client/MixinWeatherEffectRenderer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.mixin.client; 6 | 7 | import net.minecraft.client.renderer.WeatherEffectRenderer; 8 | import net.minecraft.core.BlockPos; 9 | import net.minecraft.world.level.Level; 10 | import net.minecraft.world.level.biome.Biome; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 15 | import sereneseasons.core.SereneSeasons; 16 | import sereneseasons.season.SeasonHooks; 17 | 18 | @Mixin(WeatherEffectRenderer.class) 19 | public class MixinWeatherEffectRenderer 20 | { 21 | @Inject(method="getPrecipitationAt", at=@At(value = "HEAD"), cancellable = true) 22 | public void onGetPrecipitationAt(Level level, BlockPos pos, CallbackInfoReturnable cir) 23 | { 24 | cir.setReturnValue(SeasonHooks.getPrecipitationAtSeasonal(level, level.getBiome(pos), pos, level.getSeaLevel())); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/network/SyncSeasonCyclePacket.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.network; 6 | 7 | import glitchcore.network.CustomPacket; 8 | import net.minecraft.core.registries.Registries; 9 | import net.minecraft.network.FriendlyByteBuf; 10 | import net.minecraft.resources.ResourceKey; 11 | import net.minecraft.resources.ResourceLocation; 12 | import net.minecraft.world.level.Level; 13 | import sereneseasons.season.SeasonHandlerClient; 14 | 15 | public class SyncSeasonCyclePacket implements CustomPacket 16 | { 17 | public ResourceKey dimension; 18 | public int seasonCycleTicks; 19 | 20 | public SyncSeasonCyclePacket() {} 21 | 22 | public SyncSeasonCyclePacket(ResourceKey dimension, int seasonCycleTicks) 23 | { 24 | this.dimension = dimension; 25 | this.seasonCycleTicks = seasonCycleTicks; 26 | } 27 | 28 | @Override 29 | public void encode(FriendlyByteBuf buf) 30 | { 31 | buf.writeUtf(this.dimension.location().toString()); 32 | buf.writeInt(this.seasonCycleTicks); 33 | } 34 | 35 | @Override 36 | public SyncSeasonCyclePacket decode(FriendlyByteBuf buf) 37 | { 38 | return new SyncSeasonCyclePacket(ResourceKey.create(Registries.DIMENSION, ResourceLocation.parse(buf.readUtf())), buf.readInt()); 39 | } 40 | 41 | @Override 42 | public void handle(SyncSeasonCyclePacket packet, Context context) 43 | { 44 | context.getPlayer().ifPresent(player -> { 45 | ResourceKey playerDimension = player.level().dimension(); 46 | 47 | if (playerDimension.equals(packet.dimension)) 48 | { 49 | SeasonHandlerClient.clientSeasonCycleTicks.put(playerDimension, packet.seasonCycleTicks); 50 | } 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/season/RandomUpdateHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.season; 6 | 7 | import com.google.common.collect.Lists; 8 | import glitchcore.event.TickEvent; 9 | import net.minecraft.core.BlockPos; 10 | import net.minecraft.core.Holder; 11 | import net.minecraft.server.level.ChunkHolder; 12 | import net.minecraft.server.level.ChunkMap; 13 | import net.minecraft.server.level.DistanceManager; 14 | import net.minecraft.server.level.ServerLevel; 15 | import net.minecraft.world.level.ChunkPos; 16 | import net.minecraft.world.level.Level; 17 | import net.minecraft.world.level.biome.Biome; 18 | import net.minecraft.world.level.block.Blocks; 19 | import net.minecraft.world.level.block.IceBlock; 20 | import net.minecraft.world.level.block.state.BlockState; 21 | import net.minecraft.world.level.chunk.LevelChunk; 22 | import net.minecraft.world.level.levelgen.Heightmap; 23 | import net.minecraft.world.level.storage.ServerLevelData; 24 | import sereneseasons.api.season.Season; 25 | import sereneseasons.api.season.SeasonHelper; 26 | import sereneseasons.config.SeasonsConfig; 27 | import sereneseasons.init.ModConfig; 28 | import sereneseasons.init.ModTags; 29 | 30 | import java.util.Collections; 31 | import java.util.List; 32 | 33 | public class RandomUpdateHandler 34 | { 35 | private static void adjustWeatherFrequency(Level world, Season.SubSeason subSeason) 36 | { 37 | if (!ModConfig.seasons.changeWeatherFrequency) 38 | return; 39 | 40 | ServerLevelData serverLevelData = (ServerLevelData)world.getLevelData(); 41 | SeasonsConfig.SeasonProperties seasonProperties = ModConfig.seasons.getSeasonProperties(subSeason); 42 | 43 | if (seasonProperties.canRain()) 44 | { 45 | if (!world.getLevelData().isRaining() && serverLevelData.getRainTime() > seasonProperties.maxRainTime()) 46 | { 47 | serverLevelData.setRainTime(world.random.nextInt(seasonProperties.maxRainTime() - seasonProperties.minRainTime()) + seasonProperties.minRainTime()); 48 | } 49 | } 50 | else if (serverLevelData.isRaining()) serverLevelData.setRaining(false); 51 | 52 | if (seasonProperties.canThunder()) 53 | { 54 | if (!world.getLevelData().isThundering() && serverLevelData.getThunderTime() > seasonProperties.maxThunderTime()) 55 | { 56 | serverLevelData.setThunderTime(world.random.nextInt(seasonProperties.maxThunderTime() - seasonProperties.minThunderTime()) + seasonProperties.minThunderTime()); 57 | } 58 | } 59 | else if (serverLevelData.isThundering()) serverLevelData.setThundering(false); 60 | } 61 | 62 | private static void meltInChunk(ChunkMap chunkMap, LevelChunk chunkIn, float meltChance) 63 | { 64 | ServerLevel world = chunkMap.level; 65 | ChunkPos chunkpos = chunkIn.getPos(); 66 | int i = chunkpos.getMinBlockX(); 67 | int j = chunkpos.getMinBlockZ(); 68 | 69 | if (meltChance > 0 && world.random.nextFloat() < meltChance) 70 | { 71 | BlockPos topAirPos = world.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, world.getBlockRandomPos(i, 0, j, 15)); 72 | BlockPos topGroundPos = topAirPos.below(); 73 | BlockState aboveGroundState = world.getBlockState(topAirPos); 74 | BlockState groundState = world.getBlockState(topGroundPos); 75 | Holder biome = world.getBiome(topAirPos); 76 | Holder groundBiome = world.getBiome(topGroundPos); 77 | 78 | if (!biome.is(ModTags.Biomes.BLACKLISTED_BIOMES) && SeasonHooks.getBiomeTemperature(world, biome, topGroundPos, world.getSeaLevel()) >= 0.15F) 79 | { 80 | if (aboveGroundState.getBlock() == Blocks.SNOW) 81 | { 82 | world.setBlockAndUpdate(topAirPos, Blocks.AIR.defaultBlockState()); 83 | } 84 | } 85 | 86 | if (!groundBiome.is(ModTags.Biomes.BLACKLISTED_BIOMES) && SeasonHooks.getBiomeTemperature(world, groundBiome, topGroundPos, world.getSeaLevel()) >= 0.15F) 87 | { 88 | if (groundState.getBlock() == Blocks.ICE) 89 | { 90 | ((IceBlock) Blocks.ICE).melt(groundState, world, topGroundPos); 91 | } 92 | } 93 | } 94 | } 95 | 96 | 97 | //Randomly melt ice and snow when it isn't winter 98 | public static void onWorldTick(TickEvent.Level event) 99 | { 100 | if (event.getPhase() != TickEvent.Phase.END || event.getLevel().isClientSide()) 101 | return; 102 | 103 | ServerLevel level = (ServerLevel)event.getLevel(); 104 | Season.SubSeason subSeason = SeasonHelper.getSeasonState(level).getSubSeason(); 105 | Season season = subSeason.getSeason(); 106 | 107 | SeasonsConfig.SeasonProperties seasonProperties = ModConfig.seasons.getSeasonProperties(subSeason); 108 | float meltRand = seasonProperties.meltChance() / 100.0F; 109 | int rolls = seasonProperties.meltRolls(); 110 | 111 | adjustWeatherFrequency(level, subSeason); 112 | 113 | if(rolls > 0 && meltRand > 0.0F) 114 | { 115 | if (ModConfig.seasons.generateSnowAndIce && ModConfig.seasons.isDimensionWhitelisted(level.dimension())) 116 | { 117 | ChunkMap chunkMap = level.getChunkSource().chunkMap; 118 | DistanceManager distanceManager = chunkMap.getDistanceManager(); 119 | 120 | int l = distanceManager.getNaturalSpawnChunkCount(); 121 | List list = Lists.newArrayListWithCapacity(l); 122 | 123 | // Replicate the behaviour of ServerChunkCache 124 | for (ChunkHolder chunkholder : chunkMap.getChunks()) 125 | { 126 | LevelChunk levelchunk = chunkholder.getTickingChunk(); 127 | if (levelchunk != null) 128 | { 129 | list.add(new ChunkAndHolder(levelchunk, chunkholder)); 130 | } 131 | } 132 | 133 | Collections.shuffle(list); 134 | 135 | for (ChunkAndHolder serverchunkcache$chunkandholder : list) 136 | { 137 | LevelChunk levelChunk = serverchunkcache$chunkandholder.chunk; 138 | ChunkPos chunkpos = levelChunk.getPos(); 139 | if ((chunkMap.anyPlayerCloseEnoughForSpawning(chunkpos))) 140 | { 141 | if (level.shouldTickBlocksAt(chunkpos.toLong())) 142 | { 143 | for(int i = 0; i < rolls; i++) 144 | { 145 | meltInChunk(chunkMap, levelChunk, meltRand); 146 | } 147 | } 148 | } 149 | } 150 | } 151 | } 152 | } 153 | 154 | record ChunkAndHolder(LevelChunk chunk, ChunkHolder holder) { 155 | } 156 | } -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/season/SeasonColorHandlers.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.season; 2 | 3 | import com.google.common.collect.HashMultimap; 4 | import com.google.common.collect.Multimap; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.renderer.BiomeColors; 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.core.Holder; 9 | import net.minecraft.core.Registry; 10 | import net.minecraft.core.registries.Registries; 11 | import net.minecraft.resources.ResourceKey; 12 | import net.minecraft.world.level.BlockAndTintGetter; 13 | import net.minecraft.world.level.ColorResolver; 14 | import net.minecraft.world.level.FoliageColor; 15 | import net.minecraft.world.level.Level; 16 | import net.minecraft.world.level.biome.Biome; 17 | import net.minecraft.world.level.block.Blocks; 18 | import net.minecraft.world.level.block.state.BlockState; 19 | import sereneseasons.api.season.ISeasonColorProvider; 20 | import sereneseasons.api.season.ISeasonState; 21 | import sereneseasons.api.season.SeasonHelper; 22 | import sereneseasons.init.ModConfig; 23 | import sereneseasons.init.ModTags; 24 | import sereneseasons.util.SeasonColorUtil; 25 | 26 | import javax.annotation.Nullable; 27 | import java.util.List; 28 | import java.util.Optional; 29 | 30 | public class SeasonColorHandlers 31 | { 32 | private static final Multimap resolverOverrides = HashMultimap.create(); 33 | 34 | public static void setup() 35 | { 36 | registerGrassAndFoliageColorHandlers(); 37 | } 38 | 39 | public static void registerResolverOverride(ResolverType type, ColorOverride override) 40 | { 41 | resolverOverrides.put(type, override); 42 | } 43 | 44 | private static ColorResolver originalGrassColorResolver; 45 | private static ColorResolver originalFoliageColorResolver; 46 | 47 | private static void registerGrassAndFoliageColorHandlers() 48 | { 49 | originalGrassColorResolver = BiomeColors.GRASS_COLOR_RESOLVER; 50 | originalFoliageColorResolver = BiomeColors.FOLIAGE_COLOR_RESOLVER; 51 | 52 | BiomeColors.GRASS_COLOR_RESOLVER = (biome, x, z) -> resolveColors(ResolverType.GRASS, biome, x, z); 53 | BiomeColors.FOLIAGE_COLOR_RESOLVER = (biome, x, z) -> resolveColors(ResolverType.FOLIAGE, biome, x, z); 54 | } 55 | 56 | private static int resolveColors(ResolverType type, Biome biome, double x, double z) 57 | { 58 | int originalColor = switch (type) { 59 | case GRASS -> originalGrassColorResolver.getColor(biome, x, z); 60 | case FOLIAGE -> originalFoliageColorResolver.getColor(biome, x, z); 61 | }; 62 | 63 | Minecraft minecraft = Minecraft.getInstance(); 64 | Level level = minecraft.level; 65 | 66 | if (level == null) return originalColor; 67 | 68 | Registry biomeRegistry = level.registryAccess().lookupOrThrow(Registries.BIOME); 69 | Holder.Reference biomeHolder = biomeRegistry.getResourceKey(biome).flatMap(biomeRegistry::get).orElse(null); 70 | 71 | if (biomeHolder != null) 72 | { 73 | ISeasonState calendar = SeasonHelper.getSeasonState(level); 74 | ISeasonColorProvider colorProvider = biomeHolder.is(ModTags.Biomes.TROPICAL_BIOMES) ? calendar.getTropicalSeason() : calendar.getSubSeason(); 75 | 76 | int seasonalColor = switch (type) { 77 | case GRASS -> SeasonColorUtil.applySeasonalGrassColouring(colorProvider, biomeHolder, originalColor); 78 | case FOLIAGE -> SeasonColorUtil.applySeasonalFoliageColouring(colorProvider, biomeHolder, originalColor); 79 | }; 80 | 81 | int currentColor = seasonalColor; 82 | for (ColorOverride override : resolverOverrides.get(type)) 83 | { 84 | currentColor = override.apply(originalColor, seasonalColor, currentColor, biomeHolder, x, z); 85 | } 86 | 87 | return currentColor; 88 | } 89 | 90 | return originalColor; 91 | } 92 | 93 | public interface ColorOverride 94 | { 95 | int apply(int originalColor, int seasonalColor, int currentColor, Holder biome, double x, double z); 96 | } 97 | 98 | public enum ResolverType 99 | { 100 | GRASS, FOLIAGE 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/season/SeasonHandlerClient.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.season; 6 | 7 | import glitchcore.event.TickEvent; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.resources.ResourceKey; 10 | import net.minecraft.world.entity.player.Player; 11 | import net.minecraft.world.level.Level; 12 | import sereneseasons.api.season.Season; 13 | import sereneseasons.init.ModConfig; 14 | 15 | import java.util.HashMap; 16 | 17 | public class SeasonHandlerClient 18 | { 19 | static Season.SubSeason lastSeason = null; 20 | public static final HashMap, Integer> clientSeasonCycleTicks = new HashMap<>(); 21 | 22 | public static void onClientTick(TickEvent.Client event) 23 | { 24 | Player player = (Player) Minecraft.getInstance().player; 25 | 26 | //Only do this when in the world 27 | if (player == null) return; 28 | ResourceKey dimension = player.level().dimension(); 29 | 30 | if (event.getPhase() == TickEvent.Phase.END && ModConfig.seasons.isDimensionWhitelisted(dimension)) 31 | { 32 | //Keep ticking as we're synchronized with the server only every second 33 | clientSeasonCycleTicks.compute(dimension, (k, v) -> v == null ? 0 : (v + 1) % SeasonTime.ZERO.getCycleDuration()); 34 | 35 | SeasonTime calendar = new SeasonTime(clientSeasonCycleTicks.get(dimension)); 36 | if (calendar.getSubSeason() != lastSeason) 37 | { 38 | Minecraft.getInstance().levelRenderer.allChanged(); 39 | lastSeason = calendar.getSubSeason(); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/season/SeasonSavedData.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.season; 6 | 7 | import com.mojang.serialization.Codec; 8 | import com.mojang.serialization.codecs.RecordCodecBuilder; 9 | import net.minecraft.core.HolderLookup; 10 | import net.minecraft.nbt.CompoundTag; 11 | import net.minecraft.util.Mth; 12 | import net.minecraft.world.level.TicketStorage; 13 | import net.minecraft.world.level.saveddata.SavedData; 14 | 15 | import java.util.List; 16 | 17 | public class SeasonSavedData extends SavedData 18 | { 19 | public static final Codec CODEC = RecordCodecBuilder.create( 20 | builder -> builder.group( 21 | Codec.INT.fieldOf("SeasonCycleTicks").orElse(0).forGetter(o -> o.seasonCycleTicks) 22 | ).apply(builder, SeasonSavedData::new) 23 | ); 24 | 25 | public static final String DATA_IDENTIFIER = "seasons"; 26 | public static final int VERSION = 0; 27 | 28 | public int seasonCycleTicks; 29 | 30 | public SeasonSavedData(int seasonCycleTicks) 31 | { 32 | this.seasonCycleTicks = seasonCycleTicks; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/season/SeasonTime.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.season; 6 | 7 | import com.google.common.base.Preconditions; 8 | import sereneseasons.api.season.ISeasonState; 9 | import sereneseasons.api.season.Season; 10 | import sereneseasons.init.ModConfig; 11 | 12 | public final class SeasonTime implements ISeasonState 13 | { 14 | public static final SeasonTime ZERO = new SeasonTime(0); 15 | public final int time; 16 | 17 | public SeasonTime(int time) 18 | { 19 | Preconditions.checkArgument(time >= 0, "Time cannot be negative!"); 20 | this.time = time; 21 | } 22 | 23 | @Override 24 | public int getDayDuration() 25 | { 26 | return ModConfig.seasons.dayDuration; 27 | } 28 | 29 | @Override 30 | public int getSubSeasonDuration() 31 | { 32 | return getDayDuration() * ModConfig.seasons.subSeasonDuration; 33 | } 34 | 35 | @Override 36 | public int getSeasonDuration() 37 | { 38 | return getSubSeasonDuration() * 3; 39 | } 40 | 41 | @Override 42 | public int getCycleDuration() 43 | { 44 | return getSubSeasonDuration() * Season.SubSeason.VALUES.length; 45 | } 46 | 47 | @Override 48 | public int getSeasonCycleTicks() 49 | { 50 | return this.time; 51 | } 52 | 53 | @Override 54 | public int getDay() 55 | { 56 | return this.time / getDayDuration(); 57 | } 58 | 59 | @Override 60 | public Season.SubSeason getSubSeason() 61 | { 62 | int index = (this.time / getSubSeasonDuration()) % Season.SubSeason.VALUES.length; 63 | return Season.SubSeason.VALUES[index]; 64 | } 65 | 66 | @Override 67 | public Season getSeason() 68 | { 69 | return this.getSubSeason().getSeason(); 70 | } 71 | 72 | @Override 73 | public Season.TropicalSeason getTropicalSeason() 74 | { 75 | int index = ((((this.time / getSubSeasonDuration()) + 11) / 2) + 5) % Season.TropicalSeason.VALUES.length; 76 | return Season.TropicalSeason.VALUES[index]; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/season/SeasonalCropGrowthHandler.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.season; 2 | 3 | import glitchcore.event.TagsUpdatedEvent; 4 | import glitchcore.event.player.PlayerInteractEvent; 5 | import net.minecraft.core.BlockPos; 6 | import net.minecraft.core.Registry; 7 | import net.minecraft.core.registries.Registries; 8 | import net.minecraft.world.InteractionHand; 9 | import net.minecraft.world.InteractionResult; 10 | import net.minecraft.world.entity.player.Player; 11 | import net.minecraft.world.item.ItemStack; 12 | import net.minecraft.world.item.Items; 13 | import net.minecraft.world.level.Level; 14 | import net.minecraft.world.level.block.Block; 15 | import net.minecraft.world.level.block.state.BlockState; 16 | import net.minecraft.world.phys.BlockHitResult; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 18 | import sereneseasons.init.ModConfig; 19 | import sereneseasons.init.ModFertility; 20 | import sereneseasons.init.ModTags; 21 | 22 | public class SeasonalCropGrowthHandler 23 | { 24 | public static void onTagsUpdated(TagsUpdatedEvent event) 25 | { 26 | ModFertility.populate(); 27 | } 28 | 29 | public static void onCropGrowth(Level level, BlockPos pos, BlockState state, CallbackInfo ci) 30 | { 31 | if (!ModConfig.fertility.seasonalCrops || !ModFertility.isCrop(state)) 32 | return; 33 | 34 | Registry blockRegistry = level.registryAccess().lookupOrThrow(Registries.BLOCK); 35 | boolean isFertile = ModFertility.isCropFertile(blockRegistry.getKey(state.getBlock()).toString(), level, pos); 36 | 37 | if (!isFertile && !isGlassAboveBlock(level, pos)) 38 | { 39 | if (ModConfig.fertility.outOfSeasonCropBehavior == 0) 40 | { 41 | if (level.getRandom().nextInt(6) != 0) 42 | { 43 | ci.cancel(); 44 | } 45 | } 46 | else if (ModConfig.fertility.outOfSeasonCropBehavior == 1) 47 | { 48 | ci.cancel(); 49 | } 50 | else if (ModConfig.fertility.outOfSeasonCropBehavior == 2) 51 | { 52 | if (!state.is(ModTags.Blocks.UNBREAKABLE_INFERTILE_CROPS)) 53 | { 54 | level.destroyBlock(pos, false); 55 | } 56 | 57 | ci.cancel(); 58 | } 59 | } 60 | } 61 | 62 | public static void applyBonemeal(PlayerInteractEvent.UseBlock event) 63 | { 64 | ItemStack stack = event.getItemStack(); 65 | 66 | if (stack.getItem() != Items.BONE_MEAL) 67 | return; 68 | 69 | Player player = event.getPlayer(); 70 | InteractionHand hand = event.getHand(); 71 | Level level = player.level(); 72 | BlockHitResult hitResult = event.getHitResult(); 73 | BlockPos pos = hitResult.getBlockPos(); 74 | BlockState plant = level.getBlockState(pos); 75 | Block plantBlock = plant.getBlock(); 76 | Registry blockRegistry = level.registryAccess().lookupOrThrow(Registries.BLOCK); 77 | 78 | if (!ModConfig.fertility.seasonalCrops || !ModFertility.isCrop(plant)) 79 | return; 80 | 81 | boolean isFertile = ModFertility.isCropFertile(blockRegistry.getKey(plantBlock).toString(), level, pos); 82 | 83 | if (!isFertile && !isGlassAboveBlock(level, pos)) 84 | { 85 | if (ModConfig.fertility.outOfSeasonCropBehavior == 0) 86 | { 87 | if (level.getRandom().nextInt(6) != 0) 88 | { 89 | event.setCancelled(true); 90 | event.setCancelResult(InteractionResult.SUCCESS); 91 | } 92 | } 93 | else if (ModConfig.fertility.outOfSeasonCropBehavior == 1) 94 | { 95 | event.setCancelled(true); 96 | event.setCancelResult(InteractionResult.FAIL); 97 | } 98 | else if (ModConfig.fertility.outOfSeasonCropBehavior == 2) 99 | { 100 | if (!plant.is(ModTags.Blocks.UNBREAKABLE_INFERTILE_CROPS)) 101 | { 102 | level.destroyBlock(pos, false); 103 | event.setCancelled(true); 104 | event.setCancelResult(InteractionResult.SUCCESS); 105 | } 106 | else 107 | { 108 | event.setCancelled(true); 109 | } 110 | } 111 | } 112 | 113 | if (event.isCancelled() && !level.isClientSide()) 114 | { 115 | if (!player.isCreative()) 116 | stack.shrink(1); 117 | 118 | if (stack.isEmpty()) 119 | player.setItemInHand(hand, ItemStack.EMPTY); 120 | } 121 | } 122 | 123 | private static boolean isGlassAboveBlock(Level world, BlockPos cropPos) 124 | { 125 | for (int i = 0; i < 16; i++) 126 | { 127 | if (world.getBlockState(cropPos.offset(0, i + 1, 0)).is(ModTags.Blocks.GREENHOUSE_GLASS)) 128 | { 129 | return true; 130 | } 131 | } 132 | 133 | return false; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/util/Color.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.util; 6 | 7 | public class Color 8 | { 9 | int r, g, b; 10 | 11 | public Color(int r, int g, int b) 12 | { 13 | this.r = r; 14 | this.g = g; 15 | this.b = b; 16 | } 17 | 18 | public Color(int color) 19 | { 20 | this((color >> 16) & 255, (color >> 8) & 255, color & 255); 21 | } 22 | 23 | public Color(double r, double g, double b) 24 | { 25 | this((int)(r * 255.0), (int)(g * 255), (int)(b * 255)); 26 | } 27 | 28 | public int getRed() 29 | { 30 | return this.r; 31 | } 32 | 33 | public int getGreen() 34 | { 35 | return this.g; 36 | } 37 | 38 | public int getBlue() 39 | { 40 | return this.b; 41 | } 42 | 43 | public int toInt() 44 | { 45 | return (this.getRed() & 255) << 16 | (this.getGreen() & 255) << 8 | this.getBlue() & 255; 46 | } 47 | 48 | public double[] toHSV() 49 | { 50 | return convertRGBtoHSV(this.getRed() / 255.0, this.getGreen() / 255.0, this.getBlue() / 255.0); 51 | } 52 | 53 | // Based on https://stackoverflow.com/questions/3018313/algorithm-to-convert-rgb-to-hsv-and-hsv-to-rgb-in-range-0-255-for-both 54 | public static double[] convertRGBtoHSV(double r, double g, double b) 55 | { 56 | double h, s, v; 57 | double min, max, delta; 58 | 59 | min = r < g ? r : g; 60 | min = min < b ? min : b; 61 | 62 | max = r > g ? r : g; 63 | max = max > b ? max : b; 64 | 65 | v = max; 66 | delta = max - min; 67 | if (delta < 0.00001) 68 | { 69 | s = 0; 70 | h = 0; // undefined, maybe nan? 71 | return new double[]{h, s, v}; 72 | } 73 | if (max > 0.0) 74 | { 75 | // NOTE: if Max is == 0, this divide would cause a crash 76 | s = (delta / max); 77 | } 78 | else 79 | { 80 | // if max is 0, then r = g = b = 0 81 | // s = 0, h is undefined 82 | s = 0.0; 83 | h = -1.0; // its now undefined 84 | return new double[]{h, s, v}; 85 | } 86 | if (r >= max) 87 | h = ( g - b ) / delta; // between yellow & magenta 88 | else 89 | { 90 | if (g >= max) 91 | h = 2.0 + (b - r) / delta; // between cyan & yellow 92 | else 93 | h = 4.0 + (r - g) / delta; // between magenta & cyan 94 | } 95 | 96 | h *= 60.0; // degrees 97 | 98 | if (h < 0.0) 99 | h += 360.0; 100 | 101 | return new double[]{h, s, v}; 102 | } 103 | 104 | public static Color convertHSVtoRGB(double h, double s, double v) 105 | { 106 | double hh, p, q, t, ff; 107 | int i; 108 | double r, g, b; 109 | 110 | if (s <= 0.0) 111 | { 112 | r = v; 113 | g = v; 114 | b = v; 115 | return new Color(r, g, b); 116 | } 117 | hh = h; 118 | if (hh >= 360.0) hh = 0.0; 119 | hh /= 60.0; 120 | i = (int)hh; 121 | ff = hh - i; 122 | p = v * (1.0 - s); 123 | q = v * (1.0 - (s * ff)); 124 | t = v * (1.0 - (s * (1.0 - ff))); 125 | 126 | switch (i) 127 | { 128 | case 0: 129 | r = v; 130 | g = t; 131 | b = p; 132 | break; 133 | case 1: 134 | r = q; 135 | g = v; 136 | b = p; 137 | break; 138 | case 2: 139 | r = p; 140 | g = v; 141 | b = t; 142 | break; 143 | 144 | case 3: 145 | r = p; 146 | g = q; 147 | b = v; 148 | break; 149 | case 4: 150 | r = t; 151 | g = p; 152 | b = v; 153 | break; 154 | case 5: 155 | default: 156 | r = v; 157 | g = p; 158 | b = q; 159 | break; 160 | } 161 | return new Color(r, g, b); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /common/src/main/java/sereneseasons/util/SeasonColorUtil.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2021, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.util; 6 | 7 | 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.core.Holder; 10 | import net.minecraft.resources.ResourceKey; 11 | import net.minecraft.world.level.Level; 12 | import net.minecraft.world.level.biome.Biome; 13 | import sereneseasons.api.season.ISeasonColorProvider; 14 | import sereneseasons.api.season.Season; 15 | import sereneseasons.init.ModConfig; 16 | import sereneseasons.init.ModTags; 17 | 18 | public class SeasonColorUtil 19 | { 20 | public static int multiplyColours(int colour1, int colour2) 21 | { 22 | //Convert each colour to a scale between 0 and 1 and multiply them 23 | //Multiply by 255 to bring back between 0 and 255 24 | return (int)((colour1 / 255.0F) * (colour2 / 255.0F) * 255.0F); 25 | } 26 | 27 | public static int overlayBlendChannel(int underColour, int overColour) 28 | { 29 | int retVal; 30 | if (underColour < 128) 31 | { 32 | retVal = multiplyColours(2 * underColour, overColour); 33 | } 34 | else 35 | { 36 | retVal = multiplyColours(2 * (255 - underColour), 255 - overColour); 37 | retVal = 255 - retVal; 38 | } 39 | return retVal; 40 | } 41 | 42 | public static int overlayBlend(int underColour, int overColour) 43 | { 44 | int r = overlayBlendChannel((underColour >> 16) & 255, (overColour >> 16) & 255); 45 | int g = overlayBlendChannel((underColour >> 8) & 255, (overColour >> 8) & 255); 46 | int b = overlayBlendChannel(underColour & 255, overColour & 255); 47 | 48 | return (r & 255) << 16 | (g & 255) << 8 | (b & 255); 49 | } 50 | 51 | public static int mixColours(int a, int b, float ratio) { 52 | if (ratio > 1f) { 53 | ratio = 1f; 54 | } else if (ratio < 0f) { 55 | ratio = 0f; 56 | } 57 | float iRatio = 1.0f - ratio; 58 | 59 | int aA = (a >> 24 & 0xff); 60 | int aR = ((a & 0xff0000) >> 16); 61 | int aG = ((a & 0xff00) >> 8); 62 | int aB = (a & 0xff); 63 | 64 | int bA = (b >> 24 & 0xff); 65 | int bR = ((b & 0xff0000) >> 16); 66 | int bG = ((b & 0xff00) >> 8); 67 | int bB = (b & 0xff); 68 | 69 | int A = (int)((aA * iRatio) + (bA * ratio)); 70 | int R = (int)((aR * iRatio) + (bR * ratio)); 71 | int G = (int)((aG * iRatio) + (bG * ratio)); 72 | int B = (int)((aB * iRatio) + (bB * ratio)); 73 | 74 | return A << 24 | R << 16 | G << 8 | B; 75 | } 76 | 77 | public static int saturateColour(int colour, float saturationMultiplier) 78 | { 79 | Color newColor = new Color(colour); 80 | double[] hsv = newColor.toHSV(); 81 | hsv[1] *= saturationMultiplier; 82 | newColor = Color.convertHSVtoRGB(hsv[0], hsv[1], hsv[2]); 83 | return newColor.toInt(); 84 | } 85 | 86 | public static int applySeasonalGrassColouring(ISeasonColorProvider colorProvider, Holder biome, int originalColour) 87 | { 88 | ResourceKey dimension = Minecraft.getInstance().level.dimension(); 89 | if (biome.is(ModTags.Biomes.BLACKLISTED_BIOMES) || !ModConfig.seasons.isDimensionWhitelisted(dimension)) { 90 | return originalColour; 91 | } 92 | 93 | int overlay = colorProvider.getGrassOverlay(); 94 | float saturationMultiplier = colorProvider.getGrassSaturationMultiplier(); 95 | if (!ModConfig.seasons.changeGrassColor) 96 | { 97 | overlay = Season.SubSeason.MID_SUMMER.getGrassOverlay(); 98 | saturationMultiplier = Season.SubSeason.MID_SUMMER.getGrassSaturationMultiplier(); 99 | } 100 | int newColour = overlay == 0xFFFFFF ? originalColour : overlayBlend(originalColour, overlay); 101 | int fixedColour = newColour; 102 | if (biome.is(ModTags.Biomes.LESSER_COLOR_CHANGE_BIOMES)) 103 | { 104 | fixedColour = mixColours(newColour, originalColour, 0.75F); 105 | } 106 | 107 | return saturationMultiplier != -1 ? saturateColour(fixedColour, saturationMultiplier) : fixedColour; 108 | } 109 | 110 | public static int applySeasonalFoliageColouring(ISeasonColorProvider colorProvider, Holder biome, int originalColour) 111 | { 112 | ResourceKey dimension = Minecraft.getInstance().level.dimension(); 113 | if (biome.is(ModTags.Biomes.BLACKLISTED_BIOMES) || !ModConfig.seasons.isDimensionWhitelisted(dimension)) 114 | return originalColour; 115 | 116 | int overlay = colorProvider.getFoliageOverlay(); 117 | float saturationMultiplier = colorProvider.getFoliageSaturationMultiplier(); 118 | if (!ModConfig.seasons.changeFoliageColor) 119 | { 120 | overlay = Season.SubSeason.MID_SUMMER.getFoliageOverlay(); 121 | saturationMultiplier = Season.SubSeason.MID_SUMMER.getFoliageSaturationMultiplier(); 122 | } 123 | int newColour = overlay == 0xFFFFFF ? originalColour : overlayBlend(originalColour, overlay); 124 | int fixedColour = newColour; 125 | if (biome.is(ModTags.Biomes.LESSER_COLOR_CHANGE_BIOMES)) 126 | { 127 | fixedColour = mixColours(newColour, originalColour, 0.75F); 128 | } 129 | 130 | return saturationMultiplier != -1 ? saturateColour(fixedColour, saturationMultiplier) : fixedColour; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/cs_cz.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Momentální roční období je: %s, den %s/%s, tik %s/%s", 4 | "commands.sereneseasons.setseason.success": "Roční období nastaveno na: %s", 5 | "commands.sereneseasons.setseason.fail": "Neplatné roční období: %s", 6 | "commands.sereneseasons.setseason.disabled": "Roční období jsou momentálně deaktivována!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Senzor ročního období", 11 | 12 | "item.sereneseasons.ss_icon": "Ikona SS", 13 | "item.sereneseasons.calendar": "Kalendář", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Úrodné roční období", 16 | "desc.sereneseasons.year_round": "Celoroční", 17 | "desc.sereneseasons.spring": "Jaro", 18 | "desc.sereneseasons.summer": "Léto", 19 | "desc.sereneseasons.autumn": "Podzim", 20 | "desc.sereneseasons.winter": "Zima" 21 | } 22 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/de_de.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Derzeitige Jahreszeit ist %s, Tag %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Setze Jahreszeit zu %s", 5 | "commands.sereneseasons.setseason.fail": "Ungültige Jahreszeit %s", 6 | "commands.sereneseasons.setseason.disabled": "Jahreszeiten sind derzeit deaktiviert!", 7 | 8 | "gamerule.doSeasonCycle": "Jahreszeiten schreiten voran", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "Jahreszeiten Sensor", 12 | 13 | "item.sereneseasons.ss_icon": "SS Icon", 14 | "item.sereneseasons.calendar": "Kalender", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Fertile Jahreszeiten", 17 | "desc.sereneseasons.year_round": "Ganzjährig", 18 | "desc.sereneseasons.day_counter": "Tag %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Frühling", 21 | "desc.sereneseasons.early_spring": "Frühlingsanfang", 22 | "desc.sereneseasons.mid_spring": "Frühlingsmitte", 23 | "desc.sereneseasons.late_spring": "Frühlingsende", 24 | "desc.sereneseasons.summer": "Sommer", 25 | "desc.sereneseasons.early_summer": "Frühsommer", 26 | "desc.sereneseasons.mid_summer": "Hochsommer", 27 | "desc.sereneseasons.late_summer": "Spätsommer", 28 | "desc.sereneseasons.autumn": "Herbst", 29 | "desc.sereneseasons.early_autumn": "Herbstanfang", 30 | "desc.sereneseasons.mid_autumn": "Herbstmitte", 31 | "desc.sereneseasons.late_autumn": "Herbstende", 32 | "desc.sereneseasons.winter": "Winter", 33 | "desc.sereneseasons.early_winter": "Winteranfang", 34 | "desc.sereneseasons.mid_winter": "Wintermitte", 35 | "desc.sereneseasons.late_winter": "Winterende", 36 | 37 | "desc.sereneseasons.early_wet": "Anfang der Regenzeit", 38 | "desc.sereneseasons.mid_wet": "Mitte der Regenzeit", 39 | "desc.sereneseasons.late_wet": "Ende der Regenzeit", 40 | "desc.sereneseasons.early_dry": "Anfang der Trockenzeit", 41 | "desc.sereneseasons.mid_dry": "Mitte der Trockenzeit", 42 | "desc.sereneseasons.late_dry": "Ende der Trockenzeit" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Current season is %s, day %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Set season to %s", 5 | "commands.sereneseasons.setseason.fail": "Invalid season %s", 6 | "commands.sereneseasons.setseason.disabled": "Seasons are currently disabled!", 7 | 8 | "gamerule.doSeasonCycle": "Advance seasonal cycle", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "Season Sensor", 12 | 13 | "item.sereneseasons.ss_icon": "SS Icon", 14 | "item.sereneseasons.calendar": "Calendar", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Fertile Seasons", 17 | "desc.sereneseasons.year_round": "Year-Round", 18 | "desc.sereneseasons.day_counter": "Day %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Spring", 21 | "desc.sereneseasons.early_spring": "Early Spring", 22 | "desc.sereneseasons.mid_spring": "Mid Spring", 23 | "desc.sereneseasons.late_spring": "Late Spring", 24 | "desc.sereneseasons.summer": "Summer", 25 | "desc.sereneseasons.early_summer": "Early Summer", 26 | "desc.sereneseasons.mid_summer": "Mid Summer", 27 | "desc.sereneseasons.late_summer": "Late Summer", 28 | "desc.sereneseasons.autumn": "Autumn", 29 | "desc.sereneseasons.early_autumn": "Early Autumn", 30 | "desc.sereneseasons.mid_autumn": "Mid Autumn", 31 | "desc.sereneseasons.late_autumn": "Late Autumn", 32 | "desc.sereneseasons.winter": "Winter", 33 | "desc.sereneseasons.early_winter": "Early Winter", 34 | "desc.sereneseasons.mid_winter": "Mid Winter", 35 | "desc.sereneseasons.late_winter": "Late Winter", 36 | 37 | "desc.sereneseasons.early_wet": "Early Wet", 38 | "desc.sereneseasons.mid_wet": "Mid Wet", 39 | "desc.sereneseasons.late_wet": "Late Wet", 40 | "desc.sereneseasons.early_dry": "Early Dry", 41 | "desc.sereneseasons.mid_dry": "Mid Dry", 42 | "desc.sereneseasons.late_dry": "Late Dry" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/es_ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/sereneseasons [args]", 3 | "commands.sereneseasons.getseason.success": "Estación actual: %s, día %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Estación cambiada a %s", 5 | "commands.sereneseasons.setseason.fail": "Estación desconocida: %s", 6 | "commands.sereneseasons.setseason.disabled": "¡Las estaciones están desactivadas!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Sensor de estaciones", 11 | 12 | "item.sereneseasons.ss_icon": "Ícono de SS", 13 | "item.sereneseasons.calendar": "Calendario", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Estaciones fértiles", 16 | "desc.sereneseasons.year_round": "Todo el año", 17 | "desc.sereneseasons.spring": "Primavera", 18 | "desc.sereneseasons.summer": "Verano", 19 | "desc.sereneseasons.autumn": "Otoño", 20 | "desc.sereneseasons.winter": "Invierno" 21 | } -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/es_es.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/sereneseasons [args]", 3 | "commands.sereneseasons.getseason.success": "Estación actual: %s, día %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Estación ajustada a %s", 5 | "commands.sereneseasons.setseason.fail": "Estación desconocida: %s", 6 | "commands.sereneseasons.setseason.disabled": "¡Las estaciones están desactivadas!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Sensor de estaciones", 11 | 12 | "item.sereneseasons.ss_icon": "Ícono de SS", 13 | "item.sereneseasons.calendar": "Calendario", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Estaciones fértiles", 16 | "desc.sereneseasons.year_round": "Todo el año", 17 | "desc.sereneseasons.spring": "Primavera", 18 | "desc.sereneseasons.summer": "Verano", 19 | "desc.sereneseasons.autumn": "Otoño", 20 | "desc.sereneseasons.winter": "Invierno" 21 | } -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/es_mx.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Estación actual: %s, día %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Estación ajustada a %s", 5 | "commands.sereneseasons.setseason.fail": "Estación desconocida: %s", 6 | "commands.sereneseasons.setseason.disabled": "¡Las estaciones están desactivadas!", 7 | 8 | "gamerule.doSeasonCycle": "Ciclo estacional avanzado", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "Sensor de estaciones", 12 | 13 | "item.sereneseasons.ss_icon": "Ícono de SS", 14 | "item.sereneseasons.calendar": "Calendario", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Estación fértil:", 17 | "desc.sereneseasons.year_round": "Todo el año", 18 | "desc.sereneseasons.day_counter": "Día %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Primavera", 21 | "desc.sereneseasons.early_spring": "Comienzo de la primavera", 22 | "desc.sereneseasons.mid_spring": "Mediados de primavera", 23 | "desc.sereneseasons.late_spring": "Finales de la primavera", 24 | "desc.sereneseasons.summer": "Verano", 25 | "desc.sereneseasons.early_summer": "Comienzo del verano", 26 | "desc.sereneseasons.mid_summer": "Mediados de verano", 27 | "desc.sereneseasons.late_summer": "Finales del verano", 28 | "desc.sereneseasons.autumn": "Otoño", 29 | "desc.sereneseasons.early_autumn": "Comienzo del otoño", 30 | "desc.sereneseasons.mid_autumn": "Mediados de otoño", 31 | "desc.sereneseasons.late_autumn": "Finales del otoño", 32 | "desc.sereneseasons.winter": "Invierno", 33 | "desc.sereneseasons.early_winter": "Comienzo del invierno", 34 | "desc.sereneseasons.mid_winter": "Mediados de invierno", 35 | "desc.sereneseasons.late_winter": "Finales del invierno", 36 | 37 | "desc.sereneseasons.early_wet": "Tormenta temprana", 38 | "desc.sereneseasons.mid_wet": "Tormenta media", 39 | "desc.sereneseasons.late_wet": "Tormenta tardía", 40 | "desc.sereneseasons.early_dry": "Sequía temprana", 41 | "desc.sereneseasons.mid_dry": "Sequía media", 42 | "desc.sereneseasons.late_dry": "Sequía tardía" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/fi_fi.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Nykyinen vuodenaika on %s, päivä %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Vuodenajaksi asetettu %s", 5 | "commands.sereneseasons.setseason.fail": "Virheellinen vuodenaika %s", 6 | "commands.sereneseasons.setseason.disabled": "Vuodenajat on tällä hetkellä pois päältä!", 7 | 8 | "gamerule.doSeasonCycle": "Vuodenajat edistyvät", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "Vuodenajantunnistin", 12 | 13 | "item.sereneseasons.ss_icon": "SS Kuvake", 14 | "item.sereneseasons.calendar": "Kalenteri", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Viljavat vuodenajat", 17 | "desc.sereneseasons.year_round": "Ympäri vuoden", 18 | "desc.sereneseasons.day_counter": "Päivä %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Kevät", 21 | "desc.sereneseasons.early_spring": "Alkukevät", 22 | "desc.sereneseasons.mid_spring": "Keskikevät", 23 | "desc.sereneseasons.late_spring": "Loppukevät", 24 | "desc.sereneseasons.summer": "Kesä", 25 | "desc.sereneseasons.early_summer": "Alkukesä", 26 | "desc.sereneseasons.mid_summer": "Keskikesä", 27 | "desc.sereneseasons.late_summer": "Loppukesä", 28 | "desc.sereneseasons.autumn": "Syksy", 29 | "desc.sereneseasons.early_autumn": "Alkusyksy", 30 | "desc.sereneseasons.mid_autumn": "Keskisyksy", 31 | "desc.sereneseasons.late_autumn": "Loppusyksy", 32 | "desc.sereneseasons.winter": "Talvi", 33 | "desc.sereneseasons.early_winter": "Alkutalvi", 34 | "desc.sereneseasons.mid_winter": "Keskitalvi", 35 | "desc.sereneseasons.late_winter": "Lopputalvi", 36 | 37 | "desc.sereneseasons.early_wet": "Alkumärkä", 38 | "desc.sereneseasons.mid_wet": "Keskimärkä", 39 | "desc.sereneseasons.late_wet": "Loppumärkä", 40 | "desc.sereneseasons.early_dry": "Alkukuiva", 41 | "desc.sereneseasons.mid_dry": "Keskikuiva", 42 | "desc.sereneseasons.late_dry": "Loppukuiva" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/fr_fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [arguments]", 3 | "commands.sereneseasons.getseason.success": "La saison actuelle est %s, jour %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "La saison a été définie sur %s", 5 | "commands.sereneseasons.setseason.fail": "La saison %s est invalide", 6 | "commands.sereneseasons.setseason.disabled": "Les saisons sont actuellement désactivées !", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Verre de Serre", 11 | 12 | "item.sereneseasons.ss_icon": "SS Icon", 13 | "item.sereneseasons.calendar": "Calendrier", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Saisons Fertiles", 16 | "desc.sereneseasons.year_round": "Toute l'Année", 17 | "desc.sereneseasons.spring": "Printemps", 18 | "desc.sereneseasons.summer": "Été", 19 | "desc.sereneseasons.autumn": "Automne", 20 | "desc.sereneseasons.winter": "Hiver" 21 | } 22 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/it_it.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "La stagione attuale è %s, giorno %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Stagione impostata su %s", 5 | "commands.sereneseasons.setseason.fail": "Stagione %s non valida", 6 | "commands.sereneseasons.setseason.disabled": "Le stagioni sono disabilitate!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Sensore stagioni", 11 | 12 | "item.sereneseasons.ss_icon": "Icona SS", 13 | "item.sereneseasons.calendar": "Calendario", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Stagioni fertili", 16 | "desc.sereneseasons.year_round": "Tutto l'anno", 17 | "desc.sereneseasons.day_counter": "Giorno %s/%s", 18 | "desc.sereneseasons.spring": "Primavera", 19 | "desc.sereneseasons.early_spring": "Inizio Primavera", 20 | "desc.sereneseasons.mid_spring": "Metà Primavera", 21 | "desc.sereneseasons.late_spring": "Tarda Primavera", 22 | "desc.sereneseasons.summer": "Estate", 23 | "desc.sereneseasons.early_summer": "Inizio Estate", 24 | "desc.sereneseasons.mid_summer": "Metà Estate", 25 | "desc.sereneseasons.late_summer": "Tarda Estate", 26 | "desc.sereneseasons.autumn": "Autunno", 27 | "desc.sereneseasons.early_autumn": "Inizio Autunno", 28 | "desc.sereneseasons.mid_autumn": "Metà Autunno", 29 | "desc.sereneseasons.late_autumn": "Tarda Autunno", 30 | "desc.sereneseasons.winter": "Inverno", 31 | "desc.sereneseasons.early_winter": "Inizio Inverno", 32 | "desc.sereneseasons.mid_winter": "Metà Inverno", 33 | "desc.sereneseasons.late_winter": "Tarda Inverno" 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/kk_kz.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Қазіргі маусым %s, %s/%s күн, %s/%s тик", 4 | "commands.sereneseasons.setseason.success": "Маусым %s болып қойылды", 5 | "commands.sereneseasons.setseason.fail": "%s маусымы қате", 6 | "commands.sereneseasons.setseason.disabled": "Маусымдар қазіргі кезде өшірулі!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Маусым сенсоры", 11 | 12 | "item.sereneseasons.ss_icon": "SS белгішесі", 13 | "item.sereneseasons.calendar": "Күнтізбе", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Құнарлы маусым", 16 | "desc.sereneseasons.year_round": "Жыл бойы", 17 | "desc.sereneseasons.spring": "Көктем", 18 | "desc.sereneseasons.summer": "Жаз", 19 | "desc.sereneseasons.autumn": "Күз", 20 | "desc.sereneseasons.winter": "Қыс" 21 | } 22 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/ko_kr.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "현재 계절: %s 날짜: %s/%s 틱: %s/%s", 4 | "commands.sereneseasons.setseason.success": "계절을 %s으로 설정했습니다.", 5 | "commands.sereneseasons.setseason.fail": "%s라는 계절이 존재하지 않습니다.", 6 | "commands.sereneseasons.setseason.disabled": "계절이 현재 비활성화되어 있습니다!", 7 | 8 | "gamerule.doSeasonCycle": "계절 흐름", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "계절 감지기", 12 | 13 | "item.sereneseasons.ss_icon": "SS 아이콘", 14 | "item.sereneseasons.calendar": "달력", 15 | 16 | "desc.sereneseasons.fertile_seasons": "비옥한 계절", 17 | "desc.sereneseasons.year_round": "일년 내내", 18 | "desc.sereneseasons.day_counter": "날짜 %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "봄", 21 | "desc.sereneseasons.early_spring": "초봄", 22 | "desc.sereneseasons.mid_spring": "완연한 봄", 23 | "desc.sereneseasons.late_spring": "늦봄", 24 | "desc.sereneseasons.summer": "여름", 25 | "desc.sereneseasons.early_summer": "초여름", 26 | "desc.sereneseasons.mid_summer": "완연한 여름", 27 | "desc.sereneseasons.late_summer": "늦여름", 28 | "desc.sereneseasons.autumn": "가을", 29 | "desc.sereneseasons.early_autumn": "초가을", 30 | "desc.sereneseasons.mid_autumn": "완연한 가을", 31 | "desc.sereneseasons.late_autumn": "늦가을", 32 | "desc.sereneseasons.winter": "겨울", 33 | "desc.sereneseasons.early_winter": "초겨울", 34 | "desc.sereneseasons.mid_winter": "완연한 겨울", 35 | "desc.sereneseasons.late_winter": "늦겨울", 36 | 37 | "desc.sereneseasons.early_wet": "우기 초기", 38 | "desc.sereneseasons.mid_wet": "우기 중기", 39 | "desc.sereneseasons.late_wet": "우기 후기", 40 | "desc.sereneseasons.early_dry": "건기 초기", 41 | "desc.sereneseasons.mid_dry": "건기 중기", 42 | "desc.sereneseasons.late_dry": "건기 후기" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/nl_nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Het huidige seizoen is %s, dag %s/%s en tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Het seizoen is nu op %s gezet", 5 | "commands.sereneseasons.setseason.fail": "Seizoen %s bestaat niet!", 6 | "commands.sereneseasons.setseason.disabled": "Seizoenen zijn momenteel uitgeschakeld!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Seizoensensor", 11 | 12 | "item.sereneseasons.ss_icon": "SS Icoon", 13 | "item.sereneseasons.calendar": "Kalender", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Vruchtbare seizoenen", 16 | "desc.sereneseasons.year_round": "Hele jaar", 17 | "desc.sereneseasons.spring": "Voorjaar", 18 | "desc.sereneseasons.summer": "Zomer", 19 | "desc.sereneseasons.autumn": "Herfst", 20 | "desc.sereneseasons.winter": "Winter" 21 | } 22 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/nn_no.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Sesongen no er %s, dag %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Sette sesongen til %s", 5 | "commands.sereneseasons.setseason.fail": "Ugyldig sesong %s", 6 | "commands.sereneseasons.setseason.disabled": "Sesongar er deaktivert!", 7 | 8 | "gamerule.doSeasonCycle": "Gå framover i sesongsyklus", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "Sesongsensor", 12 | 13 | "item.sereneseasons.ss_icon": "SS-ikon", 14 | "item.sereneseasons.calendar": "Kalender", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Grøderike sesongar", 17 | "desc.sereneseasons.year_round": "Året rundt", 18 | "desc.sereneseasons.day_counter": "Dag %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Vår", 21 | "desc.sereneseasons.early_spring": "Tidleg på våren", 22 | "desc.sereneseasons.mid_spring": "Midt på våren", 23 | "desc.sereneseasons.late_spring": "Seint på våren", 24 | "desc.sereneseasons.summer": "Sumar", 25 | "desc.sereneseasons.early_summer": "Tidleg på sumaren", 26 | "desc.sereneseasons.mid_summer": "Midt på sumaren", 27 | "desc.sereneseasons.late_summer": "Seint på sumaren", 28 | "desc.sereneseasons.autumn": "Haust", 29 | "desc.sereneseasons.early_autumn": "Tidleg på hausten", 30 | "desc.sereneseasons.mid_autumn": "Midt på hausten", 31 | "desc.sereneseasons.late_autumn": "Seint på hausten", 32 | "desc.sereneseasons.winter": "Vinter", 33 | "desc.sereneseasons.early_winter": "Tidleg på vinteren", 34 | "desc.sereneseasons.mid_winter": "Midt på vinteren", 35 | "desc.sereneseasons.late_winter": "Seint på vinteren", 36 | 37 | "desc.sereneseasons.early_wet": "Tidleg vått", 38 | "desc.sereneseasons.mid_wet": "Midt-vått", 39 | "desc.sereneseasons.late_wet": "Seint vått", 40 | "desc.sereneseasons.early_dry": "Tidleg turt", 41 | "desc.sereneseasons.mid_dry": "Midt-turt", 42 | "desc.sereneseasons.late_dry": "Seint turt" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/pl_pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Obecna pora roku to %s, dzień %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Ustawiono porę roku na: %s", 5 | "commands.sereneseasons.setseason.fail": "Nieprawidłowa pora roku: %s", 6 | "commands.sereneseasons.setseason.disabled": "Pory roku są obecnie wyłączone!", 7 | 8 | "gamerule.doSeasonCycle": "Postępujące pory roku", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "Czujnik pory roku", 12 | 13 | "item.sereneseasons.ss_icon": "SS Icon", 14 | "item.sereneseasons.calendar": "Kalendarz", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Urodzajne pory:", 17 | "desc.sereneseasons.year_round": "Całorocznie", 18 | "desc.sereneseasons.day_counter": "Dzień %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Wiosna", 21 | "desc.sereneseasons.early_spring": "Wczesna wiosna", 22 | "desc.sereneseasons.mid_spring": "Środek wiosny", 23 | "desc.sereneseasons.late_spring": "Późna wiosna", 24 | "desc.sereneseasons.summer": "Lato", 25 | "desc.sereneseasons.early_summer": "Wczesne lato", 26 | "desc.sereneseasons.mid_summer": "Środek lata", 27 | "desc.sereneseasons.late_summer": "Późne lato", 28 | "desc.sereneseasons.autumn": "Jesień", 29 | "desc.sereneseasons.early_autumn": "Wczesna jesień", 30 | "desc.sereneseasons.mid_autumn": "Środek jesieni", 31 | "desc.sereneseasons.late_autumn": "Późna jesień", 32 | "desc.sereneseasons.winter": "Zima", 33 | "desc.sereneseasons.early_winter": "Wczesna zima", 34 | "desc.sereneseasons.mid_winter": "Środek zimy", 35 | "desc.sereneseasons.late_winter": "Późna zima", 36 | 37 | "desc.sereneseasons.early_wet": "Wczesna pora deszczowa", 38 | "desc.sereneseasons.mid_wet": "Pora deszczowa", 39 | "desc.sereneseasons.late_wet": "Późna pora deszczowa", 40 | "desc.sereneseasons.early_dry": "Wczesna pora sucha", 41 | "desc.sereneseasons.mid_dry": "Pora sucha", 42 | "desc.sereneseasons.late_dry": "Późna pora sucha" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/pt_br.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/sereneseasons [args]", 3 | "commands.sereneseasons.getseason.success": "A estação atual é %s, dia %s/%s, ciclo %s/%s", 4 | "commands.sereneseasons.setseason.success": "A estação foi definida para %s", 5 | "commands.sereneseasons.setseason.fail": "A estação %s é inválida", 6 | "commands.sereneseasons.setseason.disabled": "As estações foram desativadas!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Sensor de estações", 11 | 12 | "item.sereneseasons.ss_icon": "Ícone do SS", 13 | "item.sereneseasons.calendar": "Calendário", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Estações férteis", 16 | "desc.sereneseasons.year_round": "Ano inteiro", 17 | "desc.sereneseasons.day_counter": "Dia %s/%s", 18 | "desc.sereneseasons.spring": "Primavera", 19 | "desc.sereneseasons.early_spring": "Início da Primavera", 20 | "desc.sereneseasons.mid_spring": "Meio da Primavera", 21 | "desc.sereneseasons.late_spring": "Fim da Primavera", 22 | "desc.sereneseasons.summer": "Verão", 23 | "desc.sereneseasons.early_summer": "Início do Verão", 24 | "desc.sereneseasons.mid_summer": "Meio do Verão", 25 | "desc.sereneseasons.late_summer": "Fim do Verão", 26 | "desc.sereneseasons.autumn": "Outono", 27 | "desc.sereneseasons.early_autumn": "Início do Outono", 28 | "desc.sereneseasons.mid_autumn": "Meio do Outono", 29 | "desc.sereneseasons.late_autumn": "Fim do Outono", 30 | "desc.sereneseasons.winter": "Inverno" 31 | "desc.sereneseasons.early_winter": "Início do Inverno", 32 | "desc.sereneseasons.mid_winter": "Meio do Inverno", 33 | "desc.sereneseasons.late_winter": "Fim do Inverno" 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/ru_ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [аргументы]", 3 | "commands.sereneseasons.getseason.success": "Текущий сезон — %s, день %s/%s, такт %s/%s", 4 | "commands.sereneseasons.setseason.success": "Сезон установлен на %s.", 5 | "commands.sereneseasons.setseason.fail": "Неверный сезон %s.", 6 | "commands.sereneseasons.setseason.disabled": "В данный момент Сезоны отключены!", 7 | 8 | "gamerule.doSeasonCycle": "Опережающий сезонный цикл", 9 | "itemGroup.tabSereneSeasons": "Безмятежные Сезоны", 10 | 11 | "block.sereneseasons.season_sensor": "Датчик сезона", 12 | 13 | "item.sereneseasons.ss_icon": "Иконка БС", 14 | "item.sereneseasons.calendar": "Календарь", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Плодородные сезоны", 17 | "desc.sereneseasons.year_round": "Круглый год", 18 | "desc.sereneseasons.day_counter": "День %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Весна", 21 | "desc.sereneseasons.early_spring": "Начало весны", 22 | "desc.sereneseasons.mid_spring": "Середина весны", 23 | "desc.sereneseasons.late_spring": "Поздняя весна", 24 | "desc.sereneseasons.summer": "Лето", 25 | "desc.sereneseasons.early_summer": "Начало лета", 26 | "desc.sereneseasons.mid_summer": "Середина лета", 27 | "desc.sereneseasons.late_summer": "Позднее лето", 28 | "desc.sereneseasons.autumn": "Осень", 29 | "desc.sereneseasons.early_autumn": "Начало осени", 30 | "desc.sereneseasons.mid_autumn": "Середина осени", 31 | "desc.sereneseasons.late_autumn": "Поздняя осень", 32 | "desc.sereneseasons.winter": "Зима", 33 | "desc.sereneseasons.early_winter": "Начало зимы", 34 | "desc.sereneseasons.mid_winter": "Середина зимы", 35 | "desc.sereneseasons.late_winter": "Поздняя зима", 36 | 37 | "desc.sereneseasons.early_wet": "Ранний сезон дождей", 38 | "desc.sereneseasons.mid_wet": "Середина сезона дождей", 39 | "desc.sereneseasons.late_wet": "Поздний сезон дождей", 40 | "desc.sereneseasons.early_dry": "Ранний сезон засухи", 41 | "desc.sereneseasons.mid_dry": "Середина сезона засухи", 42 | "desc.sereneseasons.late_dry": "Поздний сезон засухи" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/tr_tr.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [komutlar]", 3 | "commands.sereneseasons.getseason.success": "Mevcut mevsim: %s, gün: %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Mevsimi şuna ayarla: %s", 5 | "commands.sereneseasons.setseason.fail": "Hatalı mevsim: %s", 6 | "commands.sereneseasons.setseason.disabled": "Mevsimler şuanda devre dışı!", 7 | 8 | "gamerule.doSeasonCycle": "Gelişmiş Mevsimsel Döngü", 9 | "itemGroup.tabSereneSeasons": "Huzurlu Mevsimler", 10 | 11 | "block.sereneseasons.season_sensor": "Mevsim Sensörü", 12 | 13 | "item.sereneseasons.ss_icon": "SS İkonu", 14 | "item.sereneseasons.calendar": "Takvim", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Bereketli Mevsimler", 17 | "desc.sereneseasons.year_round": "Tüm Yıl Boyunca", 18 | "desc.sereneseasons.day_counter": "%s/%s. Gün", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "İlkbahar", 21 | "desc.sereneseasons.early_spring": "İlkbahar Başlangıcı", 22 | "desc.sereneseasons.mid_spring": "İlkbahar Ortaları", 23 | "desc.sereneseasons.late_spring": "İlkbahar Sonları", 24 | "desc.sereneseasons.summer": "Yaz", 25 | "desc.sereneseasons.early_summer": "Yaz Başlangıcı", 26 | "desc.sereneseasons.mid_summer": "Yaz Ortaları", 27 | "desc.sereneseasons.late_summer": "Yaz Sonları", 28 | "desc.sereneseasons.autumn": "Sonbahar", 29 | "desc.sereneseasons.early_autumn": "Sonbahar Başlangıcı", 30 | "desc.sereneseasons.mid_autumn": "Sonbahar Ortaları", 31 | "desc.sereneseasons.late_autumn": "Sonbahar Sonları", 32 | "desc.sereneseasons.winter": "Kış", 33 | "desc.sereneseasons.early_winter": "Kış Başlangıcı", 34 | "desc.sereneseasons.mid_winter": "Kış Ortaları", 35 | "desc.sereneseasons.late_winter": "Kış Sonları", 36 | 37 | "desc.sereneseasons.early_wet": "Early Nem", 38 | "desc.sereneseasons.mid_wet": "Orta Nem", 39 | "desc.sereneseasons.late_wet": "Geç Nem", 40 | "desc.sereneseasons.early_dry": "Erken Kuru Nem", 41 | "desc.sereneseasons.mid_dry": "Orta Kuru Nem", 42 | "desc.sereneseasons.late_dry": "Geç Kuru Nem" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/uk_ua.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Поточний сезон — %s, день %s/%s, такт %s/%s", 4 | "commands.sereneseasons.setseason.success": "Установлено сезон на %s", 5 | "commands.sereneseasons.setseason.fail": "Недійсний сезон %s", 6 | "commands.sereneseasons.setseason.disabled": "Сезони наразі вимкнено!", 7 | 8 | "gamerule.doSeasonCycle": "Просування сезонного циклу", 9 | 10 | "itemGroup.tabSereneSeasons": "Serene Seasons", 11 | "block.sereneseasons.season_sensor": "Сезонний датчик", 12 | 13 | "item.sereneseasons.ss_icon": "Іконка SS", 14 | "item.sereneseasons.calendar": "Календар", 15 | 16 | "desc.sereneseasons.fertile_seasons": "Родючі сезони", 17 | "desc.sereneseasons.year_round": "Цілий рік", 18 | "desc.sereneseasons.day_counter": "День %s/%s", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "Весна", 21 | "desc.sereneseasons.early_spring": "Рання весна", 22 | "desc.sereneseasons.mid_spring": "Середина весни", 23 | "desc.sereneseasons.late_spring": "Пізня весна", 24 | "desc.sereneseasons.summer": "Літо", 25 | "desc.sereneseasons.early_summer": "Раннє літо", 26 | "desc.sereneseasons.mid_summer": "Середина літа", 27 | "desc.sereneseasons.late_summer": "Пізнє літо", 28 | "desc.sereneseasons.autumn": "Осінь", 29 | "desc.sereneseasons.early_autumn": "Рання осінь", 30 | "desc.sereneseasons.mid_autumn": "Середина осені", 31 | "desc.sereneseasons.late_autumn": "Пізня осінь", 32 | "desc.sereneseasons.winter": "Зима", 33 | "desc.sereneseasons.early_winter": "Рання зима", 34 | "desc.sereneseasons.mid_winter": "Середина зими", 35 | "desc.sereneseasons.late_winter": "Пізня зима", 36 | 37 | "desc.sereneseasons.early_wet": "Ранні опади", 38 | "desc.sereneseasons.mid_wet": "Середина опадів", 39 | "desc.sereneseasons.late_wet": "Пізні опади", 40 | "desc.sereneseasons.early_dry": "Рання посуха", 41 | "desc.sereneseasons.mid_dry": "Середина посухи", 42 | "desc.sereneseasons.late_dry": "Пізня посуха" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/vi_vn.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "Mùa hiện tại là %s, ngày %s/%s, tick %s/%s", 4 | "commands.sereneseasons.setseason.success": "Đã đặt mùa thành %s", 5 | "commands.sereneseasons.setseason.fail": "Mùa không hợp lệ %s", 6 | "commands.sereneseasons.setseason.disabled": "Các mùa không được bật!", 7 | 8 | "itemGroup.tabSereneSeasons": "Serene Seasons", 9 | 10 | "block.sereneseasons.season_sensor": "Cảm biến mùa", 11 | 12 | "item.sereneseasons.ss_icon": "SS Icon", 13 | "item.sereneseasons.calendar": "Lịch", 14 | 15 | "desc.sereneseasons.fertile_seasons": "Mùa trồng trọt", 16 | "desc.sereneseasons.year_round": "Mọc quanh năm", 17 | "desc.sereneseasons.day_counter": "Ngày %s/%s", 18 | "desc.sereneseasons.spring": "Mùa xuân", 19 | "desc.sereneseasons.early_spring": "Đầu xuân", 20 | "desc.sereneseasons.mid_spring": "Giữa xuân", 21 | "desc.sereneseasons.late_spring": "Cuối xuân", 22 | "desc.sereneseasons.summer": "Mùa hè", 23 | "desc.sereneseasons.early_summer": "Đầu hè", 24 | "desc.sereneseasons.mid_summer": "Giữa hè", 25 | "desc.sereneseasons.late_summer": "Cuối hè", 26 | "desc.sereneseasons.autumn": "Mùa thu", 27 | "desc.sereneseasons.early_autumn": "Đầu thu", 28 | "desc.sereneseasons.mid_autumn": "Giữa thu", 29 | "desc.sereneseasons.late_autumn": "Cuối thu", 30 | "desc.sereneseasons.winter": "Mùa đông", 31 | "desc.sereneseasons.early_winter": "Đầu đông", 32 | "desc.sereneseasons.mid_winter": "Giữa đông", 33 | "desc.sereneseasons.late_winter": "Cuối đông" 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/zh_cn.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "目前的季节为 %s,第 %s/%s 天,第 %s/%s 刻", 4 | "commands.sereneseasons.setseason.success": "已设置季节为 %s", 5 | "commands.sereneseasons.setseason.fail": "无效的季节 %s", 6 | "commands.sereneseasons.setseason.disabled": "季节更替功能当前已禁用!", 7 | 8 | "gamerule.doSeasonCycle": "是否推进季节循环", 9 | "itemGroup.tabSereneSeasons": "静谧四季", 10 | 11 | "block.sereneseasons.season_sensor": "季节传感器", 12 | 13 | "item.sereneseasons.ss_icon": "静谧四季图标", 14 | "item.sereneseasons.calendar": "日历", 15 | 16 | "desc.sereneseasons.fertile_seasons": "丰收时节", 17 | "desc.sereneseasons.year_round": "全年持续", 18 | "desc.sereneseasons.day_counter": "第 %s/%s 天", 19 | "desc.sereneseasons.tropical_day_counter": "(%s/%s)", 20 | "desc.sereneseasons.spring": "春季", 21 | "desc.sereneseasons.early_spring": "初春", 22 | "desc.sereneseasons.mid_spring": "仲春", 23 | "desc.sereneseasons.late_spring": "暮春", 24 | "desc.sereneseasons.summer": "夏季", 25 | "desc.sereneseasons.early_summer": "初夏", 26 | "desc.sereneseasons.mid_summer": "仲夏", 27 | "desc.sereneseasons.late_summer": "暮夏", 28 | "desc.sereneseasons.autumn": "秋季", 29 | "desc.sereneseasons.early_autumn": "初秋", 30 | "desc.sereneseasons.mid_autumn": "仲秋", 31 | "desc.sereneseasons.late_autumn": "暮秋", 32 | "desc.sereneseasons.winter": "冬季", 33 | "desc.sereneseasons.early_winter": "初冬", 34 | "desc.sereneseasons.mid_winter": "仲冬", 35 | "desc.sereneseasons.late_winter": "暮冬", 36 | 37 | "desc.sereneseasons.early_wet": "初雨季", 38 | "desc.sereneseasons.mid_wet": "仲雨季", 39 | "desc.sereneseasons.late_wet": "末雨季", 40 | "desc.sereneseasons.early_dry": "初旱季", 41 | "desc.sereneseasons.mid_dry": "仲旱季", 42 | "desc.sereneseasons.late_dry": "末旱季" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/lang/zh_tw.json: -------------------------------------------------------------------------------- 1 | { 2 | "commands.sereneseasons.usage": "/season [args]", 3 | "commands.sereneseasons.getseason.success": "現在是 %s 的第 %s/%s 天、%s/%s 刻", 4 | "commands.sereneseasons.setseason.success": "將季節設為 %s", 5 | "commands.sereneseasons.setseason.fail": "季節 %s 無效", 6 | "commands.sereneseasons.setseason.disabled": "目前已停用季節!", 7 | 8 | "gamerule.doSeasonCycle": "推進季節循環", 9 | "itemGroup.tabSereneSeasons": "Serene Seasons", 10 | 11 | "block.sereneseasons.season_sensor": "季節感測器", 12 | 13 | "item.sereneseasons.ss_icon": "SS Icon", 14 | "item.sereneseasons.calendar": "日曆", 15 | 16 | "desc.sereneseasons.fertile_seasons": "生長季", 17 | "desc.sereneseasons.year_round": "全年", 18 | "desc.sereneseasons.day_counter": "第 %s/%s 天", 19 | "desc.sereneseasons.tropical_day_counter": " (%s/%s)", 20 | "desc.sereneseasons.spring": "春季", 21 | "desc.sereneseasons.early_spring": "初春", 22 | "desc.sereneseasons.mid_spring": "仲春", 23 | "desc.sereneseasons.late_spring": "晚春", 24 | "desc.sereneseasons.summer": "夏季", 25 | "desc.sereneseasons.early_summer": "初夏", 26 | "desc.sereneseasons.mid_summer": "仲夏", 27 | "desc.sereneseasons.late_summer": "晚夏", 28 | "desc.sereneseasons.autumn": "秋季", 29 | "desc.sereneseasons.early_autumn": "初秋", 30 | "desc.sereneseasons.mid_autumn": "仲秋", 31 | "desc.sereneseasons.late_autumn": "晚秋", 32 | "desc.sereneseasons.winter": "冬季", 33 | "desc.sereneseasons.early_winter": "初冬", 34 | "desc.sereneseasons.mid_winter": "仲冬", 35 | "desc.sereneseasons.late_winter": "晚冬", 36 | 37 | "desc.sereneseasons.early_wet": "初雨季", 38 | "desc.sereneseasons.mid_wet": "仲雨季", 39 | "desc.sereneseasons.late_wet": "晚雨季", 40 | "desc.sereneseasons.early_dry": "初旱季", 41 | "desc.sereneseasons.mid_dry": "仲旱季", 42 | "desc.sereneseasons.late_dry": "晚旱季" 43 | } 44 | -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_autumn_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_autumn_top.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_side.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_spring_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_spring_top.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_summer_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_summer_top.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_winter_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/block/season_sensor_winter_top.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_00.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_01.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_02.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_03.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_04.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_05.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_06.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_07.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_08.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_09.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_10.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_11.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_null.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_null.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_00.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_01.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_02.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_03.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_04.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/calendar_tropical_05.png -------------------------------------------------------------------------------- /common/src/main/resources/assets/sereneseasons/textures/item/ss_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/assets/sereneseasons/textures/item/ss_icon.png -------------------------------------------------------------------------------- /common/src/main/resources/data/c/tags/block/glass_blocks.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | ] 5 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/forge/tags/block/glass.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | ] 5 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/loot_table/block/season_sensor.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "sereneseasons:season_sensor" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/autumn_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:birch_sapling", 6 | "minecraft:spruce_sapling", 7 | "minecraft:dark_oak_sapling", 8 | "minecraft:wheat", 9 | "minecraft:pumpkin_stem", 10 | "minecraft:beetroots", 11 | "minecraft:carrots" 12 | ] 13 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/greenhouse_glass.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#forge:glass", 5 | "#c:glass_blocks" 6 | ] 7 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/spring_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:birch_sapling", 6 | "minecraft:spruce_sapling", 7 | "minecraft:cherry_sapling", 8 | "minecraft:azalea", 9 | "minecraft:flowering_azalea", 10 | "minecraft:sweet_berry_bush", 11 | "minecraft:bamboo", 12 | "minecraft:bamboo_sapling", 13 | "minecraft:carrots", 14 | "minecraft:potatoes" 15 | ] 16 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/summer_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:jungle_sapling", 6 | "minecraft:acacia_sapling", 7 | "minecraft:mangrove_leaves", 8 | "minecraft:mangrove_propagule", 9 | "minecraft:azalea", 10 | "minecraft:flowering_azalea", 11 | "minecraft:bamboo", 12 | "minecraft:bamboo_sapling", 13 | "minecraft:cactus", 14 | "minecraft:sugar_cane", 15 | "minecraft:wheat", 16 | "minecraft:melon_stem", 17 | "minecraft:cocoa", 18 | "minecraft:torchflower_crop", 19 | "minecraft:pitcher_crop" 20 | ] 21 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/unbreakable_infertile_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "minecraft:oak_sapling", 5 | "minecraft:birch_sapling", 6 | "minecraft:spruce_sapling", 7 | "minecraft:jungle_sapling", 8 | "minecraft:acacia_sapling", 9 | "minecraft:dark_oak_sapling", 10 | "minecraft:mangrove_leaves", 11 | "minecraft:mangrove_propagule", 12 | "minecraft:cherry_sapling", 13 | "minecraft:azalea", 14 | "minecraft:flowering_azalea", 15 | "minecraft:grass_block", 16 | "minecraft:moss_block", 17 | "minecraft:rooted_dirt", 18 | "minecraft:big_dripleaf", 19 | "minecraft:big_dripleaf_stem", 20 | "minecraft:small_dripleaf", 21 | "minecraft:mangrove_leaves", 22 | "minecraft:mangrove_propagule", 23 | "minecraft:short_grass", 24 | "minecraft:fern", 25 | "minecraft:pink_petals", 26 | "minecraft:sunflower", 27 | "minecraft:lilac", 28 | "minecraft:rose_bush", 29 | "minecraft:peony", 30 | "minecraft:sugar_cane", 31 | "minecraft:cactus", 32 | "minecraft:bamboo", 33 | "minecraft:bamboo_sapling", 34 | "minecraft:red_mushroom", 35 | "minecraft:brown_mushroom", 36 | "minecraft:nether_wart", 37 | "minecraft:crimson_fungus", 38 | "minecraft:warped_fungus", 39 | "minecraft:crimson_nylium", 40 | "minecraft:warped_nylium", 41 | "minecraft:twisting_vines", 42 | "minecraft:twisting_vines_plant", 43 | "minecraft:weeping_vines", 44 | "minecraft:weeping_vines_plant", 45 | "minecraft:cave_vines", 46 | "minecraft:cave_vines_plant", 47 | "minecraft:small_dripleaf", 48 | "minecraft:big_dripleaf", 49 | "minecraft:big_dripleaf_stem", 50 | "minecraft:seagrass", 51 | "minecraft:sea_pickle", 52 | "minecraft:kelp", 53 | "minecraft:kelp_plant", 54 | "minecraft:glow_lichen" 55 | ] 56 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/winter_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:spruce_sapling", 6 | "minecraft:sweet_berry_bush" 7 | ] 8 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/block/year_round_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "minecraft:oak_sapling", 5 | "minecraft:red_mushroom", 6 | "minecraft:brown_mushroom", 7 | "minecraft:nether_wart", 8 | "minecraft:crimson_fungus", 9 | "minecraft:warped_fungus", 10 | "minecraft:cave_vines", 11 | "minecraft:cave_vines_plant" 12 | ] 13 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/item/autumn_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:birch_sapling", 6 | "minecraft:spruce_sapling", 7 | "minecraft:dark_oak_sapling", 8 | "minecraft:wheat_seeds", 9 | "minecraft:pumpkin_seeds", 10 | "minecraft:beetroot_seeds", 11 | "minecraft:carrot" 12 | ] 13 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/item/spring_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:birch_sapling", 6 | "minecraft:spruce_sapling", 7 | "minecraft:cherry_sapling", 8 | "minecraft:azalea", 9 | "minecraft:flowering_azalea", 10 | "minecraft:sweet_berries", 11 | "minecraft:bamboo", 12 | "minecraft:carrot", 13 | "minecraft:potato" 14 | ] 15 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/item/summer_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:jungle_sapling", 6 | "minecraft:acacia_sapling", 7 | "minecraft:mangrove_leaves", 8 | "minecraft:mangrove_propagule", 9 | "minecraft:azalea", 10 | "minecraft:flowering_azalea", 11 | "minecraft:bamboo", 12 | "minecraft:cactus", 13 | "minecraft:sugar_cane", 14 | "minecraft:wheat_seeds", 15 | "minecraft:melon_seeds", 16 | "minecraft:cocoa_beans", 17 | "minecraft:torchflower_seeds", 18 | "minecraft:pitcher_pod" 19 | ] 20 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/item/winter_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "#sereneseasons:year_round_crops", 5 | "minecraft:spruce_sapling", 6 | "minecraft:sweet_berries" 7 | ] 8 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/item/year_round_crops.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "minecraft:oak_sapling", 5 | "minecraft:red_mushroom", 6 | "minecraft:brown_mushroom", 7 | "minecraft:nether_wart", 8 | "minecraft:crimson_fungus", 9 | "minecraft:warped_fungus", 10 | "minecraft:glow_berries" 11 | ] 12 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/worldgen/biome/blacklisted_biomes.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "minecraft:lush_caves", 4 | "minecraft:dripstone_caves", 5 | "minecraft:deep_dark", 6 | "minecraft:ocean", 7 | "minecraft:deep_ocean", 8 | "minecraft:frozen_ocean", 9 | "minecraft:deep_frozen_ocean", 10 | "minecraft:cold_ocean", 11 | "minecraft:deep_cold_ocean", 12 | "minecraft:lukewarm_ocean", 13 | "minecraft:deep_lukewarm_ocean", 14 | "minecraft:warm_ocean", 15 | "minecraft:river", 16 | "minecraft:beach", 17 | "minecraft:stony_shore", 18 | "minecraft:the_void" 19 | ] 20 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/worldgen/biome/infertile_biomes.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | ] 4 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/worldgen/biome/lesser_color_change_biomes.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "minecraft:swamp" 4 | ] 5 | } -------------------------------------------------------------------------------- /common/src/main/resources/data/sereneseasons/tags/worldgen/biome/tropical_biomes.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "minecraft:desert", 4 | "minecraft:badlands", 5 | "minecraft:wooded_badlands", 6 | "minecraft:eroded_badlands", 7 | "minecraft:savanna", 8 | "minecraft:savanna_plateau", 9 | "minecraft:windswept_savanna", 10 | "minecraft:mangrove_swamp", 11 | "minecraft:jungle", 12 | "minecraft:sparse_jungle", 13 | "minecraft:bamboo_jungle", 14 | "minecraft:mushroom_fields", 15 | "minecraft:warm_ocean" 16 | ] 17 | } -------------------------------------------------------------------------------- /common/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "Resources used for Serene Seasons", 4 | "pack_format": 61 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /common/src/main/resources/sereneseasons.accesswidener: -------------------------------------------------------------------------------- 1 | accessWidener v2 named 2 | 3 | # Block entity registration 4 | accessible class net/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier 5 | 6 | # Biome temperature 7 | accessible method net/minecraft/world/level/biome/Biome getTemperature (Lnet/minecraft/core/BlockPos;I)F 8 | 9 | # Color resolvers 10 | mutable field net/minecraft/client/renderer/BiomeColors GRASS_COLOR_RESOLVER Lnet/minecraft/world/level/ColorResolver; 11 | mutable field net/minecraft/client/renderer/BiomeColors FOLIAGE_COLOR_RESOLVER Lnet/minecraft/world/level/ColorResolver; 12 | 13 | # Game rules 14 | accessible method net/minecraft/world/level/GameRules register (Ljava/lang/String;Lnet/minecraft/world/level/GameRules$Category;Lnet/minecraft/world/level/GameRules$Type;)Lnet/minecraft/world/level/GameRules$Key; 15 | accessible method net/minecraft/world/level/GameRules$BooleanValue create (Z)Lnet/minecraft/world/level/GameRules$Type; 16 | 17 | # Seasonal melting 18 | accessible field net/minecraft/server/level/ChunkMap level Lnet/minecraft/server/level/ServerLevel; 19 | accessible method net/minecraft/server/level/ChunkMap getChunks ()Ljava/lang/Iterable; 20 | accessible method net/minecraft/server/level/ChunkMap anyPlayerCloseEnoughForSpawning (Lnet/minecraft/world/level/ChunkPos;)Z 21 | accessible method net/minecraft/world/level/block/IceBlock melt (Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V 22 | 23 | # Commands 24 | accessible field net/minecraft/commands/synchronization/ArgumentTypeInfos BY_CLASS Ljava/util/Map; 25 | 26 | accessible method net/minecraft/world/level/block/entity/BlockEntityType (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;Ljava/util/Set;)V 27 | 28 | -------------------------------------------------------------------------------- /common/src/main/resources/sereneseasons.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "sereneseasons.mixin", 4 | "compatibilityLevel": "JAVA_17", 5 | "refmap": "sereneseasons.refmap.json", 6 | "mixins": [ 7 | "MixinBiome", 8 | "MixinBlockStateBase", 9 | "MixinLevel", 10 | "MixinServerLevel" 11 | ], 12 | "client": [ 13 | "client.MixinBiomeClient", 14 | "client.MixinSelectItemModelProperties", 15 | "client.MixinRangeSelectItemModelProperties", 16 | "client.MixinWeatherEffectRenderer" 17 | ], 18 | "injectors": { 19 | "defaultRequire": 1 20 | }, 21 | "minVersion": "0.8.4" 22 | } -------------------------------------------------------------------------------- /common/src/main/resources/sereneseasons_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/common/src/main/resources/sereneseasons_logo.png -------------------------------------------------------------------------------- /fabric/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "fabric-loom" version "1.10-SNAPSHOT" 3 | id "com.matthewprenger.cursegradle" version "1.4.0" 4 | } 5 | 6 | base.archivesName.set("${mod_name}-fabric") 7 | 8 | dependencies { 9 | minecraft "com.mojang:minecraft:${minecraft_version}" 10 | mappings loom.officialMojangMappings() 11 | compileOnly project(":Common") 12 | modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" 13 | modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" 14 | modImplementation "com.github.glitchfiend:GlitchCore-fabric:${minecraft_version}-${glitchcore_version}" 15 | implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2' 16 | 17 | // Dependencies embedded in final jar 18 | include implementation("com.electronwill.night-config:toml:${nightconfig_version}") 19 | include implementation("com.electronwill.night-config:core:${nightconfig_version}") 20 | include implementation("net.jodah:typetools:0.6.3") 21 | } 22 | 23 | loom { 24 | accessWidenerPath = project(":Common").file("src/main/resources/${mod_id}.accesswidener") 25 | mixin { 26 | defaultRefmapName.set("${mod_id}.refmap.json") 27 | } 28 | runs { 29 | client { 30 | client() 31 | setConfigName("Fabric Client") 32 | ideConfigGenerated(true) 33 | runDir("run") 34 | } 35 | server { 36 | server() 37 | setConfigName("Fabric Server") 38 | ideConfigGenerated(true) 39 | runDir("run") 40 | } 41 | } 42 | } 43 | 44 | processResources { 45 | from project(":Common").sourceSets.main.resources 46 | } 47 | 48 | tasks.withType(JavaCompile) { 49 | source(project(":Common").sourceSets.main.allSource) 50 | } 51 | 52 | curseforge { 53 | apiKey = project.findProperty('curseApiKey') ?: 'unset' 54 | project { 55 | id = mod_curseforge_id 56 | 57 | if (changelog_file.exists()) { 58 | changelog = changelog_file 59 | } 60 | 61 | releaseType = release_channel 62 | addGameVersion minecraft_version 63 | addGameVersion name 64 | 65 | mainArtifact(remapJar) { 66 | displayName = "${mod_display_name} ${name} ${version}" 67 | } 68 | 69 | relations { 70 | requiredDependency 'fabric-api' 71 | requiredDependency 'glitchcore' 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /fabric/src/main/java/sereneseasons/fabric/core/SereneSeasonsFabric.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.fabric.core; 6 | 7 | import glitchcore.fabric.GlitchCoreInitializer; 8 | import sereneseasons.core.SereneSeasons; 9 | import sereneseasons.init.ModClient; 10 | 11 | public class SereneSeasonsFabric implements GlitchCoreInitializer 12 | { 13 | @Override 14 | public void onInitialize() 15 | { 16 | SereneSeasons.init(); 17 | } 18 | 19 | @Override 20 | public void onInitializeClient() 21 | { 22 | ModClient.setup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /fabric/src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "${mod_id}", 4 | "version": "${mod_version}", 5 | "name": "${mod_name}", 6 | "description": "${mod_description}", 7 | "authors": [ 8 | "Adubbz", 9 | "Forstride" 10 | ], 11 | "contact": { 12 | "homepage": "${mod_page_url}", 13 | "sources": "${mod_git_url}" 14 | }, 15 | "license": "${mod_license}", 16 | "icon": "assets/sereneseasons/textures/item/ss_icon.png", 17 | "environment": "*", 18 | "entrypoints": { 19 | "glitchcore": [ 20 | "sereneseasons.fabric.core.SereneSeasonsFabric" 21 | ] 22 | }, 23 | "mixins": [ 24 | "${mod_id}.mixins.json", 25 | "${mod_id}.fabric.mixins.json" 26 | ], 27 | "depends": { 28 | "fabricloader": "*", 29 | "fabric": "*", 30 | "minecraft": "${minecraft_version}", 31 | "java": ">=21", 32 | "glitchcore": ">=${glitchcore_version}" 33 | }, 34 | "accessWidener": "${mod_id}.accesswidener", 35 | "custom": { 36 | "modmenu": { 37 | "links": { 38 | "modmenu.discord": "${mod_discord_url}" 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /fabric/src/main/resources/sereneseasons.fabric.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "sereneseasons.fabric.mixin", 4 | "compatibilityLevel": "JAVA_17", 5 | "refmap": "sereneseasons.refmap.json", 6 | "mixins": [ 7 | ], 8 | "client": [ 9 | ], 10 | "injectors": { 11 | "defaultRequire": 1 12 | }, 13 | "minVersion": "0.8.4" 14 | } -------------------------------------------------------------------------------- /forge/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "net.minecraftforge.gradle" version "6.+" 3 | id "org.spongepowered.mixin" version "0.7-SNAPSHOT" 4 | id "com.matthewprenger.cursegradle" version "1.4.0" 5 | } 6 | 7 | base.archivesName.set("${mod_name}-forge") 8 | 9 | mixin { 10 | config("${mod_id}.mixins.json") 11 | config("${mod_id}.forge.mixins.json") 12 | } 13 | 14 | // As of 1.20.6 Forge no longer has reobf tasks. This has broken mixins adding configs correctly into the manifest file 15 | // See: https://github.com/SpongePowered/MixinGradle/blob/f800b26d2b180d98d9aa9355e5b3086d71218508/src/main/groovy/org/spongepowered/asm/gradle/plugins/MixinExtension.groovy#L184 16 | // Instead, we will do it ourselves. 17 | jar { 18 | manifest { 19 | attributes([ 20 | 'MixinConfigs': "${mod_id}.mixins.json" + "," + "${mod_id}.forge.mixins.json", 21 | ]) 22 | } 23 | } 24 | 25 | minecraft { 26 | mappings channel: 'official', version: minecraft_version 27 | copyIdeResources = true //Calls processResources when in dev 28 | 29 | if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) { 30 | accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') 31 | } 32 | 33 | reobf = false 34 | 35 | runs { 36 | client { 37 | workingDirectory project.file('run') 38 | ideaModule "${rootProject.name}.${project.name}.main" 39 | taskName 'Client' 40 | mods { 41 | modClientRun { 42 | source sourceSets.main 43 | } 44 | } 45 | } 46 | 47 | server { 48 | workingDirectory project.file('run') 49 | ideaModule "${rootProject.name}.${project.name}.main" 50 | taskName 'Server' 51 | mods { 52 | modServerRun { 53 | source sourceSets.main 54 | } 55 | } 56 | } 57 | } 58 | } 59 | 60 | dependencies { 61 | minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" 62 | compileOnly project(":Common") 63 | implementation 'com.github.glitchfiend:GlitchCore-forge:' + minecraft_version + '-' + glitchcore_version 64 | annotationProcessor 'org.spongepowered:mixin:0.8.5-SNAPSHOT:processor' 65 | } 66 | 67 | tasks.withType(JavaCompile).configureEach { 68 | source(project(":Common").sourceSets.main.allSource) 69 | } 70 | 71 | tasks.withType(Javadoc).configureEach { 72 | source(project(":Common").sourceSets.main.allJava) 73 | } 74 | 75 | tasks.named("sourcesJar", Jar) { 76 | from(project(":Common").sourceSets.main.allSource) 77 | } 78 | 79 | processResources { 80 | from project(":Common").sourceSets.main.resources 81 | } 82 | 83 | // Merge the resources and classes into the same directory. 84 | // This is done because java expects modules to be in a single directory. 85 | // And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem 86 | // This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later. 87 | sourceSets.each { 88 | def dir = layout.buildDirectory.dir("sourcesSets/$it.name") 89 | it.output.resourcesDir = dir 90 | it.java.destinationDirectory = dir 91 | } 92 | 93 | curseforge { 94 | apiKey = project.findProperty('curseApiKey') ?: 'unset' 95 | project { 96 | id = mod_curseforge_id 97 | 98 | if (changelog_file.exists()) { 99 | changelog = changelog_file 100 | } 101 | 102 | releaseType = release_channel 103 | addGameVersion minecraft_version 104 | addGameVersion name 105 | 106 | mainArtifact(jar) { 107 | displayName = "${mod_display_name} ${name} ${version}" 108 | } 109 | 110 | relations { 111 | requiredDependency 'glitchcore' 112 | } 113 | } 114 | } -------------------------------------------------------------------------------- /forge/src/main/java/sereneseasons/forge/core/SereneSeasonsForge.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.forge.core; 2 | 3 | import net.minecraftforge.eventbus.api.IEventBus; 4 | import net.minecraftforge.fml.common.Mod; 5 | import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; 6 | import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; 7 | import sereneseasons.core.SereneSeasons; 8 | import sereneseasons.init.ModClient; 9 | 10 | @Mod(value = SereneSeasons.MOD_ID) 11 | public class SereneSeasonsForge 12 | { 13 | public SereneSeasonsForge(FMLJavaModLoadingContext context) 14 | { 15 | IEventBus bus = context.getModEventBus(); 16 | bus.addListener(this::clientSetup); 17 | 18 | SereneSeasons.init(); 19 | } 20 | 21 | private void clientSetup(final FMLClientSetupEvent event) 22 | { 23 | event.enqueueWork(ModClient::setup); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /forge/src/main/resources/META-INF/accesstransformer.cfg: -------------------------------------------------------------------------------- 1 | #Season colouring 2 | public-f net.minecraft.client.renderer.BiomeColors f_108789_ #GRASS_COLOR 3 | public-f net.minecraft.client.renderer.BiomeColors f_108790_ #FOLIAGE_COLOR 4 | 5 | # Seasonal melting 6 | public net.minecraft.server.level.ChunkMap f_140133_ #level 7 | public net.minecraft.server.level.ChunkMap m_140416_()Ljava/lang/Iterable; #getChunks 8 | public net.minecraft.server.level.ChunkMap m_183879_(Lnet/minecraft/world/level/ChunkPos;)Z #anyPlayerCloseEnoughForSpawning 9 | public net.minecraft.world.level.block.IceBlock m_54168_(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V #melt 10 | 11 | # Biome temperature 12 | public net.minecraft.world.level.biome.Biome m_47505_(Lnet/minecraft/core/BlockPos;I)F #getTemperature 13 | 14 | # Commands 15 | public net.minecraft.commands.synchronization.ArgumentTypeInfos f_235379_ #BY_CLASS 16 | 17 | public net.minecraft.world.level.block.entity.BlockEntityType (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;Ljava/util/Set;)V 18 | 19 | public net.minecraft.client.data.models.ItemModelGenerators *() -------------------------------------------------------------------------------- /forge/src/main/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader="javafml" 2 | license="${mod_license}" 3 | loaderVersion="${forge_loader_version_range}" 4 | issueTrackerURL="${mod_issues_url}" 5 | displayURL="${mod_page_url}" 6 | logoFile="${mod_id}_logo.png" 7 | 8 | [[mods]] 9 | modId="${mod_id}" 10 | version="${mod_version}" 11 | displayName="${mod_display_name}" 12 | authors="${mod_authors}" 13 | description="${mod_description}" 14 | 15 | [[dependencies.${mod_id}]] 16 | modId="forge" 17 | mandatory=true 18 | versionRange="${forge_version_range}" 19 | ordering="NONE" 20 | side="BOTH" 21 | 22 | [[dependencies.${mod_id}]] 23 | modId="glitchcore" 24 | mandatory=true 25 | versionRange="[${glitchcore_version},)" 26 | ordering="AFTER" 27 | side="BOTH" -------------------------------------------------------------------------------- /forge/src/main/resources/sereneseasons.forge.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "sereneseasons.forge.mixin", 4 | "compatibilityLevel": "JAVA_17", 5 | "refmap": "sereneseasons.refmap.json", 6 | "mixins": [ 7 | ], 8 | "client": [ 9 | ], 10 | "injectors": { 11 | "defaultRequire": 1 12 | }, 13 | "minVersion": "0.8.4" 14 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project 2 | group=com.github.glitchfiend 3 | release_channel=beta 4 | 5 | # Common 6 | minecraft_version=1.21.5 7 | 8 | # Forge 9 | forge_version=55.0.1 10 | forge_version_range=[55.0.1,) 11 | forge_loader_version_range=[55,) 12 | 13 | # NeoForge 14 | neoforge_version=21.5.4-beta 15 | neoforge_version_range=[21.5,) 16 | neoforge_loader_version_range=[1,) 17 | 18 | # Fabric 19 | fabric_version=0.119.5+1.21.5 20 | fabric_loader_version=0.16.10 21 | 22 | # Mod options 23 | mod_id=sereneseasons 24 | mod_name=SereneSeasons 25 | mod_display_name=Serene Seasons 26 | mod_authors=Adubbz, Forstride 27 | mod_description=Adds seasons with changing colors, temperature shifting, and more! 28 | mod_license=All Rights Reserved 29 | mod_page_url=https://www.curseforge.com/minecraft/mc-mods/serene-seasons 30 | mod_issues_url=https://github.com/Glitchfiend/SereneSeasons/issues 31 | mod_git_url=https://github.com/Glitchfiend/SereneSeasons 32 | mod_scm_url=scm:git:git@github.com:Glitchfiend/SereneSeasons.git 33 | mod_discord_url=https://discord.gg/GyyzU6T 34 | mod_curseforge_id=291874 35 | mod_modrinth_id=serene-seasons 36 | 37 | # Gradle 38 | org.gradle.jvmargs=-Xmx3G 39 | org.gradle.daemon=false 40 | 41 | # Dependencies 42 | nightconfig_version=3.6.7 43 | glitchcore_version=2.5.0.0 44 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchfiend/SereneSeasons/96b3b7f21e19b4900f59aaaa867e2db4c0a4de61/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /neoforge/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "net.neoforged.gradle.userdev" version "7.+" 3 | id "net.neoforged.gradle.mixin" version "7.+" 4 | id "com.matthewprenger.cursegradle" version "1.4.0" 5 | } 6 | 7 | base.archivesName.set("${mod_name}-neoforge") 8 | 9 | minecraft { 10 | mappings { 11 | channel = official() 12 | version.put "minecraft", minecraft_version 13 | } 14 | accessTransformers.file('src/main/resources/META-INF/accesstransformer.cfg') 15 | } 16 | 17 | runs { 18 | configureEach { 19 | modSource project.sourceSets.main 20 | } 21 | 22 | client { 23 | workingDirectory.set(project.file('run')) 24 | systemProperty 'neoforge.enabledGameTestNamespaces', mod_id 25 | } 26 | 27 | server { 28 | workingDirectory.set(project.file('run')) 29 | systemProperty 'neoforge.enabledGameTestNamespaces', mod_id 30 | programArgument '--nogui' 31 | } 32 | 33 | clientData { 34 | programArguments.addAll '--mod', project.mod_id, '--all', '--output', project(':Common').file('src/generated/resources/').getAbsolutePath(), '--existing', project(':Common').file('src/main/resources/').getAbsolutePath() 35 | } 36 | } 37 | 38 | dependencies { 39 | implementation "net.neoforged:neoforge:${neoforge_version}" 40 | compileOnly project(":Common") 41 | implementation 'com.github.glitchfiend:GlitchCore-neoforge:' + minecraft_version + '-' + glitchcore_version 42 | } 43 | 44 | // NeoGradle compiles the game, but we don't want to add our common code to the game's code 45 | TaskCollection.metaClass.excludingNeoTasks = { -> 46 | delegate.matching { !it.name.startsWith("neo") } 47 | } 48 | 49 | tasks.withType(JavaCompile).excludingNeoTasks().configureEach { 50 | source(project(":Common").sourceSets.main.allSource) 51 | } 52 | 53 | tasks.withType(Javadoc).excludingNeoTasks().configureEach { 54 | source(project(":Common").sourceSets.main.allJava) 55 | } 56 | 57 | tasks.named("sourcesJar", Jar) { 58 | from(project(":Common").sourceSets.main.allSource) 59 | } 60 | 61 | tasks.withType(ProcessResources).excludingNeoTasks().configureEach { 62 | from project(":Common").sourceSets.main.resources 63 | filesMatching("${mod_id}.mixins.json") { 64 | expand "refmap_target": "${mod_id}." 65 | } 66 | } 67 | 68 | curseforge { 69 | apiKey = project.findProperty('curseApiKey') ?: 'unset' 70 | project { 71 | id = mod_curseforge_id 72 | 73 | if (changelog_file.exists()) { 74 | changelog = changelog_file 75 | } 76 | 77 | releaseType = release_channel 78 | addGameVersion minecraft_version 79 | addGameVersion name 80 | 81 | mainArtifact(jar) { 82 | displayName = "${mod_display_name} ${name} ${version}" 83 | } 84 | 85 | relations { 86 | requiredDependency 'glitchcore' 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /neoforge/src/main/java/sereneseasons/datagen/DataGenerationHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2022, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.datagen; 6 | 7 | import net.minecraft.data.DataGenerator; 8 | import net.minecraft.data.PackOutput; 9 | import net.neoforged.bus.api.SubscribeEvent; 10 | import net.neoforged.fml.common.EventBusSubscriber; 11 | import net.neoforged.neoforge.data.event.GatherDataEvent; 12 | import sereneseasons.datagen.models.SSModelProvider; 13 | import sereneseasons.datagen.provider.SSRecipeProvider; 14 | 15 | @EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD) 16 | public class DataGenerationHandler 17 | { 18 | @SubscribeEvent 19 | public static void onGatherData(GatherDataEvent.Client event) 20 | { 21 | DataGenerator generator = event.getGenerator(); 22 | PackOutput output = generator.getPackOutput(); 23 | 24 | // Client 25 | generator.addProvider(true, new SSModelProvider(output)); 26 | 27 | // Recipes 28 | generator.addProvider(true, new SSRecipeProvider.Runner(output, event.getLookupProvider())); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /neoforge/src/main/java/sereneseasons/datagen/models/SSBlockModelGenerators.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.datagen.models; 6 | 7 | import net.minecraft.client.data.models.BlockModelGenerators; 8 | import net.minecraft.client.data.models.ItemModelOutput; 9 | import net.minecraft.client.data.models.blockstates.*; 10 | import net.minecraft.client.data.models.model.*; 11 | import net.minecraft.client.renderer.block.model.VariantMutator; 12 | import net.minecraft.resources.ResourceLocation; 13 | import net.minecraft.world.level.block.Blocks; 14 | import net.minecraft.world.level.block.state.properties.BlockStateProperties; 15 | import sereneseasons.api.SSBlocks; 16 | import sereneseasons.api.season.Season; 17 | import sereneseasons.block.SeasonSensorBlock; 18 | 19 | import java.util.function.BiConsumer; 20 | import java.util.function.Consumer; 21 | 22 | public class SSBlockModelGenerators extends BlockModelGenerators 23 | { 24 | final Consumer blockStateOutput; 25 | final BiConsumer modelOutput; 26 | 27 | public SSBlockModelGenerators(Consumer blockStateOutput, ItemModelOutput itemModelOutput, BiConsumer modelOutput) 28 | { 29 | super(blockStateOutput, itemModelOutput, modelOutput); 30 | this.blockStateOutput = blockStateOutput; 31 | this.modelOutput = modelOutput; 32 | } 33 | 34 | private void createSeasonSensor() 35 | { 36 | ResourceLocation sideTexture = TextureMapping.getBlockTexture(SSBlocks.SEASON_SENSOR, "_side"); 37 | TextureMapping textures = new TextureMapping() 38 | .put(TextureSlot.TOP, TextureMapping.getBlockTexture(SSBlocks.SEASON_SENSOR, "_summer_top")) 39 | .put(TextureSlot.SIDE, sideTexture); 40 | TextureMapping autumnTextures = new TextureMapping() 41 | .put(TextureSlot.TOP, TextureMapping.getBlockTexture(SSBlocks.SEASON_SENSOR, "_autumn_top")) 42 | .put(TextureSlot.SIDE, sideTexture); 43 | TextureMapping winterTextures = new TextureMapping() 44 | .put(TextureSlot.TOP, TextureMapping.getBlockTexture(SSBlocks.SEASON_SENSOR, "_winter_top")) 45 | .put(TextureSlot.SIDE, sideTexture); 46 | TextureMapping springTextures = new TextureMapping() 47 | .put(TextureSlot.TOP, TextureMapping.getBlockTexture(SSBlocks.SEASON_SENSOR, "_spring_top")) 48 | .put(TextureSlot.SIDE, sideTexture); 49 | 50 | this.blockStateOutput.accept( 51 | MultiVariantGenerator.dispatch(SSBlocks.SEASON_SENSOR).with( 52 | PropertyDispatch.initial(SeasonSensorBlock.SEASON) 53 | .select( 54 | Season.SUMMER.ordinal(), 55 | plainVariant(ModelTemplates.DAYLIGHT_DETECTOR.createWithSuffix(SSBlocks.SEASON_SENSOR, "_summer", textures, this.modelOutput)) 56 | ) 57 | .select( 58 | Season.AUTUMN.ordinal(), 59 | plainVariant(ModelTemplates.DAYLIGHT_DETECTOR.createWithSuffix(SSBlocks.SEASON_SENSOR, "_autumn", autumnTextures, this.modelOutput)) 60 | ) 61 | .select( 62 | Season.WINTER.ordinal(), 63 | plainVariant(ModelTemplates.DAYLIGHT_DETECTOR.createWithSuffix(SSBlocks.SEASON_SENSOR, "_winter", winterTextures, this.modelOutput)) 64 | ) 65 | .select( 66 | Season.SPRING.ordinal(), 67 | plainVariant(ModelTemplates.DAYLIGHT_DETECTOR.create(SSBlocks.SEASON_SENSOR, springTextures, this.modelOutput)) 68 | ) 69 | ) 70 | ); 71 | } 72 | 73 | @Override 74 | public void run() 75 | { 76 | this.createSeasonSensor(); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /neoforge/src/main/java/sereneseasons/datagen/models/SSItemModelGenerators.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.datagen.models; 6 | 7 | import net.minecraft.client.data.models.ItemModelGenerators; 8 | import net.minecraft.client.data.models.ItemModelOutput; 9 | import net.minecraft.client.data.models.model.ItemModelUtils; 10 | import net.minecraft.client.data.models.model.ModelInstance; 11 | import net.minecraft.client.data.models.model.ModelTemplates; 12 | import net.minecraft.client.renderer.item.ItemModel; 13 | import net.minecraft.client.renderer.item.RangeSelectItemModel; 14 | import net.minecraft.resources.ResourceLocation; 15 | import net.minecraft.world.item.Item; 16 | import sereneseasons.api.SSItems; 17 | import sereneseasons.client.item.ContextCalendarType; 18 | import sereneseasons.client.item.SeasonTimeProperty; 19 | import sereneseasons.item.CalendarType; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | import java.util.Locale; 24 | import java.util.function.BiConsumer; 25 | 26 | public class SSItemModelGenerators extends ItemModelGenerators 27 | { 28 | private final ItemModelOutput itemModelOutput; 29 | private final BiConsumer modelOutput; 30 | 31 | public SSItemModelGenerators(ItemModelOutput itemModelOutput, BiConsumer modelOutput) { 32 | super(itemModelOutput, modelOutput); 33 | this.itemModelOutput = itemModelOutput; 34 | this.modelOutput = modelOutput; 35 | } 36 | 37 | public void generateCalendarItem(Item item) { 38 | // Null calendar 39 | ItemModel.Unbaked nullCalendar = ItemModelUtils.plainModel(this.createFlatItemModel(item, "_null", ModelTemplates.FLAT_ITEM)); 40 | 41 | List standardEntries = new ArrayList<>(); 42 | List tropicalEntries = new ArrayList<>(); 43 | 44 | ItemModel.Unbaked[] standardModels = new ItemModel.Unbaked[12]; 45 | ItemModel.Unbaked[] tropicalModels = new ItemModel.Unbaked[6]; 46 | 47 | 48 | // Create standard entries and tropical models 49 | for (int i = 0; i < 12; i++) 50 | { 51 | standardModels[i] = ItemModelUtils.plainModel(this.createFlatItemModel(item, String.format("_%02d", i), ModelTemplates.FLAT_ITEM)); 52 | standardEntries.add(ItemModelUtils.override(standardModels[i], i / 12.0F)); 53 | if (i < 6) tropicalModels[i] = ItemModelUtils.plainModel(this.createFlatItemModel(item, String.format("_tropical_%02d", i), ModelTemplates.FLAT_ITEM)); 54 | } 55 | 56 | // Create tropical overrides 57 | for (int i = 0; i < 12; i++) 58 | { 59 | tropicalEntries.add(ItemModelUtils.override(tropicalModels[((i + 3) / 2) % 6], i / 12.0F)); 60 | } 61 | 62 | this.itemModelOutput 63 | .accept( 64 | item, 65 | ItemModelUtils.select(new ContextCalendarType(), 66 | ItemModelUtils.when(CalendarType.STANDARD, ItemModelUtils.rangeSelect(new SeasonTimeProperty(), 1.0F, standardEntries)), 67 | ItemModelUtils.when(CalendarType.TROPICAL, ItemModelUtils.rangeSelect(new SeasonTimeProperty(), 1.0F, tropicalEntries)), 68 | ItemModelUtils.when(CalendarType.NONE, nullCalendar)) 69 | ); 70 | } 71 | 72 | @Override 73 | public void run() 74 | { 75 | this.generateFlatItem(SSItems.SS_ICON, ModelTemplates.FLAT_ITEM); 76 | this.generateCalendarItem(SSItems.CALENDAR); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /neoforge/src/main/java/sereneseasons/datagen/models/SSModelProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.datagen.models; 6 | 7 | import glitchcore.data.ModelProviderBase; 8 | import net.minecraft.client.data.models.BlockModelGenerators; 9 | import net.minecraft.client.data.models.ItemModelGenerators; 10 | import net.minecraft.client.data.models.ItemModelOutput; 11 | import net.minecraft.client.data.models.blockstates.BlockModelDefinitionGenerator; 12 | import net.minecraft.client.data.models.model.ModelInstance; 13 | import net.minecraft.data.PackOutput; 14 | import net.minecraft.resources.ResourceLocation; 15 | import sereneseasons.core.SereneSeasons; 16 | 17 | import java.util.function.BiConsumer; 18 | import java.util.function.Consumer; 19 | 20 | public class SSModelProvider extends ModelProviderBase 21 | { 22 | public SSModelProvider(PackOutput output) 23 | { 24 | super(output, SereneSeasons.MOD_ID); 25 | } 26 | 27 | @Override 28 | protected BlockModelGenerators createBlockModelGenerators(Consumer blockStateOutput, ItemModelOutput itemModelOutput, BiConsumer modelOutput) 29 | { 30 | return new SSBlockModelGenerators(blockStateOutput, itemModelOutput, modelOutput); 31 | } 32 | 33 | @Override 34 | protected ItemModelGenerators createItemModelGenerators(ItemModelOutput itemModelOutput, BiConsumer modelOutput) 35 | { 36 | return new SSItemModelGenerators(itemModelOutput, modelOutput); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /neoforge/src/main/java/sereneseasons/datagen/provider/SSRecipeProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2024, the Glitchfiend Team. 3 | * All rights reserved. 4 | ******************************************************************************/ 5 | package sereneseasons.datagen.provider; 6 | 7 | import net.minecraft.core.HolderLookup; 8 | import net.minecraft.data.PackOutput; 9 | import net.minecraft.data.recipes.RecipeCategory; 10 | import net.minecraft.data.recipes.RecipeOutput; 11 | import net.minecraft.data.recipes.RecipeProvider; 12 | import net.minecraft.data.recipes.ShapedRecipeBuilder; 13 | import net.minecraft.data.recipes.packs.VanillaRecipeProvider; 14 | import net.minecraft.world.item.Items; 15 | import net.minecraft.world.level.block.Blocks; 16 | import sereneseasons.api.SSBlocks; 17 | import sereneseasons.api.SSItems; 18 | 19 | import java.util.concurrent.CompletableFuture; 20 | 21 | public class SSRecipeProvider extends RecipeProvider 22 | { 23 | public SSRecipeProvider(HolderLookup.Provider provider, RecipeOutput output) 24 | { 25 | super(provider, output); 26 | } 27 | 28 | @Override 29 | protected void buildRecipes() 30 | { 31 | this.shaped(RecipeCategory.REDSTONE, SSBlocks.SEASON_SENSOR).define('G', Items.GLASS).define('Q', Items.QUARTZ).define('C', SSItems.CALENDAR).define('#', Blocks.COBBLESTONE_SLAB).pattern("GGG").pattern("QCQ").pattern("###").unlockedBy("has_calendar", has(SSItems.CALENDAR)).save(output); 32 | this.shaped(RecipeCategory.TOOLS, SSItems.CALENDAR).define('P', Items.PAPER).define('C', Items.CLOCK).pattern("PPP").pattern("PCP").pattern("PPP").unlockedBy("has_clock", has(Items.CLOCK)).save(output); 33 | } 34 | 35 | public static class Runner extends RecipeProvider.Runner 36 | { 37 | public Runner(PackOutput p_365442_, CompletableFuture p_362168_) { 38 | super(p_365442_, p_362168_); 39 | } 40 | 41 | @Override 42 | protected RecipeProvider createRecipeProvider(HolderLookup.Provider provider, RecipeOutput output) 43 | { 44 | return new SSRecipeProvider(provider, output); 45 | } 46 | 47 | @Override 48 | public String getName() { 49 | return "SS Recipes"; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /neoforge/src/main/java/sereneseasons/neoforge/core/SereneSeasonsNeoForge.java: -------------------------------------------------------------------------------- 1 | package sereneseasons.neoforge.core; 2 | 3 | import glitchcore.neoforge.GlitchCoreNeoForge; 4 | import net.neoforged.bus.api.IEventBus; 5 | import net.neoforged.fml.common.Mod; 6 | import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; 7 | import sereneseasons.core.SereneSeasons; 8 | import sereneseasons.init.ModClient; 9 | 10 | @Mod(value = SereneSeasons.MOD_ID) 11 | public class SereneSeasonsNeoForge 12 | { 13 | public SereneSeasonsNeoForge(IEventBus bus) 14 | { 15 | bus.addListener(this::clientSetup); 16 | 17 | SereneSeasons.init(); 18 | GlitchCoreNeoForge.prepareModEventHandlers(bus); 19 | } 20 | 21 | private void clientSetup(final FMLClientSetupEvent event) 22 | { 23 | event.enqueueWork(ModClient::setup); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/accesstransformer.cfg: -------------------------------------------------------------------------------- 1 | #Season colouring 2 | public-f net.minecraft.client.renderer.BiomeColors GRASS_COLOR_RESOLVER 3 | public-f net.minecraft.client.renderer.BiomeColors FOLIAGE_COLOR_RESOLVER 4 | 5 | # Seasonal melting 6 | public net.minecraft.server.level.ChunkMap level 7 | public net.minecraft.server.level.ChunkMap getChunks()Ljava/lang/Iterable; 8 | public net.minecraft.server.level.ChunkMap anyPlayerCloseEnoughForSpawning(Lnet/minecraft/world/level/ChunkPos;)Z 9 | public net.minecraft.world.level.block.IceBlock melt(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V 10 | 11 | # Biome temperature 12 | public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/BlockPos;I)F 13 | 14 | # Commands 15 | public net.minecraft.commands.synchronization.ArgumentTypeInfos BY_CLASS 16 | 17 | public net.minecraft.world.level.block.entity.BlockEntityType (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;Ljava/util/Set;)V 18 | 19 | public net.minecraft.client.data.models.ItemModelGenerators *() -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/neoforge.mods.toml: -------------------------------------------------------------------------------- 1 | modLoader="javafml" 2 | license="${mod_license}" 3 | loaderVersion="${neoforge_loader_version_range}" 4 | issueTrackerURL="${mod_issues_url}" 5 | displayURL="${mod_page_url}" 6 | logoFile="${mod_id}_logo.png" 7 | 8 | [[mixins]] 9 | config="${mod_id}.mixins.json" 10 | 11 | [[mixins]] 12 | config="${mod_id}.neoforge.mixins.json" 13 | 14 | [[mods]] 15 | modId="${mod_id}" 16 | version="${mod_version}" 17 | displayName="${mod_display_name}" 18 | authors="${mod_authors}" 19 | description="${mod_description}" 20 | 21 | [[dependencies.${mod_id}]] 22 | modId="neoforge" 23 | required=true 24 | versionRange="${neoforge_version_range}" 25 | ordering="NONE" 26 | side="BOTH" 27 | 28 | [[dependencies.${mod_id}]] 29 | modId="glitchcore" 30 | required=true 31 | versionRange="[${glitchcore_version},)" 32 | ordering="AFTER" 33 | side="BOTH" -------------------------------------------------------------------------------- /neoforge/src/main/resources/sereneseasons.neoforge.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "sereneseasons.neoforge.mixin", 4 | "compatibilityLevel": "JAVA_17", 5 | "refmap": "sereneseasons.refmap.json", 6 | "mixins": [ 7 | ], 8 | "client": [ 9 | ], 10 | "injectors": { 11 | "defaultRequire": 1 12 | }, 13 | "minVersion": "0.8.4" 14 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include("common", "forge", "neoforge", "fabric") 2 | 3 | pluginManagement.repositories { 4 | gradlePluginPortal() 5 | maven { 6 | name = "Fabric" 7 | url = "https://maven.fabricmc.net/" 8 | } 9 | maven { 10 | name = "NeoForge" 11 | url = "https://maven.neoforged.net/releases" 12 | } 13 | maven { 14 | name = "Forge" 15 | url = "https://maven.minecraftforge.net" 16 | } 17 | maven { 18 | name = "Sponge Snapshots" 19 | url = "https://repo.spongepowered.org/repository/maven-public/" 20 | } 21 | } 22 | 23 | rootProject.name = "SereneSeasons" 24 | 25 | // We want lowercase folder names but uppercase project names 26 | project(":common").name = "Common" 27 | project(":forge").name = "Forge" 28 | project(":neoforge").name = "NeoForge" 29 | project(":fabric").name = "Fabric" --------------------------------------------------------------------------------