2021-03-28 15:33:12 -04:00
|
|
|
/*
|
|
|
|
* This file is free for everyone to use under the Creative Commons Zero license.
|
|
|
|
*/
|
|
|
|
|
2021-03-24 16:04:48 -04:00
|
|
|
package net.fabricmc.yarn.constants;
|
|
|
|
|
2021-03-28 15:33:12 -04:00
|
|
|
/**
|
|
|
|
* A few flag bits for the {@code flag} argument of {@code world.setBlockState(pos, state, flag)}
|
|
|
|
* and other related block state setting methods.
|
|
|
|
*
|
|
|
|
* <p>The accepted values of the {@code flag} argument is usually a bitset combination of the
|
|
|
|
* fields in this class.
|
|
|
|
*
|
|
|
|
* @see net.minecraft.world.ModifiableWorld#setBlockState(net.minecraft.util.math.BlockPos,
|
|
|
|
* net.minecraft.block.BlockState, int)
|
|
|
|
*/
|
2021-03-24 16:04:48 -04:00
|
|
|
public final class SetBlockStateFlags {
|
|
|
|
/**
|
|
|
|
* Propagates a change event to surrounding blocks.
|
|
|
|
*/
|
|
|
|
public static final int PROPAGATE_CHANGE = 1;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies listeners and clients who need to react when the block changes.
|
|
|
|
*/
|
|
|
|
public static final int NOTIFY_LISTENERS = 2;
|
|
|
|
|
2021-03-28 07:14:12 -04:00
|
|
|
/**
|
|
|
|
* The default setBlockState behavior. Same as {@code PROPAGATE_CHANGE | NOTIFY_LISTENERS}.
|
|
|
|
*/
|
|
|
|
public static final int DEFAULT = PROPAGATE_CHANGE | NOTIFY_LISTENERS;
|
|
|
|
|
2021-03-24 16:04:48 -04:00
|
|
|
/**
|
2021-03-28 15:33:12 -04:00
|
|
|
* Used in conjunction with {@link #NOTIFY_LISTENERS} to suppress the render pass on clients.
|
2021-03-24 16:04:48 -04:00
|
|
|
*/
|
|
|
|
public static final int NO_REDRAW = 4;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Forces a synchronous redraw on clients.
|
|
|
|
*/
|
|
|
|
public static final int REDRAW_ON_MAIN_THREAD = 8;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bypass virtual block state changes and forces the passed state to be stored as-is.
|
|
|
|
*/
|
|
|
|
public static final int FORCE_STATE = 16;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prevents the previous block (container) from dropping items when destroyed.
|
|
|
|
*/
|
|
|
|
public static final int SKIP_DROPS = 32;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Signals that the current block is being moved to a different location, usually because of a piston.
|
|
|
|
*/
|
|
|
|
public static final int MOVED = 64;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Signals that lighting updates should be skipped.
|
|
|
|
*/
|
|
|
|
public static final int SKIP_LIGHTING_UPDATES = 128;
|
|
|
|
|
|
|
|
private SetBlockStateFlags() {
|
|
|
|
}
|
|
|
|
}
|