add explosive items
This commit is contained in:
parent
ad83255833
commit
32d6f15c4a
30 changed files with 188 additions and 444 deletions
|
@ -116,6 +116,7 @@ import common.util.IntHashMap;
|
|||
import common.util.PortalType;
|
||||
import common.util.Position;
|
||||
import common.util.Color;
|
||||
import common.util.Equipment;
|
||||
import common.util.Vec3i;
|
||||
import common.util.WorldPos;
|
||||
import common.vars.Vars;
|
||||
|
@ -1958,7 +1959,7 @@ public class Player extends User implements Executor, IPlayer
|
|||
if(msg.length() > 30)
|
||||
throw new IllegalArgumentException("Ungültiger Name");
|
||||
if(packetIn.getArg() == -1)
|
||||
this.entity.inventoryContainer.renameItem(36 + this.entity.getSelectedIndex(), msg);
|
||||
this.entity.inventoryContainer.renameItem(5 + Equipment.ARMOR_SLOTS + 27 + this.entity.getSelectedIndex(), msg);
|
||||
else
|
||||
this.entity.openContainer.renameItem(packetIn.getArg(), msg);
|
||||
this.entity.openContainer.detectAndSendChanges();
|
||||
|
@ -2898,7 +2899,7 @@ public class Player extends User implements Executor, IPlayer
|
|||
this.entity.dropItem(stack, false, true);
|
||||
}
|
||||
else {
|
||||
Slot slot = packet.getSlot() < 0 ? this.entity.inventoryContainer.getSlot(36 + -2 - packet.getSlot()) : this.entity.openContainer.getSlot(packet.getSlot());
|
||||
Slot slot = packet.getSlot() < 0 ? this.entity.inventoryContainer.getSlot(5 + Equipment.ARMOR_SLOTS + 27 + -2 - packet.getSlot()) : this.entity.openContainer.getSlot(packet.getSlot());
|
||||
if(slot == null || !slot.canCheatItem())
|
||||
return;
|
||||
stack.setSize(Math.min(slot.getSlotStackLimit(), stack.getSize()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue