mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 03:53:12 +01:00
interaction behaviour doesn't invalidate _every_ renderer now
This commit is contained in:
parent
c6db66876a
commit
6c3337ae75
1 changed files with 4 additions and 1 deletions
|
@ -2,6 +2,8 @@ package com.simibubi.create.content.contraptions.components.structureMovement;
|
||||||
|
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.state.properties.BlockStateProperties;
|
import net.minecraft.state.properties.BlockStateProperties;
|
||||||
|
@ -21,7 +23,8 @@ public class LeverMovingInteraction extends MovingInteractionBehaviour {
|
||||||
null, player.blockPosition(), SoundEvents.LEVER_CLICK, SoundCategory.BLOCKS, 0.3f,
|
null, player.blockPosition(), SoundEvents.LEVER_CLICK, SoundCategory.BLOCKS, 0.3f,
|
||||||
newState.getValue(BlockStateProperties.POWERED) ? 0.6f : 0.5f
|
newState.getValue(BlockStateProperties.POWERED) ? 0.6f : 0.5f
|
||||||
);
|
);
|
||||||
CreateClient.invalidateRenderers();
|
// mark contraption to re-render
|
||||||
|
ContraptionRenderDispatcher.invalidate(contraptionEntity.contraption);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue