Merge branch 'master' into essenceBerryTweaks

This commit is contained in:
Martin Robertz authored and GitHub committed 2025-09-30 19:20:50 +02:00
commit 723cb0e8cd
5 files changed
+26 -21

No files matched your search

+6 -6
View File
@@ -1,13 +1,13 @@
// Add your dependencies here
dependencies {
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta55:api')
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta56:api')
api("com.github.GTNewHorizons:Mantle:0.5.1:dev")
api("com.github.GTNewHorizons:ForgeMultipart:1.6.8:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.77-GTNH:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.87-GTNH:dev")
compileOnlyApi("curse.maven:cofh-core-69162:2388751")
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.1:api")
compileOnly("com.github.GTNewHorizons:waila:1.8.12:api")
compileOnly("com.github.GTNewHorizons:waila:1.8.13:api")
compileOnly("com.github.GTNewHorizons:Battlegear2:1.4.3:api")
compileOnly("curse.maven:minefactory-reloaded-66672:2366150")
compileOnly("curse.maven:zelda-sword-skills-220540:2384889")
@@ -16,14 +16,14 @@ dependencies {
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
compileOnly("com.github.GTNewHorizons:Mobs-Info:0.5.4-GTNH:dev")
compileOnlyApi("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
compileOnlyApi("com.github.GTNewHorizons:Natura:2.8.8:dev")
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.13-GTNH:dev')
compileOnlyApi("com.github.GTNewHorizons:Natura:2.8.9:dev")
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.15-GTNH:dev')
// For testing scythe crop harvesting
// devOnlyNonPublishable("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:harvestcraft:1.3.2-GTNH:dev")
// devOnlyNonPublishable(deobfCurse("pams-harvest-the-nether-231262:2241397"))
// devOnlyNonPublishable("com.github.GTNewHorizons:Natura:2.8.8:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:Natura:2.8.9:dev")
// devOnlyNonPublishable("com.github.GTNewHorizons:EnderCore:0.4.8")
}
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.42'
}
@@ -26,7 +26,7 @@ public abstract class AbstractTab extends GuiButton {
if (this.visible) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int yTexPos = this.enabled ? 3 : 32;
int yTexPos = this.enabled ? 2 : 32;
int ySize = this.enabled ? 25 : 32;
int xOffset = this.id == 2 ? 0 : 1;
int yPos = this.yPosition + (this.enabled ? 3 : 0);
@@ -200,10 +200,14 @@ public abstract class ProjectileWeapon extends ToolCore implements IBattlegearWe
// use up ammo
if (!player.capabilities.isCreativeMode && !world.isRemote) {
if (ammo.getItem() instanceof IAmmo) {
// if we're dealing with tinkers ammo, handle their custom logic
if (ammo.hasTagCompound()) {
int ammoReinforced = ammo.getTagCompound().getCompoundTag("InfiTool").getInteger("Unbreaking");
if (random.nextInt(10) < 10 - ammoReinforced) ((IAmmo) ammo.getItem()).consumeAmmo(1, ammo);
} else player.inventory.consumeInventoryItem(ammo.getItem());
} else {
// for non-custom IAmmo types (like vanilla arrows), simply consume them like in vanilla
player.inventory.consumeInventoryItem(ammo.getItem());
}
}
@@ -95,11 +95,20 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
? sidedIvn.getAccessibleSlotsFromSide(dir.getOpposite().ordinal()).length
: inv.getSizeInventory();
if (tile instanceof TileEntityChest) {
checkForChest(world, xPos, yPos, zPos, 1, 0);
checkForChest(world, xPos, yPos, zPos, -1, 0);
checkForChest(world, xPos, yPos, zPos, 0, 1);
checkForChest(world, xPos, yPos, zPos, 0, -1);
if (tile instanceof TileEntityChest tileChest) {
if (tileChest.adjacentChestZPos != null) {
doubleChest = new WeakReference<>(tileChest.adjacentChestZPos);
doubleFirst = false;
} else if (tileChest.adjacentChestZNeg != null) {
doubleChest = new WeakReference<>(tileChest.adjacentChestZNeg);
doubleFirst = true;
} else if (tileChest.adjacentChestXPos != null) {
doubleChest = new WeakReference<>(tileChest.adjacentChestXPos);
doubleFirst = false;
} else if (tileChest.adjacentChestXNeg != null) {
doubleChest = new WeakReference<>(tileChest.adjacentChestXNeg);
doubleFirst = true;
}
}
slotCount = chestSize * (doubleChest != null ? 2 : 1);
invRows = (int) Math.ceil((double) slotCount / invColumns);
@@ -113,14 +122,6 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
return PHConstruct.craftingStationBlacklist.contains(clazz.getName());
}
void checkForChest(World world, int x, int y, int z, int dx, int dz) {
TileEntity tile = world.getTileEntity(x + dx, y, z + dz);
if (tile instanceof TileEntityChest) {
doubleChest = new WeakReference<>((IInventory) tile);
doubleFirst = dx + dz < 0;
}
}
public boolean isDoubleChest() {
return this.doubleChest != null;
}