Skip to content

Commit

Permalink
Slightly increase light levels of heaters and a few generators so tha…
Browse files Browse the repository at this point in the history
…t nearby ice melts #7659
  • Loading branch information
pupnewfster committed Apr 4, 2023
1 parent 4f677d0 commit 10bebd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ private GeneratorsBlockTypes() {
.withSound(GeneratorsSounds.HEAT_GENERATOR)
.withSupportedUpgrades(EnumSet.of(Upgrade.MUFFLING))
.withComputerSupport("heatGenerator")
.replace(Attributes.ACTIVE_MELT_LIGHT)
.with(new AttributeParticleFX()
.add(ParticleTypes.SMOKE, rand -> new Pos3D(rand.nextFloat() * 0.6F - 0.3F, rand.nextFloat() * 6.0F / 16.0F, -0.52))
.add(ParticleTypes.FLAME, rand -> new Pos3D(rand.nextFloat() * 0.6F - 0.3F, rand.nextFloat() * 6.0F / 16.0F, -0.52)))
Expand All @@ -72,6 +73,7 @@ private GeneratorsBlockTypes() {
.withSound(GeneratorsSounds.BIO_GENERATOR)
.withSupportedUpgrades(EnumSet.of(Upgrade.MUFFLING))
.withComputerSupport("bioGenerator")
.replace(Attributes.ACTIVE_MELT_LIGHT)
.with(new AttributeParticleFX()
.add(ParticleTypes.SMOKE, rand -> new Pos3D(0, 0.3, -0.25)))
.build();
Expand Down Expand Up @@ -112,6 +114,7 @@ private GeneratorsBlockTypes() {
.withSound(GeneratorsSounds.GAS_BURNING_GENERATOR)
.withSupportedUpgrades(EnumSet.of(Upgrade.MUFFLING))
.withComputerSupport("gasBurningGenerator")
.replace(Attributes.ACTIVE_MELT_LIGHT)
.build();
// Advanced Solar Generator
public static final Generator<TileEntityAdvancedSolarGenerator> ADVANCED_SOLAR_GENERATOR = GeneratorBuilder
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/mekanism/common/block/attribute/Attributes.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public class Attributes {

public static final Attribute ACTIVE = new AttributeStateActive(0);
public static final Attribute ACTIVE_LIGHT = new AttributeStateActive(8);
//12 is the minimum light level required to be able to melt ice that is directly adjacent to the block,
// we need to go slightly higher so that we can melt blocks that are also a distance of one away
public static final Attribute ACTIVE_MELT_LIGHT = new AttributeStateActive(13);
public static final Attribute ACTIVE_FULL_LIGHT = new AttributeStateActive(15);
public static final Attribute COMPARATOR = new AttributeComparator();
public static final Attribute INVENTORY = new AttributeInventory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ private MekanismBlockTypes() {
.withCustomShape(BlockShapes.RESISTIVE_HEATER)
.withSound(MekanismSounds.RESISTIVE_HEATER)
.withComputerSupport("resistiveHeater")
.replace(Attributes.ACTIVE_MELT_LIGHT)
.build();
// Seismic Vibrator
public static final Machine<TileEntitySeismicVibrator> SEISMIC_VIBRATOR = MachineBuilder
Expand Down Expand Up @@ -432,7 +433,7 @@ private MekanismBlockTypes() {
public static final BlockTypeTile<TileEntityFuelwoodHeater> FUELWOOD_HEATER = BlockTileBuilder
.createBlock(() -> MekanismTileEntityTypes.FUELWOOD_HEATER, MekanismLang.DESCRIPTION_FUELWOOD_HEATER)
.withGui(() -> MekanismContainerTypes.FUELWOOD_HEATER)
.with(Attributes.SECURITY, Attributes.INVENTORY, Attributes.ACTIVE_LIGHT, new AttributeStateFacing(), new AttributeParticleFX()
.with(Attributes.SECURITY, Attributes.INVENTORY, Attributes.ACTIVE_MELT_LIGHT, new AttributeStateFacing(), new AttributeParticleFX()
.add(ParticleTypes.SMOKE, rand -> new Pos3D(rand.nextFloat() * 0.6F - 0.3F, rand.nextFloat() * 6.0F / 16.0F, -0.52))
.add(DustParticleOptions.REDSTONE, rand -> new Pos3D(rand.nextFloat() * 0.6F - 0.3F, rand.nextFloat() * 6.0F / 16.0F, -0.52)))
.withComputerSupport("fuelwoodHeater")
Expand Down

0 comments on commit 10bebd5

Please sign in to comment.