Did some work on the Crushing ritual and made it so that it ignores liquids.
The Lava Ritual now places source blocks when the fluid is flowing. Added the ability for my potions to (finally) have custom sprites.
This commit is contained in:
parent
b79f7127b6
commit
acde7ceccd
11 changed files with 163 additions and 25 deletions
|
@ -8,6 +8,7 @@ import java.util.UUID;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.BlockPortal;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
|
@ -802,6 +803,12 @@ public class Utils
|
|||
return (state instanceof IFluidBlock || state.getMaterial().isLiquid());
|
||||
}
|
||||
|
||||
public static boolean isFlowingLiquid(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
Block block = state.getBlock();
|
||||
return ((block instanceof IFluidBlock && Math.abs(((IFluidBlock) block).getFilledPercentage(world, pos)) == 1) || (block instanceof BlockLiquid && block.getMetaFromState(state) != 0));
|
||||
}
|
||||
|
||||
public static boolean spawnStackAtBlock(World world, BlockPos pos, @Nullable EnumFacing pushDirection, ItemStack stack)
|
||||
{
|
||||
EntityItem entityItem = new EntityItem(world);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue