Skip to content

Commit

Permalink
- reflectors can now be placed in the Solar Cooker GUI and are render…
Browse files Browse the repository at this point in the history
…ed as additional lids

- default reflector speed factor was raised to 0.5
- default recipe type of the Solar Cooker was changed to "smelting"
- reflector blocks were removed
  • Loading branch information
cech12 committed Jul 7, 2024
1 parent 65efe2f commit e943734
Show file tree
Hide file tree
Showing 54 changed files with 335 additions and 945 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.21-4.0.0.0] - 2024-06-30
## [1.21-4.0.0.0] - 2024-07-07
### Changed
- updated to Minecraft 1.21 (Fabric 0.100.3+1.21, Neoforge 21.0.42-beta, Forge 51.0.18)
- updated Cloth Config support (15.0.127) (Fabric/Quilt)
- updated ModMenu support (11.0.1) (Fabric/Quilt)
- updated JEI support (19.0.0.11) (Forge & NeoForge)
- updated JEI support (19.0.0.11) (all loaders)
- updated REI support (16.0.729) (Fabric/Quilt & NeoForge)
- updated The One Probe support (1.21_neo-12.0.0) (NeoForge)
- reflectors can now be placed in the Solar Cooker GUI and are rendered as additional lids
- default reflector speed factor was raised to 0.5 (former value was 0.25) (configurable)
- default recipe type of the Solar Cooker was changed to "smelting" (former value was "smoking") (configurable)

### Removed
- reflector blocks were removed (they will disappear when you update your world from an older version)

## [1.20.6-3.2.0.0] - 2024-06-30
### Changed
Expand Down
1 change: 0 additions & 1 deletion common/src/main/java/de/cech12/solarcooker/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public class Constants {
public static final String SOLAR_COOKER_MENU_NAME = "solarcooker";

public static Supplier<Block> SOLAR_COOKER_BLOCK;
public static Supplier<Block> REFLECTOR_BLOCK;
public static Supplier<Block> SHINING_DIAMOND_BLOCK_BLOCK;

public static Supplier<BlockEntityType<? extends SolarCookerBlockEntity>> SOLAR_COOKER_ENTITY_TYPE;
Expand Down
10 changes: 10 additions & 0 deletions common/src/main/java/de/cech12/solarcooker/ModTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.minecraft.core.registries.Registries;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

import javax.annotation.Nonnull;
Expand All @@ -16,4 +17,13 @@ private static TagKey<Block> tag(@Nonnull String name) {
return TagKey.create(Registries.BLOCK, Constants.id(name));
}
}

public static class Items {

public static final TagKey<Item> SOLAR_COOKER_REFLECTOR = tag("solar_cooker_reflector");

private static TagKey<Item> tag(@Nonnull String name) {
return TagKey.create(Registries.ITEM, Constants.id(name));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ public abstract class AbstractSolarCookerBlock extends BaseEntityBlock {
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
public static final BooleanProperty SUNLIT = BlockStateProperties.LIT;
public static final BooleanProperty BURNING = BlockStateProperties.ENABLED;
public static final BooleanProperty LEFT_REFLECTOR = BooleanProperty.create("left_reflector");
public static final BooleanProperty RIGHT_REFLECTOR = BooleanProperty.create("right_reflector");

protected static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D);

protected AbstractSolarCookerBlock(BlockBehaviour.Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(SUNLIT, false).setValue(BURNING, false));
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(SUNLIT, false).setValue(BURNING, false).setValue(LEFT_REFLECTOR, false).setValue(RIGHT_REFLECTOR, false));
}

@Override
Expand Down Expand Up @@ -126,6 +128,6 @@ public BlockState mirror(BlockState state, Mirror mirrorIn) {
}

protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(FACING, SUNLIT, BURNING);
builder.add(FACING, SUNLIT, BURNING, LEFT_REFLECTOR, RIGHT_REFLECTOR);
}
}
184 changes: 0 additions & 184 deletions common/src/main/java/de/cech12/solarcooker/block/ReflectorBlock.java

This file was deleted.

Loading

0 comments on commit e943734

Please sign in to comment.