Compare commits

..
3 Commits
Author SHA1 Message Date
9570cb2982 Change Radioactive Bee Effect (#72)
* Change up how the radioactive bee works to make it a bit more reasonable.

* Remove debug code

* Fix the range of bees being off by one block. nextInt is [0,n), so we need to do n+1 to get our boundary included.

* Remove unnecessary check, fix alveary block under not using correct y and unprotect other blocks under. Also fix canMineBlock being the wrong way round.

* Fix under block protection for non-alvearies

* spotlessApply (#73)

Co-authored-by: GitHub GTNH Actions <>

* Fix condition

---------

Co-authored-by: GTNH-Colen <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-26 16:49:46 +02:00
Martin Robertz f89a074393 update 2024-06-22 22:09:49 +02:00
chochem 19457080bf dont extend the filter to any meta while optimizing (#74) 2024-06-22 17:30:54 +01:00
3 changed files with 20 additions and 5 deletions

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
dependencies {
api('curse.maven:cofh-lib-220333:2388748')
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha52:api')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.5-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.8-GTNH:dev')
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.6.2:api')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
@@ -78,7 +78,7 @@ public class AlleleEffectRadioactive extends AlleleEffectThrottled {
// Don't destroy blocks in the protected 3x3x4 area if housing is an Alveary.
// Stops the bee destroying itself. Silly behaviour.
if (isAlveary && isInAlvearyProtectedArea(posHousing, posBlock)) {
if (isInAlvearyProtectedArea(posHousing, posBlock)) {
continue;
}
@@ -192,14 +192,24 @@ public class BackpackDefinition implements IBackpackDefinition {
int[] oreIds = OreDictionary.getOreIDs(itemStack);
for (int oreId : oreIds) {
if (validOreIds.contains(oreId)) {
validItemStacks.add(itemStackStringWild);
if (meta != OreDictionary.WILDCARD_VALUE) {
String itemStackString = itemStackStringWild + ':' + meta;
validItemStacks.add(itemStackString);
} else {
validItemStacks.add(itemStackStringWild);
}
return true;
}
}
for (Class<?> itemClass : validItemClasses) {
if (itemClass.isInstance(item)) {
validItemStacks.add(itemStackStringWild);
if (meta != OreDictionary.WILDCARD_VALUE) {
String itemStackString = itemStackStringWild + ':' + meta;
validItemStacks.add(itemStackString);
} else {
validItemStacks.add(itemStackStringWild);
}
return true;
}
}
@@ -208,7 +218,12 @@ public class BackpackDefinition implements IBackpackDefinition {
if (block != null) {
for (Class<?> blockClass : validBlockClasses) {
if (blockClass.isInstance(block)) {
validItemStacks.add(itemStackStringWild);
if (meta != OreDictionary.WILDCARD_VALUE) {
String itemStackString = itemStackStringWild + ':' + meta;
validItemStacks.add(itemStackString);
} else {
validItemStacks.add(itemStackStringWild);
}
return true;
}
}