-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
209 additions
and
156 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
common/src/generated/resources/.cache/34eff76d8db6df414572b0996d464f3a4bc943ee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
common/src/generated/resources/.cache/51dc2b66606c1345aa908ef96784ba8686abe32c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e → .../7dda471881370ae09913a072085433a4eb774f0b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// 1.21 2024-06-15T10:07:24.2355164 Recipes | ||
// 1.21.3 2024-10-29T11:57:32.3267901 SS Recipes | ||
e072858e57ee517a9ad673759ea337523f1faf58 data/sereneseasons/advancement/recipes/redstone/season_sensor.json | ||
a6e2e9061195651e5a5ebe536429b983725e47a8 data/sereneseasons/advancement/recipes/tools/calendar.json | ||
6dcfb1f16a07426dedd4bb0c22cf7e8875aaa637 data/sereneseasons/recipe/calendar.json | ||
3a8122eb3cd03dfa946e5daabcc7c0a9813346e2 data/sereneseasons/recipe/season_sensor.json | ||
8baddb9771f6e76a935fa1bf988623c65578b91f data/sereneseasons/recipe/calendar.json | ||
1e0108f730fc7055f414ae4274b89cda22b7a722 data/sereneseasons/recipe/season_sensor.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
package sereneseasons.init; | ||
|
||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.SoundType; | ||
import net.minecraft.world.level.block.state.BlockBehaviour; | ||
import sereneseasons.api.SSBlocks; | ||
import sereneseasons.block.SeasonSensorBlock; | ||
import sereneseasons.core.SereneSeasons; | ||
|
||
import java.util.function.BiConsumer; | ||
import java.util.function.Function; | ||
|
||
public class ModBlocks | ||
{ | ||
public static void registerBlocks(BiConsumer<ResourceLocation, Block> func) | ||
{ | ||
SSBlocks.SEASON_SENSOR = register(func, new SeasonSensorBlock(Block.Properties.of().strength(0.2F).sound(SoundType.STONE)), "season_sensor"); | ||
SSBlocks.SEASON_SENSOR = register(func, "season_sensor", SeasonSensorBlock::new, Block.Properties.of().strength(0.2F).sound(SoundType.STONE)); | ||
} | ||
|
||
private static Block register(BiConsumer<ResourceLocation, Block> func, Block block, String name) | ||
private static Block register(BiConsumer<ResourceLocation, Block> func, ResourceKey<Block> key, Function<BlockBehaviour.Properties, Block> factory, BlockBehaviour.Properties properties) | ||
{ | ||
func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), block); | ||
Block block = factory.apply(properties.setId(key)); | ||
func.accept(key.location(), block); | ||
return block; | ||
} | ||
|
||
private static Block register(BiConsumer<ResourceLocation, Block> func, String name, Function<BlockBehaviour.Properties, Block> factory, BlockBehaviour.Properties properties) | ||
{ | ||
return register(func, blockId(name), factory, properties); | ||
} | ||
|
||
private static ResourceKey<Block> blockId(String name) | ||
{ | ||
return ResourceKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
common/src/main/java/sereneseasons/mixin/client/MixinLevelRenderer.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
common/src/main/java/sereneseasons/mixin/client/MixinWeatherEffectRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/******************************************************************************* | ||
* Copyright 2022, the Glitchfiend Team. | ||
* All rights reserved. | ||
******************************************************************************/ | ||
package sereneseasons.mixin.client; | ||
|
||
import net.minecraft.client.renderer.WeatherEffectRenderer; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.biome.Biome; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
import sereneseasons.core.SereneSeasons; | ||
import sereneseasons.season.SeasonHooks; | ||
|
||
@Mixin(WeatherEffectRenderer.class) | ||
public class MixinWeatherEffectRenderer | ||
{ | ||
@Inject(method="getPrecipitationAt", at=@At(value = "HEAD"), cancellable = true) | ||
public void onGetPrecipitationAt(Level level, BlockPos pos, CallbackInfoReturnable<Biome.Precipitation> cir) | ||
{ | ||
cir.setReturnValue(SeasonHooks.getPrecipitationAtSeasonal(level, level.getBiome(pos), pos, level.getSeaLevel())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.