CompatLayer 1.11.2/1.10.2 is a small library/mod that allows you to write mods that run on 1.10.2 and 1.11 with the same binary jar. At least upto some point. At the very least it helps to minimize the source changes between your 1.10 version and 1.11 version of your mod in case you do need to have two versions for whatever reason.

CompatLayer

Basically CompatLayer is nothing more then a set of classes and functions that help abstract away the differences between 1.10.2 and 1.11.

Features:

  • CompatBlock: A simple extension of Block that overrides methods that have changed in 1.11 and calls CompatLayer specific versions that you can override instead in your code. Currently supports ‘neighborChanged’ and ‘onBlockActivated’
  • CompatItem: A simple extension of Item that basically does the same thing as CompatBlock but then for items. Currently contains ‘onItemRightClick’
  • CompatInventory: an interface that inherits from IInventory and adds a default implementation for the new func_191420_l function.
  • CompatSidedInventory: same for ISidedInventory.
  • ChatTools: contains a simple message ‘addChatMessage’ that avoids the new parameter that player.addChatComponentMessage() has.
  • ItemStackTools: this is the biggest reason for this mod. ItemStack handling has changed a lot in 1.11. Basically itemstacks are never ‘null’. Instead there is a new empty itemstack. This class makes abstraction of that. If you carefully go through all your code that uses itemstacks and replace all calls and tests (especially things like ‘stack = null’ or ‘if (stack == null)’) with methods from this class.

Useful Links:

Wiki for more information: https://github.com/McJty/compatlayer/wiki

Tutorial for modders: http://modwiki.temporal-reality.com/mw/index.php?title=CompatLayer-1.11

Maven for 1.10.2: http://jenkins.k-4u.nl/view/McJty/job/Compatlayer%201.10/

Maven for 1.11: http://jenkins.k-4u.nl/view/McJty/job/Compatlayer%201.11/

Requires:

Minecraft Forge

How to install:

  1. Make sure you have already installed Minecraft Forge.
  2. Locate the minecraft application folder.
    • On windows open Run from the start menu, type %appdata% and click Run.
    • On mac open finder, hold down ALT and click Go then Library in the top menu bar. Open the folder Application Support and look for Minecraft.
  3. Place the mod you have just downloaded (.jar file) into the Mods folder.
  4. When you launch Minecraft and click the mods button you should now see the mod is installed.

CompatLayer 1.11.2/1.10.2 Download Links:

For Minecraft 1.10.2

Download from Server 1Download from Server 2

For Minecraft 1.11

Download from Server 1Download from Server 2

For Minecraft 1.11.2

Download from Server 1Download from Server 2