Skip to content

Commit

Permalink
Updated to LOTR Renewed-2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftedMods committed Oct 3, 2020
1 parent 60b5cf9 commit 89ecd59
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog of JEI LOTR

## 1.3.1-BETA
* Updated to LOTR Renewed-2.2
* Fixed that the transfer/click handlers didn't work anymore

## 1.3.0-BETA
### New features:
* Updated to LOTR Renewed-1.7.1 (added keg support)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
The plugin adds JEI support for all devices and recipes added by the LOTR Mod.
## Dependencies
JEI LOTR has the following dependencies:
- [The Lord of the Rings Mod Renewed v1.7.1](https://www.mediafire.com/file/nos4bbaml6c2tpz/)
- [The Lord of the Rings Mod Renewed v2.2](https://www.curseforge.com/minecraft/mc-mods/the-lord-of-the-rings-mod-renewed/files)
- [JEI 1.15.2-6.0.3.15](https://www.curseforge.com/minecraft/mc-mods/jei/files/all)

The plugin was created with the MinecraftForge version "1.15.2-31.2.31".
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: "net.minecrell.licenser"

version = '1.3.0-BETA'
version = '1.3.1-BETA'
group = 'craftedMods.jeiLotr' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'jeilotr'

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
jei_mc_version=1.15.2
jei_version=6.0.3.15
lotr_version=1.7.1
lotr_version=2.2
38 changes: 20 additions & 18 deletions src/main/java/craftedMods/jeiLotr/JEIPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ public void initDevices ()
types.add (type);
types.addAll (type.getMultiTableTypes ());

RegistryObject<ContainerType<LOTRContainerCraftingTable>> container = null;
RegistryObject<ContainerType<FactionCraftingContainer>> container = null;

try
{
Field containerField = LOTRContainers.class.getDeclaredField (field.getName ());
container = (RegistryObject<ContainerType<LOTRContainerCraftingTable>>) containerField
container = (RegistryObject<ContainerType<FactionCraftingContainer>>) containerField
.get (null);
}
catch (NoSuchFieldException e)
Expand Down Expand Up @@ -248,22 +248,24 @@ public void registerGuiHandlers (IGuiHandlerRegistration registration)

registration.addRecipeClickArea (KegScreen.class, 71, 48, 28, 23, new ResourceLocation ("lotr", "keg"));

registration.addGuiContainerHandler (LOTRGuiCrafting.class, new IGuiContainerHandler<LOTRGuiCrafting> ()
{

@Override
public Collection<IGuiClickableArea> getGuiClickableAreas (LOTRGuiCrafting containerScreen, double mouseX,
double mouseY)
registration.addGuiContainerHandler (FactionCraftingScreen.class,
new IGuiContainerHandler<FactionCraftingScreen> ()
{
ResourceLocation uid = containerScreen.getContainer ().isStandardCraftingActive ()
? VanillaRecipeCategoryUid.CRAFTING
: devicesByBlock.get (containerScreen.getContainer ().getCraftingBlock ()).uid;

IGuiClickableArea clickableArea = IGuiClickableArea.createBasic (88, 32, 28, 23,
uid);
return Collections.singleton (clickableArea);
}
});
@Override
public Collection<IGuiClickableArea> getGuiClickableAreas (FactionCraftingScreen containerScreen,
double mouseX,
double mouseY)
{
ResourceLocation uid = containerScreen.getContainer ().isStandardCraftingActive ()
? VanillaRecipeCategoryUid.CRAFTING
: devicesByBlock.get (containerScreen.getContainer ().getCraftingBlock ()).uid;

IGuiClickableArea clickableArea = IGuiClickableArea.createBasic (88, 32, 28, 23,
uid);
return Collections.singleton (clickableArea);
}
});

if (theForgeField != null)
{
Expand Down Expand Up @@ -414,10 +416,10 @@ public void registerTransferHandlers (IRecipeTransferRegistration registration)
private class LOTRCraftingTable extends LOTRDevice
{

private final RegistryObject<ContainerType<LOTRContainerCraftingTable>> container;
private final RegistryObject<ContainerType<FactionCraftingContainer>> container;

public LOTRCraftingTable (ResourceLocation uid, ItemStack icon, Collection<IRecipeType<?>> recipeTypes,
RegistryObject<ContainerType<LOTRContainerCraftingTable>> container)
RegistryObject<ContainerType<FactionCraftingContainer>> container)
{
super (uid, icon, recipeTypes);
this.container = container;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ loaderVersion="[27,)"
issueTrackerURL="http:/github.com/CraftedMods/jei-lotr/issues"
[[mods]]
modId="jeilotr"
version="1.3.0-BETA"
version="1.3.1-BETA"
displayName="JEI LOTR"
updateJSONURL="https://raw.githubusercontent.com/CraftedMods/jei-lotr/master/versions.json"
displayURL="http://github.com/CraftedMods/jei-lotr"
Expand Down Expand Up @@ -33,7 +33,7 @@ A JEI-Plugin for the "The Lord of the Rings" Minecraft Mod.
[[dependencies.jeilotr]]
modId="lotr"
mandatory=true
versionRange="[Renewed-1.7.1,)"
versionRange="[Renewed-2.2,)"
ordering="NONE"
side="BOTH"
[[dependencies.jeilotr]]
Expand Down
7 changes: 4 additions & 3 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"1.0.0-BETA": "Updated to LOTR Renewed-1.1",
"1.1.0-BETA": "Fixed that some faction crafting table recipes were not shown",
"1.2.0-BETA": "Updated to LOTR Renewed-1.3",
"1.3.0-BETA": "Updated to LOTR Renewed-1.7.1 and fixed some alloy forge related bugs"
"1.3.0-BETA": "Updated to LOTR Renewed-1.7.1 and fixed some alloy forge related bugs",
"1.3.1-BETA": "Updated to LOTR Renewed-2.2"
},
"promos": {
"1.15.2-latest": "1.3.0-BETA",
"1.15.2-recommended": "1.3.0-BETA"
"1.15.2-latest": "1.3.1-BETA",
"1.15.2-recommended": "1.3.1-BETA"
}
}

0 comments on commit 89ecd59

Please sign in to comment.