Compare commits

...

2 Commits

Author SHA1 Message Date
e3dac8a77f fix: wrong Step Cross shape 2024-07-01 02:19:34 +02:00
5281f84a2a fix: useAO out of bounds because not using model id 2024-07-01 02:11:49 +02:00
2 changed files with 8 additions and 4 deletions

View File

@ -60,8 +60,7 @@ public class ReFramedStepsCrossBlock extends WaterloggableReFramedDoubleBlock {
@Override
public VoxelShape getShape(BlockState state, int i) {
// return getStepShape(i == 1 ? state.get(EDGE): state.get(EDGE).opposite());
return getOutlineShape(state, null, null, null);
return getStepShape(i == 1 ? state.get(EDGE): state.get(EDGE).opposite());
}
static {

View File

@ -190,9 +190,14 @@ public abstract class RetexturingBakedModel extends ForwardingBakedModel {
public boolean useAmbientOcclusion(BlockRenderView view, BlockPos pos) {
if (!(view.getBlockEntity(pos) instanceof ThemeableBlockEntity frame_entity)) return false;
BlockState theme = frame_entity.getTheme(theme_index);
CamoAppearance appearance = appearance_manager
.getCamoAppearance(view, frame_entity.getTheme(theme_index), pos, theme_index, false);
return appearance.getAO(theme_index);
.getCamoAppearance(view, theme, pos, theme_index, false);
long seed = theme.getRenderingSeed(pos);
int model_id = 0;
if (appearance instanceof WeightedComputedAppearance wca) model_id = wca.getAppearanceIndex(seed);
return appearance.getAO(model_id);
}
protected Mesh getRetexturedMesh(MeshCacheKey key, BlockState state) {