Skip to content

Commit

Permalink
Hotfix for Assembly Line Casing ID Shift (#147)
Browse files Browse the repository at this point in the history
* Revert "Remove Coke Oven Bricks (#122)"
* Hide the Coke Oven block from JEI until we can actually remove it.
* See #146 for more information
  • Loading branch information
ALongStringOfNumbers authored May 7, 2021
1 parent 82b46d4 commit 5393918
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/gregicadditions/item/GAMultiblockCasing.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public GAMultiblockCasing() {
setResistance(10.0f);
setSoundType(SoundType.METAL);
setHarvestLevel("wrench", 2);
setDefaultState(getState(CasingType.TUNGSTENSTEEL_GEARBOX_CASING));
setDefaultState(getState(CasingType.COKE_OVEN_BRICKS));
}

@Override
Expand All @@ -28,6 +28,7 @@ public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos

public enum CasingType implements IStringSerializable {

COKE_OVEN_BRICKS("coke_oven_bricks"),
TUNGSTENSTEEL_GEARBOX_CASING("tungstensteel_gearbox_casing");

private final String name;
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/gregicadditions/jei/JEIGAPlugin.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package gregicadditions.jei;

import gregicadditions.item.*;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.IModRegistry;
import mezz.jei.api.JEIPlugin;
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
import net.minecraft.block.*;

@JEIPlugin
public class JEIGAPlugin implements IModPlugin {
Expand All @@ -16,6 +18,10 @@ public void registerCategories(IRecipeCategoryRegistration registry) {
@Override
public void register(IModRegistry registry) {
GAMultiblockInfoCategory.registerRecipes(registry);

// Workaround - hide the Coke Oven blocks until we can remove them without ID shift
registry.getJeiHelpers()
.getIngredientBlacklist()
.addIngredientToBlacklist(GAMetaBlocks.MUTLIBLOCK_CASING
.getItemVariant(GAMultiblockCasing.CasingType.COKE_OVEN_BRICKS));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

{
"parent": "item/generated",
"textures": {
"layer0": "gregtech:items/metaitems/brick.coke"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
},
"variants": {
"variant": {
"coke_oven_bricks": {
"textures": {
"all": "gregtech:blocks/casings/solid/machine_coke_oven_bricks"
}
},
"tungstensteel_gearbox_casing": {
"textures": {
"all": "gregtech:blocks/casings/gearbox/machine_casing_gearbox_tungstensteel"
Expand Down

0 comments on commit 5393918

Please sign in to comment.