Class MultiVersionImpl

java.lang.Object
io.github.racoondog.multiversion.MultiVersionImpl
All Implemented Interfaces:
MultiVersion

public abstract sealed class MultiVersionImpl extends Object implements 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 Details

  • Constructor Details

    • MultiVersionImpl

      public MultiVersionImpl()
  • Method Details

    • setProtocolVersion

      public void setProtocolVersion(int protocolVersion)
      Description copied from interface: MultiVersion
      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 in MultiVersion.getProtocolVersion(), and you can remove the override by passing in MultiVersion.RESET. This method does nothing if ViaFabric or ViaFabricPlus are installed, as they have their own protocol overriding settings.
      Specified by:
      setProtocolVersion in interface MultiVersion
    • doesItemExist

      public boolean doesItemExist(net.minecraft.item.Item item)
      Specified by:
      doesItemExist in interface MultiVersion
    • doesBlockExist

      public final boolean doesBlockExist(net.minecraft.block.Block block)
      Specified by:
      doesBlockExist in interface MultiVersion