Skip to content

Commit

Permalink
Pincers can take things from GT6 Chests now
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoriusT committed Sep 29, 2023
1 parent 552d2fa commit 4273f99
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Nothing (I tend to only add finished Stuff to the Changelog).
[CHANGED] Pickaxes now have the same Attack Damage Stats as the Axe, but they give twice the Invulnerability Frames to the opponent.
[CHANGED] Autosmelt on Tools works to make Charcoal again, even if the Charcoal Recipes do not exist in the Furnace.
[CHANGED] The GT6 Compasses that point to Coordinates will now jiggle the needle when you get really close to their target Coordinates.
[ADDED] Rightclicking a GT6 Chest with Pincers will pull its content into your Inventory, prioritizing stackable Items first. This should greatly help with sorting through the contents of Loot Chests you opened at your Base, like a sane person would do.
[ADDED] Fireleaf which is Steeleaf but converted with Fiery Blood or Fiery Tears. It has Fortune III and Auto-Collect along with some other Stuff.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,42 @@ public void onTickResetChecks(long aTimer, boolean aIsServerSide) {
@Override
public long onToolClick(String aTool, long aRemainingDurability, long aQuality, Entity aPlayer, List<String> aChatReturn, IInventory aPlayerInventory, boolean aSneaking, ItemStack aStack, byte aSide, float aHitX, float aHitY, float aHitZ) {
if (isClientSide()) return 0;
if (aTool.equals(TOOL_wrench)) {byte aTargetSide = UT.Code.getSideWrenching(aSide, aHitX, aHitY, aHitZ); if (aTargetSide > 1) {mFacing = aTargetSide; updateClientData(); causeBlockUpdate(); return 10000;}}
if (aTool.equals(TOOL_wrench)) {
byte aTargetSide = UT.Code.getSideWrenching(aSide, aHitX, aHitY, aHitZ);
if (aTargetSide > 1) {
mFacing = aTargetSide;
updateClientData();
causeBlockUpdate();
return 10000;
}
}
if (aTool.equals(TOOL_pincers) && aPlayerInventory != null) {
long rCount = 0;
for (int i = 0; i < invsize(); i++) if (slotHas(i)) {
if (aPlayer instanceof EntityPlayer) UT.Inventories.checkAchievements((EntityPlayer)aPlayer, slot(i));
for (int j = 0; j < aPlayerInventory.getSizeInventory(); j++) {
if (ST.equal(slot(i), aPlayerInventory.getStackInSlot(j))) {
rCount += ST.move(this, aPlayerInventory, i, j);
if (!slotHas(i)) break;
}
}
}
for (int i = 0; i < invsize(); i++) if (ST.maxsize(slot(i)) > 1) {
for (int j = 9; j < aPlayerInventory.getSizeInventory(); j++) {
rCount += ST.move(this, aPlayerInventory, i, j);
if (!slotHas(i)) break;
}
}
for (int i = 0; i < invsize(); i++) if (slotHas(i)) {
for (int j = 9; j < aPlayerInventory.getSizeInventory(); j++) {
rCount += ST.move(this, aPlayerInventory, i, j);
if (!slotHas(i)) break;
}
}
if (rCount > 0) UT.Sounds.send(SFX.MC_COLLECT, this);
ST.update(aPlayer);
return rCount;
}
return 0;
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/gregapi/util/ST.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,12 @@ public static void checkAvailabilities() {
public static ItemStack meta (ItemStack aStack, long aMeta) {return aStack == null ? null : meta_(aStack, aMeta);}
public static ItemStack meta_(ItemStack aStack, long aMeta) {Items.feather.setDamage(aStack, (short)aMeta); return aStack;}

public static byte size (ItemStack aStack) {return aStack == null || item_(aStack) == null || aStack.stackSize < 0 ? 0 : UT.Code.bindByte(aStack.stackSize);}
public static byte size (ItemStack aStack) {return aStack == null || item_(aStack) == null || aStack.stackSize < 0 ? 0 : UT.Code.bindByte(aStack.stackSize);}
public static ItemStack size (long aSize, ItemStack aStack) {return aStack == null || item_(aStack) == null ? null : size_(aSize, aStack);}
public static ItemStack size_(long aSize, ItemStack aStack) {aStack.stackSize = (int)aSize; return aStack;}

public static byte maxsize(ItemStack aStack) {return (byte)(aStack == null || item_(aStack) == null ? 64 : item_(aStack).getItemStackLimit(aStack));}

public static ItemStack copy (ItemStack aStack) {return aStack == null || item_(aStack) == null ? null : copy_(aStack);}
public static ItemStack copy_(ItemStack aStack) {return aStack.copy();}

Expand Down
7 changes: 5 additions & 2 deletions src/main/java/gregtech/loaders/b/Loader_Books.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,11 @@ public void run() {
, "Aurora Tower¶===================¶The Snow Queen Trophy you get can be used to produce CU through a Magic Field Absorber. She drops a Tri-Bow or a Seeker-Bow, both of which are fun Weapons."
, "Troll Caves¶===================¶... Greg writes this Book as they play Twilight Forest again themselves, and did not complete this part yet."
, "Troll Caves¶===================¶..."
, "Cloud Giants¶===================¶... Greg writes this Book as they play Twilight Forest again themselves, and did not complete this part yet."
, "Cloud Giants¶===================¶..."
, "Cloud Giants¶===================¶Far above the Highlands floats a Cloud. Use the Magical Beans from the Troll Caves on the Uberous Soil beneath that Cloud to spawn a huge Bean Stalk to get up there comfortably. Could also just pillar up though."
, "Cloud Giants¶===================¶Up on the big walkable Cloud you will find a giant Oak Tree and a giant small Hut, where at least two Giants live, who will respawn in that Hut every once in a while. Ranged Weapons are advisable against them."
, "Cloud Giants¶===================¶The entire Area may seem like everything is moving slower or laggier, but this is just an optical Illusion, everything still moves at normal speed. The Giants only seem slow because their movement didn't scale up."
, "Cloud Giants¶===================¶You can get a Giant Sword or a Giant Pickaxe from defeating a Giant. The Pickaxe can be used to mine any of the giant Blocks, such as the giant Leaves, giant Logs, giant Obsidian and ofcourse giant Cobblestone."
, "Cloud Giants¶===================¶It is also possible to use those giant Blocks to craft more Giant Pickaxes and Giant Swords. Also the Boxinator is capable of merging 64 Blocks into one of the giant Blocks using the Giant Pickaxe as free catalyst."
, "Troll Vault¶===================¶The giant Cube of Obsidian contains the Lamp of Cinders and vanilla Endgame Loot such as Ancient Debris and Wither Skeleton Skulls. At this Version of Minecraft it's the final worthwhile Loot of Twilight Forest."
, "Thorn Castle¶===================¶With the Lamp of Cinders you can either burn the Thorns or use it as an infinite Lighter. The Castle itself is unfinished, so there is not much to do there. There might be Ancient Debris below the Castle."
});
Expand Down

0 comments on commit 4273f99

Please sign in to comment.