Skip to content

Commit

Permalink
feat: refactor PrimitiveRecipeLogic
Browse files Browse the repository at this point in the history
  • Loading branch information
bruberu committed Jul 13, 2024
1 parent a3601f0 commit e1506eb
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public MultiblockRecipeLogic(RecipeMapMultiblockController tileEntity, boolean h
super(tileEntity, tileEntity.recipeMap, hasPerfectOC);
}

public MultiblockRecipeLogic(MultiblockWithDisplayBase tileEntity, RecipeMap<?> recipeMap) {
super(tileEntity, recipeMap);
}

@Override
public void update() {}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gregtech.api.capability.impl;

import gregtech.api.GTValues;
import gregtech.api.metatileentity.multiblock.RecipeMapPrimitiveMultiblockController;
import gregtech.api.metatileentity.multiblock.MultiblockWithDisplayBase;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.recipes.recipeproperties.IRecipePropertyStorage;

Expand All @@ -12,9 +12,9 @@
/**
* Recipe Logic for a Multiblock that does not require power.
*/
public class PrimitiveRecipeLogic extends AbstractRecipeLogic {
public class PrimitiveRecipeLogic extends MultiblockRecipeLogic {

public PrimitiveRecipeLogic(RecipeMapPrimitiveMultiblockController tileEntity, RecipeMap<?> recipeMap) {
public PrimitiveRecipeLogic(MultiblockWithDisplayBase tileEntity, RecipeMap<?> recipeMap) {
super(tileEntity, recipeMap);
}

Expand Down
5 changes: 2 additions & 3 deletions src/main/java/gregtech/api/recipes/RecipeMaps.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import gregtech.api.recipes.builders.FuelRecipeBuilder;
import gregtech.api.recipes.builders.FusionRecipeBuilder;
import gregtech.api.recipes.builders.ImplosionRecipeBuilder;
import gregtech.api.recipes.builders.NoEnergyRecipeBuilder;
import gregtech.api.recipes.builders.PrimitiveRecipeBuilder;
import gregtech.api.recipes.builders.SimpleRecipeBuilder;
import gregtech.api.recipes.builders.UniversalDistillationRecipeBuilder;
Expand Down Expand Up @@ -1472,8 +1471,8 @@ public final class RecipeMaps {
.sound(GTSoundEvents.MOTOR)
.build();

public static final RecipeMap<NoEnergyRecipeBuilder> HEAT_EXCHANGER_RECIPES = new RecipeMap<>("heat_exchanger", 1,
0, 2, 2, new NoEnergyRecipeBuilder(), false)
public static final RecipeMap<PrimitiveRecipeBuilder> HEAT_EXCHANGER_RECIPES = new RecipeMap<>("heat_exchanger", 1,
0, 2, 2, new PrimitiveRecipeBuilder(), false)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW_MULTIPLE, ProgressWidget.MoveType.HORIZONTAL)
.setSound(GTSoundEvents.COOLING);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gregtech.common.metatileentities;

import gregtech.api.capability.impl.NoEnergyMultiblockRecipeLogic;
import gregtech.api.capability.impl.PrimitiveRecipeLogic;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.api.metatileentity.multiblock.IMultiblockPart;
Expand All @@ -23,7 +23,7 @@ public class MetaTileEntityHeatExchanger extends RecipeMapMultiblockController {

public MetaTileEntityHeatExchanger(ResourceLocation metaTileEntityId) {
super(metaTileEntityId, RecipeMaps.HEAT_EXCHANGER_RECIPES);
this.recipeMapWorkable = new NoEnergyMultiblockRecipeLogic(this);
this.recipeMapWorkable = new PrimitiveRecipeLogic(this, RecipeMaps.HEAT_EXCHANGER_RECIPES);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parent": "item/generated",
"textures": {
"layer0": "gregtech:items/material_sets/dull/fuel_rod"
"layer0": "gregtech:items/material_sets/dull/fuel_rod",
"layer1": "gregtech:items/material_sets/dull/fuel_rod_overlay"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e1506eb

Please sign in to comment.