Skip to content

Commit

Permalink
Fix "active-state" multiblocks initially forming as active
Browse files Browse the repository at this point in the history
  • Loading branch information
malte0811 committed Mar 9, 2024
1 parent 39186ef commit f1e7821
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;

import javax.annotation.Nonnull;
Expand All @@ -54,6 +53,8 @@ protected void replaceStructureBlock(StructureBlockInfo info, Level world, Block
{
BlockState newState = logic.block().get().defaultBlockState();
newState = newState.setValue(IEProperties.MULTIBLOCKSLAVE, !offsetFromMaster.equals(Vec3i.ZERO));
if(newState.hasProperty(IEProperties.ACTIVE))
newState = newState.setValue(IEProperties.ACTIVE, false);
if(newState.hasProperty(IEProperties.MIRRORED))
newState = newState.setValue(IEProperties.MIRRORED, mirrored);
if(newState.hasProperty(IEProperties.FACING_HORIZONTAL))
Expand Down

0 comments on commit f1e7821

Please sign in to comment.