DiddiZ/LogBlock — Issue #96: itemData datatype (byte) is too small causing wrong data in Database
Author: bhelm
Created: 2012-03-08 08:34:47+00:00
State: open

for chest logging the "itemData" datatype for holding the item's data value is byte, which is too small to handle short-sized datavalues of magic potions (and others) correctly.

Steps to reproduce:
if i place a potion of "Strength_(8.00)" (Itemid 373, datavalue 8265) into a chest, it gets stored with data value 73 into the Database. 8265%128 = 73. The highest data value currently is 16385 for the potion of "Regeneration_(0:33)".

src/de/diddiz/LogBlock/ChestAccess.java:6: final byte itemData;
the database field is unsigned tinyint, which is also too small.