misc fixes
This commit is contained in:
parent
cfcb590574
commit
00ac4146bc
8 changed files with 119 additions and 116 deletions
|
@ -581,7 +581,7 @@ public class Client implements IThreadListener {
|
||||||
@Variable(name = "chunk_build_time", category = CVarCategory.RENDER, min = 1, max = 100, display = "Zeit für Chunk-Bau", unit = "ms")
|
@Variable(name = "chunk_build_time", category = CVarCategory.RENDER, min = 1, max = 100, display = "Zeit für Chunk-Bau", unit = "ms")
|
||||||
public int maxBuildTime = 8;
|
public int maxBuildTime = 8;
|
||||||
@Variable(name = "chunk_light_updates", category = CVarCategory.RENDER, min = 0, max = 10000, display = "Licht-Updates / Frame")
|
@Variable(name = "chunk_light_updates", category = CVarCategory.RENDER, min = 0, max = 10000, display = "Licht-Updates / Frame")
|
||||||
private int lightUpdates = 150;
|
private int lightUpdates = 300;
|
||||||
@Variable(name = "chunk_light_range", category = CVarCategory.RENDER, min = 5, max = 512, display = "Radius Licht-Updates")
|
@Variable(name = "chunk_light_range", category = CVarCategory.RENDER, min = 5, max = 512, display = "Radius Licht-Updates")
|
||||||
private int lightRange = 32;
|
private int lightRange = 32;
|
||||||
@Variable(name = "draw_fov", category = CVarCategory.RENDER, min = 20.0f, max = 160.0f, display = "Sichtfeld (FOV)", unit = "°", precision = 1)
|
@Variable(name = "draw_fov", category = CVarCategory.RENDER, min = 20.0f, max = 160.0f, display = "Sichtfeld (FOV)", unit = "°", precision = 1)
|
||||||
|
@ -610,6 +610,8 @@ public class Client implements IThreadListener {
|
||||||
private int scaleVar = 1;
|
private int scaleVar = 1;
|
||||||
@Variable(name = "gui_scale_items", category = CVarCategory.GUI, display = "Gegenstände vergrößern", callback = ItemRedrawFunction.class)
|
@Variable(name = "gui_scale_items", category = CVarCategory.GUI, display = "Gegenstände vergrößern", callback = ItemRedrawFunction.class)
|
||||||
public boolean scaleItems = true;
|
public boolean scaleItems = true;
|
||||||
|
@Variable(name = "gui_scale_items_always", category = CVarCategory.GUI, display = "Immer vergrößern", callback = ItemRedrawFunction.class)
|
||||||
|
public boolean scaleItemsAlways = false;
|
||||||
@Variable(name = "gui_scale_hotbar", category = CVarCategory.GUI, display = "Leiste vergrößern")
|
@Variable(name = "gui_scale_hotbar", category = CVarCategory.GUI, display = "Leiste vergrößern")
|
||||||
public boolean scaleHotbar = true;
|
public boolean scaleHotbar = true;
|
||||||
@Variable(name = "hud_margin", category = CVarCategory.GUI, min = 0, max = 120, unit = "px", display = "Seitenabstand der HUD")
|
@Variable(name = "hud_margin", category = CVarCategory.GUI, min = 0, max = 120, unit = "px", display = "Seitenabstand der HUD")
|
||||||
|
@ -2512,6 +2514,7 @@ public class Client implements IThreadListener {
|
||||||
PerfSection.TICK.enter();
|
PerfSection.TICK.enter();
|
||||||
this.doTicks();
|
this.doTicks();
|
||||||
PerfSection.UPDATE.enter();
|
PerfSection.UPDATE.enter();
|
||||||
|
this.update();
|
||||||
PerfSection.RENDER.enter();
|
PerfSection.RENDER.enter();
|
||||||
this.render();
|
this.render();
|
||||||
PerfSection.GUI.enter();
|
PerfSection.GUI.enter();
|
||||||
|
@ -2700,7 +2703,9 @@ public class Client implements IThreadListener {
|
||||||
this.tickFraction = ((double)this.tick_torun) / 1000000.0;
|
this.tickFraction = ((double)this.tick_torun) / 1000000.0;
|
||||||
this.tick_ttime += this.tick_ftime;
|
this.tick_ttime += this.tick_ftime;
|
||||||
this.tick_time = this.tickFrame != 0 ? (this.tick_ftime / (long)this.tickFrame) : 0L;
|
this.tick_time = this.tickFrame != 0 ? (this.tick_ftime / (long)this.tickFrame) : 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void update() {
|
||||||
if(this.player != null) {
|
if(this.player != null) {
|
||||||
int radius = Math.min(this.renderDistance * 16, this.lightRange);
|
int radius = Math.min(this.renderDistance * 16, this.lightRange);
|
||||||
for(int n = 0; n < this.lightUpdates; n++) {
|
for(int n = 0; n < this.lightUpdates; n++) {
|
||||||
|
|
|
@ -97,6 +97,7 @@ public abstract class GuiContainer extends Gui
|
||||||
private Label cheatLabel;
|
private Label cheatLabel;
|
||||||
private Field cheatSearch;
|
private Field cheatSearch;
|
||||||
private String cheatLast;
|
private String cheatLast;
|
||||||
|
private Label inventoryLabel;
|
||||||
|
|
||||||
public static String formatAmount(int amount) {
|
public static String formatAmount(int amount) {
|
||||||
if(amount < 0)
|
if(amount < 0)
|
||||||
|
@ -260,21 +261,22 @@ public abstract class GuiContainer extends Gui
|
||||||
{
|
{
|
||||||
this.inventorySlots = container;
|
this.inventorySlots = container;
|
||||||
this.ignoreMouseUp = true;
|
this.ignoreMouseUp = true;
|
||||||
this.xSize = (container.getInventoryOffsetX() - 1) * 2 + 18 * 12;
|
this.xSize = (container.getInventoryOffsetX() - 1) * 2 + 18 * Container.INVENTORY_WIDTH;
|
||||||
this.ySize = container.getInventoryOffsetY() + 6 + 18 * ((Equipment.INVENTORY_SLOTS + 11) / 12);
|
this.ySize = container.getInventoryOffsetY() + 26 + 18 * ((Equipment.INVENTORY_SLOTS + Container.INVENTORY_WIDTH - 1) / Container.INVENTORY_WIDTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(int width, int height) {
|
public void init(int width, int height) {
|
||||||
this.itemRender = this.gm.getRenderItem();
|
this.itemRender = this.gm.getRenderItem();
|
||||||
this.tooltip = null;
|
this.tooltip = null;
|
||||||
this.cheatStack = null;
|
this.cheatStack = null;
|
||||||
this.container_scale = this.gm.scaleItems && this.xSize * 2 <= Client.MIN_WIDTH && this.ySize * 2 <= Client.MIN_HEIGHT ? 2 : 1;
|
this.container_scale = this.gm.scaleItems && (this.gm.scaleItemsAlways || (this.xSize * 2 <= Client.MIN_WIDTH && this.ySize * 2 <= Client.MIN_HEIGHT)) ? 2 : 1;
|
||||||
this.container_x = (width - (this.container_w = (this.xSize * this.container_scale))) / 2;
|
this.container_x = (width - (this.container_w = (this.xSize * this.container_scale))) / 2;
|
||||||
this.container_y = (height - (this.container_h = (this.ySize * this.container_scale))) / 2;
|
this.container_y = (height - (this.container_h = (this.ySize * this.container_scale))) / 2;
|
||||||
this.initGui();
|
this.initGui();
|
||||||
this.addButtons();
|
this.addButtons();
|
||||||
this.addElements();
|
this.addElements();
|
||||||
this.label("Inventar", this.inventorySlots.getInventoryOffsetX(), this.inventorySlots.getInventoryOffsetY() - 2);
|
this.label("Inventar", this.inventorySlots.getInventoryOffsetX(), this.inventorySlots.getInventoryOffsetY() - 2);
|
||||||
|
this.inventoryLabel = this.label("", this.inventorySlots.getInventoryOffsetX() + 18 * Container.INVENTORY_WIDTH - 90, this.inventorySlots.getInventoryOffsetY() - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hover(String text, int x, int y) {
|
public void hover(String text, int x, int y) {
|
||||||
|
@ -767,14 +769,18 @@ public abstract class GuiContainer extends Gui
|
||||||
|
|
||||||
public void updateScreen()
|
public void updateScreen()
|
||||||
{
|
{
|
||||||
if (this.gm != null && this.gm.player != null && (!this.gm.player.isEntityAlive() || this.gm.player.dead))
|
if(this.gm != null && this.gm.player != null && (!this.gm.player.isEntityAlive() || this.gm.player.dead)) {
|
||||||
{
|
|
||||||
this.gm.show(null);
|
this.gm.show(null);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if(this.gm.itemCheat && !this.cheatSearch.getText().equals(this.cheatLast)) {
|
|
||||||
|
if(this.gm.itemCheat && !this.cheatSearch.getText().equals(this.cheatLast)) {
|
||||||
this.cheatLast = this.cheatSearch.getText();
|
this.cheatLast = this.cheatSearch.getText();
|
||||||
this.setCurrentTab(selectedTab);
|
this.setCurrentTab(selectedTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.gm != null && this.gm.player != null)
|
||||||
|
this.inventoryLabel.setText((this.gm.player.getInventoryWeight() > this.gm.player.getInventoryCapacity() ? Color.RED : Color.NEON) + String.format("% 5d / % 5d", this.gm.player.getInventoryWeight(), this.gm.player.getInventoryCapacity()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderItemOverlayIntoGUI(ItemStack stack, int xPosition, int yPosition, String text)
|
public void renderItemOverlayIntoGUI(ItemStack stack, int xPosition, int yPosition, String text)
|
||||||
|
|
|
@ -77,6 +77,7 @@ public class GuiStyle extends GuiOptions {
|
||||||
this.addSelector("gui_font", H_SHIFT, y, 0, 0);
|
this.addSelector("gui_font", H_SHIFT, y, 0, 0);
|
||||||
|
|
||||||
this.addSelector("gui_scale_items", 0, y += BASE_SHIFT, 0, 0);
|
this.addSelector("gui_scale_items", 0, y += BASE_SHIFT, 0, 0);
|
||||||
|
this.addSelector("gui_scale_items_always", H_SHIFT, y, 0, 0);
|
||||||
|
|
||||||
super.init(width, height);
|
super.init(width, height);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2484,7 +2484,7 @@ public abstract class EntityNPC extends EntityLiving implements IInventory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHotbarSize() {
|
public final int getHotbarSize() {
|
||||||
return Equipment.INVENTORY_SLOTS;
|
return Equipment.INVENTORY_SLOTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2760,6 +2760,16 @@ public abstract class EntityNPC extends EntityLiving implements IInventory
|
||||||
public int getInventoryCapacity() {
|
public int getInventoryCapacity() {
|
||||||
return 36;
|
return 36;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getInventoryWeight() {
|
||||||
|
int total = 0;
|
||||||
|
for(int z = 0; z < Equipment.INVENTORY_SLOTS; z++) {
|
||||||
|
ItemStack stack = this.getInventory()[z];
|
||||||
|
if(stack != null)
|
||||||
|
total += stack.getSize() * stack.getItem().getWeight();
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean hasArmorSlot(Equipment slot) {
|
public boolean hasArmorSlot(Equipment slot) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -8,11 +8,14 @@ import common.collect.Sets;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
|
import common.item.material.ItemArmor;
|
||||||
import common.network.IPlayer;
|
import common.network.IPlayer;
|
||||||
import common.util.Equipment;
|
import common.util.Equipment;
|
||||||
|
|
||||||
public abstract class Container
|
public abstract class Container
|
||||||
{
|
{
|
||||||
|
public static final int INVENTORY_WIDTH = 16;
|
||||||
|
|
||||||
public List<ItemStack> inventoryItemStacks = Lists.<ItemStack>newArrayList();
|
public List<ItemStack> inventoryItemStacks = Lists.<ItemStack>newArrayList();
|
||||||
public List<Slot> inventorySlots = Lists.<Slot>newArrayList();
|
public List<Slot> inventorySlots = Lists.<Slot>newArrayList();
|
||||||
public int windowId;
|
public int windowId;
|
||||||
|
@ -33,13 +36,33 @@ public abstract class Container
|
||||||
return this.offset;
|
return this.offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addPlayerSlots(EntityNPC player) {
|
protected void addPlayerSlots(final EntityNPC player) {
|
||||||
this.offset = this.inventorySlots.size();
|
|
||||||
int x = this.getInventoryOffsetX();
|
int x = this.getInventoryOffsetX();
|
||||||
int y = this.getInventoryOffsetY();
|
int y = this.getInventoryOffsetY();
|
||||||
|
for(Equipment slot : Equipment.ARMOR) {
|
||||||
|
final Equipment type = slot;
|
||||||
|
this.addSlotToContainer(new Slot(player, Equipment.INVENTORY_SLOTS + slot.getIndex(), x + slot.getIndex() * 18, y) {
|
||||||
|
public boolean canStackItems() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isItemValid(ItemStack stack) {
|
||||||
|
return stack != null && stack.getItem() instanceof ItemArmor armor && armor.getArmorType().canUseInSlot(player, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTexture() {
|
||||||
|
return type.isRing() ? "ring" : type.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canDraw() {
|
||||||
|
return player.hasArmorSlot(type);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.offset = this.inventorySlots.size();
|
||||||
List<SlotCommon> list = Lists.newArrayList();
|
List<SlotCommon> list = Lists.newArrayList();
|
||||||
for(int z = 0; z < Equipment.INVENTORY_SLOTS; ++z) {
|
for(int z = 0; z < Equipment.INVENTORY_SLOTS; ++z) {
|
||||||
this.addSlotToContainer(new SlotCommon(list, player, z, x + (z % 12) * 18, y + (z / 12) * 18));
|
this.addSlotToContainer(new SlotCommon(list, player, z, x + (z % INVENTORY_WIDTH) * 18, y + 20 + (z / INVENTORY_WIDTH) * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ContainerChest extends Container
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getInventoryOffsetX() {
|
public int getInventoryOffsetX() {
|
||||||
return 8 + (this.width < 12 ? 0 : (this.width - 12) * 18 / 2);
|
return 8 + (this.width < INVENTORY_WIDTH ? 0 : (this.width - INVENTORY_WIDTH) * 18 / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getInventoryOffsetY() {
|
public int getInventoryOffsetY() {
|
||||||
|
|
|
@ -1,129 +1,87 @@
|
||||||
package common.inventory;
|
package common.inventory;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import common.collect.Lists;
|
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.item.material.ItemArmor;
|
import common.item.material.ItemArmor;
|
||||||
import common.util.Equipment;
|
import common.util.Equipment;
|
||||||
|
|
||||||
public class ContainerPlayer extends Container {
|
public class ContainerPlayer extends Container {
|
||||||
private final EntityNPC thePlayer;
|
public ContainerPlayer(EntityNPC player) {
|
||||||
|
this.addPlayerSlots(player);
|
||||||
public ContainerPlayer(EntityNPC player)
|
|
||||||
{
|
|
||||||
this.thePlayer = player;
|
|
||||||
|
|
||||||
for (Equipment slot : Equipment.ARMOR)
|
|
||||||
{
|
|
||||||
final Equipment type = slot;
|
|
||||||
this.addSlotToContainer(new Slot(player, Equipment.INVENTORY_SLOTS + slot.getIndex(), 8 + (slot.getIndex() / 4) * 18, 8 + (slot.getIndex() % 4) * 18)
|
|
||||||
{
|
|
||||||
public boolean canStackItems()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
public boolean isItemValid(ItemStack stack)
|
|
||||||
{
|
|
||||||
return stack != null && stack.getItem() instanceof ItemArmor armor && armor.getArmorType().canUseInSlot(ContainerPlayer.this.thePlayer, type);
|
|
||||||
}
|
|
||||||
public String getTexture() {
|
|
||||||
return type.isRing() ? "ring" : type.getName();
|
|
||||||
}
|
|
||||||
public boolean canDraw() {
|
|
||||||
return ContainerPlayer.this.thePlayer.hasArmorSlot(type);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.addPlayerSlots(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getInventoryOffsetY() {
|
|
||||||
return 92;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getSingleRecipe(ItemStack stack) {
|
public int getInventoryOffsetY() {
|
||||||
return null;
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getSingleRecipe(ItemStack stack) {
|
||||||
|
return null;
|
||||||
// this.baseCrafting.setInventorySlotContents(0, stack);
|
// this.baseCrafting.setInventorySlotContents(0, stack);
|
||||||
// stack = CraftingRegistry.getMatching(this.baseCrafting);
|
// stack = CraftingRegistry.getMatching(this.baseCrafting);
|
||||||
// this.baseCrafting.setInventorySlotContents(0, null);
|
// this.baseCrafting.setInventorySlotContents(0, null);
|
||||||
// return stack;
|
// return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack craftSingleRecipe(ItemStack stack) {
|
public ItemStack craftSingleRecipe(ItemStack stack) {
|
||||||
// this.baseCrafting.setInventorySlotContents(0, stack);
|
// this.baseCrafting.setInventorySlotContents(0, stack);
|
||||||
// SlotCrafting.handleRemaining(this.baseCrafting, this.thePlayer);
|
// SlotCrafting.handleRemaining(this.baseCrafting, this.thePlayer);
|
||||||
// stack = this.baseCrafting.getStackInSlot(0);
|
// stack = this.baseCrafting.getStackInSlot(0);
|
||||||
// this.baseCrafting.setInventorySlotContents(0, null);
|
// this.baseCrafting.setInventorySlotContents(0, null);
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canInteractWith(EntityNPC playerIn)
|
public boolean canInteractWith(EntityNPC playerIn) {
|
||||||
{
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private int getFreeSlotFor(Equipment type) {
|
|
||||||
for(Equipment slot : type.getPossibleSlots(this.thePlayer)) {
|
|
||||||
if(!this.inventorySlots.get(slot.getIndex()).getHasStack())
|
|
||||||
return slot.getIndex();
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack transferStackInSlot(EntityNPC playerIn, int index)
|
private int getFreeSlotFor(EntityNPC player, Equipment type) {
|
||||||
{
|
for(Equipment slot : type.getPossibleSlots(player)) {
|
||||||
ItemStack itemstack = null;
|
if(!this.inventorySlots.get(slot.getIndex()).getHasStack())
|
||||||
Slot slot = (Slot)this.inventorySlots.get(index);
|
return slot.getIndex();
|
||||||
int idx;
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (slot != null && slot.getHasStack())
|
public ItemStack transferStackInSlot(EntityNPC playerIn, int index) {
|
||||||
{
|
ItemStack itemstack = null;
|
||||||
ItemStack itemstack1 = slot.getStack();
|
Slot slot = this.inventorySlots.get(index);
|
||||||
itemstack = itemstack1.copy();
|
int idx;
|
||||||
|
|
||||||
if (index >= 0 && index < Equipment.ARMOR_SLOTS)
|
if(slot != null && slot.getHasStack()) {
|
||||||
{
|
ItemStack itemstack1 = slot.getStack();
|
||||||
if (!this.mergeItemStack(itemstack1, Equipment.ARMOR_SLOTS, Equipment.ARMOR_SLOTS + Equipment.INVENTORY_SLOTS))
|
itemstack = itemstack1.copy();
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (itemstack.getItem() instanceof ItemArmor armor && (idx = this.getFreeSlotFor(armor.getArmorType())) >= 0)
|
|
||||||
{
|
|
||||||
if (!this.mergeItemStack(itemstack1, idx, idx + 1))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (index >= Equipment.ARMOR_SLOTS && index < Equipment.ARMOR_SLOTS + Equipment.INVENTORY_SLOTS)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else if (!this.mergeItemStack(itemstack1, Equipment.ARMOR_SLOTS, Equipment.ARMOR_SLOTS + Equipment.INVENTORY_SLOTS))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (itemstack1.isEmpty())
|
if(index >= 0 && index < Equipment.ARMOR_SLOTS) {
|
||||||
{
|
if(!this.mergeItemStack(itemstack1, Equipment.ARMOR_SLOTS, Equipment.ARMOR_SLOTS + Equipment.INVENTORY_SLOTS)) {
|
||||||
slot.putStack((ItemStack)null);
|
return null;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else if(itemstack.getItem() instanceof ItemArmor armor && (idx = this.getFreeSlotFor(playerIn, armor.getArmorType())) >= 0) {
|
||||||
slot.onSlotChanged();
|
if(!this.mergeItemStack(itemstack1, idx, idx + 1)) {
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(index >= Equipment.ARMOR_SLOTS && index < Equipment.ARMOR_SLOTS + Equipment.INVENTORY_SLOTS) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else if(!this.mergeItemStack(itemstack1, Equipment.ARMOR_SLOTS, Equipment.ARMOR_SLOTS + Equipment.INVENTORY_SLOTS)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (itemstack1.getSize() == itemstack.getSize())
|
if(itemstack1.isEmpty()) {
|
||||||
{
|
slot.putStack((ItemStack)null);
|
||||||
return null;
|
}
|
||||||
}
|
else {
|
||||||
|
slot.onSlotChanged();
|
||||||
|
}
|
||||||
|
|
||||||
slot.onPickupFromSlot(playerIn, itemstack1);
|
if(itemstack1.getSize() == itemstack.getSize()) {
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return itemstack;
|
slot.onPickupFromSlot(playerIn, itemstack1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return itemstack;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public enum Equipment implements Identifyable, Displayable {
|
||||||
|
|
||||||
HORSE_ARMOR("horse_armor", "Pferderüstung", EntityHorse.class, 8, 0);
|
HORSE_ARMOR("horse_armor", "Pferderüstung", EntityHorse.class, 8, 0);
|
||||||
|
|
||||||
public static final int INVENTORY_SLOTS = 64;
|
public static final int INVENTORY_SLOTS = 256;
|
||||||
public static final int ARMOR_SLOTS;
|
public static final int ARMOR_SLOTS;
|
||||||
public static final Equipment[] ARMOR;
|
public static final Equipment[] ARMOR;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue