Package org.cyclops.cyclopscore.helper
Class MinecraftHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.MinecraftHelpers
Deprecated.
Contains helper methods for various minecraft specific things.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.Cause a regular blockState update.static final int
Deprecated.Send a blockState update to the client.static final int
Deprecated.Stop the blockState from re-rendering.static final int
Deprecated.The amount of steps there are in a vanilla comparator.static final int
Deprecated.The length of one Minecraft day.static final int
Deprecated.The amount of ticks that go in one second. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareBlockPos
(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2) Deprecated.Comparator forBlockPos
.static String
Deprecated.static String
Deprecated.static boolean
Deprecated.static boolean
Deprecated.static boolean
Deprecated.static boolean
Deprecated.static boolean
Deprecated.Check if we are inside a modded minecraft environment.static boolean
isPlayerInventoryFull
(net.minecraft.world.entity.player.Player player) Deprecated.Check if the given player inventory is full.static boolean
Deprecated.static void
setDay
(net.minecraft.server.level.ServerLevel world, boolean toDay) Deprecated.Set the world time to day or night.static <T> net.minecraft.world.InteractionResultHolder
<T> successAction
(T result) Deprecated.Create a new successfull action result.
-
Field Details
-
MINECRAFT_DAY
public static final int MINECRAFT_DAYDeprecated.The length of one Minecraft day.- See Also:
-
COMPARATOR_MULTIPLIER
public static final int COMPARATOR_MULTIPLIERDeprecated.The amount of steps there are in a vanilla comparator.- See Also:
-
SECOND_IN_TICKS
public static final int SECOND_IN_TICKSDeprecated.The amount of ticks that go in one second.- See Also:
-
BLOCK_NOTIFY
public static final int BLOCK_NOTIFYDeprecated.Cause a regular blockState update.- See Also:
-
BLOCK_NOTIFY_CLIENT
public static final int BLOCK_NOTIFY_CLIENTDeprecated.Send a blockState update to the client.- See Also:
-
BLOCK_NOTIFY_NO_RERENDER
public static final int BLOCK_NOTIFY_NO_RERENDERDeprecated.Stop the blockState from re-rendering.- See Also:
-
-
Constructor Details
-
MinecraftHelpers
public MinecraftHelpers()Deprecated.
-
-
Method Details
-
setDay
public static void setDay(net.minecraft.server.level.ServerLevel world, boolean toDay) Deprecated.Set the world time to day or night.- Parameters:
world
- the world to manipulate time in.toDay
- if true, set to day, otherwise to night.
-
isPlayerInventoryFull
public static boolean isPlayerInventoryFull(net.minecraft.world.entity.player.Player player) Deprecated.Check if the given player inventory is full.- Parameters:
player
- The player.- Returns:
- If the player does not have a free spot in it's inventory.
-
isDevEnvironment
public static boolean isDevEnvironment()Deprecated.- Returns:
- If we are currently running inside a deobfuscated development environment.
-
isMinecraftInitialized
public static boolean isMinecraftInitialized()Deprecated.- Returns:
- If minecraft has been fully loaded.
-
getMinecraftVersion
Deprecated.- Returns:
- The Minecraft version (e.g. "1.14.4")
-
getMinecraftVersionMajorMinor
Deprecated.- Returns:
- The Minecraft major and minor version (e.g. "1.14")
-
isModdedEnvironment
public static boolean isModdedEnvironment()Deprecated.Check if we are inside a modded minecraft environment.- Returns:
- If in minecraft.
-
isShifted
public static boolean isShifted()Deprecated.- Returns:
- If the user is shifted.
-
compareBlockPos
public static int compareBlockPos(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2) Deprecated.Comparator forBlockPos
.- Parameters:
pos1
- First pos.pos2
- Second pos.- Returns:
- The compared value.
-
successAction
public static <T> net.minecraft.world.InteractionResultHolder<T> successAction(T result) Deprecated.Create a new successfull action result.- Type Parameters:
T
- The type.- Parameters:
result
- The result element.- Returns:
- The action result.
-
isClientSide
public static boolean isClientSide()Deprecated.- Returns:
- If we are physically running on a client.
-
isClientSideThread
public static boolean isClientSideThread()Deprecated.- Returns:
- If we are physically running on a client and are running in the client thread.
-