Giter Site home page Giter Site logo

compatlayer's Introduction

compatlayer

Compatibility Layer to help with keeping mods compatible between 1.10 and 1.11

compatlayer's People

Contributors

josephcsible avatar mcjty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

compatlayer's Issues

Constructor missing in 1.10 version only

Whenever I try to initialize an ItemStackList(List<ItemStack> stack, /*Nullable*/ ItemStack defaultNullItem) on 1.10.2 version of CompatLayer I get

java.lang.NoSuchMethodError: mcjty.lib.tools.ItemStackList.<init>(Ljava/util/List;Lnet/minecraft/item/ItemStack;)V

On 1.11.2 this works just fine

Not sure if I should go a different way to get a custom ItemStackList, because add/set methods always crash minecraft super implemenatation

New version breaks Dense Ores

Updating to the newest CompatLayer breaks Dense Ores:
com.rwtema.denseores.ProxyClient$1: Dense Ores requires CompatLayer to run in Minecraft 1.10.2

Can't add library to mod dependencies.

I am fairly new to the whole modding thing. I wanted to add the compatlayer to the mod to make it compatible with 1.11 too. But as soon as I add the dependency within the build.gradle file,all minecraft and forge related dependencies get removed from the project. Here is my build.gradle file.
I invalidated the project several times and cleaned it too. No idea what is wrong.
I would really really appreciate any help since it is quite frustrating...

Create CompatSlotItemHandler

I'd like to see a new class, mcjty.lib.compat.CompatSlotItemHandler, which extends net.minecraftforge.items.SlotItemHandler, and implements getX, getY, setX, setY, onTake, and onPickup for it.

I'm working with CompatLayer, and attempting to reimplement my class extending SlotItemHandler. However, I use onTake (which is not a method in 1.10.2) and to use CompatSlot I would have to re-implement all the logic in Forge's SlotItemHandler.

Create CompatGUI(?)

The field GuiScreen#fontRendererObj from 1.10.2 was renamed to GuiScreen#fontRenderer in 1.11. I'd like to have a class added for this.
The issue is that the commonly-used GuiContainer extends GuiScreen; would you have two compat classes, or is there some other solution?

Setting repair material for Armor is not compatible between 1.10.2 & 1.11.2

I can't believe you missed this one when you wrote CompatItemArmor.

  • ArmorMaterial in 1.10 sets repair material by assigning to ArmorMaterial.customCraftingMaterial. There is no setRepairItem() method.
  • ArmorMaterial in 1.11 uses ArmorMaterial.setRepairItem(itemstack) to set the repair material. There is no public field 'customCraftingMaterial' to assign to; it has been renamed and made private.

See the problem? I solved it by writing a helper method; feel free to cut & paste it into a new 'Tools' class: https://github.com/Sinhika/SimpleCore/blob/dev1.9/src/main/java/alexndr/api/helpers/game/ArmorMaterialHelper.java

Internal comments separate the 1.10 version from the 1.11 version; ask if it's not clear.

JEI compatability

Would it be possible for you to make a compatlayer version of JEI's IIngredients?
During the port from 1.10-1.11 mezz made IIngredients.getInputs(Class ingredientClass) return a list inside a list rather than just a list like in 1.10.

An example of this can be found here.

The class in both versions, for reference.
1.11 1.10

Using the maven links

I'd like to use this library, but I have trouble wrapping my mind around maven and gradle ๐Ÿ™Š
Could you elaborate on how to use the links on the wiki page as maven repository?
Is it even possible to use them in gradle? Sorry, if this is a dumb question, but I'm pretty
new to Java.

What I tried so far, was adding it this way into my build.gradle:

repositories {
    maven { // CompatLayer
        url = "http://jenkins.k-4u.nl/view/McJty/job/Compatlayer%201.10/"
    }
}

dependencies {
    deobfCompile "mcjty.lib:compatlayer:1.10-0.0.12alpha"
}

Conflict with ye old tanks - coal causes crash

When i place coal in the upper left slot (1 or more - i tried both), the game crashes.
i was trying to compress the coal into coal blocks.

  1. key press compression (from crafting tweaks) is okay
  2. it doesnt matter what else is in the table or if it is empty.

Ye' Olde tanks with JEI only, no crash
compat layer by itsself, no crash
starts crashing when compatlayer is added to Ye' Olde Tanks

here is the crash report.

Link to crash report/log in a gist:

YeOldeTanks version: YeOldeTanks-1.11-1.9.2
Compatlayer version: compatlayer-1.11.2-0.2.1

Minecraft version: 1.11.2-forge1.11.2-13.20.0.2227, 1.11.2

crash-2017-02-05_23.39.02-client.txt

Create CompatParticle

I'd like to see a new class, mcjty.lib.compat.CompatParticle, which extends net.minecraft.client,particle.Particle, and creates overrides for getBoundingBox, getEntityBoundingBox, setBoundingBox, and setEntityBoundingBox.

During the change from 1.10.2 to 1.11.2, getEntityBoundingBox was renamed to getBoundingBox, and setEntityBoundingBox was renamed to setBoundingBox. Since boundingBox is private and cannot be accessed directly, and each pair of methods is identical other than their names, an implementation through CompatLayer would be perfect to resolve this problem.

Feature Request

In CompatCreativeTabs I'd need a compat method like
clDisplayAllRelevantItems(ItemStackList list)
to support
public void displayAllRelevantItems(List<ItemStack> list) for 1.10
public void displayAllRelevantItems(NonNullList<ItemStack> list) for 1.11+

Is it doable?

Modpack Permission

Hello, I am seeking to use this mod in my modpack "Immersive Experience - 1.10.2" on the Twitch/Curse launcher. For further information, please contact me.

Tile entity class?

I have a class that is a tile entity and implements Itickable. I've tried plugging in each of your classes but we run into a inconvertible error with one of the lines of code . None of your compat classes seem to handle tileentity's in the general scope and the code needs them to work.

Any ideas?


NN

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.