- Joined
- Jul 11, 2020
- Messages
- 0
- Reaction score
- 25
- Points
- 0
Heey, ich habe ein problem mit meinem scaffold und zwar soll es nach blöcken in der Hotbar suchen aber er nimmt nur blöcke die auf dem erstem slot sind an hier meine for schleife die, die blöcke sucht:
[HIDE]
int newSlot = -1;
for(int i = 0; i < 9; i++){
// filter out non-block items
ItemStack stack = Wrapper.getPlayer().inventory.getStackInSlot(i);
if (InventoryUtils.isEmptySlot(stack) || !(stack.getItem() instanceof ItemBlock))
continue;
// filter out non-solid blocks
if (!Block.getBlockFromItem(stack.getItem()).isFullBlock())
continue;
newSlot = i;
break;
}
[/HIDE]
Danke schonmal im vorraus
MFG GNMoDz
//EDIT THREAD BY FANTACOKE: Removed not allowed Tags and rewritten Title.
[HIDE]
int newSlot = -1;
for(int i = 0; i < 9; i++){
// filter out non-block items
ItemStack stack = Wrapper.getPlayer().inventory.getStackInSlot(i);
if (InventoryUtils.isEmptySlot(stack) || !(stack.getItem() instanceof ItemBlock))
continue;
// filter out non-solid blocks
if (!Block.getBlockFromItem(stack.getItem()).isFullBlock())
continue;
newSlot = i;
break;
}
[/HIDE]
Danke schonmal im vorraus
MFG GNMoDz
//EDIT THREAD BY FANTACOKE: Removed not allowed Tags and rewritten Title.