/** * Sets the value of this item. * @param value New value * @param updateClient Whether or not to update the client */ public void setValue(Object value, boolean updateClient) { if (VALUE_INDEX == null) { VALUE_INDEX = MinecraftReflection.watcherObjectExists() ? 1 : 2; } modifier.write(VALUE_INDEX, getUnwrapped(value)); if (updateClient) { setDirtyState(true); } }
watch.setDirtyState(false); watch.setDirtyState(false);
getWatchableObject(object.getIndex()).setDirtyState(update);