com.parzivail.util.block.mutating.MutatingStairsBlock Maven / Gradle / Ivy
package com.parzivail.util.block.mutating;
import net.minecraft.class_2338;
import net.minecraft.class_2510;
import net.minecraft.class_2680;
import net.minecraft.class_3218;
import net.minecraft.class_4970;
import net.minecraft.class_5819;
public class MutatingStairsBlock extends class_2510
{
private final class_2510 target;
private final int meanTransitionTime;
public MutatingStairsBlock(class_2680 baseBlockState, class_2510 target, int meanTransitionTime, class_4970.class_2251 settings)
{
super(baseBlockState, settings.method_9640());
this.target = target;
this.meanTransitionTime = meanTransitionTime;
}
@Override
public void method_9514(class_2680 state, class_3218 world, class_2338 pos, class_5819 random)
{
if (!canTransition(state, world, pos, random))
return;
if (random.method_43048(meanTransitionTime) == 0)
world.method_8652(pos, target.method_34725(state), field_31028);
}
protected boolean canTransition(class_2680 state, class_3218 world, class_2338 pos, class_5819 random)
{
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy