Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void openChestAndDropSlot(BlockPos pos, int slot,boolean dropstack){
- Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(pos,(double)pos.getY()+0.5D < Minecraft.getMinecraft().thePlayer.posY + 1.7D ? 1:0,Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem(),0.0F,0.0F,0.0F));
- Minecraft.getMinecraft().thePlayer.swingItem();
- new Thread( new Runnable() {
- public void run() {
- try { Thread.sleep( 1000 ); }
- catch (InterruptedException ie) {}
- ContainerChest containerchest = (ContainerChest) (ContainerChest) Minecraft.getMinecraft().thePlayer.openContainer;
- System.out.println(containerchest.getInventory());
- Minecraft.getMinecraft().playerController.windowClick(containerchest.windowId, slot, dropstack?1:0, 4, Minecraft.getMinecraft().thePlayer);
- Minecraft.getMinecraft().thePlayer.closeScreen();
- }
- } ).start();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement