Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Why does sandstone change into air when I use ItemStack.setAmount()?
- ItemStack I = null;
- Integer Qty = ToInt(args[2]);
- I = P.getItemInHand().clone();
- I.setAmount(Qty);
- Integer MaxQty = GetAPItem(I.getTypeId()).TransactionMaxQty;
- if (MaxQty==null) { MaxQty=1; }
- if (I.getAmount() > MaxQty) {
- Qty = MaxQty;
- MsgP(P,"ItamStack check before: "+I.getType().name());
- I.setAmount(MaxQty);
- MsgP(P,"ItamStack check after: "+I.getType().name());
- }
Advertisement
Add Comment
Please, Sign In to add comment