Package io.github.racoondog.multiversion
Class MultiVersionImpl
java.lang.Object
io.github.racoondog.multiversion.MultiVersionImpl
- All Implemented Interfaces:
MultiVersion
Adapted from clientcommands.
Originally made by Earthcomputer, FlorianMichael, and RaphiMC.
Modified by Crosby to replace java reflect with java invoke and add protocol version overriding.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleandoesBlockExist(net.minecraft.block.Block block) booleandoesItemExist(net.minecraft.item.Item item) voidsetProtocolVersion(int protocolVersion) It's not always possible to detect the server's version, especially when the server is running ViaVersion, so you can use this method if you wish to override the protocol version returned inMultiVersion.getProtocolVersion(), and you can remove the override by passing inMultiVersion.RESET.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.racoondog.multiversion.MultiVersion
getProtocolName, getProtocolVersion, isAbove, isAtLeast, isAtMost, isUnder
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
MultiVersionImpl
public MultiVersionImpl()
-
-
Method Details
-
setProtocolVersion
public void setProtocolVersion(int protocolVersion) Description copied from interface:MultiVersionIt's not always possible to detect the server's version, especially when the server is running ViaVersion, so you can use this method if you wish to override the protocol version returned inMultiVersion.getProtocolVersion(), and you can remove the override by passing inMultiVersion.RESET. This method does nothing if ViaFabric or ViaFabricPlus are installed, as they have their own protocol overriding settings.- Specified by:
setProtocolVersionin interfaceMultiVersion
-
doesItemExist
public boolean doesItemExist(net.minecraft.item.Item item) - Specified by:
doesItemExistin interfaceMultiVersion
-
doesBlockExist
public final boolean doesBlockExist(net.minecraft.block.Block block) - Specified by:
doesBlockExistin interfaceMultiVersion
-