Skip to content

Commit 80e4f6f

Browse files
committed
Fix server crash
1 parent 6051295 commit 80e4f6f

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

merged.patch

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22330,15 +22330,17 @@
2233022330
}
2233122331

2233222332
public ItemStack(Item var1, int var2) {
22333-
@@ -27,26 +34,73 @@
22333+
@@ -27,26 +34,75 @@
2233422334
}
2233522335

2233622336
public ItemStack(int var1, int var2) {
2233722337
- this.stackSize = 0;
2233822338
this.itemID = var1;
2233922339
this.stackSize = var2;
2234022340
+// this.checkMissing();
22341-
+ this.itemDmg = Item.itemsList[var1].startingDamage;
22341+
+ if (Item.itemsList[var1] != null) {
22342+
+ this.itemDmg = Item.itemsList[var1].startingDamage;
22343+
+ }
2234222344
}
2234322345

2234422346
public ItemStack(int var1, int var2, int var3) {
@@ -22348,7 +22350,7 @@
2234822350
this.itemDmg = var3;
2234922351
+// this.checkMissing();
2235022352
+
22351-
+ if (this.itemDmg < 0) {
22353+
+ if (this.itemDmg < 0 && Item.itemsList[var1] != null) {
2235222354
+ this.itemDmg = Item.itemsList[var1].startingDamage;
2235322355
+ }
2235422356
+ }
@@ -22408,7 +22410,7 @@
2240822410
}
2240922411

2241022412
public Item getItem() {
22411-
@@ -57,8 +111,8 @@
22413+
@@ -57,8 +113,8 @@
2241222414
return this.getItem().getIconIndex(this);
2241322415
}
2241422416

@@ -22419,7 +22421,7 @@
2241922421
}
2242022422

2242122423
public float getStrVsBlock(Block var1) {
22422-
@@ -70,16 +124,27 @@
22424+
@@ -70,16 +126,27 @@
2242322425
}
2242422426

2242522427
public NBTTagCompound writeToNBT(NBTTagCompound var1) {
@@ -22448,7 +22450,7 @@
2244822450
}
2244922451

2245022452
public int getMaxStackSize() {
22451-
@@ -127,6 +192,75 @@
22453+
@@ -127,6 +194,75 @@
2245222454
}
2245322455

2245422456
public ItemStack copy() {

0 commit comments

Comments
 (0)