Skip to content

Commit

Permalink
New packet-dupe exploit!
Browse files Browse the repository at this point in the history
Required mod FTBLib and ThermalExpansion satchel
  • Loading branch information
N1nt4nd0 committed Sep 8, 2020
1 parent f922af8 commit 32556b8
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/main/java/forgefuck/team/xenobyte/modules/FTBSatchelDupe.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package forgefuck.team.xenobyte.modules;

import cpw.mods.fml.common.Loader;
import forgefuck.team.xenobyte.api.module.Category;
import forgefuck.team.xenobyte.api.module.CheatModule;
import forgefuck.team.xenobyte.api.module.PerformMode;
import forgefuck.team.xenobyte.api.module.PerformSource;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;

public class FTBSatchelDupe extends CheatModule{

public FTBSatchelDupe() {
super("FTBSatchelDupe", Category.MODS, PerformMode.SINGLE);
}

@Override public void onPerform(PerformSource src) {
try {
if (Class.forName("cofh.thermalexpansion.gui.container.ContainerSatchel").isInstance(utils.player().openContainer)) {
Class.forName("ftb.lib.api.net.MessageLM").getMethod("sendToServer").invoke(Class.forName("ftb.lib.mod.net.MessageClientItemAction").getConstructor(String.class, NBTTagCompound.class).newInstance("", new NBTTagCompound()));
int dropCount = (int) Class.forName("cofh.thermalexpansion.item.ItemSatchel").getMethod("getStorageIndex", ItemStack.class).invoke(null, utils.item());
for(int slot = utils.mySlotsCount(); slot < utils.mySlotsCount() + dropCount * 9; slot++) {
utils.dropSlot(slot, true);
}
utils.player().closeScreen();
}
} catch (Exception e) {}
}

@Override public boolean inGuiPerform() {
return true;
}

@Override public boolean isWorking() {
return Loader.isModLoaded("ThermalExpansion") && Loader.isModLoaded("FTBL");
}

@Override public String moduleDesc() {
return lang.get("Open any ThermalExpansion bag with Items and press keybind of function", "Открыть любую сумку из ThermalExpansion с вещами и нажать кейбинд функции");
}

}

0 comments on commit 32556b8

Please sign in to comment.