Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GT, fix names with new api #227

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.10:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.17:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.49.52:dev') {
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.49.55:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void run() {

if (ModAndClassUtil.GT5) {
try {
Class<?> recipeMapClazz = Class.forName("gregtech.api.util.GT_Recipe$GT_Recipe_Map");
Class<?> recipeMapClazz = Class.forName("gregtech.api.util.GTRecipe$GT_Recipe_Map");
Collection<?> sMappings = (Collection<?>) recipeMapClazz.getDeclaredField("sMappings").get(null);
for (Object tMap : sMappings) {
String mNEIName = (String) recipeMapClazz.getDeclaredField("mNEIName").get(tMap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import codechicken.nei.PositionedStack;
import gregtech.api.enums.ItemList;
import gregtech.common.items.GT_FluidDisplayItem;
import gregtech.common.items.ItemFluidDisplay;

public class GregTech5RecipeExtractor implements IRecipeExtractor {

Expand Down Expand Up @@ -47,7 +47,7 @@ private void removeSpecial(List<PositionedStack> list) {
public static Object getFluidFromDisplay(PositionedStack stack) {
if (stack != null) {
ItemStack item = stack.items[0].copy();
if (item.getItem() instanceof GT_FluidDisplayItem) {
if (item.getItem() instanceof ItemFluidDisplay) {
if (item.getTagCompound() != null) {
Fluid fluid = FluidRegistry.getFluid(item.getItemDamage());
int amt = (int) item.getTagCompound().getLong("mFluidDisplayAmount");
Expand Down