net.minecraftforge.items.wrapper.PlayerMainInvWrapper Java Examples

The following examples show how to use net.minecraftforge.items.wrapper.PlayerMainInvWrapper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ModularUI.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Builder bindPlayerInventory(InventoryPlayer inventoryPlayer, TextureArea imageLocation, int x, int y) {
    for (int row = 0; row < 3; row++) {
        for (int col = 0; col < 9; col++) {
            this.widget(new SlotWidget(new PlayerMainInvWrapper(inventoryPlayer), col + (row + 1) * 9, x + col * 18, y + row * 18)
                .setBackgroundTexture(imageLocation)
                .setLocationInfo(true, false));
        }
    }
    return bindPlayerHotbar(inventoryPlayer, imageLocation, x, y + 58);
}
 
Example #2
Source File: ModularUI.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Builder bindPlayerHotbar(InventoryPlayer inventoryPlayer, TextureArea imageLocation, int x, int y) {
    for (int slot = 0; slot < 9; slot++) {
        this.widget(new SlotWidget(new PlayerMainInvWrapper(inventoryPlayer), slot, x + slot * 18, y)
            .setBackgroundTexture(imageLocation)
            .setLocationInfo(true, true));
    }
    return this;
}