Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Fix naq fuel refinery coils not auto placeable in survival (#245)
Browse files Browse the repository at this point in the history
* update bs+deps

* fix naq fuel refinery coils not auto placeable in survival
  • Loading branch information
Lyfts authored Mar 12, 2024
1 parent 71709d9 commit 4f47324
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Add your dependencies here

dependencies {
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.71:dev')
api('com.github.GTNewHorizons:bartworks:0.9.11:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.97:dev')
api('com.github.GTNewHorizons:bartworks:0.9.17:dev')
implementation('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
implementation('com.github.GTNewHorizons:GTplusplus:1.11.25:dev')
implementation('com.github.GTNewHorizons:GTplusplus:1.11.35:dev')

compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.2-GTNH:dev') {transitive = false}

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.17'
}


Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureUtility;

import goodgenerator.api.recipe.GoodGeneratorRecipeMaps;
import goodgenerator.blocks.tileEntity.base.GT_MetaTileEntity_TooltipMultiBlockBase_EM;
Expand Down Expand Up @@ -153,6 +155,28 @@ private int getIndex(ItemStack trigger) {
public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
return world.setBlock(x, y, z, coils[getIndex(trigger)], 0, 3);
}

@Override
public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger,
AutoPlaceEnvironment env) {
return BlocksToPlace.create(coils[getIndex(trigger)], 0);
}

@Override
public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger,
AutoPlaceEnvironment env) {
if (check(t, world, x, y, z)) return PlaceResult.SKIP;
return StructureUtility.survivalPlaceBlock(
coils[getIndex(trigger)],
0,
world,
x,
y,
z,
env.getSource(),
env.getActor(),
env.getChatter());
}
};
}

Expand Down

0 comments on commit 4f47324

Please sign in to comment.